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

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

Some bugsfixes - Yield is disabled.
Added parameters.
Correcte moduleheaders.
Introduced a new base class for virtual lx modules + some elf sketches.

File size: 1.7 KB
Line 
1/* $Id: myldrClose.cpp,v 1.4 1999-11-10 01:45:36 bird Exp $
2 *
3 * myldrClose - _ldrClose
4 *
5 * Copyright (c) 1998-1999 knut st. osmundsen
6 *
7 * Project Odin Software License can be found in LICENSE.TXT
8 *
9 */
10
11/*******************************************************************************
12* Defined Constants And Macros *
13*******************************************************************************/
14#define INCL_DOSERRORS
15#define INCL_NOPMAPI
16
17/*******************************************************************************
18* Header Files *
19*******************************************************************************/
20#include <os2.h>
21
22#include <memory.h>
23#include <stdlib.h>
24
25#include "log.h"
26#include <peexe.h>
27#include <exe386.h>
28#include "OS2Krnl.h"
29#include "avl.h"
30#include "ModuleBase.h"
31#include "ldr.h"
32#include "ldrCalls.h"
33
34
35/**
36 * Close a file.
37 * @returns NO_ERROR on success?
38 * error code on error?
39 * @param hFile Handle to file which is to be closed.
40 */
41ULONG LDRCALL myldrClose(SFN hFile)
42{
43 int rc;
44
45 /* closes handle */
46 kprintf(("_ldrClose: hFile = %.4x\n", hFile));
47 if (GetState(hFile) == HSTATE_OUR)
48 {
49 #ifdef DEBUG
50 PMODULE pMod = getModuleBySFN(hFile);
51 if (pMod != NULL)
52 pMod->Data.pModule->dumpVirtualLxFile();
53 else
54 kprintf(("_ldrClose: getModuleBySFN failed!!!"));
55 #endif
56
57 rc = removeModule(hFile);
58 if (rc != NO_ERROR)
59 kprintf(("_ldrClose: removeModule retured rc=%d\n", rc));
60
61 SetState(hFile, HSTATE_UNUSED);
62 }
63
64 return _ldrClose(hFile);
65}
Note: See TracBrowser for help on using the repository browser.