|
Last change
on this file since 1663 was 1467, checked in by bird, 26 years ago |
|
Corrections to make win32k work.
(And now it does work, at least at my test machine...)
|
|
File size:
1.4 KB
|
| Line | |
|---|
| 1 | /* $Id: myldrClose.cpp,v 1.3 1999-10-27 02:02:58 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 <memory.h>
|
|---|
| 21 | #include <stdlib.h>
|
|---|
| 22 |
|
|---|
| 23 | #include "log.h"
|
|---|
| 24 | #include <peexe.h>
|
|---|
| 25 | #include <exe386.h>
|
|---|
| 26 | #include "OS2Krnl.h"
|
|---|
| 27 | #include "pe2lx.h"
|
|---|
| 28 | #include "avl.h"
|
|---|
| 29 | #include "ldr.h"
|
|---|
| 30 | #include "ldrCalls.h"
|
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 | /**
|
|---|
| 34 | * Close a file.
|
|---|
| 35 | * @returns NO_ERROR on success?
|
|---|
| 36 | * error code on error?
|
|---|
| 37 | * @param hFile Handle to file which is to be closed.
|
|---|
| 38 | */
|
|---|
| 39 | ULONG LDRCALL myldrClose(SFN hFile)
|
|---|
| 40 | {
|
|---|
| 41 | int rc;
|
|---|
| 42 |
|
|---|
| 43 | /* closes handle */
|
|---|
| 44 | kprintf(("_ldrClose: hFile = %.4x\n", hFile));
|
|---|
| 45 | if (GetState(hFile) == HSTATE_OUR)
|
|---|
| 46 | {
|
|---|
| 47 | rc = removeModule(hFile);
|
|---|
| 48 | if (rc != NO_ERROR)
|
|---|
| 49 | kprintf(("_ldrClose: removeModule retured rc=%d\n", rc));
|
|---|
| 50 |
|
|---|
| 51 | SetState(hFile, HSTATE_UNUSED);
|
|---|
| 52 | }
|
|---|
| 53 |
|
|---|
| 54 | return _ldrClose(hFile);
|
|---|
| 55 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.