Changeset 21916 for trunk/src/kernel32
- Timestamp:
- Dec 18, 2011, 10:28:22 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 21 deleted
- 110 edited
- 11 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 1 bin 2 Makefile.inc 1 env.cmd 2 LocalConfig.kmk
-
-
Property svn:mergeinfo
set to
/branches/gcc-kmk merged eligible
- Property svn:ignore
-
trunk/src/kernel32/FastInfoBlocksa.asm
r9910 r21916 26 26 ;******************************************************************************* 27 27 DATA32 segment use32 dword public 'DATA' 28 _ gpfibLIS dd 029 _ gfpfibLIS dd 030 _ gpfibGIS dd 031 _ gfpfibGIS dd 032 _ gpfibPIB dd 028 __gpfibLIS dd 0 29 __gfpfibLIS dd 0 30 __gpfibGIS dd 0 31 __gfpfibGIS dd 0 32 __gpfibPIB dd 0 33 33 DATA32 ends 34 35 extrn fibDumpAll:near36 34 37 35 … … 39 37 ;* Exported Symbols * 40 38 ;******************************************************************************* 41 public _ gpfibLIS42 public _ gfpfibLIS43 public _ gpfibGIS44 public _ gfpfibGIS45 public _ gpfibPIB46 public fibInit39 public __gpfibLIS 40 public __gfpfibLIS 41 public __gpfibGIS 42 public __gfpfibGIS 43 public __gpfibPIB 44 public _fibInit 47 45 48 46 … … 62 60 ; @remark 63 61 ; 64 fibInit proc near62 _fibInit proc near 65 63 push ebp 66 64 mov ebp, esp 67 cmp _ gpfibPIB, 065 cmp __gpfibPIB, 0 68 66 jz @doinit 69 67 jmp @exit_ok … … 114 112 push ss 115 113 push dx 114 IFDEF __EMX__ 115 extrn _16_Dos16GetInfoSeg:far 116 call _16_Dos16GetInfoSeg 117 ELSE 116 118 extrn DOS16GETINFOSEG:far 117 119 call DOS16GETINFOSEG 120 ENDIF 118 121 pop dx ; sel LIS 119 122 pop cx ; sel GIS … … 148 151 ; Store far pointers. 149 152 ; 150 mov word ptr [_ gfpfibLIS + 2], dx151 mov word ptr [_ gfpfibGIS + 2], cx153 mov word ptr [__gfpfibLIS + 2], dx 154 mov word ptr [__gfpfibGIS + 2], cx 152 155 153 156 ; … … 156 159 and edx, 0fff8h 157 160 shl edx, 13 158 mov [_ gpfibLIS], edx161 mov [__gpfibLIS], edx 159 162 160 163 and ecx, 0fff8h 161 164 shl ecx, 13 162 mov [_ gpfibGIS], ecx165 mov [__gpfibGIS], ecx 163 166 164 167 … … 178 181 pop eax ; ptib, ignore. 179 182 pop eax ; ppib 180 mov [_ gpfibPIB], eax183 mov [__gpfibPIB], eax 181 184 182 185 ; … … 188 191 leave 189 192 ret 190 fibInit endp193 _fibInit endp 191 194 192 195 -
trunk/src/kernel32/Fileio.cpp
r21566 r21916 1184 1184 DWORD sp = 0, lp = 0,attr; 1185 1185 LPSTR tmpshortpath,tmplongpath; 1186 LPSTR lpszShortPath1, lpszLongPath1; 1186 LPCSTR lpszShortPath1; 1187 LPSTR lpszLongPath1; 1187 1188 1188 1189 dprintf(("GetLongPathNameA %s %x %d", lpszShortPath, lpszLongPath, cchBuffer)); … … 1203 1204 } 1204 1205 1205 lpszShortPath1 = ODINHelperStripUNC( (char*)lpszShortPath);1206 lpszLongPath1 = ODINHelperStripUNC( (char*)lpszLongPath);1206 lpszShortPath1 = ODINHelperStripUNC(lpszShortPath); 1207 lpszLongPath1 = ODINHelperStripUNC(lpszLongPath); 1207 1208 1208 1209 lstrcpyA(tmpshortpath,lpszShortPath1); -
trunk/src/kernel32/HandleManager.cpp
r21374 r21916 70 70 71 71 #include <vmutex.h> 72 #include <win \thread.h>72 #include <win/thread.h> 73 73 74 74 #include <odinapi.h> … … 170 170 RasRemoveObject(rthHandles, a); \ 171 171 } while (0) 172 173 extern "C" { 172 174 173 175 /***************************************************************************** … … 454 456 *****************************************************************************/ 455 457 456 static ULONG INLINE_HMHandleQuery(HANDLE hHandle)458 INLINE ULONG _HMHandleQuery(HANDLE hHandle) 457 459 { 458 460 if (hHandle >= MAX_OS2_HMHANDLES) /* check the table range */ … … 533 535 *****************************************************************************/ 534 536 535 DWORD HMDeviceRegisterEx(LP STRpszDeviceName,537 DWORD HMDeviceRegisterEx(LPCSTR pszDeviceName, 536 538 HMDeviceHandler *pDeviceHandler, 537 539 VOID *pDevData) … … 564 566 } 565 567 566 DWORD HMDeviceRegister(LP STRpszDeviceName,568 DWORD HMDeviceRegister(LPCSTR pszDeviceName, 567 569 HMDeviceHandler *pDeviceHandler) 568 570 { … … 2133 2135 * GetFileSizeEx (KERNEL32.@) 2134 2136 */ 2135 #define INVALID_FILE_SIZE ((DWORD)~0UL)2136 2137 BOOL WINAPI GetFileSizeEx( HANDLE hFile, PLARGE_INTEGER lpFileSize ) 2137 2138 { … … 3624 3625 } 3625 3626 3627 } // extern "C" 3628 -
trunk/src/kernel32/_ras.cpp
r21342 r21916 7 7 #include <_ras.h> 8 8 #include <umalloc.h> 9 #include <process.h> 9 10 10 11 #include <custombuild.h> 11 12 #include <odincrt.h> 13 #ifdef __GNUC__ 14 #include <float.h> 15 #else 12 16 #include <libc/float.h> 17 #endif 13 18 14 19 #include "initterm.h" … … 18 23 19 24 /* RAS functions to isolate all RAS related services: 20 * 25 * 21 26 * - Common statistic functions to track objects allocations/deallocations. 22 27 * … … 29 34 * Note: RAS subsystem does not use any other Odin subsystem, and IMO must not. 30 35 * That is RAS has its own heap, serialization, logging. 31 * External stuff that is used: 36 * External stuff that is used: 32 37 * - from Odin: asm helpers from interlock.asm 33 38 * - from libc: uheap functions 34 * 39 * 35 40 * The following has been borrowed from other Odin parts and adapted: 36 41 * - critical section … … 48 53 typedef struct _RAS_TRACK RAS_TRACK; 49 54 50 typedef struct _RAS_OBJECT_INFO 55 typedef struct _RAS_OBJECT_INFO 51 56 { 52 57 struct _RAS_OBJECT_INFO *next; 53 58 struct _RAS_OBJECT_INFO *prev; 54 59 55 60 RAS_TRACK_HANDLE h; 56 61 57 62 ULONG objident; 58 63 ULONG usecount; 59 64 60 65 ULONG objhandle; 61 66 62 67 void *objdata; 63 68 ULONG cbobjdata; 64 69 65 70 char userdata[1]; 66 71 } RAS_OBJECT_INFO; … … 73 78 RAS_OBJECT_INFO *objfirst; 74 79 RAS_OBJECT_INFO *objlast; 75 80 76 81 char objname[80]; 77 82 78 83 ULONG cbuserdata; 79 84 80 85 ULONG fLogObjectContent: 1; 81 86 ULONG fMemory: 1; 82 87 ULONG fLogAtExit: 1; 83 88 ULONG fLogObjectsAtExit: 1; 84 89 85 90 FNLOC *pfnLogObjectContent; 86 91 FNCOC *pfnCompareObjectContent; 87 92 88 93 /* Used when fMemory = 1 for RasTrackAlloc, Realloc and Free calls */ 89 94 ULONG cAllocs; 90 95 ULONG cFrees; 91 96 ULONG cbTotalAllocated; 92 97 93 98 }; 94 99 … … 119 124 120 125 ULONG hlogfile; // filehandle if default logging functions are used 121 126 122 127 HMODULE hmod; 123 128 } RasLogChannel; … … 126 131 { 127 132 HMODULE hmod; // handle of this dll 128 133 129 134 RasLogChannel rlc; 130 135 131 136 Heap_t rasheap; 132 137 void *pHeapMem; 133 138 ULONG ulRefCount; 134 139 ULONG flAllocMem; 135 140 136 141 HMODULE hmodPlugin; 137 142 138 143 RasEntryTable ret; 139 144 RasPluginEntryTable pet; … … 163 168 } RASCONTEXT_I; 164 169 170 extern "C" { 171 165 172 void rasSaveContext(RASCONTEXT_I *pcontext) 166 173 { … … 181 188 182 189 DosGetInfoBlocks(&ptib, &ppib); 183 190 184 191 return ppib->pib_ulpid << 16 | ptib->tib_ptib2->tib2_ultid; 185 192 } … … 188 195 { 189 196 int rc = NO_ERROR; 190 197 191 198 rc = DosCreateEventSem (NULL, &crit->hevLock, DC_SEM_SHARED, 0); 192 199 193 200 if (rc != NO_ERROR) 194 201 { 195 202 crit->hevLock = 0; 196 203 } 197 204 198 205 return rc; 199 206 } … … 207 214 { 208 215 APIRET rc = NO_ERROR; 209 216 210 217 ULONG threadid = rasGetCurrentThreadId (); 211 218 212 219 // We want to acquire the section, count the entering 213 220 DosInterlockedIncrement (&crit->LockCount); 214 221 215 222 if (crit->OwningThread == threadid) 216 223 { … … 228 235 break; 229 236 } 230 237 231 238 rc = DosWaitEventSem (crit->hevLock, ulTimeout); 232 233 if (rc != NO_ERROR) 239 240 if (rc != NO_ERROR) 234 241 { 235 242 // We fail, deregister itself … … 238 245 } 239 246 } 240 247 241 248 // the section was successfully aquired 242 249 crit->RecursionCount = 1; 243 250 244 251 return NO_ERROR; 245 252 } … … 256 263 { 257 264 DosInterlockedDecrement (&crit->LockCount); 258 265 259 266 return NO_ERROR; 260 267 } 261 268 262 269 crit->OwningThread = 0; 263 270 … … 270 277 DosResetEventSem (crit->hevLock, &ulnrposts); 271 278 } 272 279 273 280 return NO_ERROR; 274 281 } … … 287 294 void ulong2string (unsigned long number, char *string, int n, int base) 288 295 { 289 static c har *digits = "0123456789ABCDEF";290 296 static const char *digits = "0123456789ABCDEF"; 297 291 298 unsigned long tmp = number; 292 299 char *s = string; … … 294 301 int l = 0; 295 302 int i; 296 303 297 304 if (n <= 0) 298 305 { 299 306 return; 300 307 } 301 308 302 309 if (tmp == 0) 303 310 { 304 311 s[l++] = digits[0]; 305 312 } 306 313 307 314 while (tmp != 0) 308 315 { … … 319 326 s[l++] = '\0'; 320 327 } 321 328 322 329 s = string; 323 330 324 331 for (i = 0; i < len/2; i++) 325 332 { … … 338 345 return; 339 346 } 340 347 341 348 if (number < 0) 342 349 { … … 345 352 n--; 346 353 } 347 354 348 355 ulong2string (number, string, n, base); 349 356 } 350 357 351 358 int string2ulong (const char *string, char **pstring2, unsigned long *pvalue, int base) 352 359 { 353 360 unsigned long value = 0; 354 361 int sign = 1; 355 362 356 363 const char *p = string; 357 364 358 365 if (p[0] == '-') 359 366 { … … 361 368 p++; 362 369 } 363 370 364 371 if (base == 0) 365 372 { … … 379 386 } 380 387 } 381 388 382 389 while (*p) 383 390 { 384 391 int digit = 0; 385 392 386 393 if ('0' <= *p && *p <= '9') 387 394 { … … 400 407 break; 401 408 } 402 409 403 410 if (digit >= base) 404 411 { 405 412 break; 406 413 } 407 414 408 415 value = value*base + digit; 409 416 410 417 p++; 411 418 } 412 419 413 420 if (pstring2) 414 421 { 415 422 *pstring2 = (char *)p; 416 423 } 417 424 418 425 *pvalue = sign*value; 419 426 420 427 return 1; 421 428 } 429 430 #ifndef __GNUC__ 422 431 423 432 int vsnprintf (char *buf, int n, const char *fmt, va_list args) … … 426 435 char *s = (char *)fmt; 427 436 char *d = buf; 428 437 429 438 if (n <= 0) 430 439 { 431 440 return 0; 432 441 } 433 442 434 443 n--; 435 444 436 445 while (*s && count < n) 437 446 { 438 447 char tmpstr[16]; 439 448 440 449 char *str = NULL; 441 450 442 451 int width = 0; 443 452 int precision = 0; 444 453 445 454 if (*s == '%') 446 455 { 447 456 s++; 448 457 449 458 if ('0' <= *s && *s <= '9' || *s == '-') 450 459 { … … 462 471 string2ulong (s, &s, (unsigned long *)&precision, 10); 463 472 } 464 473 465 474 if (*s == 's') 466 475 { … … 480 489 { 481 490 int num = va_arg(args, int); 482 491 483 492 ulong2string (num, tmpstr, sizeof (tmpstr), 16); 484 493 485 494 str = &tmpstr[0]; 486 495 s++; … … 494 503 s++; 495 504 } 496 505 497 506 if (*s == 'd' || *s == 'i') 498 507 { 499 508 int num = va_arg(args, int); 500 509 501 510 long2string (num, tmpstr, sizeof (tmpstr), 10); 502 511 503 512 str = &tmpstr[0]; 504 513 s++; … … 507 516 { 508 517 int num = va_arg(args, int); 509 518 510 519 ulong2string (num, tmpstr, sizeof (tmpstr), 10); 511 520 512 521 str = &tmpstr[0]; 513 522 s++; … … 516 525 { 517 526 int num = va_arg(args, int); 518 527 519 528 ulong2string (num, tmpstr, sizeof (tmpstr), 16); 520 529 521 530 str = &tmpstr[0]; 522 531 s++; … … 524 533 } 525 534 } 526 535 527 536 if (str != NULL) 528 537 { … … 531 540 int len = strlen (str); 532 541 int leftalign = 0; 533 542 534 543 if (width < 0) 535 544 { … … 537 546 leftalign = 1; 538 547 } 539 548 540 549 if (precision) 541 550 { … … 546 555 precision--; 547 556 } 548 557 549 558 memcpy (&numstr[i], str, len); 550 559 551 560 str = &numstr[0]; 552 561 len += i; 553 562 } 554 563 555 564 if (len < width && !leftalign) 556 565 { … … 561 570 count++; 562 571 } 563 572 564 573 if (count >= n) 565 574 { … … 567 576 } 568 577 } 569 578 570 579 i = 0; 571 580 while (i < len && count < n) … … 574 583 count++; 575 584 } 576 585 577 586 if (count >= n) 578 587 { 579 588 break; 580 589 } 581 590 582 591 if (len < width && leftalign) 583 592 { … … 588 597 count++; 589 598 } 590 599 591 600 if (count >= n) 592 601 { … … 601 610 } 602 611 } 603 612 604 613 *d = '\0'; 605 614 606 615 return count + 1; 607 616 } 608 617 618 #endif // ifndef __GNUC__ 619 620 #ifdef __GNUC__ 621 int WIN32API_VA ras_snprintf (char *buf, int n, const char *fmt, ...) 622 #else 609 623 int WIN32API snprintf (char *buf, int n, const char *fmt, ...) 624 #endif 610 625 { 611 626 va_list args; 612 627 613 628 int rc = 0; 614 629 615 630 va_start (args, fmt); 616 631 617 632 rc = vsnprintf (buf, n, fmt, args); 618 633 619 634 va_end (args); 620 635 621 636 return rc; 622 637 } … … 625 640 { 626 641 ULONG ulAction = 0; 627 642 628 643 int rc = DosOpen (logfilename, ph, &ulAction, 0L, FILE_ARCHIVED, 629 644 OPEN_ACTION_CREATE_IF_NEW | OPEN_ACTION_REPLACE_IF_EXISTS, 630 645 OPEN_FLAGS_NOINHERIT | OPEN_SHARE_DENYNONE | 631 646 OPEN_ACCESS_READWRITE, 0L); 632 647 633 648 if (rc == ERROR_TOO_MANY_OPEN_FILES) 634 649 { 635 650 LONG lReqCount = 10l; 636 651 ULONG ulCurMaxFH = 0ul; 637 652 638 653 DosSetRelMaxFH (&lReqCount, &ulCurMaxFH); 639 654 640 655 rc = DosOpen (logfilename, ph, &ulAction, 0L, FILE_ARCHIVED, 641 656 OPEN_ACTION_CREATE_IF_NEW | OPEN_ACTION_REPLACE_IF_EXISTS, … … 643 658 OPEN_ACCESS_READWRITE, 0L); 644 659 } 645 660 646 661 if (rc != NO_ERROR) 647 662 { 648 663 *ph = -1; 649 664 } 650 665 651 666 return rc; 652 667 } … … 660 675 { 661 676 ULONG ulActual = 0; 662 677 663 678 DosWrite ((HFILE)h, msg, len, &ulActual); 664 679 } … … 671 686 prlc->hlogfile = -1; 672 687 } 673 688 674 689 if (prlc->hmod) 675 690 { … … 677 692 prlc->hmod = NULLHANDLE; 678 693 } 679 694 680 695 prlc->pfnWriteLog = NULL; 681 696 prlc->pfnOpenLogFile = NULL; … … 687 702 { 688 703 int rc = NO_ERROR; 689 704 690 705 const char *env = NULL; 691 706 692 707 DosScanEnv (env_loghandler, &env); 693 708 694 709 HMODULE hmod = NULLHANDLE; 695 710 696 711 PFN popenlogfile = NULL; 697 712 PFN pcloselogfile = NULL; 698 713 PFN pwritelog = NULL; 699 714 700 715 if (env) 701 716 { 702 717 rc = DosLoadModule (NULL, 0, env, &hmod); 703 718 704 719 if (rc == NO_ERROR) 705 720 { 706 721 rc = DosQueryProcAddr (hmod, 0, "WIN32RAS_OPENLOGFILE", &popenlogfile); 707 722 } 708 723 709 724 if (rc == NO_ERROR) 710 725 { 711 726 rc = DosQueryProcAddr (hmod, 0, "WIN32RAS_CLOSELOGFILE", &pcloselogfile); 712 727 } 713 728 714 729 if (rc == NO_ERROR) 715 730 { 716 731 rc = DosQueryProcAddr (hmod, 0, "WIN32RAS_WRITELOG", &pwritelog); 717 732 } 718 733 719 734 if (rc != NO_ERROR && hmod) 720 735 { … … 723 738 } 724 739 } 725 740 726 741 if (rc == NO_ERROR && hmod && popenlogfile && pcloselogfile && pwritelog) 727 742 { … … 739 754 prlc->hlogfile = -1; 740 755 prlc->hmod = NULLHANDLE; 741 756 742 757 rc = NO_ERROR; 743 758 } 744 759 745 760 rc = prlc->pfnOpenLogFile (&prlc->hlogfile, filename); 746 761 747 762 if (rc != NO_ERROR) 748 763 { … … 750 765 rasCloseLogChannel (prlc); 751 766 } 752 767 753 768 return rc; 754 769 } … … 757 772 { 758 773 int rc = NO_ERROR; 759 774 760 775 const char *filename = "win32ras.log"; 761 776 762 777 const char *env = NULL; 763 778 764 779 DosScanEnv ("WIN32RAS_LOG_FILENAME", &env); 765 780 766 781 if (env) 767 782 { 768 783 filename = env; 769 784 } 770 785 771 786 char uniqueLogFileName[260]; 772 787 773 788 snprintf (uniqueLogFileName, sizeof(uniqueLogFileName), 774 "%s.%d", filename, loadNr);775 789 "%s.%d", filename, getpid()); 790 776 791 if (rasdata.rlc.hlogfile == -1) 777 792 { 778 793 rc = rasOpenLogChannel ("WIN32RAS_LOGHANDLER", &rasdata.rlc, uniqueLogFileName); 779 794 } 780 795 781 796 return rc; 782 797 } … … 787 802 } 788 803 789 void rasLogInternalV (RAS_LOG_CHANNEL_H hchannel, c har *fmt, va_list args)804 void rasLogInternalV (RAS_LOG_CHANNEL_H hchannel, const char *fmt, va_list args) 790 805 { 791 806 static char szOutMsg[4096]; 792 807 793 808 ULONG ulHdrLen = snprintf (szOutMsg, sizeof (szOutMsg), "%s", ""); 794 809 795 810 ulHdrLen -= 1; 796 811 797 812 ULONG ulMsgLen = vsnprintf (&szOutMsg[ulHdrLen], sizeof (szOutMsg) - ulHdrLen, fmt, args); 798 813 799 814 ulMsgLen -= 1; 800 815 801 816 if (ulMsgLen > 0) 802 817 { … … 810 825 } 811 826 } 812 827 813 828 RasLogChannel *prlc = hchannel? (RasLogChannel *)hchannel: &rasdata.rlc; 814 829 815 830 prlc->pfnWriteLog (prlc->hlogfile, szOutMsg, ulMsgLen + ulHdrLen); 816 831 } 817 832 } 818 833 819 void rasLog (c har *fmt, ...)834 void rasLog (const char *fmt, ...) 820 835 { 821 836 va_list args; 822 837 823 838 va_start (args, fmt); 824 839 825 840 rasLogInternalV (NULL, fmt, args); 826 841 827 842 va_end (args); 828 843 } 829 844 830 void rasLogInternal (c har *fmt, ...)845 void rasLogInternal (const char *fmt, ...) 831 846 { 832 847 va_list args; 833 848 834 849 va_start (args, fmt); 835 850 836 851 rasLogInternalV (NULL, fmt, args); 837 852 838 853 va_end (args); 839 854 } 840 855 841 void WIN32API rasLogExternal (char *fmt, ...)856 void WIN32API_VA rasLogExternal (const char *fmt, ...) 842 857 { 843 858 va_list args; … … 846 861 847 862 va_start (args, fmt); 848 863 849 864 rasLogInternalV (NULL, fmt, args); 850 865 851 866 va_end (args); 852 867 853 868 SetFS (sel); 854 869 } … … 876 891 877 892 *clean = _BLOCK_CLEAN; 878 893 879 894 rc = DosAllocSharedMem (&p, NULL, *size, rasdata.flAllocMem | OBJ_GETTABLE); 880 895 881 896 if (rc != NO_ERROR) 882 897 { 883 898 rasLog ("RAS heap: getmore_fn: DosAllocSharedMem failed, rc = %d\n", rc); 884 899 } 885 900 886 901 return p; 887 902 } … … 906 921 { 907 922 rasdata.flAllocMem = PAG_READ | PAG_WRITE | PAG_COMMIT; 908 923 909 924 if (rascfg.fUseHighMem) 910 925 { 911 926 ULONG ulSysinfo = 0; 912 927 913 928 rc = DosQuerySysInfo (QSV_VIRTUALADDRESSLIMIT, QSV_VIRTUALADDRESSLIMIT, &ulSysinfo, sizeof (ulSysinfo)); 914 929 915 930 if (rc == NO_ERROR && ulSysinfo > 512) // VirtualAddresslimit is in MB 916 931 { 917 932 rasdata.flAllocMem |= PAG_ANY; 918 933 919 934 rasLog ("RAS heap initialization: will use high memory\n"); 920 935 } 921 936 } 922 937 923 rc = DosAllocSharedMem (&rasdata.pHeapMem, NULL, rascfg.ulInitHeapSize, 938 rc = DosAllocSharedMem (&rasdata.pHeapMem, NULL, rascfg.ulInitHeapSize, 924 939 rasdata.flAllocMem | OBJ_GETTABLE); 925 940 if (rc != NO_ERROR) … … 928 943 return NO_ERROR; 929 944 } 930 931 rasdata.rasheap = _ucreate (rasdata.pHeapMem, rascfg.ulInitHeapSize, 945 946 rasdata.rasheap = _ucreate (rasdata.pHeapMem, rascfg.ulInitHeapSize, 932 947 _BLOCK_CLEAN, _HEAP_REGULAR | _HEAP_SHARED, 933 948 getmore_fn, release_fn); … … 936 951 { 937 952 rasLog ("RAS heap initialization: _ucreate failed\n"); 938 953 939 954 DosFreeMem (rasdata.pHeapMem); 940 955 rasdata.pHeapMem = NULL; 941 956 942 957 return ERROR_NOT_ENOUGH_MEMORY; 943 958 } … … 949 964 */ 950 965 rc = DosGetSharedMem (rasdata.pHeapMem, rasdata.flAllocMem); 951 966 952 967 if (rc != NO_ERROR) 953 968 { 954 969 rasLog ("RAS heap initialization: DosGetSharedMem failed %d\n", rc); 955 970 956 971 return rc; 957 972 } … … 960 975 { 961 976 rasLog ("RAS heap initialization: _uopen failed\n"); 962 977 963 978 DosFreeMem (rasdata.pHeapMem); 964 979 965 980 return ERROR_NOT_ENOUGH_MEMORY; 966 981 } 967 982 } 968 983 969 984 rasdata.ulRefCount++; 970 985 971 986 return NO_ERROR; 972 987 } … … 980 995 return 1; 981 996 } 982 983 if (useflag == _USEDENTRY) 997 998 if (useflag == _USEDENTRY) 984 999 { 985 1000 if (filename) … … 1001 1016 { 1002 1017 rasLog ("RAS heap uninitialization: privateRefCount = %d\n", privateRefCount); 1003 1018 1004 1019 return; 1005 1020 } … … 1017 1032 1018 1033 _uclose (rasdata.rasheap); 1019 1034 1020 1035 _udestroy (rasdata.rasheap, _FORCE); 1021 1036 rasdata.rasheap = NULL; 1022 1037 } 1023 1038 1024 1039 if (rasdata.pHeapMem) 1025 1040 { … … 1028 1043 } 1029 1044 } 1030 else 1045 else 1031 1046 { 1032 1047 _uclose (rasdata.rasheap); … … 1037 1052 { 1038 1053 void *p = _umalloc(rasdata.rasheap, size); 1039 1054 1040 1055 if (p) 1041 1056 { … … 1046 1061 rasLog ("RAS heap: allocation failed, %d bytes\n", size); 1047 1062 } 1048 1063 1049 1064 return p; 1050 1065 } … … 1060 1075 { 1061 1076 RAS_TRACK_HANDLE iter = rasdata.firsttrack; 1062 1077 1063 1078 while (iter) 1064 1079 { … … 1067 1082 break; 1068 1083 } 1069 1084 1070 1085 iter = iter->next; 1071 1086 } 1072 1087 1073 1088 return iter; 1074 1089 } … … 1076 1091 ULONG rasGenObjIdent (void) 1077 1092 { 1078 static objident = 0;1079 1093 static ULONG objident = 0; 1094 1080 1095 objident++; 1081 1096 1082 1097 if (objident == 0) 1083 1098 { 1084 1099 objident++; 1085 1100 } 1086 1101 1087 1102 return objident; 1088 1103 } … … 1100 1115 h->objlast = h->objfirst = pinfo; 1101 1116 } 1102 1117 1103 1118 return NO_ERROR; 1104 1119 } 1105 1120 1106 1121 void rasRemoveObjectInfo (RAS_OBJECT_INFO *pinfo) 1107 1122 { … … 1115 1130 pinfo->h->objlast = pinfo->prev; 1116 1131 } 1117 1132 1118 1133 if (pinfo->prev) 1119 1134 { … … 1131 1146 { 1132 1147 pinfo->objhandle = objhandle; 1133 1148 1134 1149 pinfo->h = h; 1135 1150 1136 1151 pinfo->usecount = 1; 1137 1152 1138 1153 pinfo->objident = rasGenObjIdent (); 1139 1154 … … 1146 1161 } 1147 1162 } 1148 1163 1149 1164 pinfo->cbobjdata = cbobjdata; 1150 1165 } … … 1152 1167 struct _RAS_OBJECT_INFO *rasSearchObject2 (RAS_TRACK_HANDLE h, ULONG objident) 1153 1168 { 1154 if (!h) 1169 if (!h) 1155 1170 { 1156 1171 return NULL; … … 1158 1173 1159 1174 RAS_OBJECT_INFO *iter = h->objfirst; 1160 1175 1161 1176 while (iter) 1162 1177 { … … 1167 1182 iter = iter->next; 1168 1183 } 1169 1184 1170 1185 return iter; 1171 1186 } … … 1181 1196 struct _RAS_OBJECT_INFO *rasSearchObject (RAS_TRACK_HANDLE h, ULONG objhandle, RAS_OBJECT_INFO **ppinfo_next) 1182 1197 { 1183 if (!h) 1198 if (!h) 1184 1199 { 1185 1200 return NULL; … … 1187 1202 1188 1203 RAS_OBJECT_INFO *iter = h->objfirst; 1189 1204 1190 1205 while (iter) 1191 1206 { … … 1194 1209 break; 1195 1210 } 1196 1211 1197 1212 iter = iter->next; 1198 1213 } 1199 1214 1200 1215 if (iter && ppinfo_next) 1201 1216 { 1202 1217 *ppinfo_next = iter->next; 1203 1218 } 1204 1219 1205 1220 return iter; 1206 1221 } … … 1214 1229 { 1215 1230 pinfo->usecount--; 1216 1231 1217 1232 return pinfo->usecount; 1218 1233 } … … 1223 1238 char buf[128]; 1224 1239 char *p = &buf[0]; 1225 1240 1226 1241 if (!objdata) 1227 1242 { 1228 1243 return NO_ERROR; 1229 1244 } 1230 1245 1231 1246 for (i = 0; i < cbobjdata; i++) 1232 1247 { … … 1238 1253 p = &buf[0]; 1239 1254 } 1240 1255 1241 1256 snprintf (p, sizeof(buf) - (p - &buf[0]), "%8.8x:", i / 16); 1242 1257 p += strlen (p); 1243 1258 } 1244 1259 1245 1260 snprintf (p, sizeof(buf) - (p - &buf[0]), " %2.2x", ((char *)objdata)[i]); 1246 1261 p += strlen (p); 1247 1262 } 1248 1263 1249 1264 pRasLog ("%s\n", buf); 1250 1265 1251 1266 return NO_ERROR; 1252 1267 } … … 1258 1273 return 1; 1259 1274 } 1260 1275 1261 1276 if (objdata1 == NULL || objdata2 == NULL) 1262 1277 { … … 1264 1279 return 1; 1265 1280 } 1266 1281 1267 1282 return memcmp (objdata1, objdata2, cbobjdata1); 1268 1283 } 1269 1284 1270 ULONG rasCallLogObjectContent (RAS_TRACK_HANDLE h, RASCONTEXT_I *pctx, 1271 ULONG objident, ULONG objhandle, 1285 ULONG rasCallLogObjectContent (RAS_TRACK_HANDLE h, RASCONTEXT_I *pctx, 1286 ULONG objident, ULONG objhandle, 1272 1287 void *objdata, ULONG cbobjdata, FNRASLOG_EXTERNAL *rasLogExternal) 1273 1288 { 1274 1289 rasRestoreContext (pctx); 1275 1290 1276 1291 ULONG rc = h->pfnLogObjectContent (objident, objhandle, objdata, cbobjdata, rasLogExternal); 1277 1292 1278 1293 rasSaveContext (pctx); 1279 1294 1280 1295 return rc; 1281 1296 } 1282 1297 1283 ULONG WIN32API rasCallCompareObjectContent (RAS_TRACK_HANDLE h, RASCONTEXT_I *pctx, 1298 ULONG WIN32API rasCallCompareObjectContent (RAS_TRACK_HANDLE h, RASCONTEXT_I *pctx, 1284 1299 ULONG objhandle, void *objdata1, ULONG cbobjdata1, void *objdata2, ULONG cbobjdata2) 1285 1300 { 1286 1301 rasRestoreContext (pctx); 1287 1302 1288 1303 ULONG rc = h->pfnCompareObjectContent (objhandle, objdata1, cbobjdata1, objdata2, cbobjdata2); 1289 1304 1290 1305 rasSaveContext (pctx); 1291 1306 1292 1307 return rc; 1293 1308 } … … 1301 1316 { 1302 1317 const char *env = NULL; 1303 1318 1304 1319 DosScanEnv (name, &env); 1305 1320 1306 1321 if (env) 1307 1322 { 1308 1323 ULONG ul = 0; 1309 1324 char *e = NULL; 1310 1325 1311 1326 string2ulong (env, &e, &ul, 10); 1312 1327 1313 1328 if (e && *e == '\0') 1314 1329 { … … 1324 1339 { 1325 1340 int rc = NO_ERROR; 1326 1341 1327 1342 if (!rasdata.hmodPlugin) 1328 1343 { 1329 1344 rasdata.ret.cb = sizeof (RasEntryTable); 1330 1345 1331 1346 rasdata.ret.RasRegisterObjectTracking = RasRegisterObjectTracking; 1332 1347 rasdata.ret.RasDeregisterObjectTracking = RasDeregisterObjectTracking; … … 1343 1358 rasdata.ret.RasLogNoEOL = RasLogNoEOL2; 1344 1359 rasdata.ret.RasLogMsg = RasLogMsg2; 1360 #ifdef __GNUC__ 1361 rasdata.ret.snprintf = ras_snprintf; 1362 #else 1345 1363 rasdata.ret.snprintf = snprintf; 1364 #endif 1346 1365 rasdata.ret.RasSaveContext = RasSaveContext; 1347 1366 rasdata.ret.RasRestoreContext = RasRestoreContext; … … 1353 1372 rasdata.ret.RasTrackMemFree = RasTrackMemFree; 1354 1373 rasdata.ret.RasGetTrackHandle = RasGetTrackHandle; 1355 1374 1356 1375 rasdata.pet.cb = sizeof (RasPluginEntryTable); 1357 1376 1358 1377 rasdata.pet.RasEntry = _RasEntry; 1359 1378 1360 1379 const char *env = NULL; 1361 1380 1362 1381 DosScanEnv ("WIN32RAS_PLUGIN", &env); 1363 1382 1364 1383 if (env) 1365 1384 { 1366 1385 HMODULE hmod = NULLHANDLE; 1367 1386 FNPI *pfnPluginInit = NULL; 1368 1387 1369 1388 rc = DosLoadModule (NULL, 0, env, &hmod); 1370 1389 1371 1390 if (rc == NO_ERROR) 1372 1391 { 1373 1392 rc = DosQueryProcAddr (hmod, 0, "WIN32RAS_PLUGIN_INIT", (PFN *)&pfnPluginInit); 1374 1393 } 1375 1394 1376 1395 if (rc != NO_ERROR) 1377 1396 { 1378 1397 rasLogInternal ("Could not load RAS plugin %s rc = %d", env, rc); 1379 1398 } 1380 1399 1381 1400 if (rc != NO_ERROR && hmod) 1382 1401 { … … 1386 1405 { 1387 1406 rasdata.hmodPlugin = hmod; 1388 1407 1389 1408 pfnPluginInit (rasdata.hmod, &rasdata.ret, &rasdata.pet); 1390 1409 } 1391 1410 } 1392 1411 } 1393 1412 1394 1413 return rc; 1395 1414 } … … 1398 1417 { 1399 1418 int rc = NO_ERROR; 1400 1419 1401 1420 if (rasdata.hmodPlugin) 1402 1421 { 1403 1422 HMODULE hmod = rasdata.hmodPlugin; 1404 1423 FNPE *pfnPluginExit = NULL; 1405 1424 1406 1425 rc = DosQueryProcAddr (hmod, 0, "WIN32RAS_PLUGIN_EXIT", (PFN *)&pfnPluginExit); 1407 1426 1408 1427 if (rc == NO_ERROR) 1409 1428 { 1410 1429 pfnPluginExit (rasdata.hmod); 1411 1430 } 1412 1431 1413 1432 DosFreeModule (hmod); 1414 1433 } 1415 1434 1416 1435 return rc; 1417 1436 } … … 1463 1482 { 1464 1483 int rc = NO_ERROR; 1465 1484 1466 1485 if (!rasInitialized) 1467 1486 { 1468 1487 rasInitialized = 1; 1469 1488 1470 1489 memset (&rascfg, 0, sizeof (rascfg)); 1471 1490 1472 1491 rascfg.ulTimeout = 60000; // default 1 minute 1473 1492 rasQueryEnvUlong ("WIN32RAS_TIMEOUT", &rascfg.ulTimeout, 1, 3600, 1000); 1474 1493 1475 1494 rascfg.ulInitHeapSize = 128*1024; 1476 1495 rasQueryEnvUlong ("WIN32RAS_INITHEAPSIZE", &rascfg.ulInitHeapSize, 64, 16*1024, 1024); 1477 1496 1478 1497 ULONG ul = 0; 1479 1498 rasQueryEnvUlong ("WIN32RAS_DUMPHEAPOBJECTS", &ul, 0, 1, 1); 1480 1499 rascfg.fDumpHeapObjects = ul; 1481 1500 1482 1501 ul = 1; 1483 1502 rasQueryEnvUlong ("WIN32RAS_USEHIGHMEM", &ul, 0, 1, 1); 1484 1503 rascfg.fUseHighMem = ul; 1485 1504 1486 1505 ul = 0; 1487 1506 rasQueryEnvUlong ("WIN32RAS_ENABLE", &ul, 0, 1, 1); 1488 1507 rascfg.fRasEnable = ul; 1489 1508 1490 1509 ul = 0; 1491 1510 rasQueryEnvUlong ("WIN32RAS_BREAKPOINT", &ul, 0, 1, 1); 1492 1511 rascfg.fRasBreakPoint = ul; 1493 1512 1494 1513 memset (&rasdata, 0, sizeof (rasdata)); 1495 1514 rasdata.rlc.hlogfile = -1; 1496 1515 rasdata.hmod = hmod; 1497 1516 1498 1517 rc = NO_ERROR; 1499 1518 } 1500 1519 1501 1520 if (!rascfg.fRasEnable) 1502 1521 { … … 1510 1529 1511 1530 rc = rasInitializeLog (); 1512 1531 1513 1532 if (rc == NO_ERROR) 1514 1533 { 1515 1534 rc = rasInitializeCriticalSection (&csras); 1516 1535 } 1517 1536 1518 1537 if (rc == NO_ERROR) 1519 1538 { 1520 1539 rc = rasInitializeHeap (); 1521 1540 } 1522 1541 1523 1542 if (rc == NO_ERROR) 1524 1543 { 1525 1544 rc = rasInitializePlugin (); 1526 1545 } 1527 1546 1528 1547 return rc; 1529 1548 } … … 1532 1551 { 1533 1552 ENTER_RAS(NO_HANDLE); 1534 1553 1535 1554 /* Deregister all objects */ 1536 1555 while (rasdata.firsttrack) 1537 1556 { 1538 1557 RAS_TRACK_HANDLE iter = rasdata.firsttrack; 1539 1558 1540 1559 if (iter->fLogAtExit) 1541 1560 { 1542 1561 RasLogObjects (iter, iter->fLogObjectsAtExit? RAS_FLAG_LOG_OBJECTS: 0); 1543 1562 } 1544 1563 1545 1564 RasDeregisterObjectTracking (iter); 1546 1565 1547 1566 rasFree (iter); 1548 1567 } 1549 1568 1550 1569 rasUninitializePlugin (); 1551 1570 1552 1571 rasUninitializeHeap (); 1553 1572 1554 1573 EXIT_RAS(); 1555 1574 1556 1575 rasUninitializeCriticalSection (&csras); 1557 1558 rasUninitializeLog (); 1576 1577 rasUninitializeLog (); 1559 1578 } 1560 1579 … … 1562 1581 { 1563 1582 ENTER_RAS_RET(NO_HANDLE, NULL); 1564 1583 1565 1584 RAS_TRACK_HANDLE iter = rasdata.firsttrack; 1566 1585 1567 1586 while (iter) 1568 1587 { … … 1571 1590 break; 1572 1591 } 1573 1592 1574 1593 iter = iter->next; 1575 1594 } 1576 1595 1577 1596 EXIT_RAS(); 1578 1597 1579 1598 return iter; 1580 1599 } 1581 1600 1582 void WIN32API RasRegisterObjectTracking (RAS_TRACK_HANDLE *ph, c har *objname,1601 void WIN32API RasRegisterObjectTracking (RAS_TRACK_HANDLE *ph, const char *objname, 1583 1602 ULONG cbuserdata, 1584 1603 ULONG flags, … … 1587 1606 { 1588 1607 ENTER_RAS(NO_HANDLE); 1589 1608 1590 1609 RAS_TRACK *prt = (RAS_TRACK *)rasAlloc (sizeof (RAS_TRACK)); 1591 1610 1592 1611 if (prt) 1593 1612 { 1594 1613 strcpy (prt->objname, objname); 1595 1614 1596 1615 prt->cbuserdata = cbuserdata; 1597 1616 1598 1617 if (flags & RAS_TRACK_FLAG_LOGOBJECTCONTENT) 1599 1618 { 1600 1619 prt->fLogObjectContent = 1; 1601 1620 } 1602 1621 1603 1622 if (flags & RAS_TRACK_FLAG_MEMORY) 1604 1623 { 1605 1624 prt->fMemory = 1; 1606 1625 } 1607 1626 1608 1627 if (flags & RAS_TRACK_FLAG_LOG_AT_EXIT) 1609 1628 { 1610 1629 prt->fLogAtExit = 1; 1611 1630 } 1612 1631 1613 1632 if (flags & RAS_TRACK_FLAG_LOG_OBJECTS_AT_EXIT) 1614 1633 { 1615 1634 prt->fLogObjectsAtExit = 1; 1616 1635 } 1617 1636 1618 1637 if (pfnLogObjectContent) 1619 1638 { … … 1624 1643 prt->pfnLogObjectContent = rasLogObjectContent; 1625 1644 } 1626 1645 1627 1646 if (pfnCompareObjectContent) 1628 1647 { … … 1633 1652 prt->pfnCompareObjectContent = pfnCompareObjectContent; 1634 1653 } 1635 1654 1636 1655 /* Insert the new tracking record in the list */ 1637 1656 if (rasdata.firsttrack) … … 1645 1664 rasdata.lasttrack = rasdata.firsttrack = prt; 1646 1665 } 1647 1666 1648 1667 *ph = prt; 1649 1668 } … … 1657 1676 1658 1677 h = rasVerifyTrackHandle (h); 1659 1678 1660 1679 if (h) 1661 1680 { … … 1664 1683 { 1665 1684 RAS_OBJECT_INFO *iter = h->objfirst; 1666 1685 1667 1686 rasRemoveObjectInfo (iter); 1668 1687 1669 1688 rasFree (iter); 1670 1689 } 1671 1690 1672 1691 /* Remove the track record */ 1673 1692 if (h->next) … … 1680 1699 rasdata.lasttrack = h->prev; 1681 1700 } 1682 1701 1683 1702 if (h->prev) 1684 1703 { … … 1691 1710 } 1692 1711 } 1693 1712 1694 1713 EXIT_RAS (); 1695 1714 } … … 1700 1719 { 1701 1720 ENTER_RAS_RET (h, 0); 1702 1721 1703 1722 struct _RAS_OBJECT_INFO *pinfo_next = NULL; 1704 1723 1705 1724 struct _RAS_OBJECT_INFO *pinfo = rasSearchObject (h, objhandle, &pinfo_next); 1706 1725 1707 1726 // rasLog ("Object added: handle = %8.8X\n", objhandle); 1708 1727 1709 1728 if (pinfo != NULL) 1710 1729 { … … 1715 1734 */ 1716 1735 rasIncUseCount (pinfo); 1717 1736 1718 1737 /* log this event */ 1719 1738 rasLog ("Dublicate object added: handle = %8.8X\n", objhandle); … … 1722 1741 rasLogInternal ("Added object content:\n"); 1723 1742 rasCallLogObjectContent (h, &ctx, pinfo->objident, objhandle, objdata, cbobjdata, rasLogExternal); 1724 1743 1725 1744 rasLogInternal ("Existing object content:\n"); 1726 1745 rasCallLogObjectContent (h, &ctx, pinfo->objident, objhandle, pinfo->objdata, pinfo->cbobjdata, rasLogExternal); 1727 1746 1728 1747 if (rasCallCompareObjectContent (h, &ctx, objhandle, objdata, cbobjdata, pinfo->objdata, pinfo->cbobjdata) != 0) 1729 1748 { … … 1734 1753 else 1735 1754 { 1736 pinfo = (RAS_OBJECT_INFO *)rasAlloc (sizeof (RAS_OBJECT_INFO) - sizeof (RAS_OBJECT_INFO::userdata) 1737 + h->cbuserdata 1755 pinfo = (RAS_OBJECT_INFO *)rasAlloc (sizeof (RAS_OBJECT_INFO) - sizeof (RAS_OBJECT_INFO::userdata) 1756 + h->cbuserdata 1738 1757 + (objdata? cbobjdata: 0)); 1739 1758 if (pinfo) 1740 1759 { 1741 1760 rasInitObjectInfo (pinfo, h, objhandle, objdata, cbobjdata); 1742 1761 1743 1762 int rc = rasAddObjectInfo (pinfo, h, pinfo_next); 1744 1763 1745 1764 if (rc != NO_ERROR) 1746 1765 { 1747 rasFree (pinfo); 1766 rasFree (pinfo); 1748 1767 pinfo = NULL; 1749 1768 } … … 1752 1771 1753 1772 EXIT_RAS (); 1754 1773 1755 1774 if (pinfo) 1756 1775 { 1757 1776 return pinfo->objident; 1758 1777 } 1759 1778 1760 1779 return 0; 1761 1780 } … … 1764 1783 { 1765 1784 ENTER_RAS (h); 1766 1785 1767 1786 // rasLog ("Object to remove: handle = %8.8X\n", objhandle); 1768 1787 1769 1788 struct _RAS_OBJECT_INFO *pinfo = rasSearchObject (h, objhandle, NULL); 1770 1789 1771 1790 // rasLog ("Objects pinfo = %8.8X\n", pinfo); 1772 1791 1773 1792 if (pinfo != NULL) 1774 1793 { … … 1776 1795 { 1777 1796 rasRemoveObjectInfo (pinfo); 1778 1797 1779 1798 rasFree (pinfo); 1780 1799 } 1781 1800 } 1782 1801 1783 1802 EXIT_RAS (); 1784 1803 } 1785 1804 1786 1805 1787 1806 void WIN32API RasQueryObjectUserData (RAS_TRACK_HANDLE h, ULONG objident, void *pdata, ULONG cbdata, ULONG *pcbdataret) 1788 1807 { 1789 1808 ENTER_RAS (h); 1790 1809 1791 1810 struct _RAS_OBJECT_INFO *pinfo = rasSearchObject2 (h, objident); 1792 1811 1793 1812 if (pinfo) 1794 1813 { … … 1797 1816 cbdata = pinfo->h->cbuserdata; 1798 1817 } 1799 1818 1800 1819 memcpy (pdata, &pinfo->userdata, cbdata); 1801 1820 } … … 1804 1823 cbdata = 0; 1805 1824 } 1806 1825 1807 1826 EXIT_RAS (); 1808 1827 1809 1828 if (pcbdataret) 1810 1829 { 1811 1830 *pcbdataret = cbdata; 1812 1831 } 1813 1832 1814 1833 return; 1815 1834 } … … 1818 1837 { 1819 1838 ENTER_RAS (h); 1820 1839 1821 1840 struct _RAS_OBJECT_INFO *pinfo = rasSearchObject2 (h, objident); 1822 1841 1823 1842 if (pinfo) 1824 1843 { … … 1827 1846 cbdata = pinfo->h->cbuserdata; 1828 1847 } 1829 1848 1830 1849 memcpy (&pinfo->userdata, pdata, cbdata); 1831 1850 } … … 1834 1853 cbdata = 0; 1835 1854 } 1836 1855 1837 1856 EXIT_RAS (); 1838 1857 1839 1858 if (pcbdataret) 1840 1859 { 1841 1860 *pcbdataret = cbdata; 1842 1861 } 1843 1862 1844 1863 return; 1845 1864 } 1846 1865 1847 1866 1848 void WIN32API RasLog (char *fmt, ...)1867 void WIN32API_VA RasLog (const char *fmt, ...) 1849 1868 { 1850 1869 ENTER_RAS (NO_HANDLE); 1851 1870 1852 1871 va_list args; 1853 1872 1854 1873 va_start (args, fmt); 1855 1874 1856 1875 rasLogInternalV (NULL, fmt, args); 1857 1876 1858 1877 va_end (args); 1859 1878 1860 1879 EXIT_RAS (); 1861 1880 } 1862 1881 1863 void WIN32API RasLogNoEOL (char *fmt, ...)1882 void WIN32API_VA RasLogNoEOL (const char *fmt, ...) 1864 1883 { 1865 1884 va_list args; 1866 1885 1867 1886 ENTER_RAS (NO_HANDLE); 1868 1887 1869 1888 va_start (args, fmt); 1870 1889 1871 1890 ULONG noeolstate = rasdata.fNoEOL; 1872 1891 1873 1892 rasdata.fNoEOL = 1; 1874 1893 1875 1894 rasLogInternalV (NULL, fmt, args); 1876 1895 1877 1896 rasdata.fNoEOL = noeolstate; 1878 1897 1879 1898 va_end (args); 1880 1899 1881 1900 EXIT_RAS (); 1882 1901 } … … 1885 1904 { 1886 1905 ENTER_RAS (NO_HANDLE); 1887 1906 1888 1907 EXIT_RAS (); 1889 1908 } 1890 1909 1891 1910 void WIN32API RasLogObjects (RAS_TRACK_HANDLE h, ULONG flags) 1892 1911 { 1893 1912 ENTER_RAS (h); 1894 1913 1895 1914 rasLogInternal ("[%s] objects", h->objname); 1896 1915 1897 1916 if (h->fMemory) 1898 1917 { … … 1904 1923 } 1905 1924 } 1906 1925 1907 1926 RAS_OBJECT_INFO *iter = h->objfirst; 1908 1927 1909 1928 int count = 0; 1910 1929 ULONG cb = 0; // count total memory allocated if fMemory is set 1911 1930 1912 1931 while (iter) 1913 1932 { … … 1916 1935 cb += iter->cbobjdata; 1917 1936 } 1918 1937 1919 1938 if (flags & RAS_FLAG_LOG_OBJECTS) 1920 1939 { … … 1926 1945 { 1927 1946 rasLogInternal (" handle = %8.8X\n", iter->objhandle); 1928 1947 1929 1948 if (h->fLogObjectContent) 1930 1949 { … … 1933 1952 } 1934 1953 } 1935 1954 1936 1955 count++; 1937 1956 1938 1957 iter = iter->next; 1939 1958 } 1940 1959 1941 1960 rasLogInternal ("%d [%s] objects", count, h->objname); 1942 1961 1943 1962 if (h->fMemory && count > 0) 1944 1963 { 1945 1964 rasLogInternal ("%d bytes allocated", cb); 1946 1965 } 1947 1966 1948 1967 EXIT_RAS (); 1949 1968 1950 1969 return; 1951 1970 } … … 1954 1973 { 1955 1974 ENTER_RAS (h); 1956 1975 1957 1976 RAS_OBJECT_INFO *iter = h->objfirst; 1958 1977 1959 1978 int count = 0; 1960 1979 ULONG cb = 0; // count total memory allocated if fMemory is set 1961 1980 1962 1981 while (iter) 1963 1982 { … … 1966 1985 cb += iter->cbobjdata; 1967 1986 } 1968 1987 1969 1988 count++; 1970 1989 1971 1990 iter = iter->next; 1972 1991 } 1973 1992 1974 1993 if (h->fMemory) 1975 1994 { … … 1979 1998 } 1980 1999 } 1981 2000 1982 2001 if (pcount) 1983 2002 { 1984 2003 *pcount = count; 1985 2004 } 1986 2005 1987 2006 EXIT_RAS (); 1988 2007 1989 2008 return; 1990 2009 } 1991 2010 1992 void WIN32API RasLog2 (RAS_LOG_CHANNEL_H hchannel, char *fmt, ...)2011 void WIN32API_VA RasLog2 (RAS_LOG_CHANNEL_H hchannel, char *fmt, ...) 1993 2012 { 1994 2013 ENTER_RAS (NO_HANDLE); 1995 2014 1996 2015 va_list args; 1997 2016 1998 2017 va_start (args, fmt); 1999 2018 2000 2019 rasLogInternalV (hchannel, fmt, args); 2001 2020 2002 2021 va_end (args); 2003 2022 2004 2023 EXIT_RAS (); 2005 2024 } 2006 2025 2007 void WIN32API RasLogNoEOL2 (RAS_LOG_CHANNEL_H hchannel, char *fmt, ...)2026 void WIN32API_VA RasLogNoEOL2 (RAS_LOG_CHANNEL_H hchannel, char *fmt, ...) 2008 2027 { 2009 2028 va_list args; 2010 2029 2011 2030 ENTER_RAS (NO_HANDLE); 2012 2031 2013 2032 va_start (args, fmt); 2014 2033 2015 2034 ULONG noeolstate = rasdata.fNoEOL; 2016 2035 2017 2036 rasdata.fNoEOL = 1; 2018 2037 2019 2038 rasLogInternalV (hchannel, fmt, args); 2020 2039 2021 2040 rasdata.fNoEOL = noeolstate; 2022 2041 2023 2042 va_end (args); 2024 2043 2025 2044 EXIT_RAS (); 2026 2045 } … … 2029 2048 { 2030 2049 ENTER_RAS (NO_HANDLE); 2031 2050 2032 2051 EXIT_RAS (); 2033 2052 } … … 2047 2066 { 2048 2067 ENTER_RAS_RET (NO_HANDLE, ERROR_GEN_FAILURE); 2049 2068 2050 2069 int rc = NO_ERROR; 2051 2070 2052 2071 RasLogChannel *prlc = (RasLogChannel *)rasAlloc (sizeof (RasLogChannel)); 2053 2072 2054 2073 if (!prlc) 2055 2074 { … … 2059 2078 { 2060 2079 rc = rasOpenLogChannel (env_loghandler, prlc, filename); 2061 2080 2062 2081 if (rc != NO_ERROR) 2063 2082 { … … 2069 2088 } 2070 2089 } 2071 2090 2072 2091 EXIT_RAS (); 2073 2092 2074 2093 return rc; 2075 2094 } 2076 2095 2077 2096 void WIN32API RasWriteLogChannel (RAS_LOG_CHANNEL_H hchannel, const char *msg, ULONG length) 2078 2097 { 2079 2098 ENTER_RAS (NO_HANDLE); 2080 2099 2081 2100 if (length > 0) 2082 2101 { 2083 2102 RasLogChannel *prlc = (RasLogChannel *)hchannel; 2084 2103 2085 2104 prlc->pfnWriteLog (prlc->hlogfile, (char *)msg, length); 2086 2105 } 2087 2106 2088 2107 EXIT_RAS (); 2089 2108 } 2090 2109 2091 2110 void WIN32API RasCloseLogChannel (RAS_LOG_CHANNEL_H hchannel) 2092 2111 { 2093 2112 ENTER_RAS (NO_HANDLE); 2094 2113 2095 2114 RasLogChannel *prlc = (RasLogChannel *)hchannel; 2096 2115 2097 2116 rasCloseLogChannel (prlc); 2098 2117 2099 2118 rasFree (prlc); 2100 2119 2101 2120 EXIT_RAS (); 2102 2121 } 2103 2122 2104 2123 2105 2124 void WIN32API RasEntry (ULONG ulEvent, void *p, ULONG cb) 2106 2125 { 2107 2126 ENTER_RAS (NO_HANDLE); 2108 2127 2109 2128 if (rasdata.pet.RasEntry) 2110 2129 { 2111 2130 rasdata.pet.RasEntry (ulEvent, p, cb); 2112 2131 } 2113 2132 2114 2133 EXIT_RAS (); 2115 2134 } … … 2140 2159 { 2141 2160 ENTER_RAS (h); 2142 2161 2143 2162 if (h->fMemory && size > 0) 2144 2163 { … … 2146 2165 h->cbTotalAllocated += size; 2147 2166 } 2148 2167 2149 2168 EXIT_RAS (); 2150 2169 } 2151 2170 2152 2171 void WIN32API RasTrackMemRealloc (RAS_TRACK_HANDLE h, ULONG oldsize, ULONG newsize) 2153 2172 { 2154 2173 ENTER_RAS (h); 2155 2174 2156 2175 if (h->fMemory) 2157 2176 { … … 2162 2181 } 2163 2182 } 2164 2183 2165 2184 EXIT_RAS (); 2166 2185 } 2167 2186 2168 2187 void WIN32API RasTrackMemFree (RAS_TRACK_HANDLE h, ULONG size) 2169 2188 { 2170 2189 ENTER_RAS (h); 2171 2190 2172 2191 if (h->fMemory && size > 0) 2173 2192 { … … 2175 2194 h->cbTotalAllocated -= size; 2176 2195 } 2177 2196 2178 2197 EXIT_RAS (); 2179 2198 } 2180 2199 2200 } // extern "C" 2201 -
trunk/src/kernel32/asmutil.asm
r21343 r21916 11 11 NAME except 12 12 13 DATA32 14 DATA32 15 CONST32_RO 16 CONST32_RO 17 BSS32 18 BSS32 19 DGROUP 20 assumecs:FLAT, ds:FLAT, ss:FLAT, es:FLAT13 DATA32 segment dword use32 public 'DATA' 14 DATA32 ends 15 CONST32_RO segment dword use32 public 'CONST' 16 CONST32_RO ends 17 BSS32 segment dword use32 public 'BSS' 18 BSS32 ends 19 DGROUP group BSS32, DATA32 20 assume cs:FLAT, ds:FLAT, ss:FLAT, es:FLAT 21 21 22 22 extrn Dos32TIB:abs … … 24 24 CODE32 SEGMENT DWORD PUBLIC USE32 'CODE' 25 25 26 PUBLIC getEAX27 PUBLIC getEBX 28 getEAX proc near 29 ret 30 getEAX endp 31 32 public getEDX 33 getEDX proc near 34 mov EAX, EDX 35 ret 36 endp 37 38 getEBXproc near26 PUBLIC _getEAX 27 _getEAX proc near 28 ret 29 _getEAX endp 30 31 PUBLIC _getEDX 32 _getEDX proc near 33 mov EAX, EDX 34 ret 35 _getEDX endp 36 37 PUBLIC _getEBX 38 _getEBX proc near 39 39 mov eax, ebx 40 40 ret 41 getEBXendp41 _getEBX endp 42 42 43 43 PUBLIC GetFS … … 52 52 mov fs, eax 53 53 ret 54 SetFS 55 56 PUBLIC getCS57 getCSproc near54 SetFS endp 55 56 PUBLIC _getCS 57 _getCS proc near 58 58 mov eax, cs 59 59 ret 60 getCSendp61 62 PUBLIC getDS63 getDSproc near60 _getCS endp 61 62 PUBLIC _getDS 63 _getDS proc near 64 64 mov eax, ds 65 65 ret 66 getDSendp66 _getDS endp 67 67 68 68 PUBLIC SetReturnFS … … 75 75 SetReturnFS endp 76 76 77 PUBLIC getSS78 getSSproc near77 PUBLIC _getSS 78 _getSS proc near 79 79 mov ax, ss 80 80 ret 81 getSSendp82 83 PUBLIC getES84 getESproc near81 _getSS endp 82 83 PUBLIC _getES 84 _getES proc near 85 85 mov eax, es 86 86 ret 87 getESendp88 89 PUBLIC getGS90 getGSproc near87 _getES endp 88 89 PUBLIC _getGS 90 _getGS proc near 91 91 mov eax, gs 92 92 ret 93 getGSendp94 95 PUBLIC getESP96 getESPproc near93 _getGS endp 94 95 PUBLIC _getESP 96 _getESP proc near 97 97 mov eax, esp 98 98 ret 99 getESPendp99 _getESP endp 100 100 101 101 PUBLIC RestoreOS2FS … … 129 129 _Mul32x32to64 endp 130 130 131 132 133 134 _Sub64 131 align 4h 132 133 public _Sub64 134 _Sub64 proc 135 135 136 136 ; 34 c = a - b; … … 143 143 mov edi, [ebp+10h] ;&c 144 144 mov esi, [ebp+08h] ;&a 145 moveax,[esi] ;a.low146 movedx,[esi+04h] ;a.high145 mov eax,[esi] ;a.low 146 mov edx,[esi+04h] ;a.high 147 147 mov esi, [ebp+0ch] ;&b 148 subeax,[esi] ;b.low149 sbbedx,[esi+04h] ;b.high148 sub eax,[esi] ;b.low 149 sbb edx,[esi+04h] ;b.high 150 150 151 151 mov [edi], eax ;c.low … … 156 156 pop esi 157 157 leave 158 ret 159 _Sub64 160 161 162 163 164 _Add64 158 ret 159 _Sub64 endp 160 161 align 4h 162 163 public _Add64 164 _Add64 proc 165 165 166 166 ; 25 c = a + b; … … 173 173 mov edi, [ebp+10h] ;&c 174 174 mov esi, [ebp+08h] ;&a 175 moveax,[esi] ;a.low176 movedx,[esi+04h] ;a.high175 mov eax,[esi] ;a.low 176 mov edx,[esi+04h] ;a.high 177 177 mov esi, [ebp+0ch] ;&b 178 addeax,[esi] ;b.low179 adcedx,[esi+04h] ;b.high178 add eax,[esi] ;b.low 179 adc edx,[esi+04h] ;b.high 180 180 181 181 mov [edi], eax ;c.low … … 186 186 pop esi 187 187 leave 188 ret 189 190 _Add64 191 192 193 194 195 188 ret 189 190 _Add64 endp 191 192 193 align 4h 194 195 public _set_bit 196 196 ;void CDECL set_bit(int bitnr, void *addr); 197 197 _set_bit proc near … … 207 207 _set_bit endp 208 208 209 210 211 209 align 4h 210 211 public _test_bit 212 212 ;int CDECL test_bit(int bitnr, void *addr); 213 213 _test_bit proc near … … 225 225 _test_bit endp 226 226 227 227 public _clear_bit 228 228 ;void CDECL clear_bit(int bitnr, void *addr); 229 229 _clear_bit proc near -
trunk/src/kernel32/asmutil.h
r9946 r21916 14 14 #endif 15 15 16 ULONG getEAX();17 ULONG getEBX();18 ULONG getESP();19 USHORT getSS();20 USHORT getDS();21 USHORT getCS();22 USHORT getSS();23 USHORT getES();24 USHORT getFS();25 USHORT getGS();16 ULONG CDECL getEAX(); 17 ULONG CDECL getEBX(); 18 ULONG CDECL getESP(); 19 USHORT CDECL getSS(); 20 USHORT CDECL getDS(); 21 USHORT CDECL getCS(); 22 USHORT CDECL getSS(); 23 USHORT CDECL getES(); 24 USHORT CDECL getFS(); 25 USHORT CDECL getGS(); 26 26 27 27 void CDECL Mul32x32to64(PVOID result, DWORD op1, DWORD op2); -
trunk/src/kernel32/async.cpp
r7549 r21916 74 74 static GLOBALS Globals; 75 75 76 extern "C" { 76 77 77 78 /***************************************************************************** … … 108 109 } 109 110 111 } // extern "C" 112 -
trunk/src/kernel32/atom.cpp
r10251 r21916 21 21 #include <misc.h> 22 22 23 #ifdef __GNUC__ 24 #include <alloca.h> 25 #endif 26 23 27 #define DBG_LOCALLOG DBG_atom 24 28 #include "dbglocal.h" … … 29 33 #define LOOKUP_DELETE 2 30 34 #define LOOKUP_NOCASE 0x80000000 35 36 extern "C" { 31 37 32 38 ATOM APIENTRY LookupAtom(HATOMTBL hAtomTbl, PSZ psz, ULONG actionMask); … … 355 361 //****************************************************************************** 356 362 //****************************************************************************** 363 364 } // extern "C" -
trunk/src/kernel32/char.cpp
r7886 r21916 26 26 27 27 #include <misc.h> 28 #include <wine \unicode.h>28 #include <wine/unicode.h> 29 29 30 30 -
trunk/src/kernel32/codepage.c
r21355 r21916 211 211 if (table->info.def_char & 0xff00) 212 212 { 213 cpinfo->DefaultChar[0] = table->info.def_char & 0xff00;213 cpinfo->DefaultChar[0] = (table->info.def_char & 0xff00) >> 8; 214 214 cpinfo->DefaultChar[1] = table->info.def_char & 0x00ff; 215 215 } -
trunk/src/kernel32/conbuffer.cpp
r21302 r21916 53 53 * Includes * 54 54 *****************************************************************************/ 55 56 // Vio/Kbd/Mou declarations conflict in GCC and in real OS2TK headers; 57 // force GCC declarations since we link against GCC libs 58 #if defined (__EMX__) && defined (USE_OS2_TOOLKIT_HEADERS) 59 #undef USE_OS2_TOOLKIT_HEADERS 60 #endif 55 61 56 62 #define INCL_WIN -
trunk/src/kernel32/conbuffervio.cpp
r10010 r21916 53 53 * Includes * 54 54 *****************************************************************************/ 55 56 // Vio/Kbd/Mou declarations conflict in GCC and in real OS2TK headers; 57 // force GCC declarations since we link against GCC libs 58 #if defined (__EMX__) && defined (USE_OS2_TOOLKIT_HEADERS) 59 #undef USE_OS2_TOOLKIT_HEADERS 60 #endif 55 61 56 62 #define INCL_WIN -
trunk/src/kernel32/conbuffervio.h
r10010 r21916 63 63 LPDWORD lpNumberOfAttrsWritten); 64 64 65 DWORD HMDeviceConsoleVioBufferClass::FillConsoleOutputCharacterA(PHMHANDLEDATA pHMHandleData,66 67 68 69 65 DWORD FillConsoleOutputCharacterA(PHMHANDLEDATA pHMHandleData, 66 UCHAR ucCharacter, 67 DWORD nLength, 68 COORD dwWriteCoord, 69 LPDWORD lpNumberOfCharsWritten); 70 70 71 71 }; -
trunk/src/kernel32/conodin32.cpp
r8774 r21916 237 237 if (pNew) 238 238 { 239 pNew->pfnHandler = pfnHandler;239 pNew->pfnHandler = (void *)pfnHandler; 240 240 pNew->pPrev = NULL; 241 241 -
trunk/src/kernel32/conprop.cpp
r5308 r21916 70 70 ULONG ulID; // Resource ID for dialog page 71 71 PFNWP wpDlgProc; // dialog window procedure 72 P SZszStatusLineText; // Text to go on status line73 P SZszTabText; // Text to go on major tab72 PCSZ szStatusLineText; // Text to go on status line 73 PCSZ szTabText; // Text to go on major tab 74 74 ULONG idFocus; // ID of the control to get the focus first 75 75 BOOL fParent; // Is this a Parent page with minor pages … … 92 92 /**********************************************************************/ 93 93 94 static VOID ErrorMsg( PSZ szFormat,95 ... 94 static VOID ErrorMsg(PCSZ szFormat, 95 ...); 96 96 97 97 … … 195 195 }; 196 196 197 static P SZ priorities[] = {"idle", "normal", "critical", "server"};197 static PCSZ priorities[] = {"idle", "normal", "critical", "server"}; 198 198 #define NUMPRIORITIES 4 199 199 … … 216 216 #define MESSAGE_SIZE 1024 217 217 218 static VOID ErrorMsg( PSZ szFormat,219 ... 218 static VOID ErrorMsg(PCSZ szFormat, 219 ...) 220 220 { 221 221 PSZ szMsg; -
trunk/src/kernel32/conprop2.cpp
r5308 r21916 268 268 szKey, 269 269 0, 270 "",270 NULL, 271 271 0, 272 272 KEY_ALL_ACCESS, … … 281 281 #define REGSAVEVALUE(name,var) \ 282 282 lRes = RegSetValueExA(hkConsole, name, 0, REG_DWORD, \ 283 ( LPBYTE)&pConsoleOptions->var, sizeof(pConsoleOptions->var));283 (const BYTE *)&pConsoleOptions->var, sizeof(pConsoleOptions->var)); 284 284 285 285 REGSAVEVALUE("AutomaticTermination", fTerminateAutomatically) -
trunk/src/kernel32/console.cpp
r21426 r21916 53 53 * Header Files * 54 54 *******************************************************************************/ 55 #include <process.h> 56 #include <stdlib.h> 57 #include <string.h> 55 56 // Vio/Kbd/Mou declarations conflict in GCC and in real OS2TK headers; 57 // force GCC declarations since we link against GCC libs 58 #if defined (__EMX__) && defined (USE_OS2_TOOLKIT_HEADERS) 59 #undef USE_OS2_TOOLKIT_HEADERS 60 #endif 58 61 59 62 #define INCL_WIN … … 69 72 #define INCL_AVIO 70 73 #include <os2wrap.h> //Odin32 OS/2 api wrappers 74 75 #include <process.h> 76 #include <stdlib.h> 77 #include <string.h> 71 78 72 79 #include <win32type.h> … … 2308 2315 } 2309 2316 2317 extern "C" { 2310 2318 2311 2319 /***************************************************************************** … … 3772 3780 return fResult; 3773 3781 } 3782 3783 } // extern "C" -
trunk/src/kernel32/console2.h
r6919 r21916 221 221 #define MAX_OS2_ROWS 255 222 222 #define MAX_OS2_COLUMNS 255 223 #define FORMAT_CGA 1224 223 #define CONSOLE_TIMER_ID 1 225 224 #define CONSOLE_INPUTQUEUESIZE 256 226 225 226 #ifndef FORMAT_CGA 227 #define FORMAT_CGA 1 228 #endif 227 229 228 230 #define CONSOLECURSOR_HIDE 1 -
trunk/src/kernel32/cpu.cpp
r21343 r21916 28 28 29 29 static BYTE PF[64] = {0,}; 30 static nrCPUs= 1;30 static int nrCPUs = 1; 31 31 static SYSTEM_INFO cachedsi = {0}; 32 32 … … 53 53 * Note that there is a hierarchy for every processor installed, so this 54 54 * supports multiprocessor systems. This is done like Win95 does it, I think. 55 * 55 * 56 56 * It also creates a cached flag array for IsProcessorFeaturePresent(). 57 57 * … … 104 104 } 105 105 106 if(SupportsCPUID()) 106 if(SupportsCPUID()) 107 107 { 108 for(int i=0;i<cachedsi.dwNumberOfProcessors;i++) 108 for(int i=0;i<cachedsi.dwNumberOfProcessors;i++) 109 109 { 110 110 // Create a new processor subkey … … 153 153 154 154 Sleep(32); //sleep for about 32 ms 155 155 156 156 GetTSC((LONG *)&tsc2.LowPart, &tsc2.HighPart); 157 157 QueryPerformanceCounter(&time2); … … 167 167 tmp1 = (double)tsc1.LowPart + (double)tsc1.HighPart*4.0*1024.0*1024.0; 168 168 clockticks = tmp - tmp1; 169 if(millisec > 0) 169 if(millisec > 0) 170 170 {//make sure we have something valid here 171 171 tmp = 1000 / millisec; … … 199 199 if (features & CPUID_FPU_PRESENT) { 200 200 if (i == 0) { 201 if(RegCreateKeyA(HKEY_LOCAL_MACHINE,"HARDWARE\\DESCRIPTION\\System\\FloatingPointProcessor",&fpukey)!=ERROR_SUCCESS) 201 if(RegCreateKeyA(HKEY_LOCAL_MACHINE,"HARDWARE\\DESCRIPTION\\System\\FloatingPointProcessor",&fpukey)!=ERROR_SUCCESS) 202 202 dprintf(("Unable to register FPU information\n")); 203 203 } … … 208 208 } 209 209 } 210 210 211 211 } //for each cpu 212 212 } -
trunk/src/kernel32/cpuhlp.asm
r4407 r21916 14 14 ASSUME DS:FLAT,SS:FLAT 15 15 16 PUBLIC CPUFeatures17 CPUFeaturesdd 016 PUBLIC _CPUFeatures 17 _CPUFeatures dd 0 18 18 19 19 DATA32 ENDS … … 85 85 mov eax, edx 86 86 87 mov [ CPUFeatures], eax87 mov [_CPUFeatures], eax 88 88 89 89 pop edx -
trunk/src/kernel32/critsection.cpp
r21302 r21916 2 2 /* 3 3 * Win32 critical sections 4 * 4 * 5 5 * 6 6 * … … 238 238 return ret; 239 239 } 240 241 extern "C" { 240 242 241 243 /*********************************************************************** … … 416 418 } 417 419 #endif 418 420 419 421 if (--crit->RecursionCount) 420 422 { … … 470 472 } 471 473 474 } // extern "C" 475 -
trunk/src/kernel32/cvtresource.h
r1454 r21916 7 7 #include <winaccel.h> 8 8 #include <wincursor.h> 9 #include <winimagebase.h>9 #include "winimagebase.h" 10 10 11 11 void *ConvertAccelerator(WINACCEL *accdata, int size, int cp = 0); -
trunk/src/kernel32/dbglocal.cpp
r21302 r21916 20 20 USHORT DbgEnabledLvl2KERNEL32[DBG_MAXFILES] = {0}; 21 21 22 static c har*DbgFileNames[DBG_MAXFILES] =22 static const char *DbgFileNames[DBG_MAXFILES] = 23 23 { 24 24 "kernel32", -
trunk/src/kernel32/dbglog.cpp
r21343 r21916 26 26 #include <string.h> 27 27 #include <stdarg.h> 28 #include <process.h> 28 29 #include <win32type.h> 29 30 #include <win32api.h> … … 93 94 /* arguments. */ 94 95 /* ----------------------------------------------------------------- */ 95 int SYSTEM WriteLog(c har *f, ...)96 int SYSTEM WriteLog(const char *f, ...) 96 97 { 97 98 TIB *ptib; /* process/thread id structures */ … … 257 258 static BOOL fLogging = TRUE; 258 259 static int dwEnableLogging = 1; 260 #ifdef __IBMC__ 259 261 static int oldcrtmsghandle = 0; 262 #endif 260 263 261 264 static BOOL fDisableThread[5] = {0}; 262 265 static BOOL fFlushLines = TRUE; 263 266 264 static c har *pszLastLogEntry = NULL;267 static const char *pszLastLogEntry = NULL; 265 268 266 269 //#define CHECK_ODINHEAP … … 305 308 } 306 309 307 int SYSTEM WriteLog(c har *tekst, ...)310 int SYSTEM WriteLog(const char *tekst, ...) 308 311 { 309 312 USHORT sel = RestoreOS2FS(); … … 330 333 #ifdef WIN32_IP_LOGGING 331 334 char *logserver = getenv("WIN32LOG_IPSERVER"); 332 if(logserver && loadNr == 0) {335 if(logserver) { 333 336 sock_init(); 334 337 … … 346 349 pszLogBase = "odin32_"; 347 350 348 sprintf(szLogFile, "%s%d.log", pszLogBase, loadNr);351 sprintf(szLogFile, "%s%d.log", pszLogBase, getpid()); 349 352 flog = fopen(szLogFile, "w"); 350 if(flog == NULL) 353 if(flog == NULL) 351 354 {//probably running exe on readonly device 352 sprintf(szLogFile, "%sodin32_%d.log", kernel32Path, loadNr);355 sprintf(szLogFile, "%sodin32_%d.log", kernel32Path, getpid()); 353 356 flog = fopen(szLogFile, "w"); 354 357 } 358 #ifdef __IBMC__ 355 359 oldcrtmsghandle = _set_crt_msg_handle(fileno(flog)); 360 #endif 356 361 } 357 362 else … … 385 390 if(logSocket == -1) { 386 391 #endif 387 if(teb) 392 if(teb) 388 393 { 389 394 ULONG ulCallDepth; … … 393 398 ulCallDepth = 0; 394 399 #endif 395 400 396 401 teb->o.odin.logfile = (DWORD)flog; 397 402 398 403 #ifdef LOG_TIME 399 404 if(sel == 0x150b && fSwitchTIBSel) 400 fprintf(flog, 405 fprintf(flog, 401 406 "t%02d (%3d): (%x) (FS=150B) ", 402 407 LOWORD(teb->o.odin.threadId), 403 408 ulCallDepth, 404 409 GetTickCount()); 405 else 406 fprintf(flog, 410 else 411 fprintf(flog, 407 412 "t%02d (%3d): (%x) ", 408 413 LOWORD(teb->o.odin.threadId), … … 410 415 GetTickCount()); 411 416 #else 412 if(sel == 0x150b && fSwitchTIBSel) 413 fprintf(flog, 417 if(sel == 0x150b && fSwitchTIBSel) 418 fprintf(flog, 414 419 #ifdef SHOW_FPU_CONTROLREG 415 420 "t%02d (%3d)(%3x): ", … … 422 427 ulCallDepth); 423 428 #endif 424 else 425 fprintf(flog, 429 else 430 fprintf(flog, 426 431 #ifdef SHOW_FPU_CONTROLREG 427 432 "t%02d (%3d)(%3x): ", … … 450 455 int prefixlen = 0; 451 456 452 if(teb) 457 if(teb) 453 458 { 454 459 ULONG ulCallDepth; … … 459 464 #endif 460 465 #ifdef LOG_TIME 461 if(sel == 0x150b && fSwitchTIBSel) 466 if(sel == 0x150b && fSwitchTIBSel) 462 467 sprintf(logbuffer, "t%02d (%3d): %x (FS=150B) ", 463 468 LOWORD(teb->o.odin.threadId), ulCallDepth, GetTickCount()); 464 else 469 else 465 470 sprintf(logbuffer, "t%02d (%3d): %x ", 466 471 LOWORD(teb->o.odin.threadId), ulCallDepth, GetTickCount()); 467 472 #else 468 if(sel == 0x150b && fSwitchTIBSel) 473 if(sel == 0x150b && fSwitchTIBSel) 469 474 sprintf(logbuffer, "t%02d (%3d): (FS=150B) ", 470 475 LOWORD(teb->o.odin.threadId), ulCallDepth); 471 else 476 else 472 477 sprintf(logbuffer, "t%02d (%3d): ", 473 478 LOWORD(teb->o.odin.threadId), ulCallDepth); … … 497 502 if(tekst[strlen(tekst)-1] != '\n') 498 503 fprintf(flog, "\n"); 499 #if 0 504 #if 0 500 505 if (teb && LOWORD(teb->o.odin.threadId) > 1) 501 506 { … … 514 519 break; 515 520 } 516 521 517 522 if ((ULONG)pframe < getESP()) 518 523 { … … 554 559 //****************************************************************************** 555 560 //****************************************************************************** 556 int SYSTEM WriteLogNoEOL(c har *tekst, ...)561 int SYSTEM WriteLogNoEOL(const char *tekst, ...) 557 562 { 558 563 USHORT sel = RestoreOS2FS(); … … 572 577 char logname[CCHMAXPATH]; 573 578 574 sprintf(logname, "odin32_%d.log", loadNr);579 sprintf(logname, "odin32_%d.log", getpid()); 575 580 flog = fopen(logname, "w"); 576 581 if(flog == NULL) {//probably running exe on readonly device 577 sprintf(logname, "%sodin32_%d.log", kernel32Path, loadNr);582 sprintf(logname, "%sodin32_%d.log", kernel32Path, getpid()); 578 583 flog = fopen(logname, "w"); 579 584 } … … 612 617 //****************************************************************************** 613 618 //****************************************************************************** 614 int SYSTEM WritePrivateLog(void *logfile, c har *tekst, ...)619 int SYSTEM WritePrivateLog(void *logfile, const char *tekst, ...) 615 620 { 616 621 USHORT sel = RestoreOS2FS(); … … 717 722 void CloseLogFile() 718 723 { 724 #ifdef __IBMC__ 719 725 if(oldcrtmsghandle) 720 726 _set_crt_msg_handle(oldcrtmsghandle); 727 #endif 721 728 722 729 #ifdef WIN32_IP_LOGGING … … 789 796 "int 3" 790 797 #endif 798 extern "C" 791 799 void WIN32API DebugBreak() 792 800 { -
trunk/src/kernel32/dbgwrap.cpp
r21567 r21916 13 13 14 14 #define DBG_LOCALLOG DBG_trace 15 #include <dbglocal.h>15 #include "dbglocal.h" 16 16 17 17 #define DBGWRAP_MODULE "KERNEL32" 18 18 #include <dbgwrap.h> 19 19 20 extern "C" { 20 21 21 22 BOOL WINAPI TryEnterCriticalSection( CRITICAL_SECTION *crit ); … … 950 951 DEBUGWRAP_LVL2_12(OemToCharBuffW) 951 952 DEBUGWRAP_LVL2_8(OemToCharW) 953 954 } // extern "C" -
trunk/src/kernel32/directory.cpp
r21302 r21916 6 6 * Copyright 1998 Sander van Leeuwen 7 7 * 8 * NOTE: Directory creation has to be done in install program (odin\win) 8 * NOTE: Directory creation has to be done in install program (odin\win) 9 9 * 10 10 * Parts based on Wine code (991031) (files\directory.c) … … 14 14 * Copyright 1995 Alexandre Julliard 15 15 * 16 * TODO: 16 * TODO: 17 17 * - System/window directories should be created by install program! 18 18 * … … 30 30 #include <os2win.h> 31 31 #include <stdlib.h> 32 #include <string.h> 33 #ifdef __GNUC__ 34 #include <alloca.h> 35 #endif 32 36 #include <unicode.h> 33 37 #include <heapstring.h> 34 38 #include <options.h> 35 39 #include "initterm.h" 36 #include <win\file.h> 37 #include <string.h> 40 #include <win/file.h> 38 41 #include "oslibdos.h" 39 42 #include "profile.h" … … 80 83 len = strlen(DIR_System); 81 84 if(DIR_System[len-1] == '\\') { 82 DIR_System[len-1] = 0; 85 DIR_System[len-1] = 0; 83 86 } 84 87 len = PROFILE_GetOdinIniString(ODINDIRECTORIES,"WINDOWS","",DIR_Windows,sizeof(DIR_Windows)); 85 88 if (len > 2) { 86 89 if(DIR_Windows[len-1] == '\\') { 87 DIR_Windows[len-1] = 0; 90 DIR_Windows[len-1] = 0; 88 91 } 89 92 } … … 116 119 len = strlen(DIR_System); 117 120 if(DIR_System[len-1] == '\\') { 118 DIR_System[len-1] = 0; 121 DIR_System[len-1] = 0; 119 122 } 120 123 strcpy(DIR_Windows, szWindowsDir); 121 124 len = strlen(DIR_Windows); 122 125 if(DIR_Windows[len-1] == '\\') { 123 DIR_Windows[len-1] = 0; 126 DIR_Windows[len-1] = 0; 124 127 } 125 128 … … 146 149 rc = OSLibDosQueryDir(nBufferLength, lpBuffer); 147 150 if(rc && rc < nBufferLength) { 148 dprintf(("CurrentDirectory = %s (%d)", lpBuffer, rc)); 149 } 150 else dprintf(("CurrentDirectory returned %d", rc)); 151 dprintf(("CurrentDirectory = %s (%d)", lpBuffer, rc)); 152 } 153 else dprintf(("CurrentDirectory returned %d", rc)); 151 154 return rc; 152 155 } … … 196 199 return FALSE; 197 200 } 198 201 199 202 // cut off trailing backslashes 200 203 // not if a process wants to change to the root directory … … 204 207 (len != 1) ) 205 208 { 206 LPSTR lpTemp = (LPSTR) _alloca(len);209 LPSTR lpTemp = (LPSTR)alloca(len); 207 210 lstrcpynA(lpTemp, 208 211 lpstrDirectory, … … 264 267 265 268 int len = strlen(lpstrDirectory); 266 269 267 270 // cut off trailing backslashes 268 271 if ( (lpstrDirectory[len - 1] == '\\') || 269 272 (lpstrDirectory[len - 1] == '/') ) 270 273 { 271 LPSTR lpTemp = (LPSTR) _alloca(len);274 LPSTR lpTemp = (LPSTR)alloca(len); 272 275 lstrcpynA(lpTemp, 273 276 lpstrDirectory, … … 275 278 lpstrDirectory = lpTemp; 276 279 } 277 280 278 281 dprintf(("CreateDirectoryA %s", lpstrDirectory)); 279 282 280 283 // Creation of an existing directory will fail (verified in NT4 & XP) 281 284 DWORD dwAttr = GetFileAttributesA(lpstrDirectory); 282 if(dwAttr != -1) 285 if(dwAttr != -1) 283 286 { 284 287 if (dwAttr & FILE_ATTRIBUTE_DIRECTORY) … … 287 290 return FALSE; 288 291 } 289 } 292 } 290 293 return(OSLibDosCreateDirectory(lpstrDirectory)); 291 294 } … … 437 440 asciibuffer = (char *)alloca(uSize+1); 438 441 439 if(lpBuffer && asciibuffer == NULL) 442 if(lpBuffer && asciibuffer == NULL) 440 443 { 441 444 DebugInt3(); … … 445 448 if(rc && asciibuffer) 446 449 AsciiToUnicode(asciibuffer, lpBuffer); 447 450 448 451 return(rc); 449 452 } … … 495 498 asciibuffer = (char *)alloca(uSize+1); 496 499 497 if(lpBuffer && asciibuffer == NULL) 500 if(lpBuffer && asciibuffer == NULL) 498 501 { 499 502 DebugInt3(); … … 503 506 if(rc && asciibuffer) 504 507 AsciiToUnicode(asciibuffer, lpBuffer); 505 508 506 509 return(rc); 507 510 } … … 524 527 { 525 528 int len = strlen(lpstrDirectory); 526 529 527 530 if(lpstrDirectory == NULL) { 528 531 SetLastError(ERROR_INVALID_PARAMETER); … … 533 536 (lpstrDirectory[len - 1] == '/') ) 534 537 { 535 LPSTR lpTemp = (LPSTR) _alloca(len);538 LPSTR lpTemp = (LPSTR)alloca(len); 536 539 lstrcpynA(lpTemp, 537 540 lpstrDirectory, … … 539 542 lpstrDirectory = lpTemp; 540 543 } 541 544 542 545 dprintf(("RemoveDirectory %s", lpstrDirectory)); 543 546 … … 619 622 those (according to SDK docs) */ 620 623 if ((path != NULL) && strchr(path, ';')) { 621 ret = OSLibDosSearchPath(OSLIB_SEARCHDIR, (LPSTR)path, (LPSTR)name, 624 ret = OSLibDosSearchPath(OSLIB_SEARCHDIR, (LPSTR)path, (LPSTR)name, 622 625 full_name, MAX_PATHNAME_LEN); 623 626 goto done; … … 647 650 name = tmp; 648 651 } 649 652 650 653 /* If we have an explicit path, everything's easy */ 651 654 … … 704 707 * filename is returned. 705 708 * Failure: Zero 706 * 709 * 707 710 * NOTES 708 711 * Should call SetLastError(but currently doesn't). … … 732 735 LPSTR nameA = HEAP_strdupWtoA( GetProcessHeap(), 0, name ); 733 736 LPSTR extA = HEAP_strdupWtoA( GetProcessHeap(), 0, ext ); 734 737 735 738 dprintf(("SearchPathA %s %s %s", pathA, nameA, extA)); 736 739 DWORD ret = DIR_SearchPath( pathA, nameA, extA, (LPSTR)full_name ); 737 740 738 741 if (NULL != extA) 739 742 HeapFree( GetProcessHeap(), 0, extA ); 740 743 741 744 if (NULL != nameA) 742 745 HeapFree( GetProcessHeap(), 0, nameA ); 743 746 744 747 if (NULL != pathA) 745 748 HeapFree( GetProcessHeap(), 0, pathA ); 746 749 747 750 if (!ret) return 0; 748 751 -
trunk/src/kernel32/dosdevice.cpp
r21355 r21916 9 9 * Copyright 1993 Erik Bos 10 10 * Copyright 1996 Alexandre Julliard 11 * 11 * 12 12 * Project Odin Software License can be found in LICENSE.TXT 13 13 * … … 24 24 #include <os2win.h> 25 25 #include <stdio.h> 26 #include <string.h> 26 27 #include <winnls.h> 27 28 #include "unicode.h" 28 29 #include "handlemanager.h" 29 30 #include "handlenames.h" 30 #include <string.h>31 31 32 32 … … 150 150 } 151 151 *ptr = 0; 152 152 153 153 SetLastError(ERROR_SUCCESS); 154 154 return sizeof(devices)+len; … … 176 176 if(devname[1] == ':' && devname[2] == 0) { 177 177 int ret = GetDriveTypeA(devname); 178 if(ret != DRIVE_UNKNOWN) 178 if(ret != DRIVE_UNKNOWN) 179 179 { 180 180 if(bufsize < 16) { -
trunk/src/kernel32/dosqss.h
r1924 r21916 7 7 #endif 8 8 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 APIRET APIENTRY DosQuerySysState(ULONG func,ULONG arg1,ULONG arg2, 13 ULONG _res_,PVOID buf,ULONG bufsz); 14 15 #ifdef __cplusplus 16 } 17 #endif 18 19 inline APIRET _DosQuerySysState(ULONG func,ULONG arg1,ULONG arg2, 20 ULONG _res_,PVOID buf,ULONG bufsz) 21 { 22 APIRET yyrc; 23 USHORT sel = RestoreOS2FS(); 24 25 yyrc = DosQuerySysState(func, arg1, arg2, _res_, buf, bufsz); 26 SetFS(sel); 27 28 return yyrc; 29 } 9 /* DosQuerySysState is declared in os2wrap.h */ 30 10 31 11 #undef DosAllocMem -
trunk/src/kernel32/environ.cpp
r21355 r21916 41 41 //list of important OS/2 environment variables that must not be removed 42 42 //when creating a new process 43 static c har *lpReservedEnvStrings[] = {43 static const char *lpReservedEnvStrings[] = { 44 44 "HOSTNAME", 45 45 "TZ", … … 76 76 //TEMP is a standard environment variable in Windows, but is not always 77 77 //present in OS/2, so make sure it is. 78 if(GetEnvironmentVariableA("TEMP", szVar, sizeof(szVar)) == 0) 78 if(GetEnvironmentVariableA("TEMP", szVar, sizeof(szVar)) == 0) 79 79 { 80 80 if(GetEnvironmentVariableA("TMP", szVar, sizeof(szVar)) == 0) { … … 85 85 } 86 86 } 87 88 extern "C" { 89 87 90 //****************************************************************************** 88 91 //****************************************************************************** … … 226 229 * If the function fails, the return value is zero 227 230 * Remark : 228 * Status : 231 * Status : 229 232 * 230 233 *****************************************************************************/ … … 254 257 if ((p = strchr( src + 1, '%' )) != NULL) 255 258 { 256 len = p - src - 1; /* Length of the variable name */ 259 len = p - src - 1; /* Length of the variable name */ 257 260 if ((var = ENV_FindVariable( GetEnvironmentStringsA(), 258 261 src + 1, len )) != NULL) … … 309 312 * If the function fails, the return value is zero 310 313 * Remark : 311 * Status : 314 * Status : 312 315 * 313 316 *****************************************************************************/ … … 330 333 return ret; 331 334 } 335 336 } // extern "C" 337 332 338 //****************************************************************************** 333 339 // Create a new process environment block based on input from the application … … 340 346 char *tmpenvnew, *newenv; 341 347 int newsize = 0, len; 342 348 343 349 dprintf(("New environment:")); 344 350 while(*tmpenvold) { … … 374 380 tmpenvold += len+1; 375 381 } 382 int i; 376 383 for(i=0;i<sizeof(lpReservedEnvStrings)/sizeof(char *);i++) { 377 384 if(!ENV_FindVariable(lpEnvironment, lpReservedEnvStrings[i], strlen(lpReservedEnvStrings[i]))) { -
trunk/src/kernel32/exceptions.cpp
r21662 r21916 109 109 static PEXCEPTION_HANDLER StartupCodeHandler = NULL; 110 110 111 extern "C" PWINEXCEPTION_FRAME GetExceptionRecord(ULONG offset, ULONG segment); 111 extern "C" { 112 113 PWINEXCEPTION_FRAME GetExceptionRecord(ULONG offset, ULONG segment); 112 114 113 115 LONG WIN32API UnhandledExceptionFilter(PWINEXCEPTION_POINTERS lpexpExceptionInfo); … … 118 120 PCONTEXTRECORD pCtxRec, PVOID p, PSZ szTrapDump); 119 121 120 extern "C"121 122 int __cdecl __seh_handler(PWINEXCEPTION_RECORD pRec, 122 123 PWINEXCEPTION_FRAME pFrame, 123 124 PCONTEXTRECORD pContext, PVOID pVoid); 124 125 125 extern "C"126 126 PWINEXCEPTION_FRAME __cdecl __seh_get_prev_frame(PWINEXCEPTION_FRAME pFrame); 127 127 … … 162 162 } 163 163 164 #if 0164 #ifdef __EMX__ 165 165 static inline WINEXCEPTION_FRAME * EXC_push_frame( WINEXCEPTION_FRAME *frame ) 166 166 { … … 182 182 183 183 /***************************************************************************** 184 * Name : VOID _ Pascal OS2RaiseException184 * Name : VOID __cdecl OS2RaiseException 185 185 * Purpose : Unwinds exception handlers (heavily influenced by Wine) 186 186 * Parameters: ... … … 195 195 void WIN32API RtlRaiseException(WINEXCEPTION_RECORD *rec, WINCONTEXT *context); 196 196 197 VOID _ Pascal OS2RaiseException(DWORD dwExceptionCode,197 VOID __cdecl OS2RaiseException(DWORD dwExceptionCode, 198 198 DWORD dwExceptionFlags, 199 199 DWORD cArguments, … … 308 308 } 309 309 310 #if 1 310 #ifndef __EMX__ 311 extern "C" 311 312 DWORD EXC_CallHandler( WINEXCEPTION_RECORD *record, WINEXCEPTION_FRAME *frame, 312 313 WINCONTEXT *context, WINEXCEPTION_FRAME **dispatcher, … … 441 442 } 442 443 /***************************************************************************** 443 * Name : int _ Pascal OS2RtlUnwind444 * Name : int __cdecl OS2RtlUnwind 444 445 * Purpose : Unwinds exception handlers (heavily influenced by Wine) 445 446 * Parameters: ... … … 452 453 *****************************************************************************/ 453 454 454 int _ Pascal OS2RtlUnwind(PWINEXCEPTION_FRAME pEndFrame,455 int __cdecl OS2RtlUnwind(PWINEXCEPTION_FRAME pEndFrame, 455 456 LPVOID unusedEip, 456 457 PWINEXCEPTION_RECORD pRecord, … … 756 757 } 757 758 758 P SZpszExceptionName = "<unknown>"; /* points to name/type excpt */759 PCSZ pszExceptionName = "<unknown>"; /* points to name/type excpt */ 759 760 APIRET rc = XCPT_CONTINUE_SEARCH; /* excpt-dep. code */ 760 761 BOOL fExcptSoftware = FALSE; /* software/hardware gen. exceptn */ … … 1181 1182 1182 1183 if(lpszExeName) { 1183 DosWrite(hFile, "\n", 2, &ulBytesWritten);1184 DosWrite(hFile, (PVOID)"\n", 2, &ulBytesWritten); 1184 1185 DosWrite(hFile, lpszExeName, strlen(lpszExeName), &ulBytesWritten); 1185 DosWrite(hFile, "\n", 2, &ulBytesWritten);1186 DosWrite(hFile, (PVOID)"\n", 2, &ulBytesWritten); 1186 1187 } 1187 1188 } … … 1791 1792 * Author : Sander van Leeuwen [Sun, 1999/08/21 12:16] 1792 1793 *****************************************************************************/ 1793 void OS2SetExceptionHandler(void *exceptframe)1794 void SYSTEM OS2SetExceptionHandler(void *exceptframe) 1794 1795 { 1795 1796 PEXCEPTIONREGISTRATIONRECORD pExceptRec = (PEXCEPTIONREGISTRATIONRECORD)exceptframe; … … 1954 1955 * Author : Sander van Leeuwen [Sun, 1999/08/21 12:16] 1955 1956 *****************************************************************************/ 1956 void OS2UnsetExceptionHandler(void *exceptframe)1957 void SYSTEM OS2UnsetExceptionHandler(void *exceptframe) 1957 1958 { 1958 1959 PEXCEPTIONREGISTRATIONRECORD pExceptRec = (PEXCEPTIONREGISTRATIONRECORD)exceptframe; … … 1986 1987 //***************************************************************************** 1987 1988 1989 } // extern "C" 1990 -
trunk/src/kernel32/exceptstackdump.cpp
r21611 r21916 14 14 #define INCL_MISC 15 15 #define INCL_BASE 16 #include <os2 .h> //No wrappers needed16 #include <os2wrap.h> //Odin32 OS/2 api wrappers 17 17 #include <stdio.h> 18 18 #include <string.h> … … 30 30 #include "dbglocal.h" 31 31 32 int SYSTEM EXPORT WriteLogNoEOL(c har *tekst, ...);32 int SYSTEM EXPORT WriteLogNoEOL(const char *tekst, ...); 33 33 34 34 #define FIX64KLIMIT … … 160 160 Buffer[SymDef32.cbSymName] = 0x00; 161 161 // dprintf(("%s\n", Buffer)); 162 #if def RAS162 #if defined(RAS) || defined(__GNUC__) 163 163 strncpy(Info, Buffer, cbInfo); 164 164 strncat(Info, "\n", cbInfo); … … 183 183 { 184 184 // symbol found 185 #if def RAS185 #if defined(RAS) || defined(__GNUC__) 186 186 snprintf(Info, cbInfo, "between %s + 0x%X", Buffer, TrapOffset - LastVal); 187 187 #else … … 197 197 { 198 198 // symbol found, as above 199 #if def RAS199 #if defined(RAS) || defined(__GNUC__) 200 200 snprintf(&Info[strlen(Info)], cbInfo - strlen(Info), " and %s - 0x%X\n", Buffer, LastVal - TrapOffset); 201 201 #else … … 223 223 Buffer[SymDef16.cbSymName] = 0x00; 224 224 // dprintf(("%s\n", Buffer)); 225 #if def RAS225 #if defined(RAS) || defined(__GNUC__) 226 226 strncpy(Info, Buffer, cbInfo); 227 227 strncat(Info, "\n", cbInfo); … … 245 245 if (SymDef16.wSymVal > TrapOffset) 246 246 { 247 #if def RAS247 #if defined(RAS) || defined(__GNUC__) 248 248 snprintf(Info, cbInfo, "between %s + 0x%X", Buffer, TrapOffset - LastVal); 249 249 #else … … 257 257 if (SymDef16.wSymVal > TrapOffset) 258 258 { 259 #if def RAS259 #if defined(RAS) || defined(__GNUC__) 260 260 snprintf(&Info[strlen(Info)], cbInfo - strlen(Info), " and %s - 0x%X\n", Buffer, LastVal - TrapOffset); 261 261 #else -
trunk/src/kernel32/exceptutil.asm
r10409 r21916 33 33 34 34 CODE32 SEGMENT DWORD PUBLIC USE32 'CODE' 35 36 35 37 public _RaiseException@16 36 extrn OS2RAISEEXCEPTION: near38 extrn _OS2RaiseException : near 37 39 38 40 _RaiseException@16 proc near 39 push dword ptr [esp+4] ;DWORD dwExceptionCode 40 push dword ptr [esp+12] ;DWORD dwExceptionFlags 41 push dword ptr [esp+20] ;DWORD cArguments 42 push dword ptr [esp+28] ;DWORD *lpArguments 43 push dword ptr [esp+16] ;return address 44 push esp 45 add dword ptr [esp], 20 41 42 ; _OS2RaiseException is _cdecl 43 46 44 push ebp 45 mov ebp, esp 46 push eax 47 48 mov eax, 0 49 mov eax, ss 50 push eax 51 mov eax, gs 52 push eax 53 mov eax, fs 54 push eax 55 mov eax, es 56 push eax 57 mov eax, ds 58 push eax 59 mov eax, cs 60 push cs 61 push esi 62 push edi 63 push edx 64 push ecx 65 push ebx 66 push dword ptr [ebp-4] ; original eax 47 67 pushfd 48 push eax 68 push dword ptr [ebp] ; original ebp 69 push ebp 70 add dword ptr [esp], 4 ; original esp 71 push dword ptr [ebp + 4] ; original eip (return address) 72 73 push dword ptr [ebp + 20] ; arg 4 (DWORD *lpArguments) 74 push dword ptr [ebp + 16] ; arg 3 (DWORD cArguments) 75 push dword ptr [ebp + 12] ; arg 2 (DWORD dwExceptionFlags) 76 push dword ptr [ebp + 8] ; arg 1 (DWORD dwExceptionCode) 77 78 call _OS2RaiseException 79 80 add esp, 20 * 4 81 82 pop eax 83 pop ebp 84 85 ret 16 ;__stdcall 86 87 _RaiseException@16 endp 88 89 90 public _RtlUnwind@16 91 extrn _OS2RtlUnwind : near 92 93 _RtlUnwind@16 proc near 94 95 ; OS2RtlUnwind is _cdecl 96 97 push ebp 98 mov ebp, esp 99 push eax 100 101 mov eax, 0 102 mov eax, ss 103 push eax 104 mov eax, gs 105 push eax 106 mov eax, fs 107 push eax 108 mov eax, es 109 push eax 110 mov eax, ds 111 push eax 112 mov eax, cs 113 push cs 114 push esi 115 push edi 116 push edx 117 push ecx 49 118 push ebx 50 push ecx51 push edx52 push edi53 push e si54 xor eax, eax55 mov eax, cs56 push eax 57 mov eax, ds58 push eax59 mov eax, es60 push eax61 mov eax, fs 62 push eax63 mov eax, gs 64 push eax65 mov eax, ss 66 p usheax67 call OS2RAISEEXCEPTION119 push dword ptr [ebp-4] ; original eax 120 pushfd 121 push dword ptr [ebp] ; original ebp 122 push ebp 123 add dword ptr [esp], 4 ; original esp 124 push dword ptr [ebp + 4] ; original eip (return address) 125 126 push dword ptr [ebp + 20] ; arg 4 (DWORD returnEax) 127 push dword ptr [ebp + 16] ; arg 3 (PWINEXCEPTION_RECORD pRecord) 128 push dword ptr [ebp + 12] ; arg 2 (LPVOID unusedEip) 129 push dword ptr [ebp + 8] ; arg 1 (PWINEXCEPTION_FRAME pEndFrame) 130 131 call _OS2RtlUnwind 132 133 add esp, 20 * 4 134 135 pop eax 136 pop ebp 68 137 69 138 ret 16 ;__stdcall 70 _RaiseException@16 endp 71 72 public _RtlUnwind@16 73 extrn OS2RTLUNWIND : near 74 75 _RtlUnwind@16 proc near 76 push dword ptr [esp+4] ;PWINEXCEPTION_FRAME pEndFrame 77 push dword ptr [esp+12] ;LPVOID unusedEip 78 push dword ptr [esp+20] ;PWINEXCEPTION_RECORD pRecord 79 push dword ptr [esp+28] ;DWORD returnEax 80 push dword ptr [esp+16] ;return address 81 push esp 82 add dword ptr [esp], 20 83 push ebp 84 pushfd 85 push eax 86 push ebx 87 push ecx 88 push edx 89 push edi 90 push esi 91 xor eax, eax 92 mov eax, cs 93 push eax 94 mov eax, ds 95 push eax 96 mov eax, es 97 push eax 98 mov eax, fs 99 push eax 100 mov eax, gs 101 push eax 102 mov eax, ss 103 push eax 104 call OS2RTLUNWIND 105 106 ret 16 ;__stdcall 139 107 140 _RtlUnwind@16 endp 108 141 … … 118 151 OS2ExceptionHandler endp 119 152 120 PUBLIC QueryExceptionChain121 122 QueryExceptionChain proc near153 PUBLIC _QueryExceptionChain 154 155 _QueryExceptionChain proc near 123 156 mov eax, fs:[0] 124 157 ret 125 QueryExceptionChain endp158 _QueryExceptionChain endp 126 159 127 160 PUBLIC GetExceptionRecord … … 279 312 _CallEntryPoint endp 280 313 281 282 ; 281 static DWORD EXC_CallHandler( WINEXCEPTION_RECORD *record, WINEXCEPTION_FRAME *frame, 314 ifndef __EMX__ 315 283 316 EXTRN WriteLog:PROC 284 317 EXTRN _GetThreadTEB@0:PROC 285 318 IFDEF DEBUG 286 EXTRN DbgEnabledKERNEL32:DWORD319 EXTRN _DbgEnabledKERNEL32:DWORD 287 320 ENDIF 288 321 289 EXC_push_frame__FP19_WINEXCEPTION_FRAME proc 322 ; 129 static inline WINEXCEPTION_FRAME * EXC_push_frame( WINEXCEPTION_FRAME *frame ) 323 align 04h 324 325 EXC_push_frame proc 290 326 push ebp 291 327 mov ebp,esp … … 313 349 leave 314 350 ret 315 EXC_push_frame __FP19_WINEXCEPTION_FRAMEendp351 EXC_push_frame endp 316 352 317 353 ; 138 static inline WINEXCEPTION_FRAME * EXC_pop_frame( WINEXCEPTION_FRAME *frame ) 318 354 align 04h 319 355 320 EXC_pop_frame __FP19_WINEXCEPTION_FRAMEproc356 EXC_pop_frame proc 321 357 push ebp 322 358 mov ebp,esp … … 339 375 leave 340 376 ret 341 EXC_pop_frame__FP19_WINEXCEPTION_FRAME endp 342 377 EXC_pop_frame endp 378 379 ; 281 static extern "C" DWORD EXC_CallHandler( WINEXCEPTION_RECORD *record, WINEXCEPTION_FRAME *frame, 343 380 align 04h 344 PUBLIC EXC_CallHandler__FP20_WINEXCEPTION_RECORDP19_WINEXCEPTION_FRAMEP10WINCONTEXTPP19_WINEXCEPTION_FRAMEPFP20_WINEXCEPTION_RECORDP19_WINEXCEPTION_FRAMEP10WINCONTEXTPv_UlT5345 346 EXC_CallHandler__FP20_WINEXCEPTION_RECORDP19_WINEXCEPTION_FRAMEP10WINCONTEXTPP19_WINEXCEPTION_FRAMEPFP20_WINEXCEPTION_RECORDP19_WINEXCEPTION_FRAMEP10WINCONTEXTPv_UlT5proc381 PUBLIC _EXC_CallHandler 382 383 _EXC_CallHandler proc 347 384 push ebp 348 385 mov ebp,esp … … 363 400 ; 298 EXC_push_frame( &newframe.frame ); 364 401 lea eax,[ebp-0ch]; newframe 365 call EXC_push_frame __FP19_WINEXCEPTION_FRAME402 call EXC_push_frame 366 403 367 404 ; 299 dprintf(("KERNEL32: Calling handler at %p code=%lx flags=%lx\n", 368 405 IFDEF DEBUG 369 cmp word ptr DbgEnabledKERNEL32+020h,01h406 cmp word ptr _DbgEnabledKERNEL32+020h,01h 370 407 jne @BLBL20 371 408 mov eax,[ebp+08h]; record … … 392 429 IFDEF DEBUG 393 430 ; 302 dprintf(("KERNEL32: Handler returned %lx\n", ret)); 394 cmp word ptr DbgEnabledKERNEL32+020h,01h431 cmp word ptr _DbgEnabledKERNEL32+020h,01h 395 432 jne @BLBL21 396 433 push dword ptr [ebp-010h]; ret … … 403 440 ; 303 EXC_pop_frame( &newframe.frame ); 404 441 lea eax,[ebp-0ch]; newframe 405 call EXC_pop_frame __FP19_WINEXCEPTION_FRAME442 call EXC_pop_frame 406 443 407 444 ; 304 return ret; … … 410 447 leave 411 448 ret 412 EXC_CallHandler__FP20_WINEXCEPTION_RECORDP19_WINEXCEPTION_FRAMEP10WINCONTEXTPP19_WINEXCEPTION_FRAMEPFP20_WINEXCEPTION_RECORDP19_WINEXCEPTION_FRAMEP10WINCONTEXTPv_UlT5 endp 449 _EXC_CallHandler endp 450 451 endif ; ifndef __EMX__ 413 452 414 453 CODE32 ENDS -
trunk/src/kernel32/exceptutil.h
r21619 r21916 20 20 void __cdecl SetExceptionChain(DWORD); 21 21 22 extern "C"PVOID QueryExceptionChain();22 PVOID QueryExceptionChain(); 23 23 24 void OS2SetExceptionHandler(void *exceptframe);25 void OS2UnsetExceptionHandler(void *exceptframe);24 void SYSTEM OS2SetExceptionHandler(void *exceptframe); 25 void SYSTEM OS2UnsetExceptionHandler(void *exceptframe); 26 26 27 27 #ifdef DEBUG -
trunk/src/kernel32/handlenames.cpp
r21302 r21916 27 27 #define INCL_DOSSEMAPHORES 28 28 #define INCL_DOSERRORS 29 #include <os2 .h>29 #include <os2wrap.h> 30 30 31 31 #include <stdlib.h> … … 53 53 PSZ pszTarget; 54 54 ULONG ulTargetLength; 55 55 56 56 // the alias prefix 57 57 PSZ pszSymbolicLink; … … 65 65 VMutex mtxHandleNameMgr; 66 66 CLinearList* pSymbolicLinks; 67 68 PHANDLENAME findSymbolicLink(P SZ pszSymbolicLink,67 68 PHANDLENAME findSymbolicLink(PCSZ pszSymbolicLink, 69 69 BOOL fCaseInsensitive); 70 71 PHANDLENAME findSymbolicLinkExact(P SZ pszSymbolicLink);72 70 71 PHANDLENAME findSymbolicLinkExact(PCSZ pszSymbolicLink); 72 73 73 public: 74 74 HandleNames(void); 75 75 ~HandleNames(); 76 77 BOOL addSymbolicLink(P SZ pszSymbolicLink,78 P SZ pszTarget);79 80 BOOL removeSymbolicLink(P SZ pszSymbolicLink);81 82 BOOL removeTarget(P SZ pszTarget);83 84 BOOL resolveName(P SZ pszName,85 PSZ pszTarget, 86 ULONG ulTargetLength, 76 77 BOOL addSymbolicLink(PCSZ pszSymbolicLink, 78 PCSZ pszTarget); 79 80 BOOL removeSymbolicLink(PCSZ pszSymbolicLink); 81 82 BOOL removeTarget(PCSZ pszTarget); 83 84 BOOL resolveName(PCSZ pszName, 85 PSZ pszTarget, 86 ULONG ulTargetLength, 87 87 BOOL fCaseInsensitive); 88 88 }; … … 107 107 * Name : HandleNames::HandleNames 108 108 * Purpose : Constructor for handle name mapper 109 * Parameters: 110 * Variables : 111 * Result : 109 * Parameters: 110 * Variables : 111 * Result : 112 112 * Remark : 113 113 * Status : … … 127 127 * Name : HandleNames::~HandleNames 128 128 * Purpose : destructor for handle name mapper 129 * Parameters: 130 * Variables : 131 * Result : 129 * Parameters: 130 * Variables : 131 * Result : 132 132 * Remark : 133 133 * Status : … … 148 148 * BOOL fCaseInsensitive - TRUE for a case-insensitive lookup 149 149 * Variables : 150 * Result : 150 * Result : 151 151 * Remark : The comparison here is not meant to be "identity" but 152 152 * "startsWith" because for the name resolver, the first … … 161 161 *****************************************************************************/ 162 162 163 PHANDLENAME HandleNames::findSymbolicLink(P SZ pszSymbolicLink,163 PHANDLENAME HandleNames::findSymbolicLink(PCSZ pszSymbolicLink, 164 164 BOOL fCaseInsensitive) 165 165 { … … 170 170 PHANDLENAME pHandleName = (PHANDLENAME)pLE->pObject; 171 171 int cch = pHandleName->ulSymbolicLinkLength; //strlen(pHandleName->pszSymbolicLink); 172 172 173 173 /* pszSymbolicLink must end a path component at cch. */ 174 174 if ( cch <= cchSymbolicLink … … 186 186 } 187 187 } 188 188 189 189 // skip to the next entry 190 190 pLE = pSymbolicLinks->getNext(pLE); 191 191 } 192 192 193 193 // not found 194 194 return NULL; … … 202 202 * BOOL fCaseInsensitive - TRUE for a case-insensitive lookup 203 203 * Variables : 204 * Result : 204 * Result : 205 205 * Remark : The comparison here is not meant to be "identity" but 206 206 * "startsWith" because for the name resolver, the first … … 215 215 *****************************************************************************/ 216 216 217 PHANDLENAME HandleNames::findSymbolicLinkExact(P SZ pszSymbolicLink)217 PHANDLENAME HandleNames::findSymbolicLinkExact(PCSZ pszSymbolicLink) 218 218 { 219 219 PLINEARLISTENTRY pLE = pSymbolicLinks->getFirst(); … … 221 221 { 222 222 PHANDLENAME pHandleName = (PHANDLENAME)pLE->pObject; 223 223 224 224 if (strcmp(pHandleName->pszSymbolicLink, pszSymbolicLink) == 0) 225 225 return pHandleName; 226 226 227 227 // skip to the next entry 228 228 pLE = pSymbolicLinks->getNext(pLE); 229 229 } 230 230 231 231 // not found 232 232 return NULL; … … 248 248 *****************************************************************************/ 249 249 250 BOOL HandleNames::addSymbolicLink(P SZ pszSymbolicLink,251 P SZ pszTarget)250 BOOL HandleNames::addSymbolicLink(PCSZ pszSymbolicLink, 251 PCSZ pszTarget) 252 252 { 253 253 BOOL rc = TRUE; 254 254 255 255 mtxHandleNameMgr.enter(); 256 256 257 257 // 1 - find symbolic link with same name 258 258 PHANDLENAME pHandleName = findSymbolicLinkExact(pszSymbolicLink); 259 260 // 2 - if found 259 260 // 2 - if found 261 261 if (NULL != pHandleName) 262 262 { … … 264 264 if (strcmp(pszTarget, pHandleName->pszTarget) == 0) 265 265 rc = TRUE; 266 266 267 267 // 2.2 - and targets are identical, return TRUE 268 268 else … … 297 297 pHandleName->ulTargetLength = strlen(pszTarget); 298 298 pHandleName->ulSymbolicLinkLength = strlen(pszSymbolicLink); 299 299 300 300 // OK, finally add to the list 301 301 pSymbolicLinks->addFirst(pHandleName); … … 304 304 } 305 305 } 306 306 307 307 mtxHandleNameMgr.leave(); 308 308 309 309 return rc; 310 310 } … … 312 312 313 313 /***************************************************************************** 314 * Name : 315 * Purpose : 316 * Parameters: 314 * Name : 315 * Purpose : 316 * Parameters: 317 317 * Variables : 318 318 * Result : TRUE if successful, FALSE if otherwise … … 323 323 *****************************************************************************/ 324 324 325 BOOL HandleNames::removeSymbolicLink(P SZ pszSymbolicLink)325 BOOL HandleNames::removeSymbolicLink(PCSZ pszSymbolicLink) 326 326 { 327 327 BOOL rc = TRUE; 328 328 329 329 mtxHandleNameMgr.enter(); 330 330 331 331 // 1 - find symbolic name 332 332 PHANDLENAME pHandleName = findSymbolicLinkExact(pszSymbolicLink); … … 337 337 // 2 - remove the link 338 338 pSymbolicLinks->removeObject(pHandleName); 339 339 340 340 if (NULL != pHandleName->pszSymbolicLink ) 341 341 free( pHandleName->pszSymbolicLink ); 342 342 343 343 if (NULL != pHandleName->pszTarget ) 344 344 free( pHandleName->pszTarget ); 345 345 346 346 free( pHandleName ); 347 347 } 348 348 349 349 mtxHandleNameMgr.leave(); 350 350 351 351 return rc; 352 352 } … … 365 365 *****************************************************************************/ 366 366 367 BOOL HandleNames::removeTarget(P SZ pszTarget)367 BOOL HandleNames::removeTarget(PCSZ pszTarget) 368 368 { 369 369 BOOL rc = FALSE; 370 370 371 371 mtxHandleNameMgr.enter(); 372 372 373 373 // iterate over all registered symbolic links 374 374 PLINEARLISTENTRY pLE = pSymbolicLinks->getFirst(); … … 376 376 { 377 377 PHANDLENAME pHandleName = (PHANDLENAME)pLE->pObject; 378 378 379 379 // check the name 380 380 if (strcmp(pszTarget, pHandleName->pszTarget) == 0) 381 381 { 382 382 pSymbolicLinks->removeElement(pLE); 383 383 384 384 // at least one removal succeeded 385 385 rc = TRUE; 386 386 } 387 387 } 388 388 389 389 mtxHandleNameMgr.leave(); 390 390 391 391 return rc; 392 392 } … … 403 403 * Variables : 404 404 * Result : FALSE if name was not modified, TRUE if name was resolved 405 * Remark : This is a very easy, cheesy implementation of a pathname 405 * Remark : This is a very easy, cheesy implementation of a pathname 406 406 * cracker. Should be sufficient at the moment though. 407 407 * Status : … … 410 410 *****************************************************************************/ 411 411 412 BOOL HandleNames::resolveName(P SZ pszName,413 PSZ pszTarget, 412 BOOL HandleNames::resolveName(PCSZ pszName, 413 PSZ pszTarget, 414 414 ULONG ulTargetLength, 415 415 BOOL fCaseInsensitive) 416 416 { 417 417 BOOL rc = FALSE; 418 418 419 419 mtxHandleNameMgr.enter(); 420 420 421 421 // scan through the names (case-insensitive) 422 422 PHANDLENAME pHandleName = findSymbolicLink(pszName, fCaseInsensitive); … … 425 425 // rebuild the target name 426 426 int iNameLength = strlen(pszName); 427 427 428 428 // first copy the resolved target name fragment 429 429 strncpy(pszTarget, 430 430 pHandleName->pszTarget, 431 431 ulTargetLength); 432 432 433 433 // now append the rest of the specified name with the 434 434 // now resolved symbolic cut away … … 437 437 pszName + pHandleName->ulSymbolicLinkLength, 438 438 ulTargetLength - pHandleName->ulTargetLength); 439 439 440 440 // tell caller the name has been resolved 441 441 // (is different from the source name) 442 442 rc = TRUE; 443 443 } 444 444 445 445 mtxHandleNameMgr.leave(); 446 446 447 447 return rc; 448 448 } … … 454 454 * Exported Wrapper Functions 455 455 *****************************************************************************/ 456 457 BOOL HandleNamesResolveName(P SZ pszName,456 457 BOOL HandleNamesResolveName(PCSZ pszName, 458 458 PSZ pszTarget, 459 459 ULONG ulTargetLength, … … 467 467 468 468 469 BOOL HandleNamesAddSymbolicLink(P SZ pszSymbolicLink,470 P SZ pszTarget)469 BOOL HandleNamesAddSymbolicLink(PCSZ pszSymbolicLink, 470 PCSZ pszTarget) 471 471 { 472 472 return pHandleNameMgr->addSymbolicLink(pszSymbolicLink, 473 473 pszTarget); 474 474 } 475 476 477 BOOL HandleNamesRemoveSymbolicLink(P SZ pszSymbolicLink)475 476 477 BOOL HandleNamesRemoveSymbolicLink(PCSZ pszSymbolicLink) 478 478 { 479 479 return pHandleNameMgr->removeSymbolicLink(pszSymbolicLink); 480 480 } 481 482 483 BOOL HandleNamesRemoveTarget(P SZ pszTarget)481 482 483 BOOL HandleNamesRemoveTarget(PCSZ pszTarget) 484 484 { 485 485 return pHandleNameMgr->removeTarget(pszTarget); -
trunk/src/kernel32/handlenames.h
r7441 r21916 17 17 * Exported Wrapper Functions 18 18 *****************************************************************************/ 19 20 BOOL HandleNamesResolveName(P SZ pszName,19 20 BOOL HandleNamesResolveName(PCSZ pszName, 21 21 PSZ pszTarget, 22 22 ULONG ulTargetLength, 23 23 BOOL fCaseInsensitive); 24 24 25 BOOL HandleNamesAddSymbolicLink(P SZ pszSymbolicLink,26 P SZ pszTarget);25 BOOL HandleNamesAddSymbolicLink(PCSZ pszSymbolicLink, 26 PCSZ pszTarget); 27 27 28 BOOL HandleNamesRemoveSymbolicLink(P SZ pszSymbolicLink);28 BOOL HandleNamesRemoveSymbolicLink(PCSZ pszSymbolicLink); 29 29 30 BOOL HandleNamesRemoveTarget(P SZ pszTarget);30 BOOL HandleNamesRemoveTarget(PCSZ pszTarget); 31 31 32 32 -
trunk/src/kernel32/heap.cpp
r21435 r21916 264 264 265 265 #pragma pack() 266 267 extern "C" { 266 268 267 269 /*********************************************************************** … … 1013 1015 } 1014 1016 1017 } // extern "C" 1018 -
trunk/src/kernel32/heapshared.cpp
r21302 r21916 8 8 * 9 9 * TODO: Not process/thread safe (initializing/destroying heap) 10 * 10 * 11 11 * ASSUMPTION: Rtl library takes care of protection of heap increase/decrease 12 12 * (from multiple threads/processes) … … 31 31 #include "dbglocal.h" 32 32 33 #define MAX_HEAPSIZE 33 #define MAX_HEAPSIZE (2048*1024) 34 34 #define MAX_HEAPPAGES (MAX_HEAPSIZE/PAGE_SIZE) 35 35 #define INCR_HEAPSIZE (16*1024) 36 36 37 // Global DLL Data38 #pragma data_seg(_GLOBALDATA)39 Heap_t sharedHeap = 0; 40 static PVOID pSharedMem = NULL; 41 static BYTE pageBitmap[MAX_HEAPPAGES] = {0}; 42 static ULONG refCount = 0; 43 #pragma data_seg() 37 // 38 // Global DLL Data (keep it in sync with globaldata.asm!) 39 // 40 extern Heap_t sharedHeap; // = 0 41 extern PVOID pSharedMem; // = NULL 42 extern BYTE pageBitmap[MAX_HEAPPAGES]; // = {0} 43 extern ULONG refCount; // = 0; 44 44 45 45 static int privateRefCount = 0; … … 158 158 dprintf(("KERNEL32: GetPageRangeFree(%08xh)", pageoffset)); 159 159 160 for(int i=pageoffset;i<MAX_HEAPPAGES;i++) { 160 int i; 161 for(i=pageoffset;i<MAX_HEAPPAGES;i++) { 161 162 if(pageBitmap[i] == 1) { 162 163 break; … … 184 185 { 185 186 int nrpagesfree = GetPageRangeFree(i); 186 if(nrpagesfree >= *size/PAGE_SIZE) 187 if(nrpagesfree >= *size/PAGE_SIZE) 187 188 { 188 189 newblock = (PVOID)((ULONG)pSharedMem + i*PAGE_SIZE); … … 254 255 //****************************************************************************** 255 256 //****************************************************************************** 256 void * _System _debug_smalloc(int size, c har *pszFile, int linenr)257 void * _System _debug_smalloc(int size, const char *pszFile, int linenr) 257 258 { 258 259 void *chunk; … … 268 269 //****************************************************************************** 269 270 //****************************************************************************** 270 void * _System _debug_smallocfill(int size, int filler, c har *pszFile, int linenr)271 void * _System _debug_smallocfill(int size, int filler, const char *pszFile, int linenr) 271 272 { 272 273 void *chunk; … … 285 286 //****************************************************************************** 286 287 //****************************************************************************** 287 void _System _debug_sfree(void *chunk, c har *pszFile, int linenr)288 void _System _debug_sfree(void *chunk, const char *pszFile, int linenr) 288 289 { 289 290 dprintf(("_sfree %x", chunk)); -
trunk/src/kernel32/heapstring.cpp
r21361 r21916 25 25 #include <unicode.h> 26 26 #include <ctype.h> 27 #include <wchar.h> 28 #ifndef __GNUC__ 27 29 #include <wcstr.h> 30 #endif 28 31 #include "heap.h" 29 #include <wine \unicode.h>32 #include <wine/unicode.h> 30 33 #include "misc.h" 31 34 #include "codepage.h" … … 443 446 return 1; 444 447 445 return str cmpi(arg1, arg2);448 return stricmp(arg1, arg2); 446 449 } 447 450 -
trunk/src/kernel32/hmcomm.cpp
r21302 r21916 233 233 { 234 234 OSLibDosClose(pHMHandleData->hHMHandle); 235 delete pHMHandleData->lpHandlerData;235 delete (PHMDEVCOMDATA)pHMHandleData->lpHandlerData; 236 236 return rc; 237 237 } … … 274 274 fail: 275 275 276 delete pHMHandleData->lpHandlerData;276 delete (PHMDEVCOMDATA)pHMHandleData->lpHandlerData; 277 277 OSLibDosClose(pHMHandleData->hHMHandle); 278 278 return ret; … … 300 300 BOOL HMDeviceCommClass::CloseHandle(PHMHANDLEDATA pHMHandleData) 301 301 { 302 PHMDEVCOMDATA pDevData = (PHMDEVCOMDATA)pHMHandleData->lpHandlerData;303 302 dprintf(("HMComm: Serial communication port close request")); 304 303 305 delete pHMHandleData->lpHandlerData;304 delete (PHMDEVCOMDATA)pHMHandleData->lpHandlerData; 306 305 return OSLibDosClose(pHMHandleData->hHMHandle); 307 306 } -
trunk/src/kernel32/hmdevice.h
r21302 r21916 446 446 447 447 448 #ifdef __cplusplus 449 extern "C" { 450 #endif 451 448 452 /***************************************************************************** 449 453 * Prototypes * … … 451 455 452 456 /* register a new device with the handle manager */ 453 DWORD HMDeviceRegister(LP STR pszDeviceName,457 DWORD HMDeviceRegister(LPCSTR pszDeviceName, 454 458 HMDeviceHandler *pDeviceHandler); 455 459 456 DWORD HMDeviceRegisterEx(LP STR pszDeviceName,460 DWORD HMDeviceRegisterEx(LPCSTR pszDeviceName, 457 461 HMDeviceHandler *pDeviceHandler, 458 462 VOID *pDevData); 459 463 464 #ifdef __cplusplus 465 } // extern "C" 466 #endif 460 467 461 468 #include "hmhandle.h" -
trunk/src/kernel32/hmdevio.cpp
r21302 r21916 25 25 #include <win32api.h> 26 26 #include <misc.h> 27 #include <win \winioctl.h>27 #include <win/winioctl.h> 28 28 #include "hmdevio.h" 29 29 #include "exceptutil.h" … … 47 47 DWORD rc; 48 48 49 for(int i=0;i<nrKnownDrivers;i++) 49 for(int i=0;i<nrKnownDrivers;i++) 50 50 { 51 51 driver = new HMDeviceDriver(knownDriver[i].szWin32Name, … … 101 101 if (rc != NO_ERROR) /* check for errors */ 102 102 dprintf(("KERNEL32:RegisterDevices: registering %s failed with %u.\n", szDrvName, rc)); 103 103 104 104 // @@@PH 105 105 // there should be an symbolic link: … … 109 109 rc = 0; 110 110 } 111 } 111 } 112 112 RegCloseKey(hkDrivers); 113 113 } … … 117 117 //****************************************************************************** 118 118 //****************************************************************************** 119 BOOL WIN32API RegisterCustomDriver(PFNDRVOPEN pfnDriverOpen, PFNDRVCLOSE pfnDriverClose, 119 BOOL WIN32API RegisterCustomDriver(PFNDRVOPEN pfnDriverOpen, PFNDRVCLOSE pfnDriverClose, 120 120 PFNDRVIOCTL pfnDriverIOCtl, PFNDRVREAD pfnDriverRead, 121 121 PFNDRVWRITE pfnDriverWrite, PFNDRVCANCELIO pfnDriverCancelIo, … … 141 141 //****************************************************************************** 142 142 //****************************************************************************** 143 HMDeviceDriver::HMDeviceDriver(LPCSTR lpDeviceName, LPSTR lpOS2DevName, BOOL fCreate, 143 HMDeviceDriver::HMDeviceDriver(LPCSTR lpDeviceName, LPSTR lpOS2DevName, BOOL fCreate, 144 144 WINIOCTL pDevIOCtl) 145 145 : HMDeviceHandler(lpDeviceName) … … 215 215 dprintf(("DosOpen %s returned %d\n", szOS2Name, rc)); 216 216 217 if(rc == NO_ERROR) 217 if(rc == NO_ERROR) 218 218 { 219 219 pHMHandleData->hHMHandle = hfFileHandle; 220 220 return (NO_ERROR); 221 221 } 222 else 222 else 223 223 return(error2WinError(rc)); 224 224 } … … 259 259 //****************************************************************************** 260 260 //****************************************************************************** 261 HMCustomDriver::HMCustomDriver(PFNDRVOPEN pfnDriverOpen, PFNDRVCLOSE pfnDriverClose, 261 HMCustomDriver::HMCustomDriver(PFNDRVOPEN pfnDriverOpen, PFNDRVCLOSE pfnDriverClose, 262 262 PFNDRVIOCTL pfnDriverIOCtl, PFNDRVREAD pfnDriverRead, 263 263 PFNDRVWRITE pfnDriverWrite, PFNDRVCANCELIO pfnDriverCancelIo, … … 461 461 return FALSE; 462 462 } 463 return pfnDriverGetOverlappedResult(lpDriverData, pHMHandleData->hHMHandle, pHMHandleData->dwFlags, 463 return pfnDriverGetOverlappedResult(lpDriverData, pHMHandleData->hHMHandle, pHMHandleData->dwFlags, 464 464 lpOverlapped, lpcbTransfer, fWait, (LPVOID)pHMHandleData->dwUserData); 465 465 } 466 467 extern "C" { 468 466 469 //****************************************************************************** 467 470 //****************************************************************************** … … 507 510 //****************************************************************************** 508 511 //****************************************************************************** 512 513 } // extern "C" 514 -
trunk/src/kernel32/hmdisk.cpp
r9911 r21916 18 18 #include "hmdisk.h" 19 19 #include "mmap.h" 20 #include <win \winioctl.h>21 #include <win \ntddscsi.h>22 #include <win \wnaspi32.h>20 #include <win/winioctl.h> 21 #include <win/ntddscsi.h> 22 #include <win/wnaspi32.h> 23 23 #include "oslibdos.h" 24 24 #include "osliblvm.h" … … 43 43 typedef struct 44 44 { 45 BOOL fCDIoSupported; 45 BOOL fCDIoSupported; 46 46 ULONG driveLetter; 47 47 ULONG driveType; … … 163 163 szDrive[2] = '\0'; 164 164 165 //if volume name, query 166 if(!strncmp(lpFileName, VOLUME_NAME_PREFIX, sizeof(VOLUME_NAME_PREFIX)-1)) 165 //if volume name, query 166 if(!strncmp(lpFileName, VOLUME_NAME_PREFIX, sizeof(VOLUME_NAME_PREFIX)-1)) 167 167 { 168 168 int length; … … 171 171 return ERROR_FILE_NOT_FOUND; //not allowed 172 172 } 173 if(OSLibLVMStripVolumeName(lpFileName, szVolumeName, sizeof(szVolumeName))) 173 if(OSLibLVMStripVolumeName(lpFileName, szVolumeName, sizeof(szVolumeName))) 174 174 { 175 175 BOOL fLVMVolume; … … 184 184 return ERROR_FILE_NOT_FOUND; //not found 185 185 } 186 if(szDrive[0] == 0) 186 if(szDrive[0] == 0) 187 187 { 188 188 //volume isn't mounted 189 189 190 190 //Note: this only works on Warp 4.5 and up 191 sprintf(szDiskName, "\\\\.\\Physical_Disk%d", volext.Extents[0].DiskNumber+1); 191 sprintf(szDiskName, "\\\\.\\Physical_Disk%d", volext.Extents[0].DiskNumber+1); 192 192 fPhysicalDisk = TRUE; 193 193 dwPhysicalDiskNr = volext.Extents[0].DiskNumber + 1; … … 211 211 else return ERROR_FILE_NOT_FOUND; 212 212 } 213 else 214 if(strncmp(lpFileName, "\\\\.\\PHYSICALDRIVE", 17) == 0) 213 else 214 if(strncmp(lpFileName, "\\\\.\\PHYSICALDRIVE", 17) == 0) 215 215 { 216 216 if(!fPhysicalDiskAccess) { … … 304 304 drvInfo->fLocked = FALSE; 305 305 306 //save volume start & length if volume must be accessed through the physical disk 306 //save volume start & length if volume must be accessed through the physical disk 307 307 //(no other choice for unmounted volumes) 308 308 drvInfo->fPhysicalDisk = fPhysicalDisk; … … 348 348 if(pHMHandleData->hHMHandle && drvInfo->dwShare == 0) { 349 349 dprintf(("Locking drive")); 350 if(OSLibDosDevIOCtl(pHMHandleData->hHMHandle,IOCTL_DISK,DSK_LOCKDRIVE,0,0,0,0,0,0)) 350 if(OSLibDosDevIOCtl(pHMHandleData->hHMHandle,IOCTL_DISK,DSK_LOCKDRIVE,0,0,0,0,0,0)) 351 351 { 352 352 dprintf(("Sharing violation while attempting to lock the drive")); … … 411 411 if(hFile && drvInfo->dwShare == 0) { 412 412 dprintf(("Locking drive")); 413 if(OSLibDosDevIOCtl(hFile,IOCTL_DISK,DSK_LOCKDRIVE,0,0,0,0,0,0)) 413 if(OSLibDosDevIOCtl(hFile,IOCTL_DISK,DSK_LOCKDRIVE,0,0,0,0,0,0)) 414 414 { 415 415 dprintf(("Sharing violation while attempting to lock the drive")); … … 522 522 { 523 523 #ifdef DEBUG 524 c har *msg = NULL;524 const char *msg = NULL; 525 525 526 526 switch(dwIoControlCode) … … 890 890 //label has changed 891 891 //TODO: Find better way to determine if floppy was removed or switched 892 if(drvInfo->driveType != DRIVE_FIXED) 892 if(drvInfo->driveType != DRIVE_FIXED) 893 893 { 894 894 rc = OSLibDosQueryVolumeSerialAndName(1 + drvInfo->driveLetter - 'A', &volumelabel, NULL, 0); … … 1439 1439 return (ret == ERROR_SUCCESS); 1440 1440 } 1441 1441 1442 1442 case IOCTL_CDROM_RAW_READ: 1443 1443 { 1444 1444 #pragma pack(1) 1445 struct 1445 struct 1446 1446 { 1447 1447 ULONG ID_code; … … 1497 1497 1498 1498 if(lpBytesReturned) { 1499 *lpBytesReturned = dwDataSize; 1499 *lpBytesReturned = dwDataSize; 1500 1500 } 1501 1501 … … 1633 1633 case IOCTL_SCSI_GET_CAPABILITIES: 1634 1634 { 1635 PIO_SCSI_CAPABILITIES pPacket = (PIO_SCSI_CAPABILITIES)lpOutBuffer; 1635 PIO_SCSI_CAPABILITIES pPacket = (PIO_SCSI_CAPABILITIES)lpOutBuffer; 1636 1636 1637 1637 if(nOutBufferSize < sizeof(IO_SCSI_CAPABILITIES) || … … 1677 1677 return FALSE; 1678 1678 } 1679 1679 1680 1680 if(!drvInfo || drvInfo->fCDIoSupported == FALSE) { 1681 1681 dprintf(("os2cdrom.dmd CD interface not supported!!")); … … 1842 1842 if((nNumberOfBytesToRead+offset) & 0xfff) 1843 1843 nrpages++; 1844 1844 1845 1845 map->commitRange((ULONG)lpBuffer, offset & ~0xfff, TRUE, nrpages); 1846 1846 map->Release(); … … 2106 2106 if((nNumberOfBytesToWrite+offset) & 0xfff) 2107 2107 nrpages++; 2108 2108 2109 2109 map->commitRange((ULONG)lpBuffer, offset & ~0xfff, TRUE, nrpages); 2110 2110 map->Release(); … … 2202 2202 2203 2203 dprintf2(("KERNEL32: HMDeviceDiskClass::GetFileSize %s(%08xh,%08xh)\n", 2204 lpHMDeviceName, pHMHandleData, lpdwFileSizeHigh)); 2204 lpHMDeviceName, pHMHandleData, lpdwFileSizeHigh)); 2205 2205 2206 2206 //If we didn't get an OS/2 handle for the disk before, get one now -
trunk/src/kernel32/hmhandle.h
r21302 r21916 34 34 35 35 36 36 #ifdef __cplusplus 37 extern "C" { 38 #endif 37 39 38 40 PHMHANDLE HMHandleQueryPtr(HANDLE hHandle); … … 40 42 PHMHANDLEDATA HMQueryHandleData(HANDLE handle); 41 43 44 #ifdef __cplusplus 45 } // extern "C" 46 #endif 47 42 48 43 49 #endif -
trunk/src/kernel32/hmparport.cpp
r8404 r21916 60 60 61 61 #define MAX_PARALLEL_PORTS_CONFIGURATION 3 62 static PARALLELPORTCONFIGURATION arrParallelPorts[MAX_PARALLEL_PORTS_CONFIGURATION] = 62 static PARALLELPORTCONFIGURATION arrParallelPorts[MAX_PARALLEL_PORTS_CONFIGURATION] = 63 63 { 64 64 {1, 0x378, 8, 0x778, 3}, … … 71 71 { 72 72 ULONG ulMagic; 73 73 74 74 // Win32 Device Control Block 75 75 COMMCONFIG CommCfg; 76 76 77 77 // hardware configuration block 78 78 PPARALLELPORTCONFIGURATION pHardwareConfiguration; … … 83 83 static VOID *CreateDevData() 84 84 { 85 HFILE hfFileHandle = 0L; 86 UCHAR uchParms[2] = {0, RM_COMMAND_PHYS}; 87 ULONG ulParmLen = 0; 85 HFILE hfFileHandle = 0L; 86 UCHAR uchParms[2] = {0, RM_COMMAND_PHYS}; 87 ULONG ulParmLen = 0; 88 88 UCHAR uchDataArea[MAX_ENUM_SIZE] = {0}; 89 UCHAR uchDataArea2[MAX_RM_NODE_SIZE] = {0}; 90 ULONG ulDataLen = 0; 89 UCHAR uchDataArea2[MAX_RM_NODE_SIZE] = {0}; 90 ULONG ulDataLen = 0; 91 91 int rc,portCount = 0; 92 92 93 93 PRM_ENUMNODES_DATA enumData; 94 94 PNODEENTRY pNode; … … 105 105 } 106 106 else 107 { 107 { 108 108 dprintf(("HMDeviceParPortClass: Succesfully opened Resource Manager")); 109 109 … … 114 114 CAT_RM,FUNC_RM_ENUM_NODES, uchParms, sizeof(uchParms), 115 115 &ulParmLen, 116 uchDataArea, 117 sizeof(uchDataArea), 118 &ulDataLen); 119 116 uchDataArea, 117 sizeof(uchDataArea), 118 &ulDataLen); 119 120 120 if (rc) 121 121 { 122 dprintf(("HMDeviceParPortClass: Failed to get resource list (IOCTL)")); 122 dprintf(("HMDeviceParPortClass: Failed to get resource list (IOCTL)")); 123 123 goto resourceLoopEnd; 124 124 } 125 125 126 126 enumData = (PRM_ENUMNODES_DATA)uchDataArea; 127 127 128 128 inputData.RMHandle = enumData->NodeEntry[0].RMHandle; 129 129 inputData.Linaddr = (ULONG)&uchDataArea2[0]; 130 130 131 131 for (int i=0;i<enumData->NumEntries;i++) 132 132 { 133 133 ulParmLen = sizeof(inputData); /* Length of input parameters */ 134 134 ulDataLen = sizeof(uchDataArea2); /* Length of data */ 135 135 136 136 rc = OSLibDosDevIOCtl(hfFileHandle, /* Handle to device */ 137 137 CAT_RM,FUNC_RM_GET_NODEINFO, … … 146 146 if (rc) 147 147 { 148 dprintf(("HMDeviceParPortClass: Failed to get resource node (IOCTL)")); 149 break; 148 dprintf(("HMDeviceParPortClass: Failed to get resource node (IOCTL)")); 149 break; 150 150 } 151 151 inputData.RMHandle = enumData->NodeEntry[i].RMHandle; … … 163 163 // @@PF Hack, but what to do no ECP info from Resource Manager! 164 164 if (arrParallelPorts[portCount].ulPortBase == 0x378) 165 { 165 { 166 166 arrParallelPorts[portCount].ulEcpPortBase = 0x778; 167 167 arrParallelPorts[portCount].ulEcpPortSpan = 3; 168 168 } 169 else 169 else 170 170 if (arrParallelPorts[portCount].ulPortBase == 0x278) 171 { 171 { 172 172 arrParallelPorts[portCount].ulEcpPortBase = 0x678; 173 173 arrParallelPorts[portCount].ulEcpPortSpan = 3; … … 178 178 arrParallelPorts[portCount].ulEcpPortSpan = 0; 179 179 dprintf(("HMDeviceParPortClass: Found and registered LPT%d with Base I/O: 0x%x",portCount,arrParallelPorts[portCount].ulPortBase)); 180 portCount ++ ; 180 portCount ++ ; 181 181 } 182 182 } 183 183 } 184 184 resourceLoopEnd: 185 OSLibDosClose(hfFileHandle); 185 OSLibDosClose(hfFileHandle); 186 186 187 187 pData = new HMDEVPARPORTDATA(); … … 194 194 pData->CommCfg.dwProviderSubType = PST_PARALLELPORT; 195 195 } 196 196 197 197 return pData; 198 198 } 199 199 //****************************************************************************** 200 200 //****************************************************************************** 201 HMDeviceParPortClass::HMDeviceParPortClass(LPCSTR lpDeviceName) : 201 HMDeviceParPortClass::HMDeviceParPortClass(LPCSTR lpDeviceName) : 202 202 HMDeviceHandler(lpDeviceName) 203 203 { 204 204 dprintf(("HMDeviceParPortClass::HMDevParPortClass(%s)\n", 205 205 lpDeviceName)); 206 206 207 207 #ifndef DEVINFO_PRINTER 208 208 #define DEVINFO_PRINTER 0 209 209 #endif 210 210 211 211 // first, we determine the number of parallel port devices available 212 212 213 213 // PH 2001-12-04 Note: 214 214 // This call will not return any information about redirected LPT ports. … … 223 223 if (0 == bNumberOfParallelPorts) 224 224 return; 225 225 226 226 VOID *pData; 227 227 dprintf(("HMDeviceParPortClass: Registering LPTs with Handle Manager\n")); 228 228 229 229 pData = CreateDevData(); 230 230 if(pData!= NULL) 231 231 HMDeviceRegisterEx("LPT1", this, pData); 232 232 233 233 // add symbolic links to the "real name" of the device 234 234 if (bNumberOfParallelPorts > 0) … … 246 246 free(pszLPT); 247 247 free(pszLPT2); 248 248 249 249 // add "PRN" device 250 250 HandleNamesAddSymbolicLink("PRN", "LPT1"); … … 272 272 if (bNumberOfParallelPorts == 0) 273 273 return FALSE; 274 274 275 275 // can be both, "LPT1" and "LPT1:" 276 276 if(namelength > 5) … … 283 283 if(namelength == 5 && lpDeviceName[4] != ':') 284 284 return FALSE; 285 285 286 286 // can support up tp LPT9 287 287 if ( (lpDeviceName[3] >= '1') && … … 305 305 lpSecurityAttributes, 306 306 pHMHandleDataTemplate)); 307 307 308 308 char lptname[6]; 309 309 310 310 dprintf(("HMDeviceParPortClass: Parallel port %s open request\n", lpFileName)); 311 311 312 312 // Don't accept any name if no parallel ports have been detected 313 313 if (bNumberOfParallelPorts == 0) … … 315 315 return ERROR_DEV_NOT_EXIST; 316 316 } 317 317 318 318 strcpy(lptname, lpFileName); 319 319 lptname[4] = 0; //get rid of : (if present) (eg LPT1:) … … 326 326 OSLIB_ACCESS_SHAREDENYWRITE); 327 327 SetErrorMode(oldmode); 328 328 329 329 // check if handle could be opened properly 330 330 if (0 == pHMHandleData->hHMHandle) … … 337 337 APIRET rc; 338 338 pHMHandleData->lpHandlerData = new HMDEVPARPORTDATA(); 339 339 340 340 // Init The handle instance with the default default device config 341 341 memcpy( pHMHandleData->lpHandlerData, 342 342 pHMHandleData->lpDeviceData, 343 343 sizeof(HMDEVPARPORTDATA)); 344 344 345 345 // determine which port was opened 346 346 ULONG ulPortNo = lptname[3] - '1'; 347 347 348 348 // safety check (device no 0..8 -> LPT1..9) 349 349 if (ulPortNo > MAX_PARALLEL_PORTS_CONFIGURATION) … … 352 352 return ERROR_DEV_NOT_EXIST; 353 353 } 354 354 355 355 // and save the hardware information 356 356 PHMDEVPARPORTDATA pPPD = (PHMDEVPARPORTDATA)pHMHandleData->lpHandlerData; 357 357 pPPD->pHardwareConfiguration = &arrParallelPorts[ulPortNo]; 358 358 359 359 return NO_ERROR; 360 360 } … … 387 387 dprintf(("HMDeviceParPortClass: Parallel port close request(%08xh)\n", 388 388 pHMHandleData)); 389 390 delete pHMHandleData->lpHandlerData;389 390 delete (PHMDEVPARPORTDATA)pHMHandleData->lpHandlerData; 391 391 return OSLibDosClose(pHMHandleData->hHMHandle); 392 392 } … … 511 511 //****************************************************************************** 512 512 //****************************************************************************** 513 BOOL HMDeviceParPortClass::DeviceIoControl(PHMHANDLEDATA pHMHandleData, 513 BOOL HMDeviceParPortClass::DeviceIoControl(PHMHANDLEDATA pHMHandleData, 514 514 DWORD dwIoControlCode, 515 LPVOID lpInBuffer, 515 LPVOID lpInBuffer, 516 516 DWORD nInBufferSize, 517 LPVOID lpOutBuffer, 517 LPVOID lpOutBuffer, 518 518 DWORD nOutBufferSize, 519 LPDWORD lpBytesReturned, 519 LPDWORD lpBytesReturned, 520 520 LPOVERLAPPED lpOverlapped) 521 521 { 522 522 #ifdef DEBUG 523 c har *msg = NULL;523 const char *msg = NULL; 524 524 525 525 switch(dwIoControlCode) … … 528 528 msg = "IOCTL_INTERNAL_GET_PARALLEL_PORT_INFO"; 529 529 break; 530 530 531 531 case IOCTL_INTERNAL_GET_PARALLEL_PNP_INFO: 532 532 msg = "IOCTL_INTERNAL_GET_PARALLEL_PNP_INFO"; 533 533 break; 534 534 } 535 535 536 536 if(msg) { 537 537 dprintf(("HMDeviceParPortClass::DeviceIoControl %s %x %d %x %d %x %x", msg, lpInBuffer, nInBufferSize, … … 545 545 { 546 546 PPARALLEL_PORT_INFORMATION pPPI = (PPARALLEL_PORT_INFORMATION)lpOutBuffer; 547 548 if(nOutBufferSize < sizeof(PARALLEL_PORT_INFORMATION) || !pPPI) 547 548 if(nOutBufferSize < sizeof(PARALLEL_PORT_INFORMATION) || !pPPI) 549 549 { 550 550 SetLastError(ERROR_INSUFFICIENT_BUFFER); 551 551 return FALSE; 552 552 } 553 553 554 554 if(lpBytesReturned) 555 555 *lpBytesReturned = sizeof(PARALLEL_PORT_INFORMATION); 556 556 557 557 // fill in the data values 558 558 PHMDEVPARPORTDATA pPPD = (PHMDEVPARPORTDATA)pHMHandleData->lpHandlerData; 559 559 560 560 // @@@PH 561 561 // Specifies the bus relative base I/O address of the parallel port registers. 562 562 pPPI->OriginalController.LowPart = pPPD->pHardwareConfiguration->ulPortBase; 563 563 pPPI->OriginalController.HighPart = 0; 564 564 565 565 // Pointer to the system-mapped base I/O location of the parallel port registers. 566 566 pPPI->Controller = NULL; 567 567 568 568 // Specifies the size, in bytes, of the I/O space, allocated to the parallel port. 569 569 pPPI->SpanOfController = pPPD->pHardwareConfiguration->ulPortSpan; 570 570 571 571 // Pointer to a callback routine that a kernel-mode driver can use to try to allocate the parallel port. 572 572 pPPI->TryAllocatePort = NULL; 573 573 574 574 // Pointer to a callback routine that a kernel-mode driver can use to free the parallel port. 575 575 pPPI->FreePort = NULL; 576 576 577 577 // Pointer to a callback routine that a kernel-mode driver can use to determine the number of requests on the work queue of the parallel port. 578 578 pPPI->QueryNumWaiters = NULL; 579 579 580 580 // Pointer to the device extension of parallel port. 581 581 pPPI->Context = NULL; … … 583 583 return TRUE; 584 584 } 585 586 585 586 587 587 case IOCTL_INTERNAL_GET_PARALLEL_PNP_INFO: 588 588 { 589 589 PPARALLEL_PNP_INFORMATION pPPI = (PPARALLEL_PNP_INFORMATION)lpOutBuffer; 590 590 591 591 if(nOutBufferSize < sizeof(PARALLEL_PNP_INFORMATION) || !pPPI) 592 592 { … … 594 594 return FALSE; 595 595 } 596 596 597 597 if(lpBytesReturned) 598 598 *lpBytesReturned = sizeof(PARALLEL_PNP_INFORMATION); 599 599 600 600 // fill in the data values 601 601 PHMDEVPARPORTDATA pPPD = (PHMDEVPARPORTDATA)pHMHandleData->lpHandlerData; 602 602 603 603 // @@@PH 604 // Specifies the base physical address that the system-supplied 605 // function driver for parallel ports uses to control the ECP 604 // Specifies the base physical address that the system-supplied 605 // function driver for parallel ports uses to control the ECP 606 606 // operation of the parallel port. 607 607 pPPI->OriginalEcpController.LowPart = pPPD->pHardwareConfiguration->ulEcpPortBase; 608 608 pPPI->OriginalEcpController.HighPart = 0; 609 610 // Pointer to the I/O port resource that is used to control the 609 610 // Pointer to the I/O port resource that is used to control the 611 611 // port in ECP mode. 612 612 pPPI->EcpController = NULL; 613 613 614 614 // Specifies the size, in bytes, of the I/O port resource. 615 615 pPPI->SpanOfEcpController = pPPD->pHardwareConfiguration->ulEcpPortSpan; 616 616 617 617 // Not used. 618 618 pPPI->PortNumber = 0; 619 619 620 620 // Specifies the hardware capabilities of the parallel port. The following capabilities can be set using a bitwise OR of the following constants: 621 621 pPPI->HardwareCapabilities = 0; … … 626 626 // PPT_EPP_PRESENT 627 627 // PT_NO_HARDWARE_PRESENT 628 628 629 629 // Pointer to a callback routine that a kernel-mode driver can use to change the operating mode of the parallel port. 630 630 pPPI->TrySetChipMode = 0; 631 631 632 632 // Pointer to a callback routine that a kernel-mode driver can use to clear the operating mode of the parallel port. 633 633 pPPI->ClearChipMode = 0; 634 634 635 635 // Specifies the size, in words, of the hardware first in/first out (FIFO) buffer. The FIFO word size, in bits, is the value of FifoWidth. 636 636 pPPI->FifoDepth = 0; 637 637 638 638 // Specifies the FIFO word size, in bits, which is the number of bits handled in parallel. 639 639 pPPI->FifoWidth = 0; 640 640 641 641 // Not used. 642 642 pPPI->EppControllerPhysicalAddress.LowPart = 0; 643 643 pPPI->EppControllerPhysicalAddress.HighPart = 0; 644 644 645 645 // Not used. 646 646 pPPI->SpanOfEppController = 0; 647 647 648 648 // Specifies the number of daisy-chain devices currently attached to a parallel port. In Microsoftÿ Windowsÿ XP, from zero to two devices can be simultaneously connected to a 649 649 // parallel port. In Windows 2000, from zero to four devices can be simultaneously connected to a parallel port. 650 650 pPPI->Ieee1284_3DeviceCount = 0; 651 651 652 652 // Pointer to a callback routine that a kernel-mode driver can use to try to select an IEEE 1284.3 device. 653 653 pPPI->TrySelectDevice = 0; 654 654 655 655 // Pointer to a callback routine that a kernel-mode driver can use to deselect an IEEE 1284.3 device. 656 656 pPPI->DeselectDevice = 0; 657 657 658 658 // Pointer to the device extension of a parallel port's function device object (FDO). 659 659 pPPI->Context = 0; 660 660 661 661 // The current operating mode of the parallel port. 662 662 pPPI->CurrentMode = 0; 663 663 664 664 // The symbolic link name of the parallel port. 665 665 pPPI->PortName = 0; 666 666 667 667 return TRUE; 668 668 } -
trunk/src/kernel32/hmthread.cpp
r21457 r21916 34 34 #include "oslibmem.h" 35 35 36 #include <win \thread.h>36 #include <win/thread.h> 37 37 #include "thread.h" 38 38 #include "asmutil.h" … … 65 65 HANDLE hThread = pHMHandleData->hHMHandle; 66 66 67 if(lpIDThread == NULL) { 67 if(lpIDThread == NULL) { 68 68 lpIDThread = &threadid; 69 69 } … … 124 124 125 125 *lpIDThread = MAKE_THREADID(O32_GetCurrentProcessId(), *lpIDThread); 126 126 127 127 TEB *teb = GetTEBFromThreadHandle(hThread); 128 128 if(teb) { … … 134 134 135 135 dprintf(("CreateThread created %08x, id %x", pHMHandleData->hHMHandle, *lpIDThread)); 136 136 137 137 return pHMHandleData->hHMHandle; 138 138 } … … 603 603 pHMHandleData->hHMHandle, 604 604 dwTimeout)); 605 605 606 606 //This doesn't work very well in Open32 (object's state never signaled) 607 607 if(threadobj && threadobj->dwState == THREAD_TERMINATED) { -
trunk/src/kernel32/initterm.h
r9878 r21916 28 28 void CloseLogFile(); //misc.cpp 29 29 30 extern int globLoadNr; //global data31 extern int loadNr;32 30 extern BOOL fVersionWarp3; 33 31 extern BOOL fInit; -
trunk/src/kernel32/kdbhookhlp.cpp
r10382 r21916 34 34 //****************************************************************************** 35 35 //****************************************************************************** 36 c har *WIN32API QueryCustomStdClassName()36 const char *WIN32API QueryCustomStdClassName() 37 37 { 38 38 return ODIN_WIN32_STDCLASS; -
trunk/src/kernel32/kernel32dbg.def
r21914 r21916 8 8 DESCRIPTION 'Odin32 System DLL - Kernel32' 9 9 10 SEGMENTS 11 12 _GLOBALDATA CLASS 'DATA' SHARED LOADONCALL READWRITE 10 ; 11 ; Segments are done with LDFLAGS (emxomfld limitation) 12 ; 13 ; SEGMENTS 14 ; 15 ; _GLOBALDATA CLASS 'DATA' SHARED LOADONCALL READWRITE 16 ; 13 17 14 18 IMPORTS … … 65 69 ; Ordinal0014 = _OS2Ordinal0014@?? @14 66 70 ; Ordinal0015 = _OS2Ordinal0015@?? @15 67 Ordinal0016 = _KERNEL32_16@12@1668 Ordinal0017 = _KERNEL32_17@4@1771 Ordinal0016 = "_KERNEL32_16@12" @16 72 Ordinal0017 = "_KERNEL32_17@4" @17 69 73 ; Ordinal0018 = _OS2Ordinal0018@?? @18 70 74 ; Ordinal0019 = _OS2Ordinal0019@?? @19 … … 91 95 ; Ordinal0040 = _OS2Ordinal0040@?? @40 92 96 ; Ordinal0041 = _OS2Ordinal0041@?? @41 93 Ordinal0042 = _NullFunction@0@4297 Ordinal0042 = "_NullFunction@0" @42 94 98 ; Ordinal0043 = _OS2Ordinal0043@?? @43 95 99 ; Ordinal0044 = _OS2Ordinal0044@?? @44 96 100 ; Ordinal0045 = _OS2Ordinal0045@?? @45 97 101 ; Ordinal0046 = _OS2Ordinal0046@?? @46 98 Ordinal0047 = _NullFunction@0@47102 Ordinal0047 = "_NullFunction@0" @47 99 103 ; Ordinal0048 = _OS2Ordinal0048@?? @49 100 104 ; Ordinal0049 = _OS2Ordinal0049@?? @49 … … 147 151 ; Ordinal0097 = _OS2Ordinal0097@?? @97 148 152 ; Ordinal0098 = _OS2Ordinal0098@?? @98 149 _KERNEL32_99@4@99 NONAME150 _KERNEL32_100@12@100 NONAME153 "_KERNEL32_99@4" @99 NONAME 154 "_KERNEL32_100@12" @100 NONAME 151 155 ; Ordinal0101 = _OS2Ordinal0101@?? @101 152 156 … … 157 161 158 162 ;;Not supported; just present 159 LoadLibrary16 = _DbgLoadLibrary16@4@35160 FreeLibrary16 = _DbgFreeLibrary16@4@36161 GetProcAddress16 = _DbgGetProcAddress16@8@37162 ReleaseThunkLock = _DbgReleaseThunkLock@4@48163 RestoreThunkLock = _DbgRestoreThunkLock@4@49164 _ConfirmWin16Lock = _Dbg_ConfirmWin16Lock@0@96165 166 AddAtomA = _DbgAddAtomA@4@50167 AddAtomW = _DbgAddAtomW@4@102163 LoadLibrary16 = "_DbgLoadLibrary16@4" @35 164 FreeLibrary16 = "_DbgFreeLibrary16@4" @36 165 GetProcAddress16 = "_DbgGetProcAddress16@8" @37 166 ReleaseThunkLock = "_DbgReleaseThunkLock@4" @48 167 RestoreThunkLock = "_DbgRestoreThunkLock@4" @49 168 _ConfirmWin16Lock = "_Dbg_ConfirmWin16Lock@0" @96 169 170 AddAtomA = "_DbgAddAtomA@4" @50 171 AddAtomW = "_DbgAddAtomW@4" @102 168 172 ; AddConsoleAliasA = _DbgAddConsoleAliasA@?? @2 ;NT 169 173 ; AddConsoleAliasW = _DbgAddConsoleAliasW@?? @3 ;NT 170 AllocConsole = _DbgAllocConsole@0@103174 AllocConsole = "_DbgAllocConsole@0" @103 171 175 ; AllocLSCallback = _DbgAllocLSCallback@?? @104 ;W95 172 176 ; AllocSLCallback = _DbgAllocSLCallback@?? @105 ;W95 173 AreFileApisANSI = _DbgAreFileApisANSI@0@106174 BackupRead = _DbgBackupRead@28@107175 BackupSeek = _DbgBackupSeek@24@108176 BackupWrite = _DbgBackupWrite@28@109177 AreFileApisANSI = "_DbgAreFileApisANSI@0" @106 178 BackupRead = "_DbgBackupRead@28" @107 179 BackupSeek = "_DbgBackupSeek@24" @108 180 BackupWrite = "_DbgBackupWrite@28" @109 177 181 ; BaseAttachCompleteThunk = _DbgBaseAttachCompleteThunk@?? @9 ;NT 178 Beep = _DbgBeep@8@110179 BeginUpdateResourceA = _DbgBeginUpdateResourceA@8@111180 BeginUpdateResourceW = _DbgBeginUpdateResourceW@8@112181 BuildCommDCBA = _DbgBuildCommDCBA@8@113182 BuildCommDCBAndTimeoutsA = _DbgBuildCommDCBAndTimeoutsA@12@114183 BuildCommDCBAndTimeoutsW = _DbgBuildCommDCBAndTimeoutsW@12@115184 BuildCommDCBW = _DbgBuildCommDCBW@8@116185 CallNamedPipeA = _DbgCallNamedPipeA@28@117186 CallNamedPipeW = _DbgCallNamedPipeW@28@118182 Beep = "_DbgBeep@8" @110 183 BeginUpdateResourceA = "_DbgBeginUpdateResourceA@8" @111 184 BeginUpdateResourceW = "_DbgBeginUpdateResourceW@8" @112 185 BuildCommDCBA = "_DbgBuildCommDCBA@8" @113 186 BuildCommDCBAndTimeoutsA = "_DbgBuildCommDCBAndTimeoutsA@12" @114 187 BuildCommDCBAndTimeoutsW = "_DbgBuildCommDCBAndTimeoutsW@12" @115 188 BuildCommDCBW = "_DbgBuildCommDCBW@8" @116 189 CallNamedPipeA = "_DbgCallNamedPipeA@28" @117 190 CallNamedPipeW = "_DbgCallNamedPipeW@28" @118 187 191 ; Callback12 = _DbgCallback12@?? @119 ;W95 188 192 ; Callback16 = _DbgCallback16@?? @120 ;W95 … … 201 205 ; Callback64 = _DbgCallback64@?? @133 ;W95 202 206 ; Callback8 = _DbgCallback8@?? @134 ;W95 203 CancelIo = _DbgCancelIo@4@19 ;NT204 CancelWaitableTimer = _DbgCancelWaitableTimer@4@20 ;NT205 ClearCommBreak = _DbgClearCommBreak@4@135206 ClearCommError = _DbgClearCommError@12@136207 CloseHandle = _DbgCloseHandle@4@137207 CancelIo = "_DbgCancelIo@4" @19 ;NT 208 CancelWaitableTimer = "_DbgCancelWaitableTimer@4" @20 ;NT 209 ClearCommBreak = "_DbgClearCommBreak@4" @135 210 ClearCommError = "_DbgClearCommError@12" @136 211 CloseHandle = "_DbgCloseHandle@4" @137 208 212 ; CloseConsoleHandle = _DbgCloseConsoleHandle@?? @22 ;NT 209 CloseProfileUserMapping = _DbgCloseProfileUserMapping@0@138213 CloseProfileUserMapping = "_DbgCloseProfileUserMapping@0" @138 210 214 ; CloseSystemHandle = _DbgCloseSystemHandle@?? @139 ;W95 211 CmdBatNotification = _DbgCmdBatNotification@4@26 ;NT212 CommConfigDialogA = _DbgCommConfigDialogA@12@140213 CommConfigDialogW = _DbgCommConfigDialogW@12@141214 CompareFileTime = _DbgCompareFileTime@8@142215 CompareStringA = _DbgCompareStringA@24@143216 CompareStringW = _DbgCompareStringW@24@144217 ConnectNamedPipe = _DbgConnectNamedPipe@8@145215 CmdBatNotification = "_DbgCmdBatNotification@4" @26 ;NT 216 CommConfigDialogA = "_DbgCommConfigDialogA@12" @140 217 CommConfigDialogW = "_DbgCommConfigDialogW@12" @141 218 CompareFileTime = "_DbgCompareFileTime@8" @142 219 CompareStringA = "_DbgCompareStringA@24" @143 220 CompareStringW = "_DbgCompareStringW@24" @144 221 ConnectNamedPipe = "_DbgConnectNamedPipe@8" @145 218 222 ; ConsoleMenuControl = _DbgConsoleMenuControl@?? @33 ;NT 219 ContinueDebugEvent = _DbgContinueDebugEvent@12@146220 ConvertDefaultLocale = _DbgConvertDefaultLocale@4@147221 ConvertToGlobalHandle = _DbgConvertToGlobalHandle@4@148 ;W95222 CopyFileA = _DbgCopyFileA@12@149223 CopyFileExA = _DbgCopyFileExA@24@38 ;NT224 CopyFileExW = _DbgCopyFileExW@24@39 ;NT225 CopyFileW = _DbgCopyFileW@12@150226 CreateConsoleScreenBuffer = _DbgCreateConsoleScreenBuffer@20@151227 CreateDirectoryA = _DbgCreateDirectoryA@8@152228 CreateDirectoryExA = _DbgCreateDirectoryExA@12@153229 CreateDirectoryExW = _DbgCreateDirectoryExW@12@154230 CreateDirectoryW = _DbgCreateDirectoryW@8@155231 CreateEventA = _DbgCreateEventA@16@156232 CreateEventW = _DbgCreateEventW@16@157233 CreateFiber = _DbgCreateFiber@12@1048 ;NT234 CreateFileA = _DbgCreateFileA@28@158235 CreateFileW = _DbgCreateFileW@28@161236 CreateFileMappingA = _DbgCreateFileMappingA@24@159237 CreateFileMappingW = _DbgCreateFileMappingW@24@160238 CreateIoCompletionPort = _DbgCreateIoCompletionPort@16@162223 ContinueDebugEvent = "_DbgContinueDebugEvent@12" @146 224 ConvertDefaultLocale = "_DbgConvertDefaultLocale@4" @147 225 ConvertToGlobalHandle = "_DbgConvertToGlobalHandle@4" @148 ;W95 226 CopyFileA = "_DbgCopyFileA@12" @149 227 CopyFileExA = "_DbgCopyFileExA@24" @38 ;NT 228 CopyFileExW = "_DbgCopyFileExW@24" @39 ;NT 229 CopyFileW = "_DbgCopyFileW@12" @150 230 CreateConsoleScreenBuffer = "_DbgCreateConsoleScreenBuffer@20" @151 231 CreateDirectoryA = "_DbgCreateDirectoryA@8" @152 232 CreateDirectoryExA = "_DbgCreateDirectoryExA@12" @153 233 CreateDirectoryExW = "_DbgCreateDirectoryExW@12" @154 234 CreateDirectoryW = "_DbgCreateDirectoryW@8" @155 235 CreateEventA = "_DbgCreateEventA@16" @156 236 CreateEventW = "_DbgCreateEventW@16" @157 237 CreateFiber = "_DbgCreateFiber@12" @1048 ;NT 238 CreateFileA = "_DbgCreateFileA@28" @158 239 CreateFileW = "_DbgCreateFileW@28" @161 240 CreateFileMappingA = "_DbgCreateFileMappingA@24" @159 241 CreateFileMappingW = "_DbgCreateFileMappingW@24" @160 242 CreateIoCompletionPort = "_DbgCreateIoCompletionPort@16" @162 239 243 ; CreateKernelThread = _DbgCreateKernelThread@?? @163 ;W95 240 CreateMailslotA = _DbgCreateMailslotA@16@164241 CreateMailslotW = _DbgCreateMailslotW@16@165242 CreateMutexA = _DbgCreateMutexA@12@166243 CreateMutexW = _DbgCreateMutexW@12@167244 CreateNamedPipeA = _DbgCreateNamedPipeA@32@168245 CreateNamedPipeW = _DbgCreateNamedPipeW@32@169246 CreatePipe = _DbgCreatePipe@16@170247 CreateProcessA = _DbgCreateProcessA@40@171248 CreateProcessW = _DbgCreateProcessW@40@172249 CreateRemoteThread = _DbgCreateRemoteThread@28@173250 CreateSemaphoreA = _DbgCreateSemaphoreA@16@174251 CreateSemaphoreW = _DbgCreateSemaphoreW@16@175244 CreateMailslotA = "_DbgCreateMailslotA@16" @164 245 CreateMailslotW = "_DbgCreateMailslotW@16" @165 246 CreateMutexA = "_DbgCreateMutexA@12" @166 247 CreateMutexW = "_DbgCreateMutexW@12" @167 248 CreateNamedPipeA = "_DbgCreateNamedPipeA@32" @168 249 CreateNamedPipeW = "_DbgCreateNamedPipeW@32" @169 250 CreatePipe = "_DbgCreatePipe@16" @170 251 CreateProcessA = "_DbgCreateProcessA@40" @171 252 CreateProcessW = "_DbgCreateProcessW@40" @172 253 CreateRemoteThread = "_DbgCreateRemoteThread@28" @173 254 CreateSemaphoreA = "_DbgCreateSemaphoreA@16" @174 255 CreateSemaphoreW = "_DbgCreateSemaphoreW@16" @175 252 256 ; CreateSocketHandle = _DbgCreateSocketHandle@?? @176 ;W95 253 CreateTapePartition = _DbgCreateTapePartition@16@177254 CreateThread = _DbgCreateThread@24@178257 CreateTapePartition = "_DbgCreateTapePartition@16" @177 258 CreateThread = "_DbgCreateThread@24" @178 255 259 ;;;; CreateToolhelp32Snapshot = _DbgCreateToolhelp32Snapshot@8 @179 ;W95 256 260 ; CreateVirtualBuffer = _DbgCreateVirtualBuffer@?? @68 ;NT 257 CreateWaitableTimerA = _DbgCreateWaitableTimerA@12@69 ;NT258 CreateWaitableTimerW = _DbgCreateWaitableTimerW@12@70 ;NT259 DebugActiveProcess = _DbgDebugActiveProcess@4@180260 DebugBreak = _DbgDebugBreak@0@181261 DefineDosDeviceA = _DbgDefineDosDeviceA@12@182262 DefineDosDeviceW = _DbgDefineDosDeviceW@12@183263 DeleteAtom = _DbgDeleteAtom@4@184264 DeleteCriticalSection = _DbgDeleteCriticalSection@4@185265 DeleteFiber = _DbgDeleteFiber@4@77 ;NT266 DeleteFileA = _DbgDeleteFileA@4@186267 DeleteFileW = _DbgDeleteFileW@4@187268 DeviceIoControl = _DbgDeviceIoControl@32@188269 DisableThreadLibraryCalls = _DbgDisableThreadLibraryCalls@4@189270 DisconnectNamedPipe = _DbgDisconnectNamedPipe@4@190271 DosDateTimeToFileTime = _DbgDosDateTimeToFileTime@12@191261 CreateWaitableTimerA = "_DbgCreateWaitableTimerA@12" @69 ;NT 262 CreateWaitableTimerW = "_DbgCreateWaitableTimerW@12" @70 ;NT 263 DebugActiveProcess = "_DbgDebugActiveProcess@4" @180 264 DebugBreak = "_DbgDebugBreak@0" @181 265 DefineDosDeviceA = "_DbgDefineDosDeviceA@12" @182 266 DefineDosDeviceW = "_DbgDefineDosDeviceW@12" @183 267 DeleteAtom = "_DbgDeleteAtom@4" @184 268 DeleteCriticalSection = "_DbgDeleteCriticalSection@4" @185 269 DeleteFiber = "_DbgDeleteFiber@4" @77 ;NT 270 DeleteFileA = "_DbgDeleteFileA@4" @186 271 DeleteFileW = "_DbgDeleteFileW@4" @187 272 DeviceIoControl = "_DbgDeviceIoControl@32" @188 273 DisableThreadLibraryCalls = "_DbgDisableThreadLibraryCalls@4" @189 274 DisconnectNamedPipe = "_DbgDisconnectNamedPipe@4" @190 275 DosDateTimeToFileTime = "_DbgDosDateTimeToFileTime@12" @191 272 276 ; DuplicateConsoleHandle = _DbgDuplicateConsoleHandle@?? ;NT 273 DuplicateHandle = _DbgDuplicateHandle@28@192274 EndUpdateResourceA = _DbgEndUpdateResourceA@8@193275 EndUpdateResourceW = _DbgEndUpdateResourceW@8@194276 EnterCriticalSection = _DbgEnterCriticalSection@4@195277 EnumCalendarInfoA = _DbgEnumCalendarInfoA@16@196278 EnumCalendarInfoW = _DbgEnumCalendarInfoW@16@197279 EnumDateFormatsA = _DbgEnumDateFormatsA@12@198280 EnumDateFormatsW = _DbgEnumDateFormatsW@12@199281 EnumResourceLanguagesA = _DbgEnumResourceLanguagesA@20@200282 EnumResourceLanguagesW = _DbgEnumResourceLanguagesW@20@201283 EnumResourceNamesA = _DbgEnumResourceNamesA@16@202284 EnumResourceNamesW = _DbgEnumResourceNamesW@16@203285 EnumResourceTypesA = _DbgEnumResourceTypesA@12@204286 EnumResourceTypesW = _DbgEnumResourceTypesW@12@205287 EnumSystemCodePagesA = _DbgEnumSystemCodePagesA@8@206288 EnumSystemCodePagesW = _DbgEnumSystemCodePagesW@8@207289 EnumSystemLocalesA = _DbgEnumSystemLocalesA@8@208290 EnumSystemLocalesW = _DbgEnumSystemLocalesW@8@209291 EnumTimeFormatsA = _DbgEnumTimeFormatsA@12@210292 EnumTimeFormatsW = _DbgEnumTimeFormatsW@12@211293 EraseTape = _DbgEraseTape@12@212294 EscapeCommFunction = _DbgEscapeCommFunction@8@213295 ExitProcess = _DbgExitProcess@4@214296 ExitThread = _DbgExitThread@4@215277 DuplicateHandle = "_DbgDuplicateHandle@28" @192 278 EndUpdateResourceA = "_DbgEndUpdateResourceA@8" @193 279 EndUpdateResourceW = "_DbgEndUpdateResourceW@8" @194 280 EnterCriticalSection = "_DbgEnterCriticalSection@4" @195 281 EnumCalendarInfoA = "_DbgEnumCalendarInfoA@16" @196 282 EnumCalendarInfoW = "_DbgEnumCalendarInfoW@16" @197 283 EnumDateFormatsA = "_DbgEnumDateFormatsA@12" @198 284 EnumDateFormatsW = "_DbgEnumDateFormatsW@12" @199 285 EnumResourceLanguagesA = "_DbgEnumResourceLanguagesA@20" @200 286 EnumResourceLanguagesW = "_DbgEnumResourceLanguagesW@20" @201 287 EnumResourceNamesA = "_DbgEnumResourceNamesA@16" @202 288 EnumResourceNamesW = "_DbgEnumResourceNamesW@16" @203 289 EnumResourceTypesA = "_DbgEnumResourceTypesA@12" @204 290 EnumResourceTypesW = "_DbgEnumResourceTypesW@12" @205 291 EnumSystemCodePagesA = "_DbgEnumSystemCodePagesA@8" @206 292 EnumSystemCodePagesW = "_DbgEnumSystemCodePagesW@8" @207 293 EnumSystemLocalesA = "_DbgEnumSystemLocalesA@8" @208 294 EnumSystemLocalesW = "_DbgEnumSystemLocalesW@8" @209 295 EnumTimeFormatsA = "_DbgEnumTimeFormatsA@12" @210 296 EnumTimeFormatsW = "_DbgEnumTimeFormatsW@12" @211 297 EraseTape = "_DbgEraseTape@12" @212 298 EscapeCommFunction = "_DbgEscapeCommFunction@8" @213 299 ExitProcess = "_DbgExitProcess@4" @214 300 ExitThread = "_DbgExitThread@4" @215 297 301 ; ExitVDM = _DbgExitVDM@?? ;NT 298 ExpandEnvironmentStringsA = _DbgExpandEnvironmentStringsA@12@216299 ExpandEnvironmentStringsW = _DbgExpandEnvironmentStringsW@12@217302 ExpandEnvironmentStringsA = "_DbgExpandEnvironmentStringsA@12" @216 303 ExpandEnvironmentStringsW = "_DbgExpandEnvironmentStringsW@12" @217 300 304 ; ExpungeConsoleCommandHistoryA = _DbgExpungeConsoleCommandHistoryA@?? ;NT 301 305 ; ExpungeConsoleCommandHistoryW = _DbgExpungeConsoleCommandHistoryW@?? ;NT 302 306 ; ExtendVirtualBuffer = _DbgExtendVirtualBuffer@?? ;NT 303 FT_Exit0 = _DbgFT_Exit0@4@218 ;W95304 FT_Exit12 = _DbgFT_Exit12@4@219 ;W95305 FT_Exit16 = _DbgFT_Exit16@4@220 ;W95306 FT_Exit20 = _DbgFT_Exit20@4@221 ;W95307 FT_Exit24 = _DbgFT_Exit24@4@222 ;W95308 FT_Exit28 = _DbgFT_Exit28@4@223 ;W95309 FT_Exit32 = _DbgFT_Exit32@4@224 ;W95310 FT_Exit36 = _DbgFT_Exit36@4@225 ;W95311 FT_Exit4 = _DbgFT_Exit4@4@226 ;W95312 FT_Exit40 = _DbgFT_Exit40@4@227 ;W95313 FT_Exit44 = _DbgFT_Exit44@4@228 ;W95314 FT_Exit48 = _DbgFT_Exit48@4@229 ;W95315 FT_Exit52 = _DbgFT_Exit52@4@230 ;W95316 FT_Exit56 = _DbgFT_Exit56@4@231 ;W95317 FT_Exit8 = _DbgFT_Exit8@4@232 ;W95318 FT_Prolog = _DbgFT_Prolog@4@233 ;W95319 FT_Thunk = _DbgFT_Thunk@4@234 ;W95320 FatalAppExitA = _DbgFatalAppExitA@8@235321 FatalAppExitW = _DbgFatalAppExitW@8@236322 FatalExit = _DbgFatalExit@4@237323 FileTimeToDosDateTime = _DbgFileTimeToDosDateTime@12@238324 FileTimeToLocalFileTime = _DbgFileTimeToLocalFileTime@8@239325 FileTimeToSystemTime = _DbgFileTimeToSystemTime@8@240326 FillConsoleOutputAttribute = _DbgFillConsoleOutputAttribute@20@241327 FillConsoleOutputCharacterA = _DbgFillConsoleOutputCharacterA@20@242328 FillConsoleOutputCharacterW = _DbgFillConsoleOutputCharacterW@20@243329 FindAtomA = _DbgFindAtomA@4@244330 FindAtomW = _DbgFindAtomW@4@245331 FindClose = _DbgFindClose@4@246332 FindCloseChangeNotification = _DbgFindCloseChangeNotification@4@247333 FindFirstChangeNotificationA = _DbgFindFirstChangeNotificationA@12@248334 FindFirstChangeNotificationW = _DbgFindFirstChangeNotificationW@12@249335 FindFirstFileA = _DbgFindFirstFileA@8@250336 FindFirstFileExA = _DbgFindFirstFileExA@24@850337 FindFirstFileExW = _DbgFindFirstFileExW@24@851338 FindFirstFileW = _DbgFindFirstFileW@8@251339 FindNextChangeNotification = _DbgFindNextChangeNotification@4@252340 FindNextFileA = _DbgFindNextFileA@8@253341 FindNextFileW = _DbgFindNextFileW@8@254342 FindResourceA = _DbgFindResourceA@12@255343 FindResourceExA = _DbgFindResourceExA@16@256344 FindResourceExW = _DbgFindResourceExW@16@257345 FindResourceW = _DbgFindResourceW@12@258346 FlushConsoleInputBuffer = _DbgFlushConsoleInputBuffer@4@259347 FlushFileBuffers = _DbgFlushFileBuffers@4@260348 FlushInstructionCache = _DbgFlushInstructionCache@12@261349 FlushViewOfFile = _DbgFlushViewOfFile@8@262350 FoldStringA = _DbgFoldStringA@20@263351 FoldStringW = _DbgFoldStringW@20@264352 FormatMessageA = _DbgFormatMessageA@28@265353 FormatMessageW = _DbgFormatMessageW@28@266354 FreeConsole = _DbgFreeConsole@0@267355 FreeEnvironmentStringsA = _DbgFreeEnvironmentStringsA@4@268356 FreeEnvironmentStringsW = _DbgFreeEnvironmentStringsW@4@269307 FT_Exit0 = "_DbgFT_Exit0@4" @218 ;W95 308 FT_Exit12 = "_DbgFT_Exit12@4" @219 ;W95 309 FT_Exit16 = "_DbgFT_Exit16@4" @220 ;W95 310 FT_Exit20 = "_DbgFT_Exit20@4" @221 ;W95 311 FT_Exit24 = "_DbgFT_Exit24@4" @222 ;W95 312 FT_Exit28 = "_DbgFT_Exit28@4" @223 ;W95 313 FT_Exit32 = "_DbgFT_Exit32@4" @224 ;W95 314 FT_Exit36 = "_DbgFT_Exit36@4" @225 ;W95 315 FT_Exit4 = "_DbgFT_Exit4@4" @226 ;W95 316 FT_Exit40 = "_DbgFT_Exit40@4" @227 ;W95 317 FT_Exit44 = "_DbgFT_Exit44@4" @228 ;W95 318 FT_Exit48 = "_DbgFT_Exit48@4" @229 ;W95 319 FT_Exit52 = "_DbgFT_Exit52@4" @230 ;W95 320 FT_Exit56 = "_DbgFT_Exit56@4" @231 ;W95 321 FT_Exit8 = "_DbgFT_Exit8@4" @232 ;W95 322 FT_Prolog = "_DbgFT_Prolog@4" @233 ;W95 323 FT_Thunk = "_DbgFT_Thunk@4" @234 ;W95 324 FatalAppExitA = "_DbgFatalAppExitA@8" @235 325 FatalAppExitW = "_DbgFatalAppExitW@8" @236 326 FatalExit = "_DbgFatalExit@4" @237 327 FileTimeToDosDateTime = "_DbgFileTimeToDosDateTime@12" @238 328 FileTimeToLocalFileTime = "_DbgFileTimeToLocalFileTime@8" @239 329 FileTimeToSystemTime = "_DbgFileTimeToSystemTime@8" @240 330 FillConsoleOutputAttribute = "_DbgFillConsoleOutputAttribute@20" @241 331 FillConsoleOutputCharacterA = "_DbgFillConsoleOutputCharacterA@20" @242 332 FillConsoleOutputCharacterW = "_DbgFillConsoleOutputCharacterW@20" @243 333 FindAtomA = "_DbgFindAtomA@4" @244 334 FindAtomW = "_DbgFindAtomW@4" @245 335 FindClose = "_DbgFindClose@4" @246 336 FindCloseChangeNotification = "_DbgFindCloseChangeNotification@4" @247 337 FindFirstChangeNotificationA = "_DbgFindFirstChangeNotificationA@12" @248 338 FindFirstChangeNotificationW = "_DbgFindFirstChangeNotificationW@12" @249 339 FindFirstFileA = "_DbgFindFirstFileA@8" @250 340 FindFirstFileExA = "_DbgFindFirstFileExA@24" @850 341 FindFirstFileExW = "_DbgFindFirstFileExW@24" @851 342 FindFirstFileW = "_DbgFindFirstFileW@8" @251 343 FindNextChangeNotification = "_DbgFindNextChangeNotification@4" @252 344 FindNextFileA = "_DbgFindNextFileA@8" @253 345 FindNextFileW = "_DbgFindNextFileW@8" @254 346 FindResourceA = "_DbgFindResourceA@12" @255 347 FindResourceExA = "_DbgFindResourceExA@16" @256 348 FindResourceExW = "_DbgFindResourceExW@16" @257 349 FindResourceW = "_DbgFindResourceW@12" @258 350 FlushConsoleInputBuffer = "_DbgFlushConsoleInputBuffer@4" @259 351 FlushFileBuffers = "_DbgFlushFileBuffers@4" @260 352 FlushInstructionCache = "_DbgFlushInstructionCache@12" @261 353 FlushViewOfFile = "_DbgFlushViewOfFile@8" @262 354 FoldStringA = "_DbgFoldStringA@20" @263 355 FoldStringW = "_DbgFoldStringW@20" @264 356 FormatMessageA = "_DbgFormatMessageA@28" @265 357 FormatMessageW = "_DbgFormatMessageW@28" @266 358 FreeConsole = "_DbgFreeConsole@0" @267 359 FreeEnvironmentStringsA = "_DbgFreeEnvironmentStringsA@4" @268 360 FreeEnvironmentStringsW = "_DbgFreeEnvironmentStringsW@4" @269 357 361 ; FreeLSCallback = _DbgFreeLSCallback@?? @270 ;W95 358 FreeLibrary = _DbgFreeLibrary@4@271359 FreeLibraryAndExitThread = _DbgFreeLibraryAndExitThread@8@272360 FreeResource = _DbgFreeResource@4@273362 FreeLibrary = "_DbgFreeLibrary@4" @271 363 FreeLibraryAndExitThread = "_DbgFreeLibraryAndExitThread@8" @272 364 FreeResource = "_DbgFreeResource@4" @273 361 365 ; FreeSLCallback = _DbgFreeSLCallback@?? @274 ;W95 362 366 ; FreeVirtualBuffer = _DbgFreeVirtualBuffer@?? ;NT 363 GenerateConsoleCtrlEvent = _DbgGenerateConsoleCtrlEvent@8@275364 GetACP = _DbgGetACP@0@276365 GetAtomNameA = _DbgGetAtomNameA@12@277366 GetAtomNameW = _DbgGetAtomNameW@12@278367 GetBinaryType = _DbgGetBinaryTypeA@8@279368 GetBinaryTypeA = _DbgGetBinaryTypeA@8@280369 GetBinaryTypeW = _DbgGetBinaryTypeW@8@281370 GetCPInfo = _DbgGetCPInfo@8@282371 GetCommConfig = _DbgGetCommConfig@12@283372 GetCommMask = _DbgGetCommMask@8@284373 GetCommModemStatus = _DbgGetCommModemStatus@8@285374 GetCommProperties = _DbgGetCommProperties@8@286375 GetCommState = _DbgGetCommState@8@287376 GetCommTimeouts = _DbgGetCommTimeouts@8@288377 GetCommandLineA = _DbgGetCommandLineA@0@289378 GetCommandLineW = _DbgGetCommandLineW@0@290379 GetCompressedFileSizeA = _DbgGetCompressedFileSizeA@8@291380 GetCompressedFileSizeW = _DbgGetCompressedFileSizeW@8@292381 GetComputerNameA = _DbgGetComputerNameA@8@293382 GetComputerNameW = _DbgGetComputerNameW@8@294367 GenerateConsoleCtrlEvent = "_DbgGenerateConsoleCtrlEvent@8" @275 368 GetACP = "_DbgGetACP@0" @276 369 GetAtomNameA = "_DbgGetAtomNameA@12" @277 370 GetAtomNameW = "_DbgGetAtomNameW@12" @278 371 GetBinaryType = "_DbgGetBinaryTypeA@8" @279 372 GetBinaryTypeA = "_DbgGetBinaryTypeA@8" @280 373 GetBinaryTypeW = "_DbgGetBinaryTypeW@8" @281 374 GetCPInfo = "_DbgGetCPInfo@8" @282 375 GetCommConfig = "_DbgGetCommConfig@12" @283 376 GetCommMask = "_DbgGetCommMask@8" @284 377 GetCommModemStatus = "_DbgGetCommModemStatus@8" @285 378 GetCommProperties = "_DbgGetCommProperties@8" @286 379 GetCommState = "_DbgGetCommState@8" @287 380 GetCommTimeouts = "_DbgGetCommTimeouts@8" @288 381 GetCommandLineA = "_DbgGetCommandLineA@0" @289 382 GetCommandLineW = "_DbgGetCommandLineW@0" @290 383 GetCompressedFileSizeA = "_DbgGetCompressedFileSizeA@8" @291 384 GetCompressedFileSizeW = "_DbgGetCompressedFileSizeW@8" @292 385 GetComputerNameA = "_DbgGetComputerNameA@8" @293 386 GetComputerNameW = "_DbgGetComputerNameW@8" @294 383 387 ; GetConsoleAliasA = _DbgGetConsoleAliasA@?? ;NT 384 388 ; GetConsoleAliasExesA = _DbgGetConsoleAliasExesA@?? ;NT … … 391 395 ; GetConsoleAliasesLengthW = _DbgGetConsoleAliasesLengthW@?? ;NT 392 396 ; GetConsoleAliasesW = _DbgGetConsoleAliasesW@?? ;NT 393 GetConsoleCP = _DbgGetConsoleCP@0@295397 GetConsoleCP = "_DbgGetConsoleCP@0" @295 394 398 ; GetConsoleCommandHistoryA = _DbgGetConsoleCommandHistoryA@?? ;NT 395 399 ; GetConsoleCommandHistoryLengthA = _DbgGetConsoleCommandHistoryLengthA@?? ;NT 396 400 ; GetConsoleCommandHistoryLengthW = _DbgGetConsoleCommandHistoryLengthW@?? ;NT 397 401 ; GetConsoleCommandHistoryW = _DbgGetConsoleCommandHistoryW@?? ;NT 398 GetConsoleCursorInfo = _DbgGetConsoleCursorInfo@8@296402 GetConsoleCursorInfo = "_DbgGetConsoleCursorInfo@8" @296 399 403 ; GetConsoleDisplayMode = _DbgGetConsoleDisplayMode@?? ;NT 400 404 ; GetConsoleFontInfo = _DbgGetConsoleFontInfo@?? ;NT … … 406 410 ; GetConsoleKeyboardLayoutNameA = _DbgGetConsoleKeyboardLayoutNameA@?? ;NT 407 411 ; GetConsoleKeyboardLayoutNameW = _DbgGetConsoleKeyboardLayoutNameW@?? ;NT 408 GetConsoleMode = _DbgGetConsoleMode@8@297409 GetConsoleOutputCP = _DbgGetConsoleOutputCP@0@298410 GetConsoleScreenBufferInfo = _DbgGetConsoleScreenBufferInfo@8@299411 GetConsoleTitleA = _DbgGetConsoleTitleA@8@300412 GetConsoleTitleW = _DbgGetConsoleTitleW@8@301413 GetCurrencyFormatA = _DbgGetCurrencyFormatA@24@302414 GetCurrencyFormatW = _DbgGetCurrencyFormatW@24@303412 GetConsoleMode = "_DbgGetConsoleMode@8" @297 413 GetConsoleOutputCP = "_DbgGetConsoleOutputCP@0" @298 414 GetConsoleScreenBufferInfo = "_DbgGetConsoleScreenBufferInfo@8" @299 415 GetConsoleTitleA = "_DbgGetConsoleTitleA@8" @300 416 GetConsoleTitleW = "_DbgGetConsoleTitleW@8" @301 417 GetCurrencyFormatA = "_DbgGetCurrencyFormatA@24" @302 418 GetCurrencyFormatW = "_DbgGetCurrencyFormatW@24" @303 415 419 ; GetCurrentConsoleFont = _DbgGetCurrentConsoleFont@?? ;NT 416 GetCurrentDirectoryA = _DbgGetCurrentDirectoryA@8@304417 GetCurrentDirectoryW = _DbgGetCurrentDirectoryW@8@305418 GetCurrentProcess = _DbgGetCurrentProcess@0@306419 GetCurrentProcessId = _DbgGetCurrentProcessId@0@307420 GetCurrentThread = _DbgGetCurrentThread@0@308421 GetCurrentThreadId = _DbgGetCurrentThreadId@0@309422 GetDateFormatA = _DbgGetDateFormatA@24@310423 GetDateFormatW = _DbgGetDateFormatW@24@311420 GetCurrentDirectoryA = "_DbgGetCurrentDirectoryA@8" @304 421 GetCurrentDirectoryW = "_DbgGetCurrentDirectoryW@8" @305 422 GetCurrentProcess = "_DbgGetCurrentProcess@0" @306 423 GetCurrentProcessId = "_DbgGetCurrentProcessId@0" @307 424 GetCurrentThread = "_DbgGetCurrentThread@0" @308 425 GetCurrentThreadId = "_DbgGetCurrentThreadId@0" @309 426 GetDateFormatA = "_DbgGetDateFormatA@24" @310 427 GetDateFormatW = "_DbgGetDateFormatW@24" @311 424 428 ; GetDaylightFlag = _DbgGetDaylightFlag@?? @312 ;W95 425 GetDefaultCommConfigA = _DbgGetDefaultCommConfigA@12@313426 GetDefaultCommConfigW = _DbgGetDefaultCommConfigW@12@314427 GetDiskFreeSpaceA = _DbgGetDiskFreeSpaceA@20@315428 GetDiskFreeSpaceW = _DbgGetDiskFreeSpaceW@20@316429 GetDriveTypeA = _DbgGetDriveTypeA@4@317430 GetDriveTypeW = _DbgGetDriveTypeW@4@318431 GetEnvironmentStrings = _DbgGetEnvironmentStringsA@0@319432 GetEnvironmentStringsA = _DbgGetEnvironmentStringsA@0@320433 GetEnvironmentStringsW = _DbgGetEnvironmentStringsW@0@321434 GetEnvironmentVariableA = _DbgGetEnvironmentVariableA@12@322435 GetEnvironmentVariableW = _DbgGetEnvironmentVariableW@12@323429 GetDefaultCommConfigA = "_DbgGetDefaultCommConfigA@12" @313 430 GetDefaultCommConfigW = "_DbgGetDefaultCommConfigW@12" @314 431 GetDiskFreeSpaceA = "_DbgGetDiskFreeSpaceA@20" @315 432 GetDiskFreeSpaceW = "_DbgGetDiskFreeSpaceW@20" @316 433 GetDriveTypeA = "_DbgGetDriveTypeA@4" @317 434 GetDriveTypeW = "_DbgGetDriveTypeW@4" @318 435 GetEnvironmentStrings = "_DbgGetEnvironmentStringsA@0" @319 436 GetEnvironmentStringsA = "_DbgGetEnvironmentStringsA@0" @320 437 GetEnvironmentStringsW = "_DbgGetEnvironmentStringsW@0" @321 438 GetEnvironmentVariableA = "_DbgGetEnvironmentVariableA@12" @322 439 GetEnvironmentVariableW = "_DbgGetEnvironmentVariableW@12" @323 436 440 ; GetErrorMode = _DbgGetErrorMode@?? @324 ;undocumented 437 GetExitCodeProcess = _DbgGetExitCodeProcess@8@325438 GetExitCodeThread = _DbgGetExitCodeThread@8@326439 GetFileAttributesA = _DbgGetFileAttributesA@4@327 ;W95440 GetFileAttributesW = _DbgGetFileAttributesW@4@328 ;W95441 GetFileInformationByHandle = _DbgGetFileInformationByHandle@8@329442 GetFileSize = _DbgGetFileSize@8@330443 GetFileTime = _DbgGetFileTime@16@331444 GetFileType = _DbgGetFileType@4@332445 GetFullPathNameA = _DbgGetFullPathNameA@16@333446 GetFullPathNameW = _DbgGetFullPathNameW@16@334441 GetExitCodeProcess = "_DbgGetExitCodeProcess@8" @325 442 GetExitCodeThread = "_DbgGetExitCodeThread@8" @326 443 GetFileAttributesA = "_DbgGetFileAttributesA@4" @327 ;W95 444 GetFileAttributesW = "_DbgGetFileAttributesW@4" @328 ;W95 445 GetFileInformationByHandle = "_DbgGetFileInformationByHandle@8" @329 446 GetFileSize = "_DbgGetFileSize@8" @330 447 GetFileTime = "_DbgGetFileTime@16" @331 448 GetFileType = "_DbgGetFileType@4" @332 449 GetFullPathNameA = "_DbgGetFullPathNameA@16" @333 450 GetFullPathNameW = "_DbgGetFullPathNameW@16" @334 447 451 ; GetHandleContext = _DbgGetHandleContext@?? @335 ;W95 448 GetHandleInformation = _DbgGetHandleInformation@8@336452 GetHandleInformation = "_DbgGetHandleInformation@8" @336 449 453 ; GetLSCallbackTarget = _DbgGetLSCallbackTarget@?? @337 ;W95 450 454 ; GetLSCallbackTemplate = _DbgGetLSCallbackTemplate@?? @338 ;W95 451 GetLargestConsoleWindowSize = _DbgGetLargestConsoleWindowSize@4@339452 GetLastError = _GetLastError@0@340453 GetLocalTime = _DbgGetLocalTime@4@341454 GetLocaleInfoA = _DbgGetLocaleInfoA@16@342455 GetLocaleInfoW = _DbgGetLocaleInfoW@16@343456 GetLogicalDriveStringsA = _DbgGetLogicalDriveStringsA@8@344457 GetLogicalDriveStringsW = _DbgGetLogicalDriveStringsW@8@345458 GetLogicalDrives = _DbgGetLogicalDrives@0@346459 GetMailslotInfo = _DbgGetMailslotInfo@20@347460 GetModuleFileNameA = _DbgGetModuleFileNameA@12@348461 GetModuleFileNameW = _DbgGetModuleFileNameW@12@349462 GetModuleHandleA = _DbgGetModuleHandleA@4@350463 GetModuleHandleW = _DbgGetModuleHandleW@4@351464 GetNamedPipeHandleStateA = _DbgGetNamedPipeHandleStateA@28@352465 GetNamedPipeHandleStateW = _DbgGetNamedPipeHandleStateW@28@353466 GetNamedPipeInfo = _DbgGetNamedPipeInfo@20@354455 GetLargestConsoleWindowSize = "_DbgGetLargestConsoleWindowSize@4" @339 456 GetLastError = "_GetLastError@0" @340 457 GetLocalTime = "_DbgGetLocalTime@4" @341 458 GetLocaleInfoA = "_DbgGetLocaleInfoA@16" @342 459 GetLocaleInfoW = "_DbgGetLocaleInfoW@16" @343 460 GetLogicalDriveStringsA = "_DbgGetLogicalDriveStringsA@8" @344 461 GetLogicalDriveStringsW = "_DbgGetLogicalDriveStringsW@8" @345 462 GetLogicalDrives = "_DbgGetLogicalDrives@0" @346 463 GetMailslotInfo = "_DbgGetMailslotInfo@20" @347 464 GetModuleFileNameA = "_DbgGetModuleFileNameA@12" @348 465 GetModuleFileNameW = "_DbgGetModuleFileNameW@12" @349 466 GetModuleHandleA = "_DbgGetModuleHandleA@4" @350 467 GetModuleHandleW = "_DbgGetModuleHandleW@4" @351 468 GetNamedPipeHandleStateA = "_DbgGetNamedPipeHandleStateA@28" @352 469 GetNamedPipeHandleStateW = "_DbgGetNamedPipeHandleStateW@28" @353 470 GetNamedPipeInfo = "_DbgGetNamedPipeInfo@20" @354 467 471 ; GetNextVDMCommand = _DbgGetNextVDMCommand@?? ;NT 468 GetNumberFormatA = _DbgGetNumberFormatA@24@355469 GetNumberFormatW = _DbgGetNumberFormatW@24@356472 GetNumberFormatA = "_DbgGetNumberFormatA@24" @355 473 GetNumberFormatW = "_DbgGetNumberFormatW@24" @356 470 474 ; GetNumberOfConsoleFonts = _DbgGetNumberOfConsoleFonts@?? ;NT 471 GetNumberOfConsoleInputEvents = _DbgGetNumberOfConsoleInputEvents@8@357472 GetNumberOfConsoleMouseButtons = _DbgGetNumberOfConsoleMouseButtons@4@358473 GetOEMCP = _DbgGetOEMCP@0@359474 GetOverlappedResult = _DbgGetOverlappedResult@16@360475 GetPriorityClass = _DbgGetPriorityClass@4@361476 GetPrivateProfileIntA = _DbgGetPrivateProfileIntA@16@362477 GetPrivateProfileIntW = _DbgGetPrivateProfileIntW@16@363478 GetPrivateProfileSectionA = _DbgGetPrivateProfileSectionA@16@364479 GetPrivateProfileSectionNamesA = _DbgGetPrivateProfileSectionNamesA@12@365480 GetPrivateProfileSectionNamesW = _DbgGetPrivateProfileSectionNamesW@12@366481 GetPrivateProfileSectionW = _DbgGetPrivateProfileSectionW@16@367482 GetPrivateProfileStringA = _DbgGetPrivateProfileStringA@24@368483 GetPrivateProfileStringW = _DbgGetPrivateProfileStringW@24@369484 GetPrivateProfileStructA = _DbgGetPrivateProfileStructA@20@370485 GetPrivateProfileStructW = _DbgGetPrivateProfileStructW@20@371486 GetProcAddress = _DbgGetProcAddress@8@372487 GetProcessAffinityMask = _DbgGetProcessAffinityMask@12@373488 GetProcessDword = _DbgGetProcessDword@8@18489 GetProcessFlags = _DbgGetProcessFlags@4@374 ;W95490 GetProcessHeap = _DbgGetProcessHeap@0@375491 GetProcessHeaps = _DbgGetProcessHeaps@8@376475 GetNumberOfConsoleInputEvents = "_DbgGetNumberOfConsoleInputEvents@8" @357 476 GetNumberOfConsoleMouseButtons = "_DbgGetNumberOfConsoleMouseButtons@4" @358 477 GetOEMCP = "_DbgGetOEMCP@0" @359 478 GetOverlappedResult = "_DbgGetOverlappedResult@16" @360 479 GetPriorityClass = "_DbgGetPriorityClass@4" @361 480 GetPrivateProfileIntA = "_DbgGetPrivateProfileIntA@16" @362 481 GetPrivateProfileIntW = "_DbgGetPrivateProfileIntW@16" @363 482 GetPrivateProfileSectionA = "_DbgGetPrivateProfileSectionA@16" @364 483 GetPrivateProfileSectionNamesA = "_DbgGetPrivateProfileSectionNamesA@12" @365 484 GetPrivateProfileSectionNamesW = "_DbgGetPrivateProfileSectionNamesW@12" @366 485 GetPrivateProfileSectionW = "_DbgGetPrivateProfileSectionW@16" @367 486 GetPrivateProfileStringA = "_DbgGetPrivateProfileStringA@24" @368 487 GetPrivateProfileStringW = "_DbgGetPrivateProfileStringW@24" @369 488 GetPrivateProfileStructA = "_DbgGetPrivateProfileStructA@20" @370 489 GetPrivateProfileStructW = "_DbgGetPrivateProfileStructW@20" @371 490 GetProcAddress = "_DbgGetProcAddress@8" @372 491 GetProcessAffinityMask = "_DbgGetProcessAffinityMask@12" @373 492 GetProcessDword = "_DbgGetProcessDword@8" @18 493 GetProcessFlags = "_DbgGetProcessFlags@4" @374 ;W95 494 GetProcessHeap = "_DbgGetProcessHeap@0" @375 495 GetProcessHeaps = "_DbgGetProcessHeaps@8" @376 492 496 ; GetProcessPriorityBoost = _DbgGetProcessPriorityBoost@?? ;NT 493 GetProcessShutdownParameters = _DbgGetProcessShutdownParameters@8@377494 GetProcessTimes = _DbgGetProcessTimes@20@378495 GetProcessVersion = _DbgGetProcessVersion@4@379496 GetProcessWorkingSetSize = _DbgGetProcessWorkingSetSize@12@380497 GetProcessShutdownParameters = "_DbgGetProcessShutdownParameters@8" @377 498 GetProcessTimes = "_DbgGetProcessTimes@20" @378 499 GetProcessVersion = "_DbgGetProcessVersion@4" @379 500 GetProcessWorkingSetSize = "_DbgGetProcessWorkingSetSize@12" @380 497 501 ; GetProductName = _DbgGetProductName@?? @381 ;W95 498 GetProfileIntA = _DbgGetProfileIntA@12@382499 GetProfileIntW = _DbgGetProfileIntW@12@383500 GetProfileSectionA = _DbgGetProfileSectionA@12@384501 GetProfileSectionW = _DbgGetProfileSectionW@12@385502 GetProfileStringA = _DbgGetProfileStringA@20@386503 GetProfileStringW = _DbgGetProfileStringW@20@387504 GetQueuedCompletionStatus = _DbgGetQueuedCompletionStatus@20@388502 GetProfileIntA = "_DbgGetProfileIntA@12" @382 503 GetProfileIntW = "_DbgGetProfileIntW@12" @383 504 GetProfileSectionA = "_DbgGetProfileSectionA@12" @384 505 GetProfileSectionW = "_DbgGetProfileSectionW@12" @385 506 GetProfileStringA = "_DbgGetProfileStringA@20" @386 507 GetProfileStringW = "_DbgGetProfileStringW@20" @387 508 GetQueuedCompletionStatus = "_DbgGetQueuedCompletionStatus@20" @388 505 509 ; GetSLCallbackTarget = _DbgGetSLCallbackTarget@?? @389 ;W95 506 510 ; GetSLCallbackTemplate = _DbgGetSLCallbackTemplate@?? @390 ;W95 507 GetShortPathNameA = _DbgGetShortPathNameA@12@391508 GetShortPathNameW = _DbgGetShortPathNameW@12@392509 GetStartupInfoA = _DbgGetStartupInfoA@4@393510 GetStartupInfoW = _DbgGetStartupInfoW@4@394511 GetStdHandle = _DbgGetStdHandle@4@395512 GetStringTypeA = _DbgGetStringTypeA@20@396513 GetStringTypeExA = _DbgGetStringTypeExA@20@397514 GetStringTypeExW = _DbgGetStringTypeExW@20@398515 GetStringTypeW = _DbgGetStringTypeW@16@399516 GetSystemDefaultLCID = _DbgGetSystemDefaultLCID@0@400517 GetSystemDefaultLangID = _DbgGetSystemDefaultLangID@0@401518 GetSystemDirectoryA = _DbgGetSystemDirectoryA@8@402519 GetSystemDirectoryW = _DbgGetSystemDirectoryW@8@403520 GetSystemInfo = _DbgGetSystemInfo@4@404521 GetSystemPowerStatus = _DbgGetSystemPowerStatus@4@405522 GetSystemTime = _DbgGetSystemTime@4@406523 GetSystemTimeAdjustment = _DbgGetSystemTimeAdjustment@12@407524 GetSystemTimeAsFileTime = _DbgGetSystemTimeAsFileTime@4@408525 GetTapeParameters = _DbgGetTapeParameters@16@409526 GetTapePosition = _DbgGetTapePosition@20@410527 GetTapeStatus = _DbgGetTapeStatus@4@411528 GetTempFileNameA = _DbgGetTempFileNameA@16@412529 GetTempFileNameW = _DbgGetTempFileNameW@16@413530 GetTempPathA = _DbgGetTempPathA@8@414531 GetTempPathW = _DbgGetTempPathW@8@415532 GetThreadContext = _DbgGetThreadContext@8@416533 GetThreadLocale = _DbgGetThreadLocale@0@417534 GetThreadPriority = _DbgGetThreadPriority@4@418511 GetShortPathNameA = "_DbgGetShortPathNameA@12" @391 512 GetShortPathNameW = "_DbgGetShortPathNameW@12" @392 513 GetStartupInfoA = "_DbgGetStartupInfoA@4" @393 514 GetStartupInfoW = "_DbgGetStartupInfoW@4" @394 515 GetStdHandle = "_DbgGetStdHandle@4" @395 516 GetStringTypeA = "_DbgGetStringTypeA@20" @396 517 GetStringTypeExA = "_DbgGetStringTypeExA@20" @397 518 GetStringTypeExW = "_DbgGetStringTypeExW@20" @398 519 GetStringTypeW = "_DbgGetStringTypeW@16" @399 520 GetSystemDefaultLCID = "_DbgGetSystemDefaultLCID@0" @400 521 GetSystemDefaultLangID = "_DbgGetSystemDefaultLangID@0" @401 522 GetSystemDirectoryA = "_DbgGetSystemDirectoryA@8" @402 523 GetSystemDirectoryW = "_DbgGetSystemDirectoryW@8" @403 524 GetSystemInfo = "_DbgGetSystemInfo@4" @404 525 GetSystemPowerStatus = "_DbgGetSystemPowerStatus@4" @405 526 GetSystemTime = "_DbgGetSystemTime@4" @406 527 GetSystemTimeAdjustment = "_DbgGetSystemTimeAdjustment@12" @407 528 GetSystemTimeAsFileTime = "_DbgGetSystemTimeAsFileTime@4" @408 529 GetTapeParameters = "_DbgGetTapeParameters@16" @409 530 GetTapePosition = "_DbgGetTapePosition@20" @410 531 GetTapeStatus = "_DbgGetTapeStatus@4" @411 532 GetTempFileNameA = "_DbgGetTempFileNameA@16" @412 533 GetTempFileNameW = "_DbgGetTempFileNameW@16" @413 534 GetTempPathA = "_DbgGetTempPathA@8" @414 535 GetTempPathW = "_DbgGetTempPathW@8" @415 536 GetThreadContext = "_DbgGetThreadContext@8" @416 537 GetThreadLocale = "_DbgGetThreadLocale@0" @417 538 GetThreadPriority = "_DbgGetThreadPriority@4" @418 535 539 ; GetThreadPriorityBoost = _DbgGetThreadPriorityBoost@?? ;NT 536 GetThreadSelectorEntry = _DbgGetThreadSelectorEntry@12@419537 GetThreadTimes = _DbgGetThreadTimes@20@420538 GetTickCount = _DbgGetTickCount@0@421539 GetTimeFormatA = _DbgGetTimeFormatA@24@422540 GetTimeFormatW = _DbgGetTimeFormatW@24@423541 GetTimeZoneInformation = _DbgGetTimeZoneInformation@4@424542 GetUserDefaultLCID = _DbgGetUserDefaultLCID@0@425543 GetUserDefaultLangID = _DbgGetUserDefaultLangID@0@426544 GetVDMCurrentDirectories = _DbgGetVDMCurrentDirectories@4;NT545 GetVersion = _DbgGetVersion@0@427546 GetVersionExA = _DbgGetVersionExA@4@428547 GetVersionExW = _DbgGetVersionExW@4@429548 GetVolumeInformationA = _DbgGetVolumeInformationA@32@430549 GetVolumeInformationW = _DbgGetVolumeInformationW@32@431550 GetWindowsDirectoryA = _DbgGetWindowsDirectoryA@8@432551 GetWindowsDirectoryW = _DbgGetWindowsDirectoryW@8@433552 GlobalAddAtomA = _DbgGlobalAddAtomA@4@434553 GlobalAddAtomW = _DbgGlobalAddAtomW@4@435554 GlobalAlloc = _DbgGlobalAlloc@8@436555 GlobalCompact = _DbgGlobalCompact@4@437556 GlobalDeleteAtom = _DbgGlobalDeleteAtom@4@438557 GlobalFindAtomA = _GlobalFindAtomA@4@439558 GlobalFindAtomW = _GlobalFindAtomW@4@440559 GlobalFix = _DbgGlobalFix@4@441560 GlobalFlags = _DbgGlobalFlags@4@442561 GlobalFree = _DbgGlobalFree@4@443562 GlobalGetAtomNameA = _DbgGlobalGetAtomNameA@12@444563 GlobalGetAtomNameW = _DbgGlobalGetAtomNameW@12@445564 GlobalHandle = _DbgGlobalHandle@4@446565 GlobalLock = _DbgGlobalLock@4@447566 GlobalMemoryStatus = _DbgGlobalMemoryStatus@4@448567 GlobalReAlloc = _DbgGlobalReAlloc@12@449568 GlobalSize = _DbgGlobalSize@4@450569 GlobalUnWire = _DbgGlobalUnWire@4@451 ;obsolete570 GlobalUnfix = _DbgGlobalUnfix@4@452 ;obsolete571 GlobalUnlock = _DbgGlobalUnlock@4@453572 GlobalWire = _DbgGlobalWire@4@454 ;obsolete540 GetThreadSelectorEntry = "_DbgGetThreadSelectorEntry@12" @419 541 GetThreadTimes = "_DbgGetThreadTimes@20" @420 542 GetTickCount = "_DbgGetTickCount@0" @421 543 GetTimeFormatA = "_DbgGetTimeFormatA@24" @422 544 GetTimeFormatW = "_DbgGetTimeFormatW@24" @423 545 GetTimeZoneInformation = "_DbgGetTimeZoneInformation@4" @424 546 GetUserDefaultLCID = "_DbgGetUserDefaultLCID@0" @425 547 GetUserDefaultLangID = "_DbgGetUserDefaultLangID@0" @426 548 ; GetVDMCurrentDirectories = "_DbgGetVDMCurrentDirectories@4" ;NT 549 GetVersion = "_DbgGetVersion@0" @427 550 GetVersionExA = "_DbgGetVersionExA@4" @428 551 GetVersionExW = "_DbgGetVersionExW@4" @429 552 GetVolumeInformationA = "_DbgGetVolumeInformationA@32" @430 553 GetVolumeInformationW = "_DbgGetVolumeInformationW@32" @431 554 GetWindowsDirectoryA = "_DbgGetWindowsDirectoryA@8" @432 555 GetWindowsDirectoryW = "_DbgGetWindowsDirectoryW@8" @433 556 GlobalAddAtomA = "_DbgGlobalAddAtomA@4" @434 557 GlobalAddAtomW = "_DbgGlobalAddAtomW@4" @435 558 GlobalAlloc = "_DbgGlobalAlloc@8" @436 559 GlobalCompact = "_DbgGlobalCompact@4" @437 560 GlobalDeleteAtom = "_DbgGlobalDeleteAtom@4" @438 561 GlobalFindAtomA = "_GlobalFindAtomA@4" @439 562 GlobalFindAtomW = "_GlobalFindAtomW@4" @440 563 GlobalFix = "_DbgGlobalFix@4" @441 564 GlobalFlags = "_DbgGlobalFlags@4" @442 565 GlobalFree = "_DbgGlobalFree@4" @443 566 GlobalGetAtomNameA = "_DbgGlobalGetAtomNameA@12" @444 567 GlobalGetAtomNameW = "_DbgGlobalGetAtomNameW@12" @445 568 GlobalHandle = "_DbgGlobalHandle@4" @446 569 GlobalLock = "_DbgGlobalLock@4" @447 570 GlobalMemoryStatus = "_DbgGlobalMemoryStatus@4" @448 571 GlobalReAlloc = "_DbgGlobalReAlloc@12" @449 572 GlobalSize = "_DbgGlobalSize@4" @450 573 GlobalUnWire = "_DbgGlobalUnWire@4" @451 ;obsolete 574 GlobalUnfix = "_DbgGlobalUnfix@4" @452 ;obsolete 575 GlobalUnlock = "_DbgGlobalUnlock@4" @453 576 GlobalWire = "_DbgGlobalWire@4" @454 ;obsolete 573 577 ; Heap32First = _DbgHeap32First@?? @455 ;W95 574 578 ; Heap32ListFirst = _DbgHeap32ListFirst@?? @456 ;W95 575 579 ; Heap32ListNext = _DbgHeap32ListNext@?? @457 ;W95 576 580 ; Heap32Next = _DbgHeap32Next@?? @458 ;W95 577 HeapAlloc = _DbgHeapAlloc@12@459578 HeapCompact = _DbgHeapCompact@8@460579 HeapCreate = _DbgHeapCreate@12@461581 HeapAlloc = "_DbgHeapAlloc@12" @459 582 HeapCompact = "_DbgHeapCompact@8" @460 583 HeapCreate = "_DbgHeapCreate@12" @461 580 584 ; HeapCreateTagsW = _DbgHeapCreateTagsW@?? ;NT 581 HeapDestroy = _DbgHeapDestroy@4@462585 HeapDestroy = "_DbgHeapDestroy@4" @462 582 586 ; HeapExtend = _DbgHeapExtend@?? ;NT 583 HeapFree = _DbgHeapFree@12@463584 HeapLock = _DbgHeapLock@4@464585 HeapReAlloc = _DbgHeapReAlloc@16@465587 HeapFree = "_DbgHeapFree@12" @463 588 HeapLock = "_DbgHeapLock@4" @464 589 HeapReAlloc = "_DbgHeapReAlloc@16" @465 586 590 ; HeapQueryTagsW = _DbgHeapQueryTagsW@?? ;NT 587 591 ; HeapSetFlags = _DbgHeapSetFlags@?? @466 588 "HeapSize" = _DbgHeapSize@12@467 ; reserved linker word589 HeapUnlock = _DbgHeapUnlock@4@468592 "HeapSize" = "_DbgHeapSize@12" @467 ; reserved linker word 593 HeapUnlock = "_DbgHeapUnlock@4" @468 590 594 ; HeapUsage = _DbgHeapUsage@?? ;NT 591 HeapValidate = _DbgHeapValidate@12@469592 HeapWalk = _DbgHeapWalk@8@470593 594 InitAtomTable = _DbgInitAtomTable@4@471595 InitializeCriticalSection = _DbgInitializeCriticalSection@4@472596 InitializeCriticalSectionAndSpinCount = _InitializeCriticalSectionAndSpinCount@8@1473597 InterlockedCompareExchange = _InterlockedCompareExchange@12@787 ;NT598 InterlockedDecrement = _InterlockedDecrement@4@473599 InterlockedExchange = _InterlockedExchange@8@474600 InterlockedExchangeAdd = _InterlockedExchangeAdd@8@788 ;NT601 InterlockedIncrement = _InterlockedIncrement@4@475595 HeapValidate = "_DbgHeapValidate@12" @469 596 HeapWalk = "_DbgHeapWalk@8" @470 597 598 InitAtomTable = "_DbgInitAtomTable@4" @471 599 InitializeCriticalSection = "_DbgInitializeCriticalSection@4" @472 600 InitializeCriticalSectionAndSpinCount = "_InitializeCriticalSectionAndSpinCount@8" @1473 601 InterlockedCompareExchange = "_InterlockedCompareExchange@12" @787 ;NT 602 InterlockedDecrement = "_InterlockedDecrement@4" @473 603 InterlockedExchange = "_InterlockedExchange@8" @474 604 InterlockedExchangeAdd = "_InterlockedExchangeAdd@8" @788 ;NT 605 InterlockedIncrement = "_InterlockedIncrement@4" @475 602 606 ; InvalidateNLSCache = _DbgInvalidateNLSCache@?? @476 ;W95 603 607 ; InvalidateConsoleDIBits = _DbgInvalidateConsoleDIBits@?? ;NT 604 IsBadCodePtr = _DbgIsBadCodePtr@4@477605 IsBadHugeReadPtr = _DbgIsBadHugeReadPtr@8@478606 IsBadHugeWritePtr = _DbgIsBadHugeWritePtr@8@479607 IsBadReadPtr = _DbgIsBadReadPtr@8@480608 IsBadStringPtrA = _DbgIsBadStringPtrA@8@481609 IsBadStringPtrW = _DbgIsBadStringPtrW@8@482610 IsBadWritePtr = _DbgIsBadWritePtr@8@483611 IsDBCSLeadByte = _DbgIsDBCSLeadByte@4@484612 IsDBCSLeadByteEx = _DbgIsDBCSLeadByteEx@8@485608 IsBadCodePtr = "_DbgIsBadCodePtr@4" @477 609 IsBadHugeReadPtr = "_DbgIsBadHugeReadPtr@8" @478 610 IsBadHugeWritePtr = "_DbgIsBadHugeWritePtr@8" @479 611 IsBadReadPtr = "_DbgIsBadReadPtr@8" @480 612 IsBadStringPtrA = "_DbgIsBadStringPtrA@8" @481 613 IsBadStringPtrW = "_DbgIsBadStringPtrW@8" @482 614 IsBadWritePtr = "_DbgIsBadWritePtr@8" @483 615 IsDBCSLeadByte = "_DbgIsDBCSLeadByte@4" @484 616 IsDBCSLeadByteEx = "_DbgIsDBCSLeadByteEx@8" @485 613 617 ; IsLSCallback = _DbgIsLSCallback@?? @486 ;W95 614 618 ; IsSLCallback = _DbgIsSLCallback@?? @487 ;W95 615 IsDebuggerPresent = _DbgIsDebuggerPresent@0@889 ;NT/98616 IsValidCodePage = _DbgIsValidCodePage@4@488617 IsValidLocale = _DbgIsValidLocale@8@489618 K32Thk1632Epilog = _DbgK32Thk1632Epilog@4@490 ;W95619 K32Thk1632Prolog = _DbgK32Thk1632Prolog@4@491 ;W95620 LCMapStringA = _DbgLCMapStringA@24@492621 LCMapStringW = _DbgLCMapStringW@24@493622 LeaveCriticalSection = _DbgLeaveCriticalSection@4@494623 LoadLibraryA = _DbgLoadLibraryA@4@495624 LoadLibraryExA = _DbgLoadLibraryExA@12@496625 LoadLibraryExW = _DbgLoadLibraryExW@12@497626 LoadLibraryW = _DbgLoadLibraryW@4@498627 LoadModule = _DbgLoadModule@8@499628 LoadResource = _DbgLoadResource@8@500629 LocalAlloc = _DbgLocalAlloc@8@501630 LocalCompact = _DbgLocalCompact@4@502 ;obsolete631 LocalFileTimeToFileTime = _DbgLocalFileTimeToFileTime@8@503632 LocalFlags = _DbgLocalFlags@4@504633 LocalFree = _DbgLocalFree@4@505634 LocalHandle = _DbgLocalHandle@4@506635 LocalLock = _DbgLocalLock@4@507636 LocalReAlloc = _DbgLocalReAlloc@12@508637 LocalShrink = _DbgLocalShrink@8@509 ;obsolete638 LocalSize = _DbgLocalSize@4@510639 LocalUnlock = _DbgLocalUnlock@4@511640 LockFile = _DbgLockFile@20@512641 LockFileEx = _DbgLockFileEx@24@513642 LockResource = _DbgLockResource@4@514643 644 MakeCriticalSectionGlobal = _DbgMakeCriticalSectionGlobal@4@515619 IsDebuggerPresent = "_DbgIsDebuggerPresent@0" @889 ;NT/98 620 IsValidCodePage = "_DbgIsValidCodePage@4" @488 621 IsValidLocale = "_DbgIsValidLocale@8" @489 622 K32Thk1632Epilog = "_DbgK32Thk1632Epilog@4" @490 ;W95 623 K32Thk1632Prolog = "_DbgK32Thk1632Prolog@4" @491 ;W95 624 LCMapStringA = "_DbgLCMapStringA@24" @492 625 LCMapStringW = "_DbgLCMapStringW@24" @493 626 LeaveCriticalSection = "_DbgLeaveCriticalSection@4" @494 627 LoadLibraryA = "_DbgLoadLibraryA@4" @495 628 LoadLibraryExA = "_DbgLoadLibraryExA@12" @496 629 LoadLibraryExW = "_DbgLoadLibraryExW@12" @497 630 LoadLibraryW = "_DbgLoadLibraryW@4" @498 631 LoadModule = "_DbgLoadModule@8" @499 632 LoadResource = "_DbgLoadResource@8" @500 633 LocalAlloc = "_DbgLocalAlloc@8" @501 634 LocalCompact = "_DbgLocalCompact@4" @502 ;obsolete 635 LocalFileTimeToFileTime = "_DbgLocalFileTimeToFileTime@8" @503 636 LocalFlags = "_DbgLocalFlags@4" @504 637 LocalFree = "_DbgLocalFree@4" @505 638 LocalHandle = "_DbgLocalHandle@4" @506 639 LocalLock = "_DbgLocalLock@4" @507 640 LocalReAlloc = "_DbgLocalReAlloc@12" @508 641 LocalShrink = "_DbgLocalShrink@8" @509 ;obsolete 642 LocalSize = "_DbgLocalSize@4" @510 643 LocalUnlock = "_DbgLocalUnlock@4" @511 644 LockFile = "_DbgLockFile@20" @512 645 LockFileEx = "_DbgLockFileEx@24" @513 646 LockResource = "_DbgLockResource@4" @514 647 648 MakeCriticalSectionGlobal = "_DbgMakeCriticalSectionGlobal@4" @515 645 649 ; MapHInstLS = _DbgMapHInstLS@?? @516 ;W95 646 650 ; MapHInstLS_PN = _DbgMapHInstLS_PN@?? @517 ;W95 … … 649 653 ; MapHModuleLS = _DbgMapHModuleLS@?? @520 ;W95 650 654 ; MapHModuleSL = _DbgMapHModuleSL@?? @521 ;W95 651 MapLS = _DbgMapLS@4@522 ;W95652 MapSL = _DbgMapSL@4@523 ;W95653 MapSLFix = _DbgMapSLFix@4@524 ;W95654 MapViewOfFile = _DbgMapViewOfFile@20@525655 MapViewOfFileEx = _DbgMapViewOfFileEx@24@526655 MapLS = "_DbgMapLS@4" @522 ;W95 656 MapSL = "_DbgMapSL@4" @523 ;W95 657 MapSLFix = "_DbgMapSLFix@4" @524 ;W95 658 MapViewOfFile = "_DbgMapViewOfFile@20" @525 659 MapViewOfFileEx = "_DbgMapViewOfFileEx@24" @526 656 660 ;;;; Module32First = _DbgModule32First@8 @527 ;W95 657 661 ;;;; Module32Next = _DbgModule32Next@8 @528 ;W95 658 MoveFileA = _DbgMoveFileA@8@529659 MoveFileExA = _DbgMoveFileExA@12@530660 MoveFileExW = _DbgMoveFileExW@12@531661 MoveFileW = _DbgMoveFileW@8@532662 MulDiv = _DbgMulDiv@12@533663 MultiByteToWideChar = _DbgMultiByteToWideChar@24@534662 MoveFileA = "_DbgMoveFileA@8" @529 663 MoveFileExA = "_DbgMoveFileExA@12" @530 664 MoveFileExW = "_DbgMoveFileExW@12" @531 665 MoveFileW = "_DbgMoveFileW@8" @532 666 MulDiv = "_DbgMulDiv@12" @533 667 MultiByteToWideChar = "_DbgMultiByteToWideChar@24" @534 664 668 ; NotifyNLSUserCache = _DbgNotifyNLSUserCache@?? @535 ;W95 665 669 ; OpenConsoleW = _DbgOpenConsoleW@?? ;NT 666 OpenEventA = _DbgOpenEventA@12@536667 OpenEventW = _DbgOpenEventW@12@537668 OpenFile = _DbgOpenFile@12@538669 OpenFileMappingA = _DbgOpenFileMappingA@12@539670 OpenFileMappingW = _DbgOpenFileMappingW@12@540671 OpenMutexA = _DbgOpenMutexA@12@541672 OpenMutexW = _DbgOpenMutexW@12@542673 OpenProcess = _DbgOpenProcess@12@543674 OpenProfileUserMapping = _DbgOpenProfileUserMapping@0@544675 OpenSemaphoreA = _DbgOpenSemaphoreA@12@545676 OpenSemaphoreW = _DbgOpenSemaphoreW@12@546670 OpenEventA = "_DbgOpenEventA@12" @536 671 OpenEventW = "_DbgOpenEventW@12" @537 672 OpenFile = "_DbgOpenFile@12" @538 673 OpenFileMappingA = "_DbgOpenFileMappingA@12" @539 674 OpenFileMappingW = "_DbgOpenFileMappingW@12" @540 675 OpenMutexA = "_DbgOpenMutexA@12" @541 676 OpenMutexW = "_DbgOpenMutexW@12" @542 677 OpenProcess = "_DbgOpenProcess@12" @543 678 OpenProfileUserMapping = "_DbgOpenProfileUserMapping@0" @544 679 OpenSemaphoreA = "_DbgOpenSemaphoreA@12" @545 680 OpenSemaphoreW = "_DbgOpenSemaphoreW@12" @546 677 681 ; OpenVxDHandle = _DbgOpenVxDHandle@?? @547 ;W95 678 682 ; OpenWaitableTimerA = _DbgOpenWaitableTimerA@?? ;NT 679 683 ; OpenWaitableTimerW = _DbgOpenWaitableTimerW@?? ;NT 680 OutputDebugStringA = _DbgOutputDebugStringA@4@548681 OutputDebugStringW = _DbgOutputDebugStringW@4@549682 PeekConsoleInputA = _DbgPeekConsoleInputA@16@550683 PeekConsoleInputW = _DbgPeekConsoleInputW@16@551684 PeekNamedPipe = _DbgPeekNamedPipe@24@552685 PostQueuedCompletionStatus = _DbgPostQueuedCompletionStatus@16@553686 PrepareTape = _DbgPrepareTape@12@554684 OutputDebugStringA = "_DbgOutputDebugStringA@4" @548 685 OutputDebugStringW = "_DbgOutputDebugStringW@4" @549 686 PeekConsoleInputA = "_DbgPeekConsoleInputA@16" @550 687 PeekConsoleInputW = "_DbgPeekConsoleInputW@16" @551 688 PeekNamedPipe = "_DbgPeekNamedPipe@24" @552 689 PostQueuedCompletionStatus = "_DbgPostQueuedCompletionStatus@16" @553 690 PrepareTape = "_DbgPrepareTape@12" @554 687 691 ;;; Process32First = _DbgProcess32First@8 @555 ;W95 688 692 ;;; Process32Next = _DbgProcess32Next@8 @556 ;W95 689 PulseEvent = _DbgPulseEvent@4@557690 PurgeComm = _DbgPurgeComm@8@558691 QT_Thunk = _DbgQT_Thunk@4@559 ;W95692 QueryDosDeviceA = _DbgQueryDosDeviceA@12@560693 QueryDosDeviceW = _DbgQueryDosDeviceW@12@561693 PulseEvent = "_DbgPulseEvent@4" @557 694 PurgeComm = "_DbgPurgeComm@8" @558 695 QT_Thunk = "_DbgQT_Thunk@4" @559 ;W95 696 QueryDosDeviceA = "_DbgQueryDosDeviceA@12" @560 697 QueryDosDeviceW = "_DbgQueryDosDeviceW@12" @561 694 698 ; QueryNumberOfEventLogRecords = _DbgQueryNumberOfEventLogRecords@?? @562 ;W95 695 699 ; QueryOldestEventLogRecord = _DbgQueryOldestEventLogRecord@?? @563 ;W95 696 QueryPerformanceCounter = _DbgQueryPerformanceCounter@4@564697 QueryPerformanceFrequency = _DbgQueryPerformanceFrequency@4@565700 QueryPerformanceCounter = "_DbgQueryPerformanceCounter@4" @564 701 QueryPerformanceFrequency = "_DbgQueryPerformanceFrequency@4" @565 698 702 ; QueryWin31IniFilesMappedToRegistry = _DbgQueryWin31IniFilesMappedToRegistry@?? ;NT 699 703 ; QueueUserAPC = _DbgQueueUserAPC@?? @566 700 RaiseException = _DbgRaiseException@16@567701 ReadConsoleA = _DbgReadConsoleA@20@568702 ReadConsoleInputA = _DbgReadConsoleInputA@16@569704 RaiseException = "_DbgRaiseException@16" @567 705 ReadConsoleA = "_DbgReadConsoleA@20" @568 706 ReadConsoleInputA = "_DbgReadConsoleInputA@16" @569 703 707 ; ReadConsoleInputExA = _DbgReadConsoleInputExA@?? ;NT 704 708 ; ReadConsoleInputExW = _DbgReadConsoleInputExW@?? ;NT 705 ReadConsoleInputW = _DbgReadConsoleInputW@16@570706 ReadConsoleOutputA = _DbgReadConsoleOutputA@20@571707 ReadConsoleOutputAttribute = _DbgReadConsoleOutputAttribute@20@572708 ReadConsoleOutputCharacterA = _DbgReadConsoleOutputCharacterA@20@573709 ReadConsoleOutputCharacterW = _DbgReadConsoleOutputCharacterW@20@574710 ReadConsoleOutputW = _DbgReadConsoleOutputW@20@575711 ReadConsoleW = _DbgReadConsoleW@20@576709 ReadConsoleInputW = "_DbgReadConsoleInputW@16" @570 710 ReadConsoleOutputA = "_DbgReadConsoleOutputA@20" @571 711 ReadConsoleOutputAttribute = "_DbgReadConsoleOutputAttribute@20" @572 712 ReadConsoleOutputCharacterA = "_DbgReadConsoleOutputCharacterA@20" @573 713 ReadConsoleOutputCharacterW = "_DbgReadConsoleOutputCharacterW@20" @574 714 ReadConsoleOutputW = "_DbgReadConsoleOutputW@20" @575 715 ReadConsoleW = "_DbgReadConsoleW@20" @576 712 716 ; ReadDirectoryChangesW = _DbgReadDirectoryChangesW@?? ;NT 713 ReadFile = _DbgReadFile@20@577714 ReadFileEx = _DbgReadFileEx@20@578717 ReadFile = "_DbgReadFile@20" @577 718 ReadFileEx = "_DbgReadFileEx@20" @578 715 719 ; ReadFileScatter = _DbgReadFileScatter@?? ;NT 716 ReadProcessMemory = _DbgReadProcessMemory@20@579717 RegisterServiceProcess = _DbgRegisterServiceProcess@8@580 ;W95718 ReinitializeCriticalSection = _DbgReinitializeCriticalSection@4@581 ;W95720 ReadProcessMemory = "_DbgReadProcessMemory@20" @579 721 RegisterServiceProcess = "_DbgRegisterServiceProcess@8" @580 ;W95 722 ReinitializeCriticalSection = "_DbgReinitializeCriticalSection@4" @581 ;W95 719 723 ; RegisterConsoleVDM = _DbgRegisterConsoleVDM@?? ;NT 720 724 ; RegisterWaitForInputIdle = _DbgRegisterWaitForInputIdle@?? ;NT 721 725 ; RegisterWowBaseHandlers = _DbgRegisterWowBaseHandlers@?? ;NT 722 726 ; RegisterWowExec = _DbgRegisterWowExec@?? ;NT 723 ReleaseMutex = _DbgReleaseMutex@4@582724 ReleaseSemaphore = _DbgReleaseSemaphore@12@583725 RemoveDirectoryA = _DbgRemoveDirectoryA@4@584726 RemoveDirectoryW = _DbgRemoveDirectoryW@4@585727 ResetEvent = _DbgResetEvent@4@586728 ResumeThread = _DbgResumeThread@4@587729 RtlFillMemory = _RtlFillMemory@12@588730 RtlMoveMemory = _RtlMoveMemory@12@589731 RtlUnwind = _RtlUnwind@16@590732 RtlZeroMemory = _RtlZeroMemory@8@591733 SMapLS = _DbgSMapLS@4@592 ;W95734 SMapLS_IP_EBP_12 = _DbgSMapLS_IP_EBP_12@4@593 ;W95735 SMapLS_IP_EBP_16 = _DbgSMapLS_IP_EBP_16@4@594 ;W95736 SMapLS_IP_EBP_20 = _DbgSMapLS_IP_EBP_20@4@595 ;W95737 SMapLS_IP_EBP_24 = _DbgSMapLS_IP_EBP_24@4@596 ;W95738 SMapLS_IP_EBP_28 = _DbgSMapLS_IP_EBP_28@4@597 ;W95739 SMapLS_IP_EBP_32 = _DbgSMapLS_IP_EBP_32@4@598 ;W95740 SMapLS_IP_EBP_36 = _DbgSMapLS_IP_EBP_36@4@599 ;W95741 SMapLS_IP_EBP_40 = _DbgSMapLS_IP_EBP_40@4@600 ;W95742 SMapLS_IP_EBP_8 = _DbgSMapLS_IP_EBP_8@4@601 ;W95743 SUnMapLS = _DbgSUnMapLS@4@602 ;W95744 SUnMapLS_IP_EBP_12 = _DbgSUnMapLS_IP_EBP_12@4@603 ;W95745 SUnMapLS_IP_EBP_16 = _DbgSUnMapLS_IP_EBP_16@4@604 ;W95746 SUnMapLS_IP_EBP_20 = _DbgSUnMapLS_IP_EBP_20@4@605 ;W95747 SUnMapLS_IP_EBP_24 = _DbgSUnMapLS_IP_EBP_24@4@606 ;W95748 SUnMapLS_IP_EBP_28 = _DbgSUnMapLS_IP_EBP_28@4@607 ;W95749 SUnMapLS_IP_EBP_32 = _DbgSUnMapLS_IP_EBP_32@4@608 ;W95750 SUnMapLS_IP_EBP_36 = _DbgSUnMapLS_IP_EBP_36@4@609 ;W95751 SUnMapLS_IP_EBP_40 = _DbgSUnMapLS_IP_EBP_40@4@610 ;W95752 SUnMapLS_IP_EBP_8 = _DbgSUnMapLS_IP_EBP_8@4@611 ;W95753 ScrollConsoleScreenBufferA = _DbgScrollConsoleScreenBufferA@20@612754 ScrollConsoleScreenBufferW = _DbgScrollConsoleScreenBufferW@20@613755 SearchPathA = _DbgSearchPathA@24@614756 SearchPathW = _DbgSearchPathW@24@615757 SetCommBreak = _DbgSetCommBreak@4@616758 SetCommConfig = _DbgSetCommConfig@12@617759 SetCommMask = _DbgSetCommMask@8@618760 SetCommState = _DbgSetCommState@8@619761 SetCommTimeouts = _DbgSetCommTimeouts@8@620762 SetComputerNameA = _DbgSetComputerNameA@4@621763 SetComputerNameW = _DbgSetComputerNameW@4@622764 SetConsoleActiveScreenBuffer = _DbgSetConsoleActiveScreenBuffer@4@623765 SetConsoleCP = _DbgSetConsoleCP@4@624727 ReleaseMutex = "_DbgReleaseMutex@4" @582 728 ReleaseSemaphore = "_DbgReleaseSemaphore@12" @583 729 RemoveDirectoryA = "_DbgRemoveDirectoryA@4" @584 730 RemoveDirectoryW = "_DbgRemoveDirectoryW@4" @585 731 ResetEvent = "_DbgResetEvent@4" @586 732 ResumeThread = "_DbgResumeThread@4" @587 733 RtlFillMemory = "_RtlFillMemory@12" @588 734 RtlMoveMemory = "_RtlMoveMemory@12" @589 735 RtlUnwind = "_RtlUnwind@16" @590 736 RtlZeroMemory = "_RtlZeroMemory@8" @591 737 SMapLS = "_DbgSMapLS@4" @592 ;W95 738 SMapLS_IP_EBP_12 = "_DbgSMapLS_IP_EBP_12@4" @593 ;W95 739 SMapLS_IP_EBP_16 = "_DbgSMapLS_IP_EBP_16@4" @594 ;W95 740 SMapLS_IP_EBP_20 = "_DbgSMapLS_IP_EBP_20@4" @595 ;W95 741 SMapLS_IP_EBP_24 = "_DbgSMapLS_IP_EBP_24@4" @596 ;W95 742 SMapLS_IP_EBP_28 = "_DbgSMapLS_IP_EBP_28@4" @597 ;W95 743 SMapLS_IP_EBP_32 = "_DbgSMapLS_IP_EBP_32@4" @598 ;W95 744 SMapLS_IP_EBP_36 = "_DbgSMapLS_IP_EBP_36@4" @599 ;W95 745 SMapLS_IP_EBP_40 = "_DbgSMapLS_IP_EBP_40@4" @600 ;W95 746 SMapLS_IP_EBP_8 = "_DbgSMapLS_IP_EBP_8@4" @601 ;W95 747 SUnMapLS = "_DbgSUnMapLS@4" @602 ;W95 748 SUnMapLS_IP_EBP_12 = "_DbgSUnMapLS_IP_EBP_12@4" @603 ;W95 749 SUnMapLS_IP_EBP_16 = "_DbgSUnMapLS_IP_EBP_16@4" @604 ;W95 750 SUnMapLS_IP_EBP_20 = "_DbgSUnMapLS_IP_EBP_20@4" @605 ;W95 751 SUnMapLS_IP_EBP_24 = "_DbgSUnMapLS_IP_EBP_24@4" @606 ;W95 752 SUnMapLS_IP_EBP_28 = "_DbgSUnMapLS_IP_EBP_28@4" @607 ;W95 753 SUnMapLS_IP_EBP_32 = "_DbgSUnMapLS_IP_EBP_32@4" @608 ;W95 754 SUnMapLS_IP_EBP_36 = "_DbgSUnMapLS_IP_EBP_36@4" @609 ;W95 755 SUnMapLS_IP_EBP_40 = "_DbgSUnMapLS_IP_EBP_40@4" @610 ;W95 756 SUnMapLS_IP_EBP_8 = "_DbgSUnMapLS_IP_EBP_8@4" @611 ;W95 757 ScrollConsoleScreenBufferA = "_DbgScrollConsoleScreenBufferA@20" @612 758 ScrollConsoleScreenBufferW = "_DbgScrollConsoleScreenBufferW@20" @613 759 SearchPathA = "_DbgSearchPathA@24" @614 760 SearchPathW = "_DbgSearchPathW@24" @615 761 SetCommBreak = "_DbgSetCommBreak@4" @616 762 SetCommConfig = "_DbgSetCommConfig@12" @617 763 SetCommMask = "_DbgSetCommMask@8" @618 764 SetCommState = "_DbgSetCommState@8" @619 765 SetCommTimeouts = "_DbgSetCommTimeouts@8" @620 766 SetComputerNameA = "_DbgSetComputerNameA@4" @621 767 SetComputerNameW = "_DbgSetComputerNameW@4" @622 768 SetConsoleActiveScreenBuffer = "_DbgSetConsoleActiveScreenBuffer@4" @623 769 SetConsoleCP = "_DbgSetConsoleCP@4" @624 766 770 ; SetConsoleCommandHistoryMode = _DbgSetConsoleCommandHistoryMode@?? ;NT 767 SetConsoleCtrlHandler = _DbgSetConsoleCtrlHandler@8@625771 SetConsoleCtrlHandler = "_DbgSetConsoleCtrlHandler@8" @625 768 772 ; SetConsoleCursor = _DbgSetConsoleCursor@?? ;NT 769 SetConsoleCursorInfo = _DbgSetConsoleCursorInfo@8@626770 SetConsoleCursorPosition = _DbgSetConsoleCursorPosition@8@627773 SetConsoleCursorInfo = "_DbgSetConsoleCursorInfo@8" @626 774 SetConsoleCursorPosition = "_DbgSetConsoleCursorPosition@8" @627 771 775 ; SetConsoleDisplayMode = _DbgSetConsoleDisplayMode@?? ;NT 772 776 ; SetConsoleFont = _DbgSetConsoleFont@?? ;NT … … 778 782 ; SetConsoleMaximumWindowSize = _DbgSetConsoleMaximumWindowSize@?? ;NT 779 783 ; SetConsoleMenuClose = _DbgSetConsoleMenuClose@?? ;NT 780 SetConsoleMode = _DbgSetConsoleMode@8@628784 SetConsoleMode = "_DbgSetConsoleMode@8" @628 781 785 ; SetConsoleNumberOfCommandsA = _DbgSetConsoleNumberOfCommandsA@?? ;NT 782 786 ; SetConsoleNumberOfCommandsW = _DbgSetConsoleNumberOfCommandsW@?? ;NT 783 SetConsoleOutputCP = _DbgSetConsoleOutputCP@4@629787 SetConsoleOutputCP = "_DbgSetConsoleOutputCP@4" @629 784 788 ; SetConsolePalette = _DbgSetConsolePalette@?? ;NT 785 SetConsoleScreenBufferSize = _DbgSetConsoleScreenBufferSize@8@630786 SetConsoleTextAttribute = _DbgSetConsoleTextAttribute@8@631787 SetConsoleTitleA = _DbgSetConsoleTitleA@4@632788 SetConsoleTitleW = _DbgSetConsoleTitleW@4@633789 SetConsoleWindowInfo = _DbgSetConsoleWindowInfo@12@634789 SetConsoleScreenBufferSize = "_DbgSetConsoleScreenBufferSize@8" @630 790 SetConsoleTextAttribute = "_DbgSetConsoleTextAttribute@8" @631 791 SetConsoleTitleA = "_DbgSetConsoleTitleA@4" @632 792 SetConsoleTitleW = "_DbgSetConsoleTitleW@4" @633 793 SetConsoleWindowInfo = "_DbgSetConsoleWindowInfo@12" @634 790 794 ; SetCriticalSectionSpinCount = _DbgSetCriticalSectionSpinCount@?? ;NT 791 SetCurrentDirectoryA = _DbgSetCurrentDirectoryA@4@635792 SetCurrentDirectoryW = _DbgSetCurrentDirectoryW@4@636795 SetCurrentDirectoryA = "_DbgSetCurrentDirectoryA@4" @635 796 SetCurrentDirectoryW = "_DbgSetCurrentDirectoryW@4" @636 793 797 ; SetDaylightFlag = _DbgSetDaylightFlag@?? @637 ;W95 794 SetDefaultCommConfigA = _DbgSetDefaultCommConfigA@12@638795 SetDefaultCommConfigW = _DbgSetDefaultCommConfigW@12@639796 SetEndOfFile = _DbgSetEndOfFile@4@640797 SetEnvironmentVariableA = _DbgSetEnvironmentVariableA@8@641798 SetEnvironmentVariableW = _DbgSetEnvironmentVariableW@8@642799 SetErrorMode = _DbgSetErrorMode@4@643800 SetEvent = _DbgSetEvent@4@644801 SetFileApisToANSI = _DbgSetFileApisToANSI@0@645802 SetFileApisToOEM = _DbgSetFileApisToOEM@0@646803 SetFileAttributesA = _DbgSetFileAttributesA@8@647804 SetFileAttributesW = _DbgSetFileAttributesW@8@648805 SetFilePointer = _DbgSetFilePointer@16@649806 SetFileTime = _DbgSetFileTime@16@650798 SetDefaultCommConfigA = "_DbgSetDefaultCommConfigA@12" @638 799 SetDefaultCommConfigW = "_DbgSetDefaultCommConfigW@12" @639 800 SetEndOfFile = "_DbgSetEndOfFile@4" @640 801 SetEnvironmentVariableA = "_DbgSetEnvironmentVariableA@8" @641 802 SetEnvironmentVariableW = "_DbgSetEnvironmentVariableW@8" @642 803 SetErrorMode = "_DbgSetErrorMode@4" @643 804 SetEvent = "_DbgSetEvent@4" @644 805 SetFileApisToANSI = "_DbgSetFileApisToANSI@0" @645 806 SetFileApisToOEM = "_DbgSetFileApisToOEM@0" @646 807 SetFileAttributesA = "_DbgSetFileAttributesA@8" @647 808 SetFileAttributesW = "_DbgSetFileAttributesW@8" @648 809 SetFilePointer = "_DbgSetFilePointer@16" @649 810 SetFileTime = "_DbgSetFileTime@16" @650 807 811 ; SetHandleContext = _DbgSetHandleContext@?? @651 ;W95 808 SetHandleCount = _DbgSetHandleCount@4@652809 SetHandleInformation = _DbgSetHandleInformation@12@653812 SetHandleCount = "_DbgSetHandleCount@4" @652 813 SetHandleInformation = "_DbgSetHandleInformation@12" @653 810 814 ; SetLastConsoleEventActive = _DbgSetLastConsoleEventActive@?? ;NT 811 SetLastError = _SetLastError@4@654812 SetLocalTime = _DbgSetLocalTime@4@655813 SetLocaleInfoA = _DbgSetLocaleInfoA@12@656814 SetLocaleInfoW = _DbgSetLocaleInfoW@12@657815 SetMailslotInfo = _DbgSetMailslotInfo@8@658816 SetNamedPipeHandleState = _DbgSetNamedPipeHandleState@16@659817 SetPriorityClass = _DbgSetPriorityClass@8@660818 SetProcessAffinityMask = _DbgSetProcessAffinityMask@8@862819 SetProcessDword = _DbgSetProcessDword@12@884820 SetProcessPriorityBoost = _DbgSetProcessPriorityBoost@8@863821 SetProcessShutdownParameters = _DbgSetProcessShutdownParameters@8@661822 SetProcessWorkingSetSize = _DbgSetProcessWorkingSetSize@12@662823 SetStdHandle = _DbgSetStdHandle@8@663824 SetSystemPowerState = _DbgSetSystemPowerState@8@664825 SetSystemTime = _DbgSetSystemTime@4@665826 SetSystemTimeAdjustment = _DbgSetSystemTimeAdjustment@8@666827 SetTapeParameters = _DbgSetTapeParameters@12@667828 SetTapePosition = _DbgSetTapePosition@24@668829 SetThreadAffinityMask = _DbgSetThreadAffinityMask@8@669830 SetThreadContext = _DbgSetThreadContext@8@670815 SetLastError = "_SetLastError@4" @654 816 SetLocalTime = "_DbgSetLocalTime@4" @655 817 SetLocaleInfoA = "_DbgSetLocaleInfoA@12" @656 818 SetLocaleInfoW = "_DbgSetLocaleInfoW@12" @657 819 SetMailslotInfo = "_DbgSetMailslotInfo@8" @658 820 SetNamedPipeHandleState = "_DbgSetNamedPipeHandleState@16" @659 821 SetPriorityClass = "_DbgSetPriorityClass@8" @660 822 SetProcessAffinityMask = "_DbgSetProcessAffinityMask@8" @862 823 SetProcessDword = "_DbgSetProcessDword@12" @884 824 SetProcessPriorityBoost = "_DbgSetProcessPriorityBoost@8" @863 825 SetProcessShutdownParameters = "_DbgSetProcessShutdownParameters@8" @661 826 SetProcessWorkingSetSize = "_DbgSetProcessWorkingSetSize@12" @662 827 SetStdHandle = "_DbgSetStdHandle@8" @663 828 SetSystemPowerState = "_DbgSetSystemPowerState@8" @664 829 SetSystemTime = "_DbgSetSystemTime@4" @665 830 SetSystemTimeAdjustment = "_DbgSetSystemTimeAdjustment@8" @666 831 SetTapeParameters = "_DbgSetTapeParameters@12" @667 832 SetTapePosition = "_DbgSetTapePosition@24" @668 833 SetThreadAffinityMask = "_DbgSetThreadAffinityMask@8" @669 834 SetThreadContext = "_DbgSetThreadContext@8" @670 831 835 ; SetThreadIdealProcessor = _DbgSetThreadIdealProcessor@?? ;NT 832 SetThreadLocale = _DbgSetThreadLocale@4@671833 SetThreadPriority = _DbgSetThreadPriority@8@672834 SetThreadPriorityBoost = _DbgSetThreadPriorityBoost@8@789 ;NT835 SetTimeZoneInformation = _DbgSetTimeZoneInformation@4@673836 SetUnhandledExceptionFilter = _DbgSetUnhandledExceptionFilter@4@674836 SetThreadLocale = "_DbgSetThreadLocale@4" @671 837 SetThreadPriority = "_DbgSetThreadPriority@8" @672 838 SetThreadPriorityBoost = "_DbgSetThreadPriorityBoost@8" @789 ;NT 839 SetTimeZoneInformation = "_DbgSetTimeZoneInformation@4" @673 840 SetUnhandledExceptionFilter = "_DbgSetUnhandledExceptionFilter@4" @674 837 841 ; SetVDMCurrentDirectories = _DbgSetVDMCurrentDirectories@?? ;NT 838 SetVolumeLabelA = _DbgSetVolumeLabelA@8@675839 SetVolumeLabelW = _DbgSetVolumeLabelW@8@676842 SetVolumeLabelA = "_DbgSetVolumeLabelA@8" @675 843 SetVolumeLabelW = "_DbgSetVolumeLabelW@8" @676 840 844 ; SetWaitableTimer = _DbgSetWaitableTimer@?? ;NT 841 SetupComm = _DbgSetupComm@12@677845 SetupComm = "_DbgSetupComm@12" @677 842 846 ; ShowConsoleCursor = _DbgShowConsoleCursor@?? ;NT 843 847 ; SignalObjectAndWait = _DbgSignalObjectAndWait@?? ;NT 844 SizeofResource = _DbgSizeofResource@8@678845 Sleep = _DbgSleep@4@679846 SleepEx = _DbgSleepEx@8@680847 SuspendThread = _DbgSuspendThread@4@681848 SizeofResource = "_DbgSizeofResource@8" @678 849 Sleep = "_DbgSleep@4" @679 850 SleepEx = "_DbgSleepEx@8" @680 851 SuspendThread = "_DbgSuspendThread@4" @681 848 852 ; SwitchToFiber = _DbgSwitchToFiber@?? ;NT 849 853 ; SwitchToThread = _DbgSwitchToThread@?? ;NT 850 SystemTimeToFileTime = _DbgSystemTimeToFileTime@8@682851 SystemTimeToTzSpecificLocalTime = _DbgSystemTimeToTzSpecificLocalTime@12@683852 TerminateProcess = _DbgTerminateProcess@8@684853 TerminateThread = _DbgTerminateThread@8@685854 SystemTimeToFileTime = "_DbgSystemTimeToFileTime@8" @682 855 SystemTimeToTzSpecificLocalTime = "_DbgSystemTimeToTzSpecificLocalTime@12" @683 856 TerminateProcess = "_DbgTerminateProcess@8" @684 857 TerminateThread = "_DbgTerminateThread@8" @685 854 858 ;;;; Thread32First = _DbgThread32First@8 @686 ;W95 855 859 ;;;; Thread32Next = _DbgThread32Next@8 @687 ;W95 856 ThunkConnect32 = _DbgThunkConnect32@24@688 ;W95857 TlsAlloc = _DbgTlsAlloc@0@689860 ThunkConnect32 = "_DbgThunkConnect32@24" @688 ;W95 861 TlsAlloc = "_DbgTlsAlloc@0" @689 858 862 ; TlsAllocInternal = _DbgTlsAllocInternal@?? @690 ;W95 859 TlsFree = _DbgTlsFree@4@691863 TlsFree = "_DbgTlsFree@4" @691 860 864 ; TlsFreeInternal = _DbgTlsFreeInternal@?? @692 ;W95 861 TlsGetValue = _DbgTlsGetValue@4@693862 TlsSetValue = _DbgTlsSetValue@8@694865 TlsGetValue = "_DbgTlsGetValue@4" @693 866 TlsSetValue = "_DbgTlsSetValue@8" @694 863 867 ; Toolhelp32ReadProcessMemory = _DbgToolhelp32ReadProcessMemory@?? @695 ;W95 864 TransactNamedPipe = _DbgTransactNamedPipe@28@696865 TransmitCommChar = _DbgTransmitCommChar@8@697868 TransactNamedPipe = "_DbgTransactNamedPipe@28" @696 869 TransmitCommChar = "_DbgTransmitCommChar@8" @697 866 870 ; TrimVirtualBuffer = _DbgTrimVirtualBuffer@?? ;NT 867 TryEnterCriticalSection = _DbgTryEnterCriticalSection@4@898 ;NT871 TryEnterCriticalSection = "_DbgTryEnterCriticalSection@4" @898 ;NT 868 872 ; UTRegister = _DbgUTRegister@?? @698 ;W95 869 873 ; UTUnRegister = _DbgUTUnRegister@?? @699 ;W95 870 UnMapLS = _DbgUnMapLS@4@700 ;W95871 UnMapSLFixArray = _DbgUnMapSLFixArray@12@701 ;W95872 UnhandledExceptionFilter = _DbgUnhandledExceptionFilter@4@702873 UninitializeCriticalSection = _DbgUninitializeCriticalSection@4@703 ;W95874 UnlockFile = _DbgUnlockFile@20@704875 UnlockFileEx = _DbgUnlockFileEx@20@705876 UnmapViewOfFile = _DbgUnmapViewOfFile@4@706877 UpdateResourceA = _DbgUpdateResourceA@24@707878 UpdateResourceW = _DbgUpdateResourceW@24@708874 UnMapLS = "_DbgUnMapLS@4" @700 ;W95 875 UnMapSLFixArray = "_DbgUnMapSLFixArray@12" @701 ;W95 876 UnhandledExceptionFilter = "_DbgUnhandledExceptionFilter@4" @702 877 UninitializeCriticalSection = "_DbgUninitializeCriticalSection@4" @703 ;W95 878 UnlockFile = "_DbgUnlockFile@20" @704 879 UnlockFileEx = "_DbgUnlockFileEx@20" @705 880 UnmapViewOfFile = "_DbgUnmapViewOfFile@4" @706 881 UpdateResourceA = "_DbgUpdateResourceA@24" @707 882 UpdateResourceW = "_DbgUpdateResourceW@24" @708 879 883 ; VDMConsoleOperation = _DbgVDMConsoleOperation@?? ;NT 880 884 ; VDMOperationStarted = _DbgVDMOperationStarted@?? ;NT 881 VerLanguageNameA = _DbgVerLanguageNameA@12@709882 VerLanguageNameW = _DbgVerLanguageNameW@12@710885 VerLanguageNameA = "_DbgVerLanguageNameA@12" @709 886 VerLanguageNameW = "_DbgVerLanguageNameW@12" @710 883 887 ; VerifyConsoleToHandle = _DbgVerifyConsoleToHandle@?? ;NT 884 VirtualAlloc = _DbgVirtualAlloc@16@711888 VirtualAlloc = "_DbgVirtualAlloc@16" @711 885 889 ; VirtualAllocEx = _DbgVirtualAllocEx@?? ;NT 886 890 ; VirtualBufferExceptionHandler = _DbgVirtualBufferExceptionHandler ;NT 887 VirtualFree = _DbgVirtualFree@12@712891 VirtualFree = "_DbgVirtualFree@12" @712 888 892 ; VirtualFreeEx = _DbgVirtuelFreeEx@?? ;NT 889 VirtualLock = _DbgVirtualLock@8@713890 VirtualProtect = _DbgVirtualProtect@16@714891 VirtualProtectEx = _DbgVirtualProtectEx@20@715893 VirtualLock = "_DbgVirtualLock@8" @713 894 VirtualProtect = "_DbgVirtualProtect@16" @714 895 VirtualProtectEx = "_DbgVirtualProtectEx@20" @715 892 896 ; VirtualQuery = _DbgVirtualQuery@12 @716 893 VirtualQuery = _VirtualQuery@12@716894 VirtualQueryEx = _DbgVirtualQueryEx@16@717895 VirtualUnlock = _DbgVirtualUnlock@8@718896 WaitCommEvent = _DbgWaitCommEvent@12@719897 WaitForDebugEvent = _DbgWaitForDebugEvent@8@720898 WaitForMultipleObjects = _DbgWaitForMultipleObjects@16@721899 WaitForMultipleObjectsEx = _DbgWaitForMultipleObjectsEx@20@722900 WaitForSingleObject = _DbgWaitForSingleObject@8@723901 WaitForSingleObjectEx = _DbgWaitForSingleObjectEx@12@724902 WaitNamedPipeA = _DbgWaitNamedPipeA@8@725903 WaitNamedPipeW = _DbgWaitNamedPipeW@8@726904 WideCharToMultiByte = _DbgWideCharToMultiByte@32@727905 WinExec = _DbgWinExec@8@728906 WriteConsoleA = _DbgWriteConsoleA@20@729907 WriteConsoleInputA = _DbgWriteConsoleInputA@16@730897 VirtualQuery = "_VirtualQuery@12" @716 898 VirtualQueryEx = "_DbgVirtualQueryEx@16" @717 899 VirtualUnlock = "_DbgVirtualUnlock@8" @718 900 WaitCommEvent = "_DbgWaitCommEvent@12" @719 901 WaitForDebugEvent = "_DbgWaitForDebugEvent@8" @720 902 WaitForMultipleObjects = "_DbgWaitForMultipleObjects@16" @721 903 WaitForMultipleObjectsEx = "_DbgWaitForMultipleObjectsEx@20" @722 904 WaitForSingleObject = "_DbgWaitForSingleObject@8" @723 905 WaitForSingleObjectEx = "_DbgWaitForSingleObjectEx@12" @724 906 WaitNamedPipeA = "_DbgWaitNamedPipeA@8" @725 907 WaitNamedPipeW = "_DbgWaitNamedPipeW@8" @726 908 WideCharToMultiByte = "_DbgWideCharToMultiByte@32" @727 909 WinExec = "_DbgWinExec@8" @728 910 WriteConsoleA = "_DbgWriteConsoleA@20" @729 911 WriteConsoleInputA = "_DbgWriteConsoleInputA@16" @730 908 912 ; WriteConsoleInputVDMA = _DbgWriteConsoleInputVDMA@?? ;NT 909 913 ; WriteConsoleInputVDMW = _DbgWriteConsoleInputVDMW@?? ;NT 910 WriteConsoleInputW = _DbgWriteConsoleInputW@16@731911 WriteConsoleOutputA = _DbgWriteConsoleOutputA@20@732912 WriteConsoleOutputAttribute = _DbgWriteConsoleOutputAttribute@20@733913 WriteConsoleOutputCharacterA = _DbgWriteConsoleOutputCharacterA@20@734914 WriteConsoleOutputCharacterW = _DbgWriteConsoleOutputCharacterW@20@735915 WriteConsoleOutputW = _DbgWriteConsoleOutputW@20@736916 WriteConsoleW = _DbgWriteConsoleW@20@737917 WriteFile = _DbgWriteFile@20@738918 WriteFileEx = _DbgWriteFileEx@20@739914 WriteConsoleInputW = "_DbgWriteConsoleInputW@16" @731 915 WriteConsoleOutputA = "_DbgWriteConsoleOutputA@20" @732 916 WriteConsoleOutputAttribute = "_DbgWriteConsoleOutputAttribute@20" @733 917 WriteConsoleOutputCharacterA = "_DbgWriteConsoleOutputCharacterA@20" @734 918 WriteConsoleOutputCharacterW = "_DbgWriteConsoleOutputCharacterW@20" @735 919 WriteConsoleOutputW = "_DbgWriteConsoleOutputW@20" @736 920 WriteConsoleW = "_DbgWriteConsoleW@20" @737 921 WriteFile = "_DbgWriteFile@20" @738 922 WriteFileEx = "_DbgWriteFileEx@20" @739 919 923 ; WriteFileGather = _DbgWriteFileGather@?? ;NT 920 WritePrivateProfileSectionA = _DbgWritePrivateProfileSectionA@12@740921 WritePrivateProfileSectionW = _DbgWritePrivateProfileSectionW@12@741922 WritePrivateProfileStringA = _DbgWritePrivateProfileStringA@16@742923 WritePrivateProfileStringW = _DbgWritePrivateProfileStringW@16@743924 WritePrivateProfileStructA = _DbgWritePrivateProfileStructA@20@744925 WritePrivateProfileStructW = _DbgWritePrivateProfileStructW@20@745926 WriteProcessMemory = _DbgWriteProcessMemory@20@746927 WriteProfileSectionA = _DbgWriteProfileSectionA@8@747928 WriteProfileSectionW = _DbgWriteProfileSectionW@8@748929 WriteProfileStringA = _DbgWriteProfileStringA@12@749930 WriteProfileStringW = _DbgWriteProfileStringW@12@750931 WriteTapemark = _DbgWriteTapemark@16@751924 WritePrivateProfileSectionA = "_DbgWritePrivateProfileSectionA@12" @740 925 WritePrivateProfileSectionW = "_DbgWritePrivateProfileSectionW@12" @741 926 WritePrivateProfileStringA = "_DbgWritePrivateProfileStringA@16" @742 927 WritePrivateProfileStringW = "_DbgWritePrivateProfileStringW@16" @743 928 WritePrivateProfileStructA = "_DbgWritePrivateProfileStructA@20" @744 929 WritePrivateProfileStructW = "_DbgWritePrivateProfileStructW@20" @745 930 WriteProcessMemory = "_DbgWriteProcessMemory@20" @746 931 WriteProfileSectionA = "_DbgWriteProfileSectionA@8" @747 932 WriteProfileSectionW = "_DbgWriteProfileSectionW@8" @748 933 WriteProfileStringA = "_DbgWriteProfileStringA@12" @749 934 WriteProfileStringW = "_DbgWriteProfileStringW@12" @750 935 WriteTapemark = "_DbgWriteTapemark@16" @751 932 936 ; _DebugOut = _Dbg_DebugOut@?? @752 ;W95 933 937 ; _DebugPrintf = _Dbg_DebugPrintf@?? @753 ;W95 934 _hread = _Dbg_lread@12@754935 _hwrite = _Dbg_lwrite@12@755936 _lclose = _Dbg_lclose@4@756937 _lcreat = _Dbg_lcreat@8@757938 _llseek = _Dbg_llseek@12@758939 _lopen = _Dbg_lopen@8@759940 _lread = _Dbg_lread@12@760941 _lwrite = _Dbg_lwrite@12@761938 _hread = "_Dbg_lread@12" @754 939 _hwrite = "_Dbg_lwrite@12" @755 940 _lclose = "_Dbg_lclose@4" @756 941 _lcreat = "_Dbg_lcreat@8" @757 942 _llseek = "_Dbg_llseek@12" @758 943 _lopen = "_Dbg_lopen@8" @759 944 _lread = "_Dbg_lread@12" @760 945 _lwrite = "_Dbg_lwrite@12" @761 942 946 ; dprintf = _Dbgdprintf@?? @762 ;W95 943 lstrcat = _DbglstrcatA@8@763944 lstrcatA = _DbglstrcatA@8@764945 lstrcatW = _DbglstrcatW@8@765946 lstrcmp = _DbglstrcmpA@8@766947 lstrcmpA = _DbglstrcmpA@8@767948 lstrcmpW = _DbglstrcmpW@8@768949 lstrcmpi = _DbglstrcmpiA@8@769950 lstrcmpiA = _DbglstrcmpiA@8@770951 lstrcmpiW = _DbglstrcmpiW@8@771952 lstrcpy = _DbglstrcpyA@8@772953 lstrcpyA = _DbglstrcpyA@8@773954 lstrcpyW = _DbglstrcpyW@8@774955 lstrcpyn = _DbglstrcpynA@12@775956 lstrcpynA = _DbglstrcpynA@12@776957 lstrcpynW = _DbglstrcpynW@12@777958 lstrlen = _DbglstrlenA@4@778959 lstrlenA = _DbglstrlenA@4@779960 lstrlenW = _DbglstrlenW@4@780961 lstrcpynAtoW = _DbglstrcpynAtoW@12@781962 lstrcpynWtoA = _DbglstrcpynWtoA@12@782963 lstrcpyAtoW = _DbglstrcpyAtoW@8@783964 lstrcpyWtoA = _DbglstrcpyWtoA@8@784965 lstrncmpA = _DbglstrncmpA@12@785966 lstrncmpW = _DbglstrncmpW@12@786967 968 GetDiskFreeSpaceExA = _DbgGetDiskFreeSpaceExA@16@871969 GetDiskFreeSpaceExW = _DbgGetDiskFreeSpaceExW@16@873970 971 IsProcessorFeaturePresent = _DbgIsProcessorFeaturePresent@4@880972 973 GetFileAttributesExA = _DbgGetFileAttributesExA@12@874974 GetFileAttributesExW = _DbgGetFileAttributesExW@12@875975 976 lstrncmpiA = _DbglstrncmpiA@12@887977 lstrncmpiW = _DbglstrncmpiW@12@888978 979 lstrlenAtoW = _DbglstrlenAtoW@8@890980 lstrlenWtoA = _DbglstrlenWtoA@8@891981 lstrtrunc = _Dbglstrtrunc@8@892982 983 GetLongPathNameA = _DbgGetLongPathNameA@12@900984 GetLongPathNameW = _DbgGetLongPathNameW@12@901947 lstrcat = "_DbglstrcatA@8" @763 948 lstrcatA = "_DbglstrcatA@8" @764 949 lstrcatW = "_DbglstrcatW@8" @765 950 lstrcmp = "_DbglstrcmpA@8" @766 951 lstrcmpA = "_DbglstrcmpA@8" @767 952 lstrcmpW = "_DbglstrcmpW@8" @768 953 lstrcmpi = "_DbglstrcmpiA@8" @769 954 lstrcmpiA = "_DbglstrcmpiA@8" @770 955 lstrcmpiW = "_DbglstrcmpiW@8" @771 956 lstrcpy = "_DbglstrcpyA@8" @772 957 lstrcpyA = "_DbglstrcpyA@8" @773 958 lstrcpyW = "_DbglstrcpyW@8" @774 959 lstrcpyn = "_DbglstrcpynA@12" @775 960 lstrcpynA = "_DbglstrcpynA@12" @776 961 lstrcpynW = "_DbglstrcpynW@12" @777 962 lstrlen = "_DbglstrlenA@4" @778 963 lstrlenA = "_DbglstrlenA@4" @779 964 lstrlenW = "_DbglstrlenW@4" @780 965 lstrcpynAtoW = "_DbglstrcpynAtoW@12" @781 966 lstrcpynWtoA = "_DbglstrcpynWtoA@12" @782 967 lstrcpyAtoW = "_DbglstrcpyAtoW@8" @783 968 lstrcpyWtoA = "_DbglstrcpyWtoA@8" @784 969 lstrncmpA = "_DbglstrncmpA@12" @785 970 lstrncmpW = "_DbglstrncmpW@12" @786 971 972 GetDiskFreeSpaceExA = "_DbgGetDiskFreeSpaceExA@16" @871 973 GetDiskFreeSpaceExW = "_DbgGetDiskFreeSpaceExW@16" @873 974 975 IsProcessorFeaturePresent = "_DbgIsProcessorFeaturePresent@4" @880 976 977 GetFileAttributesExA = "_DbgGetFileAttributesExA@12" @874 978 GetFileAttributesExW = "_DbgGetFileAttributesExW@12" @875 979 980 lstrncmpiA = "_DbglstrncmpiA@12" @887 981 lstrncmpiW = "_DbglstrncmpiW@12" @888 982 983 lstrlenAtoW = "_DbglstrlenAtoW@8" @890 984 lstrlenWtoA = "_DbglstrlenWtoA@8" @891 985 lstrtrunc = "_Dbglstrtrunc@8" @892 986 987 GetLongPathNameA = "_DbgGetLongPathNameA@12" @900 988 GetLongPathNameW = "_DbgGetLongPathNameW@12" @901 985 989 986 990 ; Windows 2000, Terminal Server 4.0 SP4 functions 987 GetSystemWindowsDirectoryA = _DbgGetWindowsDirectoryA@8@902988 GetSystemWindowsDirectoryW = _DbgGetWindowsDirectoryW@8@903991 GetSystemWindowsDirectoryA = "_DbgGetWindowsDirectoryA@8" @902 992 GetSystemWindowsDirectoryW = "_DbgGetWindowsDirectoryW@8" @903 989 993 990 994 ; Windows 2000 (and up) volume functions 991 FindFirstVolumeA = _DbgFindFirstVolumeA@8@904992 FindFirstVolumeW = _DbgFindFirstVolumeW@8@905993 FindNextVolumeA = _DbgFindNextVolumeA@12@906994 FindNextVolumeW = _DbgFindNextVolumeW@12@907995 FindVolumeClose = _DbgFindVolumeClose@4@908996 997 FindFirstVolumeMountPointA = _DbgFindFirstVolumeMountPointA@12@909998 FindFirstVolumeMountPointW = _DbgFindFirstVolumeMountPointW@12@910999 FindNextVolumeMountPointA = _DbgFindNextVolumeMountPointA@12@9111000 FindNextVolumeMountPointW = _DbgFindNextVolumeMountPointW@12@9121001 FindVolumeMountPointClose = _DbgFindVolumeMountPointClose@4@9131002 1003 GetVolumeNameForVolumeMountPointA = _DbgGetVolumeNameForVolumeMountPointA@12@9141004 GetVolumeNameForVolumeMountPointW = _DbgGetVolumeNameForVolumeMountPointW@12@9151005 1006 GetVolumePathNameA = _DbgGetVolumePathNameA@12@9161007 GetVolumePathNameW = _DbgGetVolumePathNameW@12@9171008 1009 GetFileSizeEx = _GetFileSizeEx@8@920995 FindFirstVolumeA = "_DbgFindFirstVolumeA@8" @904 996 FindFirstVolumeW = "_DbgFindFirstVolumeW@8" @905 997 FindNextVolumeA = "_DbgFindNextVolumeA@12" @906 998 FindNextVolumeW = "_DbgFindNextVolumeW@12" @907 999 FindVolumeClose = "_DbgFindVolumeClose@4" @908 1000 1001 FindFirstVolumeMountPointA = "_DbgFindFirstVolumeMountPointA@12" @909 1002 FindFirstVolumeMountPointW = "_DbgFindFirstVolumeMountPointW@12" @910 1003 FindNextVolumeMountPointA = "_DbgFindNextVolumeMountPointA@12" @911 1004 FindNextVolumeMountPointW = "_DbgFindNextVolumeMountPointW@12" @912 1005 FindVolumeMountPointClose = "_DbgFindVolumeMountPointClose@4" @913 1006 1007 GetVolumeNameForVolumeMountPointA = "_DbgGetVolumeNameForVolumeMountPointA@12" @914 1008 GetVolumeNameForVolumeMountPointW = "_DbgGetVolumeNameForVolumeMountPointW@12" @915 1009 1010 GetVolumePathNameA = "_DbgGetVolumePathNameA@12" @916 1011 GetVolumePathNameW = "_DbgGetVolumePathNameW@12" @917 1012 1013 GetFileSizeEx = "_GetFileSizeEx@8" @920 1010 1014 ; 1011 1015 ; ENDOFEXPORTS … … 1023 1027 ; ---------------------------------------------------------------------------- 1024 1028 ;registry apis imported by advapi32 1025 RegCloseKey = _DbgRegCloseKey@4@1100 NONAME1026 RegConnectRegistryA = _DbgRegConnectRegistryA@12@1101 NONAME1027 RegConnectRegistryW = _DbgRegConnectRegistryW@12@1102 NONAME1028 RegCreateKeyA = _DbgRegCreateKeyA@12@1103 NONAME1029 RegCreateKeyExA = _DbgRegCreateKeyExA@36@1104 NONAME1030 RegCreateKeyExW = _DbgRegCreateKeyExW@36@1105 NONAME1031 RegCreateKeyW = _DbgRegCreateKeyW@12@1106 NONAME1032 RegDeleteKeyA = _DbgRegDeleteKeyA@8@1107 NONAME1033 RegDeleteKeyW = _DbgRegDeleteKeyW@8@1108 NONAME1034 RegDeleteValueA = _DbgRegDeleteValueA@8@1109 NONAME1035 RegDeleteValueW = _DbgRegDeleteValueW@8@1110 NONAME1036 RegEnumKeyA = _DbgRegEnumKeyA@16@1111 NONAME1037 RegEnumKeyExA = _DbgRegEnumKeyExA@32@1112 NONAME1038 RegEnumKeyExW = _DbgRegEnumKeyExW@32@1113 NONAME1039 RegEnumKeyW = _DbgRegEnumKeyW@16@1114 NONAME1040 RegEnumValueA = _DbgRegEnumValueA@32@1115 NONAME1041 RegEnumValueW = _DbgRegEnumValueW@32@1116 NONAME1042 RegFlushKey = _DbgRegFlushKey@4@1117 NONAME1043 RegGetKeySecurity = _DbgRegGetKeySecurity@16@1118 NONAME1044 RegLoadKeyA = _DbgRegLoadKeyA@12@1119 NONAME1045 RegLoadKeyW = _DbgRegLoadKeyW@12@1120 NONAME1046 RegNotifyChangeKeyValue = _DbgRegNotifyChangeKeyValue@20@1121 NONAME1047 RegOpenKeyA = _DbgRegOpenKeyA@12@1122 NONAME1048 RegOpenKeyExA = _DbgRegOpenKeyExA@20@1123 NONAME1049 RegOpenKeyExW = _DbgRegOpenKeyExW@20@1124 NONAME1050 RegOpenKeyW = _DbgRegOpenKeyW@12@1125 NONAME1051 RegQueryInfoKeyA = _DbgRegQueryInfoKeyA@48@1126 NONAME1052 RegQueryInfoKeyW = _DbgRegQueryInfoKeyW@48@1127 NONAME1053 RegQueryMultipleValuesA = _DbgRegQueryMultipleValuesA@20@1128 NONAME1054 RegQueryMultipleValuesW = _DbgRegQueryMultipleValuesW@20@1129 NONAME1055 RegQueryValueA = _DbgRegQueryValueA@16@1130 NONAME1056 RegQueryValueExA = _DbgRegQueryValueExA@24@1131 NONAME1057 RegQueryValueExW = _DbgRegQueryValueExW@24@1132 NONAME1058 RegQueryValueW = _DbgRegQueryValueW@16@1133 NONAME1059 RegReplaceKeyA = _DbgRegReplaceKeyA@16@1134 NONAME1060 RegReplaceKeyW = _DbgRegReplaceKeyW@16@1135 NONAME1061 RegRestoreKeyA = _DbgRegRestoreKeyA@12@1136 NONAME1062 RegRestoreKeyW = _DbgRegRestoreKeyW@12@1137 NONAME1063 RegSaveKeyA = _DbgRegSaveKeyA@12@1138 NONAME1064 RegSaveKeyW = _DbgRegSaveKeyW@12@1139 NONAME1065 RegSetKeySecurity = _DbgRegSetKeySecurity@12@1140 NONAME1066 RegSetValueA = _DbgRegSetValueA@20@1141 NONAME1067 RegSetValueExA = _DbgRegSetValueExA@24@1142 NONAME1068 RegSetValueExW = _DbgRegSetValueExW@24@1143 NONAME1069 RegSetValueW = _DbgRegSetValueW@20@1144 NONAME1070 RegUnLoadKeyA = _DbgRegUnLoadKeyA@8@1145 NONAME1071 RegUnLoadKeyW = _DbgRegUnLoadKeyW@8@1146 NONAME1029 RegCloseKey = "_DbgRegCloseKey@4" @1100 NONAME 1030 RegConnectRegistryA = "_DbgRegConnectRegistryA@12" @1101 NONAME 1031 RegConnectRegistryW = "_DbgRegConnectRegistryW@12" @1102 NONAME 1032 RegCreateKeyA = "_DbgRegCreateKeyA@12" @1103 NONAME 1033 RegCreateKeyExA = "_DbgRegCreateKeyExA@36" @1104 NONAME 1034 RegCreateKeyExW = "_DbgRegCreateKeyExW@36" @1105 NONAME 1035 RegCreateKeyW = "_DbgRegCreateKeyW@12" @1106 NONAME 1036 RegDeleteKeyA = "_DbgRegDeleteKeyA@8" @1107 NONAME 1037 RegDeleteKeyW = "_DbgRegDeleteKeyW@8" @1108 NONAME 1038 RegDeleteValueA = "_DbgRegDeleteValueA@8" @1109 NONAME 1039 RegDeleteValueW = "_DbgRegDeleteValueW@8" @1110 NONAME 1040 RegEnumKeyA = "_DbgRegEnumKeyA@16" @1111 NONAME 1041 RegEnumKeyExA = "_DbgRegEnumKeyExA@32" @1112 NONAME 1042 RegEnumKeyExW = "_DbgRegEnumKeyExW@32" @1113 NONAME 1043 RegEnumKeyW = "_DbgRegEnumKeyW@16" @1114 NONAME 1044 RegEnumValueA = "_DbgRegEnumValueA@32" @1115 NONAME 1045 RegEnumValueW = "_DbgRegEnumValueW@32" @1116 NONAME 1046 RegFlushKey = "_DbgRegFlushKey@4" @1117 NONAME 1047 RegGetKeySecurity = "_DbgRegGetKeySecurity@16" @1118 NONAME 1048 RegLoadKeyA = "_DbgRegLoadKeyA@12" @1119 NONAME 1049 RegLoadKeyW = "_DbgRegLoadKeyW@12" @1120 NONAME 1050 RegNotifyChangeKeyValue = "_DbgRegNotifyChangeKeyValue@20" @1121 NONAME 1051 RegOpenKeyA = "_DbgRegOpenKeyA@12" @1122 NONAME 1052 RegOpenKeyExA = "_DbgRegOpenKeyExA@20" @1123 NONAME 1053 RegOpenKeyExW = "_DbgRegOpenKeyExW@20" @1124 NONAME 1054 RegOpenKeyW = "_DbgRegOpenKeyW@12" @1125 NONAME 1055 RegQueryInfoKeyA = "_DbgRegQueryInfoKeyA@48" @1126 NONAME 1056 RegQueryInfoKeyW = "_DbgRegQueryInfoKeyW@48" @1127 NONAME 1057 RegQueryMultipleValuesA = "_DbgRegQueryMultipleValuesA@20" @1128 NONAME 1058 RegQueryMultipleValuesW = "_DbgRegQueryMultipleValuesW@20" @1129 NONAME 1059 RegQueryValueA = "_DbgRegQueryValueA@16" @1130 NONAME 1060 RegQueryValueExA = "_DbgRegQueryValueExA@24" @1131 NONAME 1061 RegQueryValueExW = "_DbgRegQueryValueExW@24" @1132 NONAME 1062 RegQueryValueW = "_DbgRegQueryValueW@16" @1133 NONAME 1063 RegReplaceKeyA = "_DbgRegReplaceKeyA@16" @1134 NONAME 1064 RegReplaceKeyW = "_DbgRegReplaceKeyW@16" @1135 NONAME 1065 RegRestoreKeyA = "_DbgRegRestoreKeyA@12" @1136 NONAME 1066 RegRestoreKeyW = "_DbgRegRestoreKeyW@12" @1137 NONAME 1067 RegSaveKeyA = "_DbgRegSaveKeyA@12" @1138 NONAME 1068 RegSaveKeyW = "_DbgRegSaveKeyW@12" @1139 NONAME 1069 RegSetKeySecurity = "_DbgRegSetKeySecurity@12" @1140 NONAME 1070 RegSetValueA = "_DbgRegSetValueA@20" @1141 NONAME 1071 RegSetValueExA = "_DbgRegSetValueExA@24" @1142 NONAME 1072 RegSetValueExW = "_DbgRegSetValueExW@24" @1143 NONAME 1073 RegSetValueW = "_DbgRegSetValueW@20" @1144 NONAME 1074 RegUnLoadKeyA = "_DbgRegUnLoadKeyA@8" @1145 NONAME 1075 RegUnLoadKeyW = "_DbgRegUnLoadKeyW@8" @1146 NONAME 1072 1076 1073 1077 … … 1086 1090 1087 1091 ;Used by tibfix page in exe (change ordinal in pe2lx.cpp too!!) 1088 _RegisterPe2LxExe@12 @1203 1089 _RegisterPe2LxDll@12 @1209 1090 1091 _CreateWin32PeLdrExe@36 @1236 1092 1093 _RegisterLxExe@8 @1237 1094 _RegisterLxDll@24 @1238 1095 _UnregisterLxDll@4 @1239 1096 _RegisterDummyExe@4 @1249 1097 _IsDummyExeLoaded@0 @1250 NONAME 1098 1099 ;VMutex 1100 ;; enter__6VMutexFUlPUl @1204 NONAME 1101 ;; leave__6VMutexFPUl @1205 NONAME 1102 __ct__6VMutexFv @1206 NONAME 1103 __dt__6VMutexFv @1207 NONAME 1092 "_RegisterPe2LxExe@12" @1203 1093 "_RegisterPe2LxDll@12" @1209 1094 1095 "_CreateWin32PeLdrExe@36" @1236 1096 1097 "_RegisterLxExe@8" @1237 1098 "_RegisterLxDll@24" @1238 1099 "_UnregisterLxDll@4" @1239 1100 "_RegisterDummyExe@4" @1249 1101 "_IsDummyExeLoaded@0" @1250 NONAME 1104 1102 1105 1103 ;version functions … … 1113 1111 SetReturnFS = SetReturnFS @1235 NONAME 1114 1112 1115 RestoreOS2TIB = _RestoreOS2TIB@0@1228 NONAME1116 SetWin32TIB = _SetWin32TIB@4@1229 NONAME1113 RestoreOS2TIB = "_RestoreOS2TIB@0" @1228 NONAME 1114 SetWin32TIB = "_SetWin32TIB@4" @1229 NONAME 1117 1115 RestoreOS2FS = RestoreOS2FS @1230 NONAME 1118 1116 1119 1117 ;SvL: HandleManager functions 1120 1118 1121 ; HMHandleTranslateToWin __FUlPUl@12341122 1123 HMHandleAllocate__FPUlUl@1231 NONAME1124 HMHandleFree__FUl@1232 NONAME1125 HMHandleTranslateToOS2__FUlPUl@1233 NONAME1126 HMMsgWaitForMultipleObjects__FUlPUlN31@1260 NONAME1127 HMOpenThreadToken__FUlN21PUl@1261 NONAME1128 HMOpenProcessToken__FUlN21PUl@1262 NONAME1129 HMHandleGetUserData__FUl@1263 NONAME1130 HMHandleSetUserData__FUlT1@1303 NONAME1131 1132 _GetThreadTEB@0@1234 NONAME1133 _GetTEBFromThreadId@4@1255 NONAME1134 _GetTEBFromThreadHandle@4@1256 NONAME1119 ; HMHandleTranslateToWin @1234 1120 1121 _HMHandleAllocate @1231 NONAME 1122 _HMHandleFree @1232 NONAME 1123 _HMHandleTranslateToOS2 @1233 NONAME 1124 _HMMsgWaitForMultipleObjects @1260 NONAME 1125 _HMOpenThreadToken @1261 NONAME 1126 _HMOpenProcessToken @1262 NONAME 1127 _HMHandleGetUserData @1263 NONAME 1128 _HMHandleSetUserData @1303 NONAME 1129 1130 "_GetThreadTEB@0" @1234 NONAME 1131 "_GetTEBFromThreadId@4" @1255 NONAME 1132 "_GetTEBFromThreadHandle@4" @1256 NONAME 1135 1133 1136 1134 ; HEAP Management (heap.cpp, heapstring.cpp) 1137 HEAP_xalloc = _DbgHEAP_xalloc@12@1240 NONAME1138 HEAP_xrealloc = _DbgHEAP_xrealloc@16@1241 NONAME1139 HEAP_malloc = _DbgHEAP_malloc@4@1242 NONAME1140 HEAP_realloc = _DbgHEAP_realloc@8@1243 NONAME1141 HEAP_size = _DbgHEAP_size@4@1292 NONAME1142 HEAP_free = _DbgHEAP_free@4@1244 NONAME1143 HEAP_strdupWtoA = _DbgHEAP_strdupWtoA@12@1245 NONAME1144 HEAP_strdupAtoW = _DbgHEAP_strdupAtoW@12@1246 NONAME1145 HEAP_strdupA = _DbgHEAP_strdupA@12@1247 NONAME1146 HEAP_strdupW = _DbgHEAP_strdupW@12@1248 NONAME1147 1148 _VIRTUAL_MapFileA@12@1251 NONAME1149 _VIRTUAL_MapFileW@12@1252 NONAME1135 HEAP_xalloc = "_DbgHEAP_xalloc@12" @1240 NONAME 1136 HEAP_xrealloc = "_DbgHEAP_xrealloc@16" @1241 NONAME 1137 HEAP_malloc = "_DbgHEAP_malloc@4" @1242 NONAME 1138 HEAP_realloc = "_DbgHEAP_realloc@8" @1243 NONAME 1139 HEAP_size = "_DbgHEAP_size@4" @1292 NONAME 1140 HEAP_free = "_DbgHEAP_free@4" @1244 NONAME 1141 HEAP_strdupWtoA = "_DbgHEAP_strdupWtoA@12" @1245 NONAME 1142 HEAP_strdupAtoW = "_DbgHEAP_strdupAtoW@12" @1246 NONAME 1143 HEAP_strdupA = "_DbgHEAP_strdupA@12" @1247 NONAME 1144 HEAP_strdupW = "_DbgHEAP_strdupW@12" @1248 NONAME 1145 1146 "_VIRTUAL_MapFileA@12" @1251 NONAME 1147 "_VIRTUAL_MapFileW@12" @1252 NONAME 1150 1148 1151 1149 OS2SetExceptionHandler @1253 NONAME … … 1156 1154 ; ------------------- 1157 1155 1158 _PROFILE_GetOdinIniString@20@1264 NONAME1159 _PROFILE_SetOdinIniString@12@1265 NONAME1160 _PROFILE_GetOdinIniInt@12@1266 NONAME1161 _PROFILE_SetOdinIniInt@12@1267 NONAME1162 _PROFILE_GetOdinIniBool@12@1268 NONAME1163 _PROFILE_SetOdinIniBool@12@1269 NONAME1164 _PROFILE_SaveOdinIni@0@1270 NONAME1156 "_PROFILE_GetOdinIniString@20" @1264 NONAME 1157 "_PROFILE_SetOdinIniString@12" @1265 NONAME 1158 "_PROFILE_GetOdinIniInt@12" @1266 NONAME 1159 "_PROFILE_SetOdinIniInt@12" @1267 NONAME 1160 "_PROFILE_GetOdinIniBool@12" @1268 NONAME 1161 "_PROFILE_SetOdinIniBool@12" @1269 NONAME 1162 "_PROFILE_SaveOdinIni@0" @1270 NONAME 1165 1163 1166 1164 ;shared memory allocation … … 1174 1172 1175 1173 ;code memory allocation 1176 codeHeap@1272 NONAME1174 _codeHeap @1272 NONAME 1177 1175 1178 1176 ;fast file API's 1179 FindFirstFileMultiA = _FindFirstFileMultiA@12@1290 NONAME1180 FindNextFileMultiA = _FindNextFileMultiA@12@1291 NONAME1181 1182 _GetProcModuleFileNameA@12@1295 NONAME1177 FindFirstFileMultiA = "_FindFirstFileMultiA@12" @1290 NONAME 1178 FindNextFileMultiA = "_FindNextFileMultiA@12" @1291 NONAME 1179 1180 "_GetProcModuleFileNameA@12" @1295 NONAME 1183 1181 1184 1182 ;Build number 1185 _Odin32GetBuildNumber@0@1293 NONAME1186 1187 _WaitForInputIdle@8@1301 NONAME1183 "_Odin32GetBuildNumber@0" @1293 NONAME 1184 1185 "_WaitForInputIdle@8" @1301 NONAME 1188 1186 1189 1187 InitializeKernel32 @1302 NONAME 1190 1188 1191 IsExeStarted __Fv@2001 NONAME1189 IsExeStarted = _IsExeStarted @2001 NONAME 1192 1190 CheckCurFS @2002 NONAME 1193 1191 _SupportsCPUID @2003 NONAME 1194 1192 _GetCPUFeatures @2004 NONAME 1195 CPUFeatures@2005 NONAME1193 _CPUFeatures @2005 NONAME 1196 1194 1197 1195 _wctype_table @2006 NONAME … … 1205 1203 ; get_char_typeW @2008 NONAME 1206 1204 1207 _GetProcessTIBSel@0@2012 NONAME1208 1209 _SetRegistryRootKey@8@2013 NONAME1210 _SetCustomBuildName@8@2014 NONAME1211 _RegisterCustomDriver@36@2015 NONAME1205 "_GetProcessTIBSel@0" @2012 NONAME 1206 1207 "_SetRegistryRootKey@8" @2013 NONAME 1208 "_SetCustomBuildName@8" @2014 NONAME 1209 "_RegisterCustomDriver@36" @2015 NONAME 1212 1210 1213 1211 strcmpiW @2020 NONAME … … 1223 1221 OSLibDosDevIOCtl @2026 NONAME 1224 1222 1225 OSLibImSetMsgQueueProperty@2029 NONAME1226 1227 fIsDBCSEnv@2103 NONAME1228 _hookInit@4@2104 NONAME1223 _OSLibImSetMsgQueueProperty @2029 NONAME 1224 1225 _fIsDBCSEnv @2103 NONAME 1226 "_hookInit@4" @2104 NONAME 1229 1227 1230 1228 vsnprintfW @2030 NONAME … … 1234 1232 __argcA @2033 NONAME 1235 1233 __argvA @2034 NONAME 1236 _CommandLineToArgvW@8@2035 NONAME1234 "_CommandLineToArgvW@8" @2035 NONAME 1237 1235 1238 1236 ; custom dll hook installer 1239 _ODIN_SetDllLoadCallback@4@2100 NONAME1237 "_ODIN_SetDllLoadCallback@4" @2100 NONAME 1240 1238 ; override export 1241 _ODIN_SetProcAddress@12@2101 NONAME1239 "_ODIN_SetProcAddress@12" @2101 NONAME 1242 1240 1243 1241 ; override TIB switching 1244 _ODIN_SetTIBSwitch@4@2102 NONAME1245 1246 GetDisplayCodepage@3000 NONAME1247 GetWindowsCodepage@3001 NONAME1242 "_ODIN_SetTIBSwitch@4" @2102 NONAME 1243 1244 _GetDisplayCodepage @3000 NONAME 1245 _GetWindowsCodepage @3001 NONAME 1248 1246 1249 1247 ; ODIN debugging functions 1250 _dbg_GetThreadCallDepth@0@3100 NONAME1251 _dbg_IncThreadCallDepth@0@3101 NONAME1252 _dbg_DecThreadCallDepth@0@3102 NONAME1248 "_dbg_GetThreadCallDepth@0" @3100 NONAME 1249 "_dbg_IncThreadCallDepth@0" @3101 NONAME 1250 "_dbg_DecThreadCallDepth@0" @3102 NONAME 1253 1251 PerfView_RegisterCall @3103 NONAME 1254 1252 PerfView_DumpProfile @3104 NONAME 1255 1253 PerfView_Write @3105 NONAME 1256 _dbg_GetLastCallerName@0@3106 NONAME1257 _dbg_ThreadPushCall@4@3107 NONAME1258 _dbg_ThreadPopCall@0@3108 NONAME1259 1260 _ODIN_QueryLoaders@24@3109 NONAME1261 _ODIN_IsWin32App@4@3110 NONAME1262 1263 _OSLibWinCreateObject@32@3111 NONAME1264 1265 _MMAP_RegisterMemoryRange@16@3112 NONAME1266 _MMAP_UnregisterMemoryRange@4@3113 NONAME1267 1268 _ODIN_SetExceptionHandler@4@3114 NONAME1269 _ODIN_UnsetExceptionHandler@4@3115 NONAME1270 1271 _PSAPI_EnumProcessModules@16 @3116 NONAME1272 _PSAPI_GetModuleInformation@16 @3117 NONAME1273 1274 _ODIN_SetProcessDword@12@3118 NONAME1254 "_dbg_GetLastCallerName@0" @3106 NONAME 1255 "_dbg_ThreadPushCall@4" @3107 NONAME 1256 "_dbg_ThreadPopCall@0" @3108 NONAME 1257 1258 "_ODIN_QueryLoaders@24" @3109 NONAME 1259 "_ODIN_IsWin32App@4" @3110 NONAME 1260 1261 "_OSLibWinCreateObject@32" @3111 NONAME 1262 1263 "_MMAP_RegisterMemoryRange@16" @3112 NONAME 1264 "_MMAP_UnregisterMemoryRange@4" @3113 NONAME 1265 1266 "_ODIN_SetExceptionHandler@4" @3114 NONAME 1267 "_ODIN_UnsetExceptionHandler@4" @3115 NONAME 1268 1269 "_PSAPI_EnumProcessModules@16" @3116 NONAME 1270 "_PSAPI_GetModuleInformation@16" @3117 NONAME 1271 1272 "_ODIN_SetProcessDword@12" @3118 NONAME 1275 1273 1276 1274 ; required for Mozilla plugin 1277 1275 1278 _ODIN_ThreadEnterOdinContext@8 = _ODIN_ThreadEnterOdinContext@8@31191279 _ODIN_ThreadLeaveOdinContext@8 = _ODIN_ThreadLeaveOdinContext@8@31201280 _ODIN_ThreadLeaveOdinContextNested@8 = _ODIN_ThreadLeaveOdinContextNested@8@31211281 _ODIN_ThreadEnterOdinContextNested@12 = _ODIN_ThreadEnterOdinContextNested@12@31221276 "_ODIN_ThreadEnterOdinContext@8" = "_ODIN_ThreadEnterOdinContext@8" @3119 1277 "_ODIN_ThreadLeaveOdinContext@8" = "_ODIN_ThreadLeaveOdinContext@8" @3120 1278 "_ODIN_ThreadLeaveOdinContextNested@8" = "_ODIN_ThreadLeaveOdinContextNested@8" @3121 1279 "_ODIN_ThreadEnterOdinContextNested@12" = "_ODIN_ThreadEnterOdinContextNested@12" @3122 1282 1280 1283 1281 ; Char functions (forwarders from user32) 1284 _DbgCharLowerA@4@3127 NONAME1285 _DbgCharLowerBuffA@8@3128 NONAME1286 _DbgCharLowerBuffW@8@3129 NONAME1287 _DbgCharLowerW@4@3130 NONAME1288 _DbgCharNextA@4@3131 NONAME1289 _DbgCharNextExA@12@3132 NONAME1290 _DbgCharNextExW@12@3133 NONAME1291 _DbgCharNextW@4@3134 NONAME1292 _DbgCharPrevA@8@3135 NONAME1293 _DbgCharPrevExA@16@3136 NONAME1294 _DbgCharPrevExW@16@3137 NONAME1295 _DbgCharPrevW@8@3138 NONAME1296 _DbgCharToOemA@8@3139 NONAME1297 _DbgCharToOemBuffA@12@3140 NONAME1298 _DbgCharToOemBuffW@12@3141 NONAME1299 _DbgCharToOemW@8@3142 NONAME1300 _DbgCharUpperA@4@3143 NONAME1301 _DbgCharUpperBuffA@8@3144 NONAME1302 _DbgCharUpperBuffW@8@3145 NONAME1303 _DbgCharUpperW@4@3146 NONAME1304 _DbgOemToCharA@8@3149 NONAME1305 _DbgOemToCharBuffA@12@3150 NONAME1306 _DbgOemToCharBuffW@12@3151 NONAME1307 _DbgOemToCharW@8@3152 NONAME1308 _DbgIsCharAlphaA@4@3153 NONAME1309 _DbgIsCharAlphaNumericA@4@3154 NONAME1310 _DbgIsCharAlphaNumericW@4@3155 NONAME1311 _DbgIsCharAlphaW@4@3156 NONAME1312 _DbgIsCharLowerA@4@3157 NONAME1313 _DbgIsCharLowerW@4@3158 NONAME1314 _DbgIsCharUpperA@4@3159 NONAME1315 _DbgIsCharUpperW@4@3160 NONAME1316 SetFilePointerEx = _SetFilePointerEx@20@31611317 SetWaitableTimer = _SetWaitableTimer@24 @31621282 "_DbgCharLowerA@4" @3127 NONAME 1283 "_DbgCharLowerBuffA@8" @3128 NONAME 1284 "_DbgCharLowerBuffW@8" @3129 NONAME 1285 "_DbgCharLowerW@4" @3130 NONAME 1286 "_DbgCharNextA@4" @3131 NONAME 1287 "_DbgCharNextExA@12" @3132 NONAME 1288 "_DbgCharNextExW@12" @3133 NONAME 1289 "_DbgCharNextW@4" @3134 NONAME 1290 "_DbgCharPrevA@8" @3135 NONAME 1291 "_DbgCharPrevExA@16" @3136 NONAME 1292 "_DbgCharPrevExW@16" @3137 NONAME 1293 "_DbgCharPrevW@8" @3138 NONAME 1294 "_DbgCharToOemA@8" @3139 NONAME 1295 "_DbgCharToOemBuffA@12" @3140 NONAME 1296 "_DbgCharToOemBuffW@12" @3141 NONAME 1297 "_DbgCharToOemW@8" @3142 NONAME 1298 "_DbgCharUpperA@4" @3143 NONAME 1299 "_DbgCharUpperBuffA@8" @3144 NONAME 1300 "_DbgCharUpperBuffW@8" @3145 NONAME 1301 "_DbgCharUpperW@4" @3146 NONAME 1302 "_DbgOemToCharA@8" @3149 NONAME 1303 "_DbgOemToCharBuffA@12" @3150 NONAME 1304 "_DbgOemToCharBuffW@12" @3151 NONAME 1305 "_DbgOemToCharW@8" @3152 NONAME 1306 "_DbgIsCharAlphaA@4" @3153 NONAME 1307 "_DbgIsCharAlphaNumericA@4" @3154 NONAME 1308 "_DbgIsCharAlphaNumericW@4" @3155 NONAME 1309 "_DbgIsCharAlphaW@4" @3156 NONAME 1310 "_DbgIsCharLowerA@4" @3157 NONAME 1311 "_DbgIsCharLowerW@4" @3158 NONAME 1312 "_DbgIsCharUpperA@4" @3159 NONAME 1313 "_DbgIsCharUpperW@4" @3160 NONAME 1314 SetFilePointerEx = "_SetFilePointerEx@20" @3161 1315 SetWaitableTimer = "_SetWaitableTimer@24" @3162 1318 1316 1319 1317 ; NTDLL forwarder … … 1324 1322 1325 1323 ; RAS functions 1326 RasRegisterObjectTracking = _RasRegisterObjectTracking@24@35001327 RasDeregisterObjectTracking = _RasDeregisterObjectTracking@4@35011328 RasAddObject = _RasAddObject@16@35021329 RasRemoveObject = _RasRemoveObject@8@35031330 RasSetObjectUserData = _RasSetObjectUserData@20@35041331 RasQueryObjectUserData = _RasQueryObjectUserData@20@35051332 RasInitialize = _RasInitialize@4@35061333 RasUninitialize = _RasUninitialize@0@35071324 RasRegisterObjectTracking = "_RasRegisterObjectTracking@24" @3500 1325 RasDeregisterObjectTracking = "_RasDeregisterObjectTracking@4" @3501 1326 RasAddObject = "_RasAddObject@16" @3502 1327 RasRemoveObject = "_RasRemoveObject@8" @3503 1328 RasSetObjectUserData = "_RasSetObjectUserData@20" @3504 1329 RasQueryObjectUserData = "_RasQueryObjectUserData@20" @3505 1330 RasInitialize = "_RasInitialize@4" @3506 1331 RasUninitialize = "_RasUninitialize@0" @3507 1334 1332 _RasLog = _RasLog @3508 1335 RasLogMsg = _RasLogMsg@12@35091336 RasLogObjects = _RasLogObjects@8@35101337 RasEnterSerialize = _RasEnterSerialize@0@35111338 RasExitSerialize = _RasExitSerialize@0@35121333 RasLogMsg = "_RasLogMsg@12" @3509 1334 RasLogObjects = "_RasLogObjects@8" @3510 1335 RasEnterSerialize = "_RasEnterSerialize@0" @3511 1336 RasExitSerialize = "_RasExitSerialize@0" @3512 1339 1337 _RasLogNoEOL = _RasLogNoEOL @3513 1340 RasOpenLogChannel = _RasOpenLogChannel@12@35141341 RasWriteLogChannel = _RasWriteLogChannel@12@35151342 RasCloseLogChannel = _RasCloseLogChannel@4@35161338 RasOpenLogChannel = "_RasOpenLogChannel@12" @3514 1339 RasWriteLogChannel = "_RasWriteLogChannel@12" @3515 1340 RasCloseLogChannel = "_RasCloseLogChannel@4" @3516 1343 1341 _RasLog2 = _RasLog2 @3517 1344 RasLogMsg2 = _RasLogMsg2@16@35181342 RasLogMsg2 = "_RasLogMsg2@16" @3518 1345 1343 _RasLogNoEOL2 = _RasLogNoEOL2 @3519 1346 RasSaveContext = _RasSaveContext@4@35201347 RasRestoreContext = _RasRestoreContext@4@35211348 RasEntry = _RasEntry@12@35221349 RasSetProcAddr = _RasSetProcAddr@12@35231350 RasTrackMemFree = _RasTrackMemFree@8@35241351 RasTrackMemAlloc = _RasTrackMemAlloc@8@35251352 RasTrackMemRealloc = _RasTrackMemRealloc@12@35261353 RasCountObjects = _RasCountObjects@12@35271354 RasGetTrackHandle = _RasGetTrackHandle@4@35281355 1356 DecodePointer = _DecodePointer@4@3529 NONAME1357 EncodePointer = _EncodePointer@4@3530 NONAME1358 RtlUniform = _RtlUniform@4@3531 NONAME1359 1344 RasSaveContext = "_RasSaveContext@4" @3520 1345 RasRestoreContext = "_RasRestoreContext@4" @3521 1346 RasEntry = "_RasEntry@12" @3522 1347 RasSetProcAddr = "_RasSetProcAddr@12" @3523 1348 RasTrackMemFree = "_RasTrackMemFree@8" @3524 1349 RasTrackMemAlloc = "_RasTrackMemAlloc@8" @3525 1350 RasTrackMemRealloc = "_RasTrackMemRealloc@12" @3526 1351 RasCountObjects = "_RasCountObjects@12" @3527 1352 RasGetTrackHandle = "_RasGetTrackHandle@4" @3528 1353 1354 DecodePointer = "_DecodePointer@4" @3529 NONAME 1355 EncodePointer = "_EncodePointer@4" @3530 NONAME 1356 RtlUniform = "_RtlUniform@4" @3531 NONAME 1357 1360 1358 ___seh_handler @3600 NONAME 1361 _EnableSEH@0@3601 NONAME1359 "_EnableSEH@0" @3601 NONAME -
trunk/src/kernel32/lang.cpp
r21848 r21916 19 19 #include <odinwrap.h> 20 20 #include <heapstring.h> 21 #include <win \winreg.h>21 #include <win/winreg.h> 22 22 #include <winos2def.h> 23 23 #include "unicode.h" -
trunk/src/kernel32/mmap.cpp
r21667 r21916 28 28 #include <stdlib.h> 29 29 #include <string.h> 30 #include <win \virtual.h>30 #include <win/virtual.h> 31 31 #include <odincrt.h> 32 32 #include <handlemanager.h> … … 34 34 #include "oslibdos.h" 35 35 #include "oslibmem.h" 36 #include <winimagepeldr.h>36 #include "winimagepeldr.h" 37 37 #include <custombuild.h> 38 38 #include "asmutil.h" … … 41 41 #include "dbglocal.h" 42 42 43 44 45 //Global DLL Data 46 #pragma data_seg(_GLOBALDATA) 47 Win32MemMap *Win32MemMap::memmaps = NULL; 48 CRITICAL_SECTION_OS2 globalmapcritsect = {0}; 49 #pragma data_seg() 50 51 52 static char *pszMMapSemName = MEMMAP_CRITSECTION_NAME; 43 static LPCSTR pszMMapSemName = MEMMAP_CRITSECTION_NAME; 53 44 54 45 //****************************************************************************** -
trunk/src/kernel32/mmap.h
r10376 r21916 284 284 //****************************************************************************** 285 285 286 #pragma data_seg(_GLOBALDATA) 286 // 287 // Global DLL Data (keep it in sync with globaldata.asm!) 288 // 287 289 extern CRITICAL_SECTION_OS2 globalmapcritsect; 288 #pragma data_seg()289 290 290 291 void InitializeMemMaps(); -
trunk/src/kernel32/mmapdup.cpp
r10073 r21916 28 28 #include <stdlib.h> 29 29 #include <string.h> 30 #include <win \virtual.h>30 #include <win/virtual.h> 31 31 #include <odincrt.h> 32 32 #include <handlemanager.h> … … 34 34 #include "oslibdos.h" 35 35 #include "oslibmem.h" 36 #include <winimagepeldr.h>37 #include <custombuild.h> 36 #include "winimagepeldr.h" 37 #include <custombuild.h> 38 38 39 39 #define DBG_LOCALLOG DBG_mmapdup … … 48 48 // 49 49 //****************************************************************************** 50 Win32MemMapDup::Win32MemMapDup(Win32MemMap *parent, HANDLE hFile, ULONG size, 50 Win32MemMapDup::Win32MemMapDup(Win32MemMap *parent, HANDLE hFile, ULONG size, 51 51 ULONG fdwProtect, LPSTR lpszName) : 52 52 Win32MemMap(hFile, size, fdwProtect, lpszName) … … 123 123 if((fdwAccess & FILE_MAP_READ) && !(mProtFlags & (PAGE_READWRITE|PAGE_READONLY))) 124 124 goto parmfail; 125 125 126 126 if (fdwAccess != FILE_MAP_ALL_ACCESS) 127 127 if((fdwAccess & FILE_MAP_COPY) && !(mProtFlags & PAGE_WRITECOPY)) … … 222 222 BOOL Win32MemMapDup::commitPage(ULONG ulFaultAddr, ULONG offset, BOOL fWriteAccess, int nrpages) 223 223 { 224 if(mProtFlags & PAGE_WRITECOPY) 224 if(mProtFlags & PAGE_WRITECOPY) 225 225 {//this is a COW map, call commitGuardPage 226 226 return commitGuardPage(ulFaultAddr, offset, fWriteAccess); … … 245 245 // 246 246 //****************************************************************************** 247 BOOL Win32MemMapDup::commitGuardPage(ULONG ulFaultAddr, ULONG ulOffset, 247 BOOL Win32MemMapDup::commitGuardPage(ULONG ulFaultAddr, ULONG ulOffset, 248 248 BOOL fWriteAccess) 249 249 { -
trunk/src/kernel32/mmapnotify.cpp
r10376 r21916 6 6 * Calls notification handler when an exception occurs in the memory range of 7 7 * the map. 8 * 8 * 9 9 * Copyright 2003 Sander van Leeuwen (sandervl@innotek.de) 10 10 * … … 16 16 #include <stdlib.h> 17 17 #include <string.h> 18 #include <win \virtual.h>18 #include <win/virtual.h> 19 19 #include <odincrt.h> 20 20 #include <handlemanager.h> … … 22 22 #include "oslibdos.h" 23 23 #include "oslibmem.h" 24 #include <winimagepeldr.h>25 #include <custombuild.h> 24 #include "winimagepeldr.h" 25 #include <custombuild.h> 26 26 #include <memmap.h> 27 27 … … 128 128 // Win32MemMapNotify::findMapByView 129 129 // 130 // Find the map of the view that contains the specified starting address 130 // Find the map of the view that contains the specified starting address 131 131 // and has the specified access type 132 132 // -
trunk/src/kernel32/mmapview.cpp
r21302 r21916 28 28 #include <stdlib.h> 29 29 #include <string.h> 30 #include <win \virtual.h>30 #include <win/virtual.h> 31 31 #include <odincrt.h> 32 32 #include <handlemanager.h> … … 34 34 #include "oslibdos.h" 35 35 #include "oslibmem.h" 36 #include <winimagepeldr.h>37 #include <custombuild.h> 36 #include "winimagepeldr.h" 37 #include <custombuild.h> 38 38 39 39 #define DBG_LOCALLOG DBG_mmapview … … 51 51 // 52 52 //****************************************************************************** 53 Win32MemMapView::Win32MemMapView(Win32MemMap *map, ULONG offset, ULONG size, 53 Win32MemMapView::Win32MemMapView(Win32MemMap *map, ULONG offset, ULONG size, 54 54 ULONG fdwAccess, Win32MemMap *owner) 55 55 { … … 87 87 { 88 88 //shared memory map, so map it into our address space 89 if(OSLibDosGetNamedSharedMem((LPVOID *)&viewaddr, map->getMemName()) != OSLIB_NOERROR) 89 if(OSLibDosGetNamedSharedMem((LPVOID *)&viewaddr, map->getMemName()) != OSLIB_NOERROR) 90 90 { 91 91 dprintf(("new OSLibDosGetNamedSharedMem FAILED")); … … 104 104 } 105 105 else { 106 if(mfAccess & MEMMAP_ACCESS_COPYONWRITE) 106 if(mfAccess & MEMMAP_ACCESS_COPYONWRITE) 107 107 { 108 108 //A copy on write view is a private copy of the memory map … … 118 118 } 119 119 } 120 else 120 else 121 121 if(OSLibDosAliasMem(viewaddr, size, &pMapView, accessAttr) != OSLIB_NOERROR) { 122 122 dprintf(("new OSLibDosAliasMem FAILED")); … … 126 126 } 127 127 } 128 //Allocate bitmap for all pages of a COW view to track which pages are 128 //Allocate bitmap for all pages of a COW view to track which pages are 129 129 //shared and which are private (copy on write -> private page) 130 if(fdwAccess == FILE_MAP_COPY) 130 if(fdwAccess == FILE_MAP_COPY) 131 131 { 132 132 DWORD nrPages = mSize >> PAGE_SHIFT; … … 242 242 viewpagestart = mOffset >> PAGE_SHIFT; 243 243 nrviewpages = mSize >> PAGE_SHIFT; 244 if(mSize & 0xFFF) 244 if(mSize & 0xFFF) 245 245 nrviewpages++; 246 246 … … 248 248 return; //outside this view 249 249 } 250 if(startpage + nrpages > viewpagestart + nrviewpages) { 250 if(startpage + nrpages > viewpagestart + nrviewpages) { 251 251 nrpages -= ((startpage + nrpages) - (viewpagestart + nrviewpages)); 252 252 } … … 286 286 } 287 287 288 if( ( (mfAccess & MEMMAP_ACCESS_COPYONWRITE) && (flags != PAGEVIEW_GUARD) ) || 289 ( (flags == PAGEVIEW_GUARD) && !(mfAccess & MEMMAP_ACCESS_COPYONWRITE) ) ) 288 if( ( (mfAccess & MEMMAP_ACCESS_COPYONWRITE) && (flags != PAGEVIEW_GUARD) ) || 289 ( (flags == PAGEVIEW_GUARD) && !(mfAccess & MEMMAP_ACCESS_COPYONWRITE) ) ) 290 290 { 291 291 //PAGEVIEW_GUARD only applies to COW views 292 292 //PAGEVIEW_VIEW/READONLY does not apply to COW views 293 return TRUE; 293 return TRUE; 294 294 } 295 295 if(mOffset + mSize <= offset || mOffset >= offset + size) { … … 320 320 } 321 321 322 if(flags == PAGEVIEW_GUARD || (mfAccess & MEMMAP_ACCESS_COPYONWRITE)) 322 if(flags == PAGEVIEW_GUARD || (mfAccess & MEMMAP_ACCESS_COPYONWRITE)) 323 323 { 324 324 DWORD startpage = (offset - mOffset) >> PAGE_SHIFT; … … 330 330 //of the COW pages, then only the shared pages must be changed. 331 331 //So check each page if it is still shared. 332 for(int i=startpage;i<startpage+nrPages;i++) 332 for(int i=startpage;i<startpage+nrPages;i++) 333 333 { 334 if(!isCOWPage(i)) 334 if(!isCOWPage(i)) 335 335 {//page is still shared, so set the guard flag 336 336 rc = OSLibDosSetMem((char *)pMapView+(offset - mOffset), PAGE_SIZE, accessAttr); … … 354 354 //****************************************************************************** 355 355 //****************************************************************************** 356 int Win32MemMapView::findViews(Win32MemMap *map, int nrViews, 356 int Win32MemMapView::findViews(Win32MemMap *map, int nrViews, 357 357 Win32MemMapView *viewarray[]) 358 358 { … … 362 362 Win32MemMapView *view = mapviews, *nextview; 363 363 364 if(view != NULL) 364 if(view != NULL) 365 365 { 366 while(view && i < nrViews) 366 while(view && i < nrViews) 367 367 { 368 368 if(view->getParentMap() == map) … … 384 384 Win32MemMapView *view = mapviews, *nextview; 385 385 386 if(view != NULL) 386 if(view != NULL) 387 387 { 388 while(view) 388 while(view) 389 389 { 390 390 nextview = view->next; … … 404 404 // Win32MemMap::findMapByView 405 405 // 406 // Find the map of the view that contains the specified starting address 406 // Find the map of the view that contains the specified starting address 407 407 // and has the specified access type 408 408 // -
trunk/src/kernel32/module.cpp
r7342 r21916 17 17 #include "dbglocal.h" 18 18 19 #define FILE_strcasecmp str cmpi19 #define FILE_strcasecmp stricmp 20 20 21 21 /* Check whether a file is an OS/2 or a very old Windows executable -
trunk/src/kernel32/network.cpp
r7603 r21916 19 19 #define DBG_LOCALLOG DBG_network 20 20 #include "dbglocal.h" 21 22 extern "C" { 21 23 22 24 //****************************************************************************** … … 67 69 //****************************************************************************** 68 70 //****************************************************************************** 71 72 } // extern "C" -
trunk/src/kernel32/ole2nls.c
r21355 r21916 16 16 #include <heapstring.h> 17 17 #include <ctype.h> 18 #ifndef __GNUC__ 18 19 #include <wcstr.h> 20 #endif 19 21 #endif 20 22 … … 1926 1928 #ifdef __WIN32OS2__ 1927 1929 /* For WCHAR we better use the WCHAR toupper/lower. 1928 * (VAC308 toupper/tolower doesn't do range checks according to standards 1930 * (VAC308 toupper/tolower doesn't do range checks according to standards 1929 1931 * which may cause illegal memory reads access when misused like it were here. 1930 1932 */ -
trunk/src/kernel32/ordinals.cpp
r6646 r21916 13 13 *****************************************************************************/ 14 14 #include <os2win.h> 15 #include <string.h> 15 16 #include <winnls.h> 16 17 #include "unicode.h" 17 18 #include "handlemanager.h" 18 #include <string.h>19 19 20 20 #include "stubs.h" … … 32 32 *****************************************************************************/ 33 33 34 35 36 34 /***************************************************************************** 37 35 * Prototypes * 38 36 *****************************************************************************/ 37 38 extern "C" { 39 39 40 40 /***************************************************************************** … … 142 142 arg3)); 143 143 } 144 145 } // extern "C" -
trunk/src/kernel32/os2heap.h
r7728 r21916 42 42 ~OS2Heap(); 43 43 44 HANDLE INLINEgetHeapHandle() { return(hPrimaryHeap); };44 HANDLE getHeapHandle() { return(hPrimaryHeap); }; 45 45 46 46 LPVOID Alloc(DWORD dwFlags, DWORD dwBytes); -
trunk/src/kernel32/oslibdebug.cpp
r10433 r21916 23 23 #include <string.h> 24 24 #include <misc.h> 25 #include <windllbase.h>25 #include "windllbase.h" 26 26 #include <winconst.h> 27 27 #include "oslibdebug.h" … … 42 42 typedef struct 43 43 { 44 LP STR pszMsg;44 LPCSTR pszMsg; 45 45 UINT msg; 46 46 } MSGDESC, *PMSGDESC; … … 65 65 INT gcMessages = sizeof(debugMsgs) / sizeof(MSGDESC); 66 66 67 c har *GetDebugMsgText(int Msg)67 const char *GetDebugMsgText(int Msg) 68 68 { 69 69 static char msgtxt[64]; -
trunk/src/kernel32/oslibdos.cpp
r21675 r21916 88 88 static CDDRVLTR cdDrvLtr = {0xffff, 0xffff}; 89 89 90 extern "C" { 90 91 91 92 /******************************************************************************* … … 98 99 static ULONG crc32str(const char *psz); 99 100 100 char* ODINHelperStripUNC(char*strUNC)101 { 102 char *retStr = strUNC;101 LPCSTR ODINHelperStripUNC(LPCSTR strUNC) 102 { 103 LPCSTR retStr = strUNC; 103 104 104 105 if (!strUNC) return NULL; … … 460 461 //****************************************************************************** 461 462 //****************************************************************************** 462 DWORD OSLibDosOpen( char *lpszFileName, DWORD flags)463 DWORD OSLibDosOpen(LPCSTR lpszFileName, DWORD flags) 463 464 { 464 465 APIRET rc; … … 721 722 //****************************************************************************** 722 723 //****************************************************************************** 723 BOOL OSLibDosDelete( char *lpszFileName)724 BOOL OSLibDosDelete(LPCSTR lpszFileName) 724 725 { 725 726 APIRET rc; … … 850 851 DWORD WIN32API GetEnvironmentVariableA(LPCSTR, LPSTR, DWORD ); 851 852 //****************************************************************************** 852 DWORD OSLibDosSearchPath(DWORD cmd, char *path, char *name, char *full_name,853 DWORD length_fullname)853 DWORD OSLibDosSearchPath(DWORD cmd, LPCSTR path, LPCSTR name, 854 LPSTR full_name, DWORD length_fullname) 854 855 { 855 856 switch(cmd) { … … 947 948 APIRET rc = ERROR_NOT_ENOUGH_MEMORY; 948 949 949 CHAR*lpszFileLoc = ODINHelperStripUNC(lpszFile);950 LPCSTR lpszFileLoc = ODINHelperStripUNC(lpszFile); 950 951 951 952 //TODO: lpSecurityAttributes (inheritance) … … 3589 3590 } 3590 3591 3592 } // extern "C" 3593 -
trunk/src/kernel32/oslibdos.h
r21564 r21916 17 17 #endif 18 18 19 char* ODINHelperStripUNC(char*strUNC);19 LPCSTR ODINHelperStripUNC(LPCSTR strUNC); 20 20 21 21 #ifdef OS2_INCLUDED … … 46 46 #define OSLIB_ACCESS_SHAREDENYWRITE 16 47 47 48 DWORD OSLibDosOpen( char *lpszFileName, DWORD flags);48 DWORD OSLibDosOpen(LPCSTR lpszFileName, DWORD flags); 49 49 BOOL OSLibDosClose(DWORD hFile); 50 BOOL OSLibDosDelete( char *lpszFileName);50 BOOL OSLibDosDelete(LPCSTR lpszFileName); 51 51 BOOL OSLibDosCopyFile(LPCSTR lpszOldFile, LPCSTR lpszNewFile, BOOL fFailIfExist); 52 52 BOOL OSLibDosMoveFile(LPCSTR lpszOldFile, LPCSTR lpszNewFile); … … 65 65 #define OSLIB_SEARCHENV 4 66 66 67 DWORD OSLibDosSearchPath(DWORD cmd, char *path, char *name, char *full_name, DWORD length_fullname); 67 DWORD OSLibDosSearchPath(DWORD cmd, LPCSTR path, LPCSTR name, 68 LPSTR full_name, DWORD length_fullname); 68 69 69 70 #ifndef FIL_QUERYFULLNAME … … 366 367 #endif 367 368 369 #ifdef __cplusplus 370 INLINE LPSTR ODINHelperStripUNC(LPSTR strUNC) 371 { 372 return (LPSTR)ODINHelperStripUNC((LPCSTR) strUNC); 373 } 374 #endif 375 368 376 #endif //__OSLIBDOS_H__ 369 377 -
trunk/src/kernel32/osliblvm.cpp
r21583 r21916 21 21 #include <win32type.h> 22 22 #include <winconst.h> 23 #include <win \winioctl.h>23 #include <win/winioctl.h> 24 24 #include "osliblvm.h" 25 25 … … 89 89 rc = DosQueryProcAddr(hModLVM, 0, "Write_Sectors", (PFN *)&pfnWrite_Sectors); 90 90 if(rc) goto fail; 91 91 92 92 return TRUE; 93 93 … … 267 267 Volume_Control_Array *volctrl; 268 268 CARDINAL32 lasterror; 269 269 270 270 if(!hModLVM) { 271 271 dprintf(("LVM dll not loaded -> fail")); … … 310 310 //****************************************************************************** 311 311 //****************************************************************************** 312 BOOL OSLibLVMQueryVolumeName(HANDLE hVolumeControlData, ULONG *pVolIndex, 312 BOOL OSLibLVMQueryVolumeName(HANDLE hVolumeControlData, ULONG *pVolIndex, 313 313 LPSTR lpszVolumeName, DWORD cchBufferLength) 314 314 { … … 346 346 static Volume_Information_Record OSLibLVMFindVolumeByDriveLetter(ULONG driveLetter, 347 347 Volume_Control_Record *pVolRec, 348 CARDINAL32 *lasterror) 348 CARDINAL32 *lasterror) 349 349 { 350 350 Volume_Control_Array *volctrl; … … 356 356 return volinfo; 357 357 } 358 for(int i=0;i<volctrl->Count;i++) { 358 int i; 359 for(i=0;i<volctrl->Count;i++) { 359 360 volinfo = Get_Volume_Information(volctrl->Volume_Control_Data[i].Volume_Handle, lasterror); 360 361 if(*lasterror != LVM_ENGINE_NO_ERROR) { … … 384 385 static Volume_Information_Record OSLibLVMFindVolumeByName(LPSTR pszVolName, 385 386 Volume_Control_Record *pVolRec, 386 CARDINAL32 *lasterror) 387 CARDINAL32 *lasterror) 387 388 { 388 389 Volume_Control_Array *volctrl; … … 394 395 return volinfo; 395 396 } 396 for(int i=0;i<volctrl->Count;i++) { 397 int i; 398 for(i=0;i<volctrl->Count;i++) { 397 399 volinfo = Get_Volume_Information(volctrl->Volume_Control_Data[i].Volume_Handle, lasterror); 398 400 if(*lasterror != LVM_ENGINE_NO_ERROR) { … … 499 501 return FALSE; 500 502 } 501 for(int i=0;i<diskinfo.Count;i++) { 503 int i; 504 for(i=0;i<diskinfo.Count;i++) { 502 505 if(diskinfo.Drive_Control_Data[i].Drive_Handle == partctrl.Partition_Array[0].Drive_Handle) { 503 506 //win32 base = 0, os2 base = 1 … … 564 567 // - -1 if volume wasn't found 565 568 // - 0 if volume is present, but not mounted 566 // 569 // 567 570 //****************************************************************************** 568 571 CHAR OSLibLVMQueryDriveFromVolumeName(LPCSTR lpszVolume) … … 596 599 //****************************************************************************** 597 600 //****************************************************************************** 598 DWORD OSLibLVMQueryVolumeSerialAndName(LPSTR lpszVolume, LPDWORD lpVolumeSerialNumber, 601 DWORD OSLibLVMQueryVolumeSerialAndName(LPSTR lpszVolume, LPDWORD lpVolumeSerialNumber, 599 602 LPSTR lpVolumeNameBuffer, DWORD nVolumeNameSize) 600 603 { … … 621 624 //****************************************************************************** 622 625 //****************************************************************************** 623 BOOL OSLibLVMGetVolumeNameForVolumeMountPoint(LPCSTR lpszVolumeMountPoint, 624 LPSTR lpszVolumeName, 626 BOOL OSLibLVMGetVolumeNameForVolumeMountPoint(LPCSTR lpszVolumeMountPoint, 627 LPSTR lpszVolumeName, 625 628 DWORD cchBufferLength) 626 629 { … … 665 668 strncpy(lpszOS2VolumeName, &lpszWin32VolumeName[sizeof(VOLUME_NAME_PREFIX)-1+1], cchBufferLength-1); //-zero term + starting '{' 666 669 length -= sizeof(VOLUME_NAME_PREFIX)-1+1; 667 if(lpszOS2VolumeName[length-2] == '}') 670 if(lpszOS2VolumeName[length-2] == '}') 668 671 { 669 672 lpszOS2VolumeName[length-2] = 0; … … 671 674 } 672 675 else 673 if(lpszOS2VolumeName[length-1] == '}') 676 if(lpszOS2VolumeName[length-1] == '}') 674 677 { 675 678 lpszOS2VolumeName[length-1] = 0; -
trunk/src/kernel32/osliblvm.h
r9693 r21916 15 15 #endif 16 16 17 #include <win \winioctl.h>17 #include <win/winioctl.h> 18 18 19 19 #ifdef OS2_INCLUDED … … 30 30 typedef unsigned long LBA; 31 31 32 /* Define a Partition Sector Number. A Partition Sector Number is 33 relative to the start of a partition. The first sector in a partition 32 /* Define a Partition Sector Number. A Partition Sector Number is 33 relative to the start of a partition. The first sector in a partition 34 34 is PSN 0. */ 35 35 typedef unsigned long PSN; … … 330 330 HANDLE OSLibLVMQueryVolumeControlData(); 331 331 void OSLibLVMFreeVolumeControlData(HANDLE hVolumeControlData); 332 BOOL OSLibLVMQueryVolumeName(HANDLE hVolumeControlData, ULONG *pVolIndex, 332 BOOL OSLibLVMQueryVolumeName(HANDLE hVolumeControlData, ULONG *pVolIndex, 333 333 LPSTR lpszVolumeName, DWORD cchBufferLength); 334 334 … … 338 338 ULONG OSLibLVMGetDriveType(LPCSTR lpszVolume); 339 339 CHAR OSLibLVMQueryDriveFromVolumeName(LPCSTR lpszVolume); 340 BOOL OSLibLVMGetVolumeNameForVolumeMountPoint(LPCSTR lpszVolumeMountPoint, LPSTR lpszVolumeName, 340 BOOL OSLibLVMGetVolumeNameForVolumeMountPoint(LPCSTR lpszVolumeMountPoint, LPSTR lpszVolumeName, 341 341 DWORD cchBufferLength); 342 342 -
trunk/src/kernel32/oslibmem.cpp
r21339 r21916 31 31 #include <win32api.h> 32 32 #include <winconst.h> 33 #include <win \winioctl.h>33 #include <win/winioctl.h> 34 34 #include <dbglog.h> 35 35 #include <vmutex.h> … … 91 91 tmp = allocrecords; 92 92 while(tmp->next) { 93 if(tmp->next->baseaddr > baseaddr) { 93 if(tmp->next->baseaddr > baseaddr) { 94 94 break; 95 95 } … … 121 121 tmp = allocrecords; 122 122 while(tmp->next) { 123 if(tmp->next->baseaddr == baseaddr) { 123 if(tmp->next->baseaddr == baseaddr) { 124 124 break; 125 125 } … … 181 181 DWORD pAlias = (DWORD)*ppbAlias; 182 182 183 while(pAlias < (DWORD)*ppbAlias + cb) 183 while(pAlias < (DWORD)*ppbAlias + cb) 184 184 { 185 185 rc = DosQueryMem((PVOID)pAlias, &size, &attr); … … 189 189 return rc; 190 190 } 191 //Don't bother if the pages are not committed. DosSetMem will return 192 //ERROR_ACCESS_DENIED. 191 //Don't bother if the pages are not committed. DosSetMem will return 192 //ERROR_ACCESS_DENIED. 193 193 if(attr & PAG_COMMIT) { 194 194 rc = DosSetMem((PVOID)pAlias, size, fl); … … 325 325 fMemFlags = 0; 326 326 } 327 327 328 328 /* 329 329 * Let's try use the extended DosAllocMem API of Win32k.sys. … … 358 358 } 359 359 // already 64k aligned ? 360 if((ULONG) pvMemAddr & 0xFFFF) 360 if((ULONG) pvMemAddr & 0xFFFF) 361 361 { 362 362 ULONG addr64kb; … … 371 371 return rc; 372 372 } 373 373 374 374 PVOID baseAddr = (PVOID)addr64kb; // sunlover20040613: save returned address for a possible Free on failure 375 375 376 376 dprintf(("Allocate aligned memory %x -> %x", addr64kb, (addr64kb + 0xFFFF) & ~0xFFFF)); 377 377 … … 409 409 410 410 *lpAttr = 0; 411 411 412 412 if(FindAllocRec((ULONG)lpMemAddr, &ulBase, &ulSize, lpAttr) == TRUE) { 413 413 return (PVOID)ulBase; 414 414 } 415 415 416 416 ulSize = PAGE_SIZE; 417 417 rc = DosQueryMem(lpMemAddr, &ulSize, &ulAttr); … … 463 463 464 464 //Find base within previous 64kb (alignment can add filler pages) 465 for(int i=0;i<16;i++) { 465 int i; 466 for(i=0;i<16;i++) { 466 467 rc = DosQueryMem((PVOID)ulAddr, &ulSize, &ulAttr); 467 468 if(rc != NO_ERROR) { … … 482 483 } 483 484 FreeAllocRec((ULONG)lpMemAddr); 484 485 485 486 RasRemoveObject (rthVirtual, (ULONG)lpMemAddr); 486 487 -
trunk/src/kernel32/oslibwps.cpp
r9889 r21916 37 37 *pszFilename1 = 0; 38 38 } 39 40 extern "C" { 41 39 42 //****************************************************************************** 40 43 // ODIN_DisableFolderShellLink 41 44 // 42 // Disable object creation in Odin folder. Desktop shortcuts will still be 45 // Disable object creation in Odin folder. Desktop shortcuts will still be 43 46 // created as WPS objects on the desktop. 44 47 // … … 84 87 } 85 88 } 86 else { 89 else { 87 90 dprintf(("OSLibWinCreateObject: pszLink == NULL!!")); 88 91 goto fail; … … 115 118 116 119 fWin32App = ODIN_IsWin32App(pszPath); 117 if(!fWin32App) 120 if(!fWin32App) 118 121 {//don't use the PE loader; use the program path directly 119 122 sprintf(pszSetupString, "PROGTYPE=PM;OBJECTID=<%s%s>;EXENAME=%s;SET BEGINLIBPATH=%s;STARTUPDIR=%s;ICONFILE=%s;PARAMETERS=", (fDesktop) ? WPS_SHELLLINK_DESKTOP : "", pszName, pszPath, szSystemDir, szWorkDir, pszIcoPath); … … 182 185 strcpy(szLinkFile, lpszLink); 183 186 strupr(szLinkFile); 184 if(strstr(szLinkFile, ".LNK")) 187 if(strstr(szLinkFile, ".LNK")) 185 188 {//could be a shelllink file, check for magic string at start of the file 186 189 FILE *lnkfile; … … 190 193 191 194 char szMagic[sizeof(WPS_SHELLLINK_MAGIC)]; 192 195 193 196 memset(szMagic, 0, sizeof(szMagic)); 194 197 fread(szMagic, sizeof(szMagic)-1, 1, lnkfile); … … 203 206 //****************************************************************************** 204 207 // OSLibWinDeleteObject 205 // 208 // 206 209 // Delete object with object id stored in the file 207 210 // 208 211 // Parameters: 209 // 212 // 210 213 // LPSTR lpszLink - shelllink file 211 214 // … … 226 229 227 230 char szMagic[sizeof(WPS_SHELLLINK_MAGIC)]; 228 231 229 232 memset(szMagic, 0, sizeof(szMagic)); 230 233 fread(szMagic, sizeof(szMagic)-1, 1, lnkfile); 231 234 232 if(!strcmp(szMagic, WPS_SHELLLINK_MAGIC)) 235 if(!strcmp(szMagic, WPS_SHELLLINK_MAGIC)) 233 236 { 234 237 fseek(lnkfile, 0, SEEK_END); 235 238 wpsobjectidsize = ftell(lnkfile) - sizeof(WPS_SHELLLINK_MAGIC) + 2; 236 239 fseek(lnkfile, sizeof(WPS_SHELLLINK_MAGIC)-1, SEEK_SET); 237 240 238 241 memset(szObjectId, 0, sizeof(szObjectId)); 239 242 szObjectId[0] = '<'; … … 251 254 //****************************************************************************** 252 255 //****************************************************************************** 256 257 } // extern "C" -
trunk/src/kernel32/overlappedio.cpp
r10185 r21916 179 179 //****************************************************************************** 180 180 //****************************************************************************** 181 DWORD CALLBACK OverlappedIO Thread(LPVOID lpThreadParam)181 DWORD CALLBACK OverlappedIOHandler::OverlappedIOThread(LPVOID lpThreadParam) 182 182 { 183 183 LPOVERLAPPED_THREAD_PARAM threadparam = (LPOVERLAPPED_THREAD_PARAM)lpThreadParam; … … 281 281 else lpRequest->dwLastError = lpWriteHandler(lpRequest, &dwResult, NULL); 282 282 283 if(!lpRequest->fCancelled) 283 if(!lpRequest->fCancelled) 284 284 { 285 285 lpOverlapped->Internal = lpRequest->dwLastError; … … 533 533 for(int i=ASYNC_INDEX_READ;i<NR_ASYNC_OPERATIONS;i++) 534 534 { 535 while(TRUE) 535 while(TRUE) 536 536 { 537 537 lpRequest = findAndRemoveRequest(i, hHandle); -
trunk/src/kernel32/perfview.cpp
r7413 r21916 28 28 #else 29 29 30 #include <process.h> 31 30 32 #include <ccollection.h> 31 33 #include <winbase.h> 32 34 33 35 // imported from the kernel loader (initterm) 34 extern int loadNr;35 36 extern char kernel32Path[]; 36 37 … … 348 349 char szFilename[260]; 349 350 350 sprintf(szFilename, "perf_%d.log", loadNr);351 sprintf(szFilename, "perf_%d.log", getpid()); 351 352 _privateLogFile = fopen(szFilename, "w"); 352 353 353 354 if(_privateLogFile == NULL) 354 355 { 355 sprintf(szFilename, "%sperf_%d.log", kernel32Path, loadNr);356 sprintf(szFilename, "%sperf_%d.log", kernel32Path, getpid()); 356 357 _privateLogFile = fopen(szFilename, "w"); 357 358 } -
trunk/src/kernel32/process.cpp
r10445 r21916 27 27 #include <misc.h> 28 28 #include <wprocess.h> 29 #include <win \task.h>30 #include <winimagebase.h>29 #include <win/task.h> 30 #include "winimagebase.h" 31 31 #include "oslibdos.h" 32 32 … … 40 40 static DWORD ProcessAffinityMask = 1; 41 41 static PDB *PROCESS_First = &ProcessPDB; 42 43 extern "C" { 42 44 43 45 /*********************************************************************** … … 151 153 * GetProcessHeaps [KERNEL32.376] 152 154 */ 153 DWORD WINAPI GetProcessHeaps(DWORD nrofheaps,HANDLE *heaps) 155 DWORD WINAPI GetProcessHeaps(DWORD nrofheaps,HANDLE *heaps) 154 156 { 155 157 dprintf(("GetProcessHeaps: (%ld,%p), incomplete implementation.\n",nrofheaps,heaps)); … … 310 312 if ( !process ) return 0; 311 313 312 switch ( offset ) 314 switch ( offset ) 313 315 { 314 316 case GPD_APP_COMPAT_FLAGS: … … 379 381 380 382 /*********************************************************************** 381 * ODIN_SetProcessDword 383 * ODIN_SetProcessDword 382 384 * 383 385 * SvL: Special version that allows the caller to change some values … … 391 393 if ( !process ) return; 392 394 393 switch ( offset ) 395 switch ( offset ) 394 396 { 395 397 case GPD_STARTF_SHOWWINDOW: … … 424 426 if ( !process ) return; 425 427 426 switch ( offset ) 428 switch ( offset ) 427 429 { 428 430 case GPD_APP_COMPAT_FLAGS: … … 444 446 445 447 case GPD_USERDATA: 446 process->process_dword = value; 448 process->process_dword = value; 447 449 break; 448 450 … … 488 490 if(!NtdllRtlExtendedIntegerMultiply) { 489 491 HINSTANCE hInstance = LoadLibraryA("NTDLL.DLL"); 490 if(hInstance) 492 if(hInstance) 491 493 *(VOID **)&NtdllRtlExtendedIntegerMultiply=(void*)GetProcAddress(hInstance, (LPCSTR)"RtlExtendedIntegerMultiply"); 492 494 } … … 515 517 //****************************************************************************** 516 518 //****************************************************************************** 519 520 } // extern "C" 521 -
trunk/src/kernel32/profile.cpp
r21355 r21916 219 219 PROFILESECTION **next_section; 220 220 PROFILEKEY *key, *prev_key, **next_key; 221 222 if (file == NULL) 223 return NULL; 221 224 222 225 first_section = (PROFILESECTION *)HEAP_xalloc( SystemHeap, 0, sizeof(*section) ); … … 772 775 } 773 776 777 extern "C" { 778 774 779 int WIN32API PROFILE_SetOdinIniString(LPCSTR section_name, LPCSTR key_name, 775 780 LPCSTR value) … … 1002 1007 if ( (p = getenv( "ODIN_INI" )) && (f = fopen( p, "r" )) ) 1003 1008 { 1004 PROFILE_OdinProfile = PROFILE_Load( f );1005 fclose( f );1006 strncpy(PROFILE_OdinIniUsed,p,MAX_PATHNAME_LEN);1007 PROFILE_OdinIniUsed[MAX_PATHNAME_LEN-1] = 0;1009 PROFILE_OdinProfile = PROFILE_Load( f ); 1010 fclose( f ); 1011 strncpy(PROFILE_OdinIniUsed,p,MAX_PATHNAME_LEN); 1012 PROFILE_OdinIniUsed[MAX_PATHNAME_LEN-1] = 0; 1008 1013 } 1009 1014 else 1010 1015 { 1011 #if 0 /* Aug 27 2000 4:26am: Why not use the global kernel32Path 1012 * (LoadLibrary may cause harm if used...) */ 1013 HINSTANCE hInstance = LoadLibraryA("KERNEL32.DLL"); 1014 GetModuleFileNameA(hInstance,PROFILE_OdinIniUsed,sizeof(PROFILE_OdinIniUsed)); 1015 FreeLibrary(hInstance); 1016 strcpy(strrchr(PROFILE_OdinIniUsed,'\\')+1,ODINININAME); 1017 #else 1018 strcpy(PROFILE_OdinIniUsed, kernel32Path); 1019 strcat(PROFILE_OdinIniUsed, ODINININAME); 1020 #endif 1021 f = fopen(PROFILE_OdinIniUsed, "r"); 1022 PROFILE_OdinProfile = PROFILE_Load(f); 1023 fclose(f); 1016 strcpy(PROFILE_OdinIniUsed, kernel32Path); 1017 strcat(PROFILE_OdinIniUsed, ODINININAME); 1018 if ((f = fopen(PROFILE_OdinIniUsed, "r"))) 1019 { 1020 PROFILE_OdinProfile = PROFILE_Load(f); 1021 fclose(f); 1022 } 1024 1023 } 1025 1024 … … 1408 1407 *p='\0'; 1409 1408 ret = PROFILE_SetString( section, buf, p+1 ); 1410 1409 1411 1410 } 1412 1411 HeapFree( GetProcessHeap(), 0, buf ); … … 1637 1636 * CloseProfileUserMapping (KERNEL.138) 1638 1637 */ 1639 BOOL WINAPI CloseProfileUserMapping(void) 1638 BOOL WINAPI CloseProfileUserMapping(void) 1640 1639 { 1641 1640 dprintf(("CloseProfileUserMapping: STUB")); … … 1649 1648 } 1650 1649 1650 } // extern "C" 1651 -
trunk/src/kernel32/profile.h
r10528 r21916 14 14 #define ODINININAME "ODIN.INI" 15 15 16 void WINAPI WriteOutProfiles(void); 16 #ifdef __cplusplus 17 extern "C" { 18 #endif 19 17 20 int WINAPI PROFILE_Initialize (void); 18 int WINAPI PROFILE_LoadOdinIni(void);19 21 20 22 #ifdef DEBUG … … 45 47 #endif 46 48 47 #include <win\options.h> //for odin profile apis 49 #ifdef __cplusplus 50 } // extern "C" 51 #endif 52 53 #include <win/options.h> //for odin profile apis 48 54 49 55 #endif -
trunk/src/kernel32/queue.h
r3059 r21916 17 17 { 18 18 public: 19 QueueItem ::QueueItem(ULONG dwItemData)19 QueueItem(ULONG dwItemData) 20 20 { 21 21 this->dwItemData = dwItemData; -
trunk/src/kernel32/registry.cpp
r21302 r21916 79 79 } 80 80 81 extern "C" { 82 81 83 void WIN32API SetRegistryRootKey(HKEY hRootkey, HKEY hKey) 82 84 { 83 85 switch((DWORD)hRootkey) 84 86 { 85 case HKEY_CLASSES_ROOT: 87 case HKEY_CLASSES_ROOT: 86 88 hKeyClassesRoot = hKey; 87 89 break; … … 112 114 LONG WIN32API RegCloseKey(HKEY hKey) 113 115 { 114 switch(hKey) 116 switch(hKey) 115 117 {//Closing a root key should just return success (matters for custom builds) 116 118 case HKEY_CLASSES_ROOT: … … 166 168 astring, 167 169 phkResult); 168 170 169 171 if (NULL != astring) 170 172 FreeAsciiString(astring); 171 173 172 174 return(rc); 173 175 } … … 247 249 phkResult, 248 250 lpdwDisposition); 249 251 250 252 if (NULL != astring1) 251 253 FreeAsciiString(astring1); 252 254 253 255 if (NULL != astring2) 254 256 FreeAsciiString(astring2); 255 257 256 258 return(rc); 257 259 } … … 278 280 rc = O32_RegDeleteKey(ConvertKey(hKey), 279 281 astring); 280 282 281 283 if (NULL != astring) 282 284 FreeAsciiString(astring); 283 285 284 286 return(rc); 285 287 } … … 317 319 *****************************************************************************/ 318 320 319 LONG WIN32API RegDeleteValueA(HKEY hKey, LP STR lpszValue)321 LONG WIN32API RegDeleteValueA(HKEY hKey, LPCSTR lpszValue) 320 322 { 321 323 return O32_RegDeleteValue(ConvertKey(hKey), … … 336 338 *****************************************************************************/ 337 339 338 LONG WIN32API RegDeleteValueW(HKEY hKey, LP WSTR lpszValue)340 LONG WIN32API RegDeleteValueW(HKEY hKey, LPCWSTR lpszValue) 339 341 { 340 342 char *astring = UnicodeToAsciiString(lpszValue); … … 343 345 rc = O32_RegDeleteValue(ConvertKey(hKey), 344 346 astring); 345 347 346 348 if (NULL != astring) 347 349 FreeAsciiString(astring); 348 350 349 351 return(rc); 350 352 } … … 385 387 *****************************************************************************/ 386 388 387 LONG WIN32API RegEnumKeyW(HKEY hKey, DWORD iSubKey, LPWSTR lpszName, 389 LONG WIN32API RegEnumKeyW(HKEY hKey, DWORD iSubKey, LPWSTR lpszName, 388 390 DWORD cchName) 389 391 { … … 529 531 * Author : Patrick Haller [Tue, 1998/06/16 23:00] 530 532 *****************************************************************************/ 531 533 532 534 LONG WIN32API RegEnumValueW(HKEY hkey, 533 535 DWORD iValue, … … 638 640 if(rc) 639 641 *arg3 = 0; 640 642 641 643 if (NULL != astring) 642 644 FreeAsciiString(astring); 643 645 644 646 return(rc); 645 647 } … … 705 707 if(rc) 706 708 *arg5 = 0; 707 709 708 710 if (NULL != astring) 709 711 FreeAsciiString(astring); 710 712 711 713 return(rc); 712 714 } … … 741 743 lpcchClass, lpdwReserved, lpcSubKeys, 742 744 lpcchMaxSubKey, lpcchMaxClass, lpcValues, 743 lpcchMaxValueName, lpcbMaxValueData, 745 lpcchMaxValueName, lpcbMaxValueData, 744 746 lpcbSecurityDescriptor,lpftLastWriteTime); 745 747 } … … 776 778 lpcchClass, lpdwReserved, lpcSubKeys, 777 779 lpcchMaxSubKey, lpcchMaxClass, lpcValues, 778 lpcchMaxValueName, lpcbMaxValueData, 780 lpcchMaxValueName, lpcbMaxValueData, 779 781 lpcbSecurityDescriptor,lpftLastWriteTime); 780 782 if(rc == ERROR_SUCCESS) … … 786 788 free(astring); 787 789 } 788 else 790 else 789 791 if(lpszClass) *lpszClass = 0; 790 792 } … … 852 854 } 853 855 854 if((rc == ERROR_SUCCESS || rc == ERROR_MORE_DATA) && 855 pcbValue) 856 if((rc == ERROR_SUCCESS || rc == ERROR_MORE_DATA) && 857 pcbValue) 856 858 { 857 859 *pcbValue = *pcbValue * sizeof(WCHAR); //size in bytes!! 858 860 } 859 861 860 862 if (NULL != astring1) 861 863 FreeAsciiString(astring1); 862 864 863 865 return(rc); 864 866 } … … 986 988 } 987 989 988 if((rc == ERROR_SUCCESS || rc == ERROR_MORE_DATA) && 989 lpcbData) 990 if((rc == ERROR_SUCCESS || rc == ERROR_MORE_DATA) && 991 lpcbData) 990 992 { 991 993 switch(*lpdwType) { … … 1001 1003 if (NULL != astring) 1002 1004 FreeAsciiString(astring); 1003 1005 1004 1006 if(akeydata) 1005 1007 free(akeydata); … … 1073 1075 1074 1076 rc = RegSetValueA(hkey, astring1, dwType, astring2, cbData); 1075 1077 1076 1078 if (NULL != astring1) 1077 1079 FreeAsciiString(astring1); 1078 1080 1079 1081 if (NULL != astring2) 1080 1082 FreeAsciiString(astring2); 1081 1083 1082 1084 return(rc); 1083 1085 } … … 1100 1102 DWORD dwReserved, 1101 1103 DWORD fdwType, 1102 BYTE*lpbData,1104 const BYTE *lpbData, 1103 1105 DWORD cbData) 1104 1106 { … … 1165 1167 DWORD dwReserved, 1166 1168 DWORD fdwType, 1167 BYTE*lpbData,1169 const BYTE *lpbData, 1168 1170 DWORD cbData) 1169 1171 { … … 1184 1186 } 1185 1187 rc = RegSetValueExA(hkey, astring, dwReserved, fdwType, lpbData, cbData); 1186 1188 1187 1189 if(akeydata) 1188 1190 FreeAsciiString(akeydata); 1189 1191 1190 1192 if (NULL != astring) 1191 1193 FreeAsciiString(astring); 1192 1194 1193 1195 return(rc); 1194 1196 } … … 1715 1717 } 1716 1718 1719 } // extern "C" 1720 -
trunk/src/kernel32/resource.cpp
r8111 r21916 13 13 #include <os2win.h> 14 14 #include <unicode.h> 15 #include <winimagebase.h>16 #include <winexebase.h>17 #include <windllbase.h>15 #include "winimagebase.h" 16 #include "winexebase.h" 17 #include "windllbase.h" 18 18 19 19 #define DBG_LOCALLOG DBG_resource -
trunk/src/kernel32/seh/sehutil.s
r21662 r21916 178 178 subl $4, %esp 179 179 movl %eax, 0(%esp) 180 call odin_malloc /* _Optlink, rtl, EAX/EDX/ECX-in, caller cleans stack*/180 call _malloc /* __cdecl (and _Optlink compatible -> EAX/EDX/ECX-in) */ 181 181 addl $4, %esp 182 182 testl %eax, %eax … … 223 223 subl $4, %esp 224 224 movl %eax, 0(%esp) 225 call odin_free /* _Optlink, rtl, EAX/EDX/ECX-in, caller cleans stack*/225 call _free /* __cdecl (and _Optlink compatible -> EAX/EDX/ECX-in) */ 226 226 addl $4, %esp 227 227 -
trunk/src/kernel32/stubs.cpp
r21324 r21916 15 15 *****************************************************************************/ 16 16 #include <os2win.h> 17 #include <string.h> 17 18 #include <winnls.h> 18 19 #include "unicode.h" 19 20 #include "handlemanager.h" 20 #include <string.h>21 21 22 22 #include "stubs.h" … … 149 149 typedef DWORD CALID; 150 150 151 extern "C" { 151 152 152 153 /***************************************************************************** … … 1579 1580 } 1580 1581 1581 1582 } // extern "C" 1583 -
trunk/src/kernel32/thread.cpp
r21626 r21916 26 26 #include <cpuhlp.h> 27 27 #include <wprocess.h> 28 #include <windllbase.h>29 #include <winexebase.h>28 #include "windllbase.h" 29 #include "winexebase.h" 30 30 #include "exceptutil.h" 31 31 #include "oslibmisc.h" … … 61 61 //****************************************************************************** 62 62 //****************************************************************************** 63 extern "C" 63 64 HANDLE WIN32API CreateThread(LPSECURITY_ATTRIBUTES lpsa, 64 65 DWORD cbStack, … … 115 116 return pHandle->hmHandleData.hWin32Handle; 116 117 } 118 119 extern "C" { 120 117 121 /***************************************************************************** 118 122 * Name : HMGetThreadPriority … … 370 374 return (lpResult); /* deliver return code */ 371 375 } 376 377 } // extern "C" 378 372 379 /***************************************************************************** 373 380 * Name : HMSetThreadTerminated … … 397 404 return (lpResult); /* deliver return code */ 398 405 } 406 407 extern "C" { 408 399 409 //****************************************************************************** 400 410 //****************************************************************************** … … 459 469 #define MAX_CALLSTACK_SIZE 128 460 470 #ifdef DEBUG 461 static c har *pszLastCaller = NULL;471 static const char *pszLastCaller = NULL; 462 472 #endif 463 473 //****************************************************************************** 464 void WIN32API dbg_ThreadPushCall(c har *pszCaller)474 void WIN32API dbg_ThreadPushCall(const char *pszCaller) 465 475 { 466 476 #ifdef DEBUG … … 654 664 return FALSE; 655 665 } 666 667 } // extern "C" 668 656 669 //****************************************************************************** 657 670 //****************************************************************************** … … 670 683 //****************************************************************************** 671 684 //****************************************************************************** 672 DWORD OPEN32API Win32Thread Proc(LPVOID lpData)685 DWORD OPEN32API Win32Thread::Win32ThreadProc(LPVOID lpData) 673 686 { 674 687 EXCEPTION_FRAME exceptFrame; -
trunk/src/kernel32/thunk.cpp
r8449 r21916 23 23 #define DBG_LOCALLOG DBG_thunk 24 24 #include "dbglocal.h" 25 26 extern "C" { 25 27 26 28 /************************************************************************ … … 405 407 void WINAPI SUnMapLS_IP_EBP_40(CONTEXT86 *context) { x_SUnMapLS_IP_EBP_x(context,40); } 406 408 409 } // extern "C" 410 -
trunk/src/kernel32/time.cpp
r21302 r21916 36 36 #include "dbglocal.h" 37 37 38 extern "C" { 38 39 39 40 //****************************************************************************** 40 41 //File time (UTC) to MS-DOS date & time values (also UTC) 41 42 //****************************************************************************** 42 BOOL WIN32API FileTimeToDosDateTime(const FILETIME *lpFileTime, LPWORD lpDosDate, 43 BOOL WIN32API FileTimeToDosDateTime(const FILETIME *lpFileTime, LPWORD lpDosDate, 43 44 LPWORD lpDosTime) 44 45 { … … 60 61 return FALSE; 61 62 } 62 return O32_FileTimeToLocalFileTime(lpFileTime, lpLocalTime); 63 return O32_FileTimeToLocalFileTime(lpFileTime, lpLocalTime); 63 64 } 64 65 //****************************************************************************** 65 66 //Local time to File time (UTC) 66 67 //****************************************************************************** 67 BOOL WIN32API LocalFileTimeToFileTime(const FILETIME *lpLocalFileTime, 68 BOOL WIN32API LocalFileTimeToFileTime(const FILETIME *lpLocalFileTime, 68 69 LPFILETIME lpFileTime) 69 70 { … … 98 99 } 99 100 //****************************************************************************** 100 //MS-DOS date & time values (UTC) to File time (also UTC) 101 //MS-DOS date & time values (UTC) to File time (also UTC) 101 102 //****************************************************************************** 102 103 BOOL WIN32API DosDateTimeToFileTime(WORD wDosDate, WORD wDosTime, LPFILETIME pFileTime) 103 104 { 104 105 dprintf(("%x %x", wDosDate, wDosTime)); 105 106 106 107 if(pFileTime == NULL) { 107 108 SetLastError(ERROR_INVALID_PARAMETER); … … 117 118 } 118 119 //****************************************************************************** 119 //The GetLocalTime function retrieves the current local date and time. 120 //The GetLocalTime function retrieves the current local date and time. 120 121 //(in local time) 121 122 //****************************************************************************** … … 130 131 } 131 132 //****************************************************************************** 132 //The SetLocalTime function sets the current local time and date. 133 //The SetLocalTime function sets the current local time and date. 133 134 //(in local time) 134 135 //****************************************************************************** … … 143 144 } 144 145 //****************************************************************************** 145 //The GetSystemTime function retrieves the current system date and time. 146 //The GetSystemTime function retrieves the current system date and time. 146 147 //The system time is expressed in Coordinated Universal Time (UTC). 147 148 //****************************************************************************** … … 157 158 } 158 159 //****************************************************************************** 159 //The SetSystemTime function sets the current system time and date. 160 //The SetSystemTime function sets the current system time and date. 160 161 //The system time is expressed in Coordinated Universal Time (UCT). 161 162 //****************************************************************************** … … 185 186 } 186 187 //****************************************************************************** 187 static const LP STR szTZBias = "Bias";188 static const LP STR szTZActiveTimeBias = "ActiveTimeBias";189 190 static const LP WSTR szTZStandardName = (LPWSTR)L"StandardName";191 static const LP STR szTZStandardBias = "StandardBias";192 static const LP STR szTZStandardStart = "StandardStart";193 194 static const LP WSTR szTZDaylightName = (LPWSTR)L"DaylightName";195 static const LP STR szTZDaylightBias = "DaylightBias";196 static const LP STR szTZDaylightStart = "DaylightStart";197 static const LP STR KEY_WINDOWS_TZ = "SYSTEM\\CurrentControlSet\\Control\\TimeZoneInformation";188 static const LPCSTR szTZBias = "Bias"; 189 static const LPCSTR szTZActiveTimeBias = "ActiveTimeBias"; 190 191 static const LPCWSTR szTZStandardName = (LPCWSTR)L"StandardName"; 192 static const LPCSTR szTZStandardBias = "StandardBias"; 193 static const LPCSTR szTZStandardStart = "StandardStart"; 194 195 static const LPCWSTR szTZDaylightName = (LPCWSTR)L"DaylightName"; 196 static const LPCSTR szTZDaylightBias = "DaylightBias"; 197 static const LPCSTR szTZDaylightStart = "DaylightStart"; 198 static const LPCSTR KEY_WINDOWS_TZ = "SYSTEM\\CurrentControlSet\\Control\\TimeZoneInformation"; 198 199 //****************************************************************************** 199 200 DWORD WIN32API GetTimeZoneInformation(LPTIME_ZONE_INFORMATION lpTimeZone) … … 370 371 //****************************************************************************** 371 372 372 373 } // extern "C" 374 -
trunk/src/kernel32/virtual.cpp
r21675 r21916 23 23 #include <stdlib.h> 24 24 #include <string.h> 25 #include <win \virtual.h>26 #include <win \thread.h>25 #include <win/virtual.h> 26 #include <win/thread.h> 27 27 #include <heapstring.h> 28 28 #include <handlemanager.h> -
trunk/src/kernel32/windllbase.cpp
r21308 r21916 27 27 #include <string.h> 28 28 #include <stdlib.h> 29 #ifndef __GNUC__ 29 30 #include <iostream.h> 30 31 #include <fstream.h> 32 #endif 31 33 #include <misc.h> 32 34 #include <win32api.h> 33 35 #include <pefile.h> 34 #include <windllbase.h>35 #include <winimagepe2lx.h>36 #include <windllpe2lx.h>37 #include <winimagelx.h>38 #include <windlllx.h>36 #include "windllbase.h" 37 #include "winimagepe2lx.h" 38 #include "windllpe2lx.h" 39 #include "winimagelx.h" 40 #include "windlllx.h" 39 41 #include <wprocess.h> 40 42 #include "exceptions.h" … … 726 728 char renameddll[CCHMAXPATH]; 727 729 char *namestart; 728 c har *sectionname;730 const char *sectionname; 729 731 730 732 if(fWinToOS2) { … … 791 793 dll = head; 792 794 while(dll) { 793 if(str cmpi(szDllName, dll->szModule) == 0) {795 if(stricmp(szDllName, dll->szModule) == 0) { 794 796 dlllistmutex.leave(); 795 797 return(dll); -
trunk/src/kernel32/windllbase.h
r10397 r21916 13 13 #define __WINDLLBASE_H__ 14 14 15 #include <winimagebase.h>15 #include "winimagebase.h" 16 16 #include <odinlx.h> 17 17 #include <vmutex.h> -
trunk/src/kernel32/windlllx.cpp
r10397 r21916 24 24 #include <string.h> 25 25 #include <stdlib.h> 26 #ifndef __GNUC__ 26 27 #include <iostream.h> 27 28 #include <fstream.h> 29 #endif 28 30 #include <misc.h> 29 31 #include <win32type.h> 30 #include <windllbase.h>31 #include <windlllx.h>32 #include "windllbase.h" 33 #include "windlllx.h" 32 34 #include "winexepe2lx.h" 33 35 #include "winexepeldr.h" -
trunk/src/kernel32/windlllx.h
r10397 r21916 13 13 #define __WINDLLLX_H__ 14 14 15 #include <windllbase.h>16 #include <winimagelx.h>15 #include "windllbase.h" 16 #include "winimagelx.h" 17 17 18 18 #define HACK_NEVER_UNLOAD_LX_DLLS -
trunk/src/kernel32/windllpe2lx.cpp
r10397 r21916 27 27 #include <win32type.h> 28 28 #include <misc.h> 29 #include <windllpe2lx.h>30 #include <winexepe2lx.h>29 #include "windllpe2lx.h" 30 #include "winexepe2lx.h" 31 31 #include <wprocess.h> 32 32 #include <odinpe.h> … … 43 43 *******************************************************************************/ 44 44 extern BOOL fPeLoader; 45 46 extern "C" { 45 47 46 48 /** … … 134 136 } 135 137 138 } // extern "C" 136 139 137 140 /** -
trunk/src/kernel32/windllpe2lx.h
r10397 r21916 13 13 #define __WINDLLPE2LX_H__ 14 14 15 #include <windllbase.h>16 #include <winimagepe2lx.h>15 #include "windllbase.h" 16 #include "winimagepe2lx.h" 17 17 18 18 /** … … 25 25 public: 26 26 /** @cat Constructor/Destructor */ 27 Win32Pe2LxDll(HINSTANCE hinstance, BOOL fWin32k) throw(ULONG);27 Win32Pe2LxDll(HINSTANCE hinstance, BOOL fWin32k); 28 28 virtual ~Win32Pe2LxDll(); 29 29 DWORD init(); -
trunk/src/kernel32/windllpeldr.cpp
r10397 r21916 21 21 #include <string.h> 22 22 #include <stdlib.h> 23 #ifndef __GNUC__ 23 24 #include <iostream.h> 24 25 #include <fstream.h> 26 #endif 25 27 #include <misc.h> 26 28 #include <win32type.h> 27 29 #include <pefile.h> 28 #include <windllpeldr.h>30 #include "windllpeldr.h" 29 31 #include <wprocess.h> 30 32 -
trunk/src/kernel32/windllpeldr.h
r10397 r21916 13 13 #define __WINDLLPELDR_H__ 14 14 15 #include <windllbase.h>16 #include <winimagepeldr.h>15 #include "windllbase.h" 16 #include "winimagepeldr.h" 17 17 18 18 class Win32PeLdrDll : public Win32PeLdrImage, public Win32DllBase -
trunk/src/kernel32/winexebase.cpp
r9667 r21916 19 19 #include <string.h> 20 20 #include <stdlib.h> 21 #ifndef __GNUC__ 21 22 #include <iostream.h> 22 23 #include <fstream.h> 24 #endif 23 25 #include <misc.h> 24 26 #include <win32type.h> 25 #include <winexebase.h>26 #include <windllbase.h>27 #include "winexebase.h" 28 #include "windllbase.h" 27 29 #include <wprocess.h> 28 30 #include <pefile.h> … … 42 44 //****************************************************************************** 43 45 //****************************************************************************** 44 BOOL IsExeStarted()46 extern "C" BOOL IsExeStarted() 45 47 { 46 48 return fExeStarted; -
trunk/src/kernel32/winexebase.h
r9667 r21916 13 13 #define __WINEXEBASE_H__ 14 14 15 #include <winimagebase.h>15 #include "winimagebase.h" 16 16 17 17 typedef ULONG (* WIN32API WIN32EXEENTRY)(LPVOID); … … 31 31 32 32 virtual ULONG getDefaultStackSize(); 33 33 34 34 protected: 35 35 BOOL fConsoleApp; -
trunk/src/kernel32/winexedummy.cpp
r21302 r21916 21 21 #include <misc.h> 22 22 #include <win32type.h> 23 #include <winexedummy.h>23 #include "winexedummy.h" 24 24 #include <winconst.h> 25 25 #include <win32api.h> -
trunk/src/kernel32/winexedummy.h
r7797 r21916 13 13 #define __WINEXEDUMMY_H__ 14 14 15 #include <winexebase.h>16 #include <winimagelx.h>15 #include "winexebase.h" 16 #include "winimagelx.h" 17 17 #include <odinlx.h> 18 18 -
trunk/src/kernel32/winexelx.cpp
r21434 r21916 19 19 #include <string.h> 20 20 #include <stdlib.h> 21 #ifndef __GNUC__ 21 22 #include <iostream.h> 22 23 #include <fstream.h> 24 #endif 23 25 #include <misc.h> 24 26 #include <win32type.h> 25 #include <winexelx.h>27 #include "winexelx.h" 26 28 #include <winconst.h> 27 29 #include <win32api.h> -
trunk/src/kernel32/winexelx.h
r3074 r21916 13 13 #define __WINEXELX_H__ 14 14 15 #include <winexebase.h>16 #include <winimagelx.h>15 #include "winexebase.h" 16 #include "winimagelx.h" 17 17 #include <odinlx.h> 18 18 -
trunk/src/kernel32/winexepe2lx.cpp
r10397 r21916 49 49 BOOL Win32Pe2LxExe::fEarlyInit = FALSE; 50 50 51 extern "C" { 51 52 52 53 /** … … 235 236 //****************************************************************************** 236 237 //****************************************************************************** 238 239 } // extern "C" -
trunk/src/kernel32/winexepe2lx.h
r8436 r21916 13 13 #define __WINEXEPE2LX_H__ 14 14 15 #include <winexebase.h>16 #include <winimagepe2lx.h>15 #include "winexebase.h" 16 #include "winimagepe2lx.h" 17 17 18 18 -
trunk/src/kernel32/winexepeldr.cpp
r10397 r21916 19 19 #include <string.h> 20 20 #include <stdlib.h> 21 #ifndef __GNUC__ 21 22 #include <iostream.h> 22 23 #include <fstream.h> 24 #endif 23 25 #include <misc.h> 24 26 #include <win32type.h> 25 27 #include <win32api.h> 26 #include <winexepeldr.h>28 #include "winexepeldr.h" 27 29 #include <wprocess.h> 28 30 #include <pefile.h> … … 53 55 //Called by ring 3 pe loader to create win32 executable 54 56 //PE.EXE command line options: 55 // /OPT:[x1=y,x2=z,..] 57 // /OPT:[x1=y,x2=z,..] 56 58 // x = CURDIR -> set current directory to y 57 59 // (not other options available at this time) 58 60 //****************************************************************************** 61 extern "C" 59 62 DWORD WIN32API CreateWin32PeLdrExe(char *szFileName, char *szCmdLine, 60 char *peoptions, 63 char *peoptions, 61 64 ULONG reservedMem, ULONG ulPEOffset, 62 65 BOOL fConsoleApp, BOOL fVioConsole, … … 118 121 free(szFullCmdLine); 119 122 120 //Init console before loading executable as dlls might want to print 123 //Init console before loading executable as dlls might want to print 121 124 //something on the console while being loaded 122 if(WinExe->isConsoleApp()) 125 if(WinExe->isConsoleApp()) 123 126 { 124 127 dprintf(("Console application!\n")); … … 142 145 } 143 146 OS2UnsetExceptionHandler(&exceptFrame); 144 147 145 148 #ifdef PROFILE 146 149 // Note: after this point, we might start collecting performance … … 150 153 ProfilerEnable(TRUE); 151 154 #endif /* PROFILE */ 152 153 155 156 154 157 WinExe->start(); 155 158 -
trunk/src/kernel32/winexepeldr.h
r9667 r21916 13 13 #define __WINEXEPELDR_H__ 14 14 15 #include <winexebase.h>16 #include <winimagepeldr.h>15 #include "winexebase.h" 16 #include "winimagepeldr.h" 17 17 18 18 //Class for executables run by the ring 3 PE loader -
trunk/src/kernel32/winimagebase.cpp
r21339 r21916 28 28 #include <misc.h> 29 29 #include <win32type.h> 30 #include <winimagebase.h>31 #include <windllbase.h>32 #include <winexebase.h>33 #include <windlllx.h>30 #include "winimagebase.h" 31 #include "windllbase.h" 32 #include "winexebase.h" 33 #include "windlllx.h" 34 34 #include <pefile.h> 35 35 #include <unicode.h> … … 38 38 #include "initterm.h" 39 39 #include "directory.h" 40 #include <win \virtual.h>40 #include <win/virtual.h> 41 41 #include <winconst.h> 42 42 -
trunk/src/kernel32/winimagebase.h
r10397 r21916 20 20 #include <winconst.h> 21 21 #else 22 #include <win \winnls.h>22 #include <win/winnls.h> 23 23 #endif 24 24 -
trunk/src/kernel32/winimagelx.cpp
r10397 r21916 32 32 #include <misc.h> 33 33 #include <win32type.h> 34 #include <winimagebase.h>35 #include <winimagelx.h>36 #include <windllbase.h>37 #include <winexebase.h>38 #include <winexelx.h>39 #include <windlllx.h>34 #include "winimagebase.h" 35 #include "winimagelx.h" 36 #include "windllbase.h" 37 #include "winexebase.h" 38 #include "winexelx.h" 39 #include "windlllx.h" 40 40 #include <pefile.h> 41 41 #include <unicode.h> 42 42 #include "oslibmisc.h" 43 43 #include "initterm.h" 44 #include <win \virtual.h>44 #include <win/virtual.h> 45 45 46 46 #define DBG_LOCALLOG DBG_winimagelx -
trunk/src/kernel32/winimagelx.h
r10397 r21916 13 13 #define __WINIMAGELX_H__ 14 14 15 #include <winimagebase.h>15 #include "winimagebase.h" 16 16 17 17 class Win32LxImage : public virtual Win32ImageBase -
trunk/src/kernel32/winimagepe2lx.cpp
r10397 r21916 440 440 + strlen((char*)pLrec->pName) + 1 /* size of the filename */ 441 441 + 3) & ~3)); /* the size is align on 4 bytes boundrary */ 442 #ifdef __INNOTEK_LIBC__ 443 pLrec->pNextRec = (void **)(qsLrec_t*)((char*)pLrec->pObjInfo 444 + sizeof(qsLObjrec_t) * pLrec->ctObj); 445 #else 442 446 pLrec->pNextRec = (qsLrec_t*)((char*)pLrec->pObjInfo 443 447 + sizeof(qsLObjrec_t) * pLrec->ctObj); 448 #endif 444 449 } 445 450 if (pLrec->hmte == hmod) … … 549 554 550 555 /* loop thru the PE sections */ 551 for (int i = 0; i < pNtHdrs->FileHeader.NumberOfSections; i++) 556 int i; 557 for (i = 0; i < pNtHdrs->FileHeader.NumberOfSections; i++) 552 558 { 553 559 if (paSections[0].cbVirtual < paPESections[i].VirtualAddress) -
trunk/src/kernel32/winimagepe2lx.h
r10397 r21916 13 13 #define __WINIMAGEPE2LX_H__ 14 14 15 #include <winimagebase.h>15 #include "winimagebase.h" 16 16 17 17 -
trunk/src/kernel32/winimagepeldr.cpp
r21355 r21916 40 40 #include <stdlib.h> 41 41 42 #include <assert.h> 42 #ifdef DEBUG 43 #include <process.h> 43 44 //use a different logfile 44 45 #define PRIVATE_LOGGING 46 static FILE *_privateLogFile = NULL; 47 #endif 48 49 #include <assert.h> 45 50 #include <misc.h> 46 51 #include <win32api.h> … … 56 61 #include "oslibmisc.h" 57 62 #include "initterm.h" 58 #include <win \virtual.h>63 #include <win/virtual.h> 59 64 #include "oslibdos.h" 60 65 #include "oslibmem.h" … … 71 76 char szErrorModule[260] = ""; 72 77 73 #ifdef DEBUG74 static FILE *_privateLogFile = NULL;75 #endif76 77 78 ULONG WIN32API MissingApiOrd(char *parentimage, char *dllname, int ordinal); 78 79 ULONG WIN32API MissingApiName(char *parentimage, char *dllname, char *functionname); … … 86 87 char logname[CCHMAXPATH]; 87 88 88 sprintf(logname, "pe_%d.log", loadNr);89 sprintf(logname, "pe_%d.log", getpid()); 89 90 _privateLogFile = fopen(logname, "w"); 90 91 if(_privateLogFile == NULL) { 91 sprintf(logname, "%spe_%d.log", kernel32Path, loadNr);92 sprintf(logname, "%spe_%d.log", kernel32Path, getpid()); 92 93 _privateLogFile = fopen(logname, "w"); 93 94 } … … 603 604 for (i = 0; i < IMAGE_NUMBEROF_DIRECTORY_ENTRIES; i++) 604 605 { 605 c har *pszName;606 const char *pszName; 606 607 607 608 if(oh.DataDirectory[i].VirtualAddress && oh.DataDirectory[i].Size) { -
trunk/src/kernel32/winimagepeldr.h
r10397 r21916 13 13 #define __WINIMAGEPELDR_H__ 14 14 15 #include <winimagebase.h>15 #include "winimagebase.h" 16 16 17 17 #define SINGLE_PAGE 0 //commit single page -
trunk/src/kernel32/winimgres.cpp
r10471 r21916 26 26 27 27 #include <misc.h> 28 #include <winimagebase.h>28 #include "winimagebase.h" 29 29 #include <unicode.h> 30 30 #include <heapstring.h> … … 37 37 #define MAX_RES 17 38 38 typedef struct { 39 c har *typename;40 int 39 const char *typenam; 40 int namelen; 41 41 } STD_RESTYPE; 42 42 … … 131 131 typelen = strlen(lpszType); 132 132 133 for(int i=0;i<MAX_RES;i++) { 133 int i; 134 for(i=0;i<MAX_RES;i++) { 134 135 if(ResType[i].namelen && 135 136 ResType[i].namelen == typelen && 136 stricmp(lpszType, ResType[i].typenam e) == 0)137 stricmp(lpszType, ResType[i].typenam) == 0) 137 138 break; 138 139 } … … 186 187 typelen = strlen(astring1); 187 188 188 for(int i=0;i<MAX_RES;i++) { 189 int i; 190 for(i=0;i<MAX_RES;i++) { 189 191 if(ResType[i].namelen && 190 192 ResType[i].namelen == typelen && 191 stricmp(astring1, ResType[i].typenam e) == 0)193 stricmp(astring1, ResType[i].typenam) == 0) 192 194 break; 193 195 } … … 603 605 pstring = (PIMAGE_RESOURCE_DIR_STRING_U)((ULONG)pResRootDir + nameOffset); 604 606 int len = lstrlenWtoA( pstring->NameString, pstring->Length ); 605 char *typenam e= (char *)malloc( len + 1 );606 lstrcpynWtoA(typenam e, pstring->NameString, len + 1 );607 typenam e[len] = 0;608 609 fRet = lpEnumFunc(hmod, typenam e, lParam);610 free(typenam e);607 char *typenam = (char *)malloc( len + 1 ); 608 lstrcpynWtoA(typenam, pstring->NameString, len + 1 ); 609 typenam[len] = 0; 610 611 fRet = lpEnumFunc(hmod, typenam, lParam); 612 free(typenam); 611 613 } 612 614 else { -
trunk/src/kernel32/wintls.cpp
r21489 r21916 12 12 #include <os2win.h> 13 13 #include <string.h> 14 #include <winimagebase.h>14 #include "winimagebase.h" 15 15 #include <thread.h> 16 16 #include <wprocess.h> -
trunk/src/kernel32/wprocess.cpp
r21673 r21916 52 52 #include "shellapi.h" 53 53 54 #include <win \ntddk.h>55 #include <win \psapi.h>54 #include <win/ntddk.h> 55 #include <win/psapi.h> 56 56 57 57 #include <custombuild.h> … … 109 109 PFNLXDLLLOAD pfnLxDllLoadCallback = NULL; 110 110 111 extern "C" { 111 112 112 113 //****************************************************************************** … … 299 300 StartupInfo.cbReserved2 = NULL; 300 301 if (!StartupInfo.lpDesktop) 301 StartupInfo.lpDesktop = "Desktop";302 StartupInfo.lpDesktop = (LPSTR)"Desktop"; 302 303 if (!StartupInfo.lpTitle) 303 StartupInfo.lpTitle = "Title";304 StartupInfo.lpTitle = (LPSTR)"Title"; 304 305 ProcessENVDB.hStdin = StartupInfo.hStdInput = GetStdHandle(STD_INPUT_HANDLE); 305 306 ProcessENVDB.hStdout = StartupInfo.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE); … … 2987 2988 2988 2989 lpmodinfo->SizeOfImage = winmod->getImageSize(); 2989 lpmodinfo->EntryPoint = winmod->getEntryPoint();2990 lpmodinfo->EntryPoint = (LPVOID)winmod->getEntryPoint(); 2990 2991 lpmodinfo->lpBaseOfDll = (void*)hModule; 2991 2992 … … 3058 3059 } 3059 3060 3061 } // extern "C" 3062
Note:
See TracChangeset
for help on using the changeset viewer.