Changeset 111 for trunk/src/kernel32/KERNEL32.CPP
- Timestamp:
- Jun 17, 1999, 8:22:43 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/KERNEL32.CPP
r105 r111 1 /* $Id: KERNEL32.CPP,v 1. 4 1999-06-12 18:29:37 hughExp $ */1 /* $Id: KERNEL32.CPP,v 1.5 1999-06-17 18:21:36 phaller Exp $ */ 2 2 3 3 /* … … 44 44 45 45 46 /*****************************************************************************47 * Name : BOOL WIN32API CloseHandle48 * Purpose : forward call to Open3249 * Parameters:50 * Variables :51 * Result :52 * Remark : better error checking required53 * Status :54 * Mod : 980618PH: fixed mixed-up handles55 *56 * Author : Patrick Haller [Fri, 1998/06/12 03:44]57 *****************************************************************************/58 59 BOOL WIN32API CloseHandle(HANDLE hObject)60 {61 ULONG rc; /* API returncode */62 HANDLE hOS2; /* 32-bit OS/2 handle */63 64 dprintf(("KERNEL32::CloseHandle(%08xh)\n",65 hObject));66 67 rc = HMHandleTranslateToOS2(hObject, /* translate the handle */68 &hOS2);69 if (rc == NO_ERROR) /* check for errors */70 {71 /* @@@PH 1998/02/12 Handle Manager support */72 if (IS_HM_HANDLE(hOS2))73 rc = HMCloseHandle(hOS2);74 else75 rc=O32_CloseHandle(hOS2);76 77 /* @@@PH we should check rc here */78 HMHandleFree(hObject); /* free 16-bit handle from the translation table */79 80 return (rc); /* OK */81 }82 else83 {84 dprintf(("KERNEL32::CloseHandle(%08xh) HMHandleTranslateToOS2 returned %d\n"85 " trying untranslated handle instead.\n",86 hObject,87 rc));88 /* @@@PH 1998/02/12 Handle Manager support */89 if (IS_HM_HANDLE(hObject))90 rc = HMCloseHandle(hObject);91 else92 rc=O32_CloseHandle(hObject);93 94 return (rc); /* OK */95 }96 97 /* @@@PH SetLastError ? */98 return (FALSE); /* raise error condition */99 }100 101 46 102 47 /***************************************************************************** … … 142 87 143 88 return (hOS2); /* should have the correct error value here */ 89 } 90 91 /***************************************************************************** 92 * Name : BOOL WIN32API CloseHandle 93 * Purpose : forward call to Open32 94 * Parameters: 95 * Variables : 96 * Result : 97 * Remark : 98 * Status : 99 * 100 * Author : Patrick Haller [Fri, 1998/06/12 03:44] 101 *****************************************************************************/ 102 BOOL WIN32API CloseHandle(HANDLE hHandle) 103 { 104 dprintf(("KERNEL32: CloseHandle(%08xh)\n", 105 hHandle)); 106 107 return HMCloseHandle(hHandle); 144 108 } 145 109
Note:
See TracChangeset
for help on using the changeset viewer.