Changeset 1844 for trunk/src/kernel32/winimagelx.cpp
- Timestamp:
- Nov 26, 1999, 1:05:20 AM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/winimagelx.cpp
r1131 r1844 1 /* $Id: winimagelx.cpp,v 1. 3 1999-10-04 20:52:33sandervl Exp $ */1 /* $Id: winimagelx.cpp,v 1.4 1999-11-26 00:05:19 sandervl Exp $ */ 2 2 3 3 /* … … 68 68 //****************************************************************************** 69 69 //****************************************************************************** 70 ULONG Win32LxImage::getApi(char *name) 71 { 72 APIRET rc; 73 ULONG apiaddr; 70 74 75 rc = DosQueryProcAddr(hinstance, 0, name, (PFN *)&apiaddr); 76 if(rc) 77 { 78 if(rc == ERROR_INVALID_HANDLE) 79 {//handle invalid for some silly reason, so load module again (initterm entrypoint not called twice) 80 char szErrName[CCHMAXPATH]; 81 82 rc = DosLoadModule(szErrName, sizeof(szErrName), szFileName, &hinstance); 83 if(!rc) 84 rc = DosQueryProcAddr(hinstance, 0, name, (PFN *)&apiaddr); 85 } 86 if(rc) return(0); 87 } 88 return(apiaddr); 89 } 90 //****************************************************************************** 91 //****************************************************************************** 92 ULONG Win32LxImage::getApi(int ordinal) 93 { 94 APIRET rc; 95 ULONG apiaddr; 96 97 rc = DosQueryProcAddr(hinstance, ordinal, NULL, (PFN *)&apiaddr); 98 if(rc) { 99 if(rc == ERROR_INVALID_HANDLE) 100 {//handle invalid for some silly reason, so load module again (initterm entrypoint not called twice) 101 char szErrName[CCHMAXPATH]; 102 103 rc = DosLoadModule(szErrName, sizeof(szErrName), szFileName, &hinstance); 104 if(!rc) 105 rc = DosQueryProcAddr(hinstance, ordinal, NULL, (PFN *)&apiaddr); 106 } 107 if(rc) return(0); 108 } 109 return(apiaddr); 110 } 111 //****************************************************************************** 112 //****************************************************************************** 113
Note:
See TracChangeset
for help on using the changeset viewer.