Changeset 7670 for trunk/src/kernel32/winimagepeldr.cpp
- Timestamp:
- Dec 22, 2001, 1:34:06 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/winimagepeldr.cpp
r7660 r7670 1 /* $Id: winimagepeldr.cpp,v 1.9 3 2001-12-20 15:08:56 sandervl Exp $ */1 /* $Id: winimagepeldr.cpp,v 1.94 2001-12-22 12:34:06 sandervl Exp $ */ 2 2 3 3 /* … … 76 76 #endif 77 77 78 ULONG WIN32API MissingApiOrd(char * dllname, int ordinal);79 ULONG WIN32API MissingApiName(char * dllname, char *functionname);78 ULONG WIN32API MissingApiOrd(char *parentimage, char *dllname, int ordinal); 79 ULONG WIN32API MissingApiName(char *parentimage, char *dllname, char *functionname); 80 80 ULONG WIN32API MissingApi(char *message); 81 81 … … 1278 1278 } 1279 1279 //****************************************************************************** 1280 #define MISSINGOFFSET_PUSHORDINAL 1 1281 #define MISSINGOFFSET_PUSHNAME 1 1282 #define MISSINGOFFSET_PUSHDLLNAME 6 1283 #define MISSINGOFFSET_FUNCTION 11 1284 1285 char missingapicode[18] = { 1280 #define MISSINGOFFSET_PUSHNAME 1 1281 #define MISSINGOFFSET_PUSHORDINAL 1 1282 #define MISSINGOFFSET_PUSHDLLNAME 6 1283 #define MISSINGOFFSET_PUSHIMPORTIMAGE 11 1284 #define MISSINGOFFSET_FUNCTION 16 1285 1286 char missingapicode[23] = { 1287 //push ordinal/name 1288 0x68, 0x00, 0x00, 0x00, 0x00, 1286 1289 //push dllname 1287 1290 0x68, 0x00, 0x00, 0x00, 0x00, 1288 //push ordinal/name1291 //push image loading api 1289 1292 0x68, 0x00, 0x00, 0x00, 0x00, 1290 1293 //mov ecx, MissingApiOrd/Name … … 1313 1316 1314 1317 memcpy(code, missingapicode, sizeof(missingapicode)); 1318 *(DWORD *)&code[MISSINGOFFSET_PUSHIMPORTIMAGE] = (DWORD)getModuleName(); 1315 1319 *(DWORD *)&code[MISSINGOFFSET_PUSHDLLNAME] = (DWORD)WinImage->getModuleName(); 1316 1320 *(DWORD *)&code[MISSINGOFFSET_PUSHORDINAL] = ordinal; … … 1340 1344 1341 1345 memcpy(code, missingapicode, sizeof(missingapicode)); 1346 *(DWORD *)&code[MISSINGOFFSET_PUSHIMPORTIMAGE] = (DWORD)getModuleName(); 1342 1347 *(DWORD *)&code[MISSINGOFFSET_PUSHDLLNAME] = (DWORD)WinImage->getModuleName(); 1343 1348 *(DWORD *)&code[MISSINGOFFSET_PUSHNAME] = (DWORD)impname; … … 2027 2032 //****************************************************************************** 2028 2033 //****************************************************************************** 2029 ULONG WIN32API MissingApiOrd(char * dllname, int ordinal)2030 { 2031 char message[ 128];2032 2033 sprintf(message, "The application has called the non-existing api %s->%d ", dllname, ordinal);2034 ULONG WIN32API MissingApiOrd(char *parentimage, char *dllname, int ordinal) 2035 { 2036 char message[256]; 2037 2038 sprintf(message, "The application has called the non-existing api %s->%d (loaded by %s)", dllname, ordinal, parentimage); 2034 2039 return MissingApi(message); 2035 2040 } 2036 2041 //****************************************************************************** 2037 2042 //****************************************************************************** 2038 ULONG WIN32API MissingApiName(char * dllname, char *functionname)2039 { 2040 char message[ 128];2041 2042 sprintf(message, "The application has called the non-existing api %s->%s ", dllname, functionname);2043 ULONG WIN32API MissingApiName(char *parentimage, char *dllname, char *functionname) 2044 { 2045 char message[256]; 2046 2047 sprintf(message, "The application has called the non-existing api %s->%s (loaded by %s)", dllname, functionname, parentimage); 2043 2048 return MissingApi(message); 2044 2049 }
Note:
See TracChangeset
for help on using the changeset viewer.