source: trunk/src/win32k/ldr/myldrClose.cpp@ 847

Last change on this file since 847 was 847, checked in by bird, 26 years ago

Initial checkin of Win32k. (not tested & pe2lx not up-to-date!)

File size: 1.5 KB
Line 
1/* $Id: myldrClose.cpp,v 1.1 1999-09-06 02:20:01 bird Exp $
2 *
3 * myldrClose - _ldrClose
4 *
5 * Copyright (c) 1998-1999 knut st. osmundsen
6 *
7 */
8
9/*******************************************************************************
10* Defined Constants And Macros *
11*******************************************************************************/
12#define INCL_DOSERRORS
13#define INCL_NOPMAPI
14
15/*******************************************************************************
16* Header Files *
17*******************************************************************************/
18#include <os2.h>
19
20#include "OS2Krnl.h"
21#include "log.h"
22#if 0
23 #include "lxFile.h"
24#else
25 #define LXFile class { public: BOOL queryIsModuleName(const char *) {return FALSE;}}
26#endif
27#include "ldr.h"
28#include "ldrCalls.h"
29
30
31/**
32 * Close a file.
33 * @returns NO_ERROR on success?
34 * error code on error?
35 * @param hFile Handle to file which is to be closed.
36 */
37ULONG LDRCALL myldrClose(SFN hFile)
38{
39 int rc;
40
41 /* closes handle */
42 kprintf(("_ldrClose: hFile = %.4x\n", hFile));
43 if (GetState(hFile) == HSTATE_CHECK)
44 freeUncertainEntry(hFile);
45 else
46 {
47 if (GetState(hFile) == HSTATE_PE)
48 {
49 rc = deleteNode(hFile);
50 if (rc != NO_ERROR)
51 kprintf(("Funny! deleteNode failed rc = %d\n", rc));
52 }
53 }
54
55 SetState(hFile, HSTATE_UNUSED);
56 return _ldrClose(hFile);
57}
Note: See TracBrowser for help on using the repository browser.