Changeset 21653 for trunk/src/kernel32/initkernel32.cpp
- Timestamp:
- Jun 23, 2011, 4:19:24 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/initkernel32.cpp
r21651 r21653 301 301 if (ulFlag == 0 && rc == 0) 302 302 { 303 static const char msg[] = 304 "Failed to initialize the KERNEL32 library.\n\r" 303 static const char msg1[] = 304 "Failed to initialize the KERNEL32 library while starting \""; 305 306 static const char msg2[] = 307 "\".\n\r" 305 308 "\n\r" 306 309 "It is possible that there is not enough memory in the system to " … … 309 312 "creating a ticket at http://svn.netlabs.org/odin32/.\n\r"; 310 313 314 char msg[sizeof(msg1) + CCHMAXPATH + sizeof(msg2)]; 315 316 strcpy(msg, msg1); 317 318 PPIB ppib; 319 DosGetInfoBlocks(NULL, &ppib); 320 if (DosQueryModuleName(ppib->pib_hmte, CCHMAXPATH, 321 msg + sizeof(msg1) - 1) != NO_ERROR) 322 strcat(msg, "<unknown executable>"); 323 strcat(msg, msg2); 324 311 325 // Initialization has failed. Try to be nice and show an error message 312 326 // to the user. … … 317 331 // available) 318 332 ULONG dummy; 319 DosWrite((HFILE)1, (PVOID) msg, sizeof(msg), &dummy);333 DosWrite((HFILE)1, (PVOID)&msg, strlen(msg), &dummy); 320 334 } 321 335
Note:
See TracChangeset
for help on using the changeset viewer.