|
Last change
on this file since 1448 was 1273, checked in by bird, 26 years ago |
|
Pe2Lx rewrite changes in win32k.
Pluss some makefile/depend changes.
|
|
File size:
1.4 KB
|
| Line | |
|---|
| 1 | /* $Id: myldrClose.cpp,v 1.2 1999-10-14 01:25:38 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 "ldr.h"
|
|---|
| 29 | #include "ldrCalls.h"
|
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 | /**
|
|---|
| 33 | * Close a file.
|
|---|
| 34 | * @returns NO_ERROR on success?
|
|---|
| 35 | * error code on error?
|
|---|
| 36 | * @param hFile Handle to file which is to be closed.
|
|---|
| 37 | */
|
|---|
| 38 | ULONG LDRCALL myldrClose(SFN hFile)
|
|---|
| 39 | {
|
|---|
| 40 | int rc;
|
|---|
| 41 |
|
|---|
| 42 | /* closes handle */
|
|---|
| 43 | kprintf(("_ldrClose: hFile = %.4x\n", hFile));
|
|---|
| 44 | if (GetState(hFile) == HSTATE_OUR)
|
|---|
| 45 | {
|
|---|
| 46 | rc = deleteNode(hFile);
|
|---|
| 47 | if (rc != NO_ERROR)
|
|---|
| 48 | kprintf(("Funny! deleteNode failed rc = %d\n", rc));
|
|---|
| 49 |
|
|---|
| 50 | SetState(hFile, HSTATE_UNUSED);
|
|---|
| 51 | }
|
|---|
| 52 |
|
|---|
| 53 | return _ldrClose(hFile);
|
|---|
| 54 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.