- Timestamp:
- May 2, 2000, 10:53:15 PM (25 years ago)
- Location:
- trunk/src/kernel32
- Files:
-
- 2 added
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/Fileio.cpp
r3380 r3483 1 /* $Id: Fileio.cpp,v 1. 29 2000-04-15 10:00:44sandervl Exp $ */1 /* $Id: Fileio.cpp,v 1.30 2000-05-02 20:53:11 sandervl Exp $ */ 2 2 3 3 /* … … 6 6 * Copyright 1998 Sander van Leeuwen 7 7 * Copyright 1998 Patrick Haller 8 *9 8 * 10 9 * Project Odin Software License can be found in LICENSE.TXT … … 773 772 return(length-1); 774 773 } 775 //******************************************************************************776 //******************************************************************************777 ODINFUNCTION3(HANDLE, FindFirstChangeNotificationA,778 LPCSTR, lpPathName,779 BOOL, bWatchSubtree,780 DWORD, dwNotifyFilter)781 {782 dprintf(("KERNEL32: FindFirstChangeNotificationA, Not implemented\n"));783 return(0);784 }785 //******************************************************************************786 //******************************************************************************787 ODINFUNCTION1(BOOL, FindNextChangeNotification,788 HANDLE, hChange)789 {790 dprintf(("KERNEL32: FindNextChangeNotification (%08xh), Not implemented\n",791 hChange));792 793 return(0);794 }795 //******************************************************************************796 //******************************************************************************797 774 ODINPROCEDURE0(SetFileApisToANSI) 798 775 { … … 933 910 } 934 911 935 912 //****************************************************************************** 913 //****************************************************************************** 914 ODINFUNCTION3(HANDLE, FindFirstChangeNotificationA, 915 LPCSTR, lpPathName, 916 BOOL, bWatchSubtree, 917 DWORD, dwNotifyFilter) 918 { 919 dprintf(("KERNEL32: FindFirstChangeNotificationA, Not implemented (faked)\n")); 920 return -1; 921 } 922 //****************************************************************************** 923 //****************************************************************************** 924 ODINFUNCTION1(BOOL, FindNextChangeNotification, 925 HANDLE, hChange) 926 { 927 dprintf(("KERNEL32: FindNextChangeNotification (%08xh), Not implemented\n", 928 hChange)); 929 930 return FALSE; 931 } 932 //****************************************************************************** 933 //****************************************************************************** 934 ODINFUNCTION1(BOOL, FindCloseChangeNotification, HANDLE, hChange) 935 { 936 dprintf(("KERNEL32: OS2FindNextChangeNotification, Not implemented\n")); 937 938 return(TRUE); 939 } 940 /***************************************************************************** 941 * Name : HANDLE WIN32API FindFirstChangeNotificationW 942 * Purpose : The FindFirstChangeNotification function creates a change 943 * notification handle and sets up initial change notification 944 * filter conditions. A wait on a notification handle succeeds when 945 * a change matching the filter conditions occurs in the specified 946 * directory or subtree. 947 * Parameters: LPCWSTR lpPathName pointer to name of directory to watch 948 * BOOL bWatchSubtree flag for monitoring directory or 949 * directory tree 950 * DWORD dwNotifyFilter filter conditions to watch for 951 * Variables : 952 * Result : If the function succeeds, the return value is a handle to a find 953 * change notification object. 954 * If the function fails, the return value is INVALID_HANDLE_VALUE 955 * Remark : 956 * Status : UNTESTED STUB 957 * 958 * Author : Markus Montkowski [Tha, 1998/05/21 20:57] 959 *****************************************************************************/ 960 ODINFUNCTION3(HANDLE, FindFirstChangeNotificationW, LPCWSTR, lpPathName, 961 BOOL, bWatchSubtree, 962 DWORD, dwNotifyFilter) 963 { 964 LPSTR lpAsciiPath; 965 HANDLE hChange; 966 967 lpAsciiPath = UnicodeToAsciiString( (LPWSTR) lpPathName); 968 hChange = FindFirstChangeNotificationA(lpAsciiPath, bWatchSubtree, 969 dwNotifyFilter ); 970 if (lpAsciiPath) FreeAsciiString(lpAsciiPath); 971 return hChange; 972 } 973 //****************************************************************************** 974 //****************************************************************************** -
trunk/src/kernel32/KERNEL32.CPP
r3352 r3483 1 /* $Id: KERNEL32.CPP,v 1.4 3 2000-04-08 20:09:42sandervl Exp $ */1 /* $Id: KERNEL32.CPP,v 1.44 2000-05-02 20:53:11 sandervl Exp $ */ 2 2 3 3 /* … … 160 160 //****************************************************************************** 161 161 //****************************************************************************** 162 VOID WIN32API SetLastError( DWORD arg1) 163 { 164 dprintf2(("KERNEL32: SetLastError to %d\n", arg1)); 165 O32_SetLastError(arg1); 162 VOID WIN32API SetLastError( DWORD dwError) 163 { 164 if(dwError != 0) { 165 dprintf2(("KERNEL32: SetLastError to %d\n", dwError)); 166 } 167 O32_SetLastError(dwError); 166 168 } 167 169 //****************************************************************************** … … 685 687 } 686 688 687 BOOL WIN32API FindCloseChangeNotification(HANDLE hChange)688 {689 dprintf(("KERNEL32: OS2FindNextChangeNotification, Not implemented\n"));690 691 return(TRUE);692 }693 694 689 //****************************************************************************** 695 690 //****************************************************************************** -
trunk/src/kernel32/dbglocal.cpp
r3461 r3483 1 /* $Id: dbglocal.cpp,v 1. 6 2000-04-29 18:26:57sandervl Exp $ */1 /* $Id: dbglocal.cpp,v 1.7 2000-05-02 20:53:11 sandervl Exp $ */ 2 2 3 3 /* … … 117 117 "hmthread", 118 118 "hmprocess", 119 "vsemaphore" 119 "vsemaphore", 120 "exceptstackdump" 120 121 }; 121 122 //****************************************************************************** -
trunk/src/kernel32/dbglocal.h
r3461 r3483 1 /* $Id: dbglocal.h,v 1. 6 2000-04-29 18:26:58sandervl Exp $ */1 /* $Id: dbglocal.h,v 1.7 2000-05-02 20:53:12 sandervl Exp $ */ 2 2 3 3 /* … … 117 117 #define DBG_hmprocess 95 118 118 #define DBG_VSemaphore 96 119 #define DBG_MAXFILES 97 119 #define DBG_exceptstackdump 97 120 #define DBG_MAXFILES 98 120 121 121 122 extern USHORT DbgEnabled[DBG_MAXFILES]; -
trunk/src/kernel32/exceptions.cpp
r3375 r3483 1 /* $Id: exceptions.cpp,v 1. 39 2000-04-14 22:35:27sandervl Exp $ */1 /* $Id: exceptions.cpp,v 1.40 2000-05-02 20:53:12 sandervl Exp $ */ 2 2 3 3 /* 4 * Win32 Device IOCTL APIfunctions for OS/24 * Win32 Exception functions for OS/2 5 5 * 6 6 * Ported Wine exception handling code … … 65 65 #include <wprocess.h> 66 66 #include "oslibexcept.h" 67 #include "exceptstackdump.h" 67 68 68 69 #define DBG_LOCALLOG DBG_exceptions … … 535 536 536 537 537 //******************************************************************************538 APIRET APIENTRY DosQueryModFromEIP (PULONG pulModule,539 PULONG pulObject,540 ULONG ulBufferLength,541 PSZ pszBuffer,542 PULONG pulOffset,543 ULONG ulEIP);544 //******************************************************************************545 546 547 538 /***************************************************************************** 548 539 * Name : void static dprintfException … … 840 831 pERepRec->ExceptionAddress)); 841 832 842 if (rc == NO_ERROR)843 dprintf((" %s(#%u), obj #%u:%08x\n",833 if(rc == NO_ERROR && ulObject != -1) 834 dprintf(("<%s> (#%u), obj #%u:%08x\n", 844 835 szModule, 845 836 ulModule, … … 847 838 ulOffset)); 848 839 else 849 dprintf((" \n"));840 dprintf(("<win32 app>\n")); 850 841 851 842 … … 920 911 dprintf(("---[End Of Exception Information]-----\n")); 921 912 } 922 923 913 924 914 /***************************************************************************** … … 1058 1048 CrashAndBurn: 1059 1049 CheckLogException(); 1060 dprintfException(pERepRec, pERegRec, pCtxRec, p); 1050 #ifdef DEBUG 1051 dprintfException(pERepRec, pERegRec, pCtxRec, p); 1052 if(pCtxRec->ContextFlags & CONTEXT_CONTROL) { 1053 dbgPrintStack(pERepRec, pERegRec, pCtxRec, p); 1054 } 1055 #endif 1061 1056 if(fIsOS2Image == FALSE) //Only for real win32 apps 1062 1057 { -
trunk/src/kernel32/exceptutil.asm
r3275 r3483 1 ; $Id: exceptutil.asm,v 1. 6 2000-03-29 17:17:18sandervl Exp $1 ; $Id: exceptutil.asm,v 1.7 2000-05-02 20:53:12 sandervl Exp $ 2 2 3 3 ;/* … … 196 196 getGS endp 197 197 198 PUBLIC getESP 199 getESP proc near 200 mov eax, esp 201 ret 202 getESP endp 203 198 204 PUBLIC RestoreOS2FS 199 205 RestoreOS2FS proc near -
trunk/src/kernel32/exceptutil.h
r3160 r3483 1 /* $Id: exceptutil.h,v 1. 7 2000-03-18 19:49:44sandervl Exp $ */1 /* $Id: exceptutil.h,v 1.8 2000-05-02 20:53:13 sandervl Exp $ */ 2 2 3 3 /* … … 34 34 ULONG getEAX(); 35 35 ULONG getEBX(); 36 ULONG getESP(); 36 37 USHORT getSS(); 37 38 USHORT getDS(); -
trunk/src/kernel32/lang.cpp
r2803 r3483 1 /* $Id: lang.cpp,v 1.1 7 2000-02-16 14:27:07sandervl Exp $ */1 /* $Id: lang.cpp,v 1.18 2000-05-02 20:53:13 sandervl Exp $ */ 2 2 /* 3 3 * Win32 language API functions for OS/2 … … 89 89 if (wbuf) 90 90 { 91 // if (*pLen > sizeof(WCHAR))92 if (*pLen > 2)91 // if (*pLen >= sizeof(WCHAR)) 92 if (*pLen >= 2) 93 93 { 94 94 wbuf[0]=(WCHAR)'0'+wcUniChar; … … 569 569 case LOCALE_SABBREVMONTHNAME13: 570 570 case LOCALE_SMONTHNAME13: 571 if(wbuf) { 572 *wbuf = 0; 573 } 571 574 LocaleFromUniStr((LPWSTR)L"\0",wbuf,&ulInfoLen); 572 575 break; -
trunk/src/kernel32/makefile
r3390 r3483 1 # $Id: makefile,v 1.9 3 2000-04-15 16:32:35sandervl Exp $1 # $Id: makefile,v 1.94 2000-05-02 20:53:13 sandervl Exp $ 2 2 3 3 # … … 124 124 $(OBJDIR)\queue.obj \ 125 125 $(OBJDIR)\hmthread.obj \ 126 !ifdef DEBUG 127 $(OBJDIR)\exceptstackdump.obj \ 128 !endif 126 129 $(OBJDIR)\kernelrsrc.obj 127 130 -
trunk/src/kernel32/misc.cpp
r3372 r3483 1 /* $Id: misc.cpp,v 1.2 1 2000-04-13 18:48:02sandervl Exp $ */1 /* $Id: misc.cpp,v 1.22 2000-05-02 20:53:13 sandervl Exp $ */ 2 2 3 3 /* … … 304 304 //****************************************************************************** 305 305 //****************************************************************************** 306 int SYSTEM EXPORT WriteLogNoEOL(char *tekst, ...) 307 { 308 USHORT sel = RestoreOS2FS(); 309 va_list argptr; 310 311 ODIN_HEAPCHECK(); 312 313 if(!init) 314 { 315 init = TRUE; 316 317 #ifdef DEFAULT_LOGGING_OFF 318 if(getenv("WIN32LOG_ENABLED")) { 319 #else 320 if(!getenv("NOWIN32LOG")) { 321 #endif 322 char logname[CCHMAXPATH]; 323 324 sprintf(logname, "odin32_%d.log", loadNr); 325 flog = fopen(logname, "w"); 326 if(flog == NULL) {//probably running exe on readonly device 327 sprintf(logname, "%sodin32_%d.log", kernel32Path, loadNr); 328 flog = fopen(logname, "w"); 329 } 330 } 331 else 332 fLogging = FALSE; 333 } 334 335 if(fLogging && flog && (dwEnableLogging > 0)) 336 { 337 THDB *thdb = GetThreadTHDB(); 338 339 va_start(argptr, tekst); 340 if(thdb) { 341 thdb->logfile = (DWORD)flog; 342 } 343 vfprintf(flog, tekst, argptr); 344 if(thdb) thdb->logfile = 0; 345 va_end(argptr); 346 } 347 SetFS(sel); 348 return 1; 349 } 350 //****************************************************************************** 351 //****************************************************************************** 306 352 void SYSTEM DecreaseLogCount() 307 353 { -
trunk/src/kernel32/stubs.cpp
r3281 r3483 1 /* $Id: stubs.cpp,v 1.2 1 2000-03-30 15:37:14 cbratschiExp $ */1 /* $Id: stubs.cpp,v 1.22 2000-05-02 20:53:13 sandervl Exp $ */ 2 2 3 3 /* … … 1367 1367 1368 1368 /***************************************************************************** 1369 * Name : HANDLE WIN32API FindFirstChangeNotificationW1370 * Purpose : The FindFirstChangeNotification function creates a change1371 * notification handle and sets up initial change notification1372 * filter conditions. A wait on a notification handle succeeds when1373 * a change matching the filter conditions occurs in the specified1374 * directory or subtree.1375 * Parameters: LPCWSTR lpPathName pointer to name of directory to watch1376 * BOOL bWatchSubtree flag for monitoring directory or1377 * directory tree1378 * DWORD dwNotifyFilter filter conditions to watch for1379 * Variables :1380 * Result : If the function succeeds, the return value is a handle to a find1381 * change notification object.1382 * If the function fails, the return value is INVALID_HANDLE_VALUE1383 * Remark :1384 * Status : UNTESTED STUB1385 *1386 * Author : Markus Montkowski [Tha, 1998/05/21 20:57]1387 *****************************************************************************/1388 1389 HANDLE WIN32API FindFirstChangeNotificationW( LPCWSTR lpPathName,1390 BOOL bWatchSubtree,1391 DWORD dwNotifyFilter)1392 {1393 1394 dprintf(("KERNEL32: FindFirstChangeNotificationW(%08x,%08x,%08x) not implemented - INVALID_HANDLE_VALUE\n",1395 lpPathName, bWatchSubtree, dwNotifyFilter1396 ));1397 1398 return (INVALID_HANDLE_VALUE);1399 }1400 1401 /*****************************************************************************1402 1369 * Name : HANDLE WIN32API FindFirstFileExA 1403 1370 * Purpose : The FindFirstFileExA function searches a directory for a file -
trunk/src/kernel32/virtual.cpp
r3259 r3483 1 /* $Id: virtual.cpp,v 1. 29 2000-03-28 17:11:50sandervl Exp $ */1 /* $Id: virtual.cpp,v 1.30 2000-05-02 20:53:13 sandervl Exp $ */ 2 2 3 3 /* … … 437 437 if(rc) 438 438 { 439 dprintf(("KERNEL32:VirtualFree:OsLibSetMem rc = #%d\n", 440 rc)); 441 SetLastError(ERROR_INVALID_ADDRESS); 442 return(FALSE); 439 if(rc == 32803) { //SvL: ERROR_ALIAS 440 dprintf(("KERNEL32:VirtualFree:OsLibSetMem rc = #%d; app tries to decommit aliased memory; ignore", rc)); 441 return(TRUE); 442 } 443 dprintf(("KERNEL32:VirtualFree:OsLibSetMem rc = #%d\n", rc)); 444 SetLastError(ERROR_INVALID_ADDRESS); 445 return(FALSE); 443 446 } 444 447 } -
trunk/src/kernel32/windllbase.cpp
r3160 r3483 1 /* $Id: windllbase.cpp,v 1.1 2 2000-03-18 19:49:44 sandervl Exp $ */1 /* $Id: windllbase.cpp,v 1.13 2000-05-02 20:53:14 sandervl Exp $ */ 2 2 3 3 /* … … 752 752 //****************************************************************************** 753 753 //****************************************************************************** 754 Win32DllBase *Win32DllBase::findModuleByAddr(ULONG address) 755 { 756 dlllistmutex.enter(); 757 758 Win32DllBase *mod = Win32DllBase::head; 759 while(mod != NULL) { 760 dbgCheckObj(mod); 761 if(mod->insideModule(address)) { 762 dlllistmutex.leave(); 763 return(mod); 764 } 765 mod = mod->next; 766 } 767 dlllistmutex.leave(); 768 return(NULL); 769 } 770 //****************************************************************************** 771 //****************************************************************************** 754 772 BOOL Win32DllBase::isDll() 755 773 { -
trunk/src/kernel32/windllbase.h
r3059 r3483 1 /* $Id: windllbase.h,v 1. 1 2000-03-09 19:03:21sandervl Exp $ */1 /* $Id: windllbase.h,v 1.2 2000-05-02 20:53:14 sandervl Exp $ */ 2 2 3 3 /* … … 115 115 static Win32DllBase *findModule(HINSTANCE hinstance); 116 116 static Win32DllBase *findModule(WIN32DLLENTRY DllEntryPoint); 117 static Win32DllBase *findModuleByAddr(ULONG address); 117 118 118 119 #ifdef DEBUG_ENABLELOG_LEVEL2 -
trunk/src/kernel32/winexebase.cpp
r3406 r3483 1 /* $Id: winexebase.cpp,v 1. 8 2000-04-16 18:05:04 sandervl Exp $ */1 /* $Id: winexebase.cpp,v 1.9 2000-05-02 20:53:14 sandervl Exp $ */ 2 2 3 3 /* … … 120 120 //Set default FPU control word (no exceptions); same as in NT 121 121 _control87(0x27F, 0xFFF); 122 ULONG Size = 16, Attr; 123 rc = DosQueryMem((PVOID) (entryPoint), &Size, &Attr); 124 dprintf(("Start exe; Attr = %x, rc = %d", Attr, rc)); 122 125 rc = ((WIN32EXEENTRY)entryPoint)(NULL); 123 126 RestoreOS2TIB(); -
trunk/src/kernel32/winimagebase.cpp
r3404 r3483 1 /* $Id: winimagebase.cpp,v 1.1 8 2000-04-16 10:42:12sandervl Exp $ */1 /* $Id: winimagebase.cpp,v 1.19 2000-05-02 20:53:14 sandervl Exp $ */ 2 2 3 3 /* … … 131 131 dprintf(("Win32ImageBase::getVersion: NOT IMPLEMENTED!")); 132 132 return 0x40000; //NT 4 133 } 134 //****************************************************************************** 135 //****************************************************************************** 136 BOOL Win32ImageBase::insideModule(ULONG address) 137 { 138 //dummy 139 return FALSE; 140 } 141 //****************************************************************************** 142 //****************************************************************************** 143 BOOL Win32ImageBase::insideModuleCode(ULONG address) 144 { 145 //dummy 146 return FALSE; 133 147 } 134 148 //****************************************************************************** -
trunk/src/kernel32/winimagebase.h
r3404 r3483 1 /* $Id: winimagebase.h,v 1. 6 2000-04-16 10:42:12sandervl Exp $ */1 /* $Id: winimagebase.h,v 1.7 2000-05-02 20:53:14 sandervl Exp $ */ 2 2 3 3 /* … … 99 99 void tlsDetachThread(); //destroy TLS structures 100 100 101 virtual BOOL insideModule(ULONG address); 102 virtual BOOL insideModuleCode(ULONG address); 103 101 104 virtual ULONG getApi(char *name) = 0; 102 105 virtual ULONG getApi(int ordinal) = 0; -
trunk/src/kernel32/winimagepeldr.cpp
r3404 r3483 1 /* $Id: winimagepeldr.cpp,v 1.4 1 2000-04-16 10:42:12sandervl Exp $ */1 /* $Id: winimagepeldr.cpp,v 1.42 2000-05-02 20:53:15 sandervl Exp $ */ 2 2 3 3 /* … … 1475 1475 //****************************************************************************** 1476 1476 //****************************************************************************** 1477 BOOL Win32PeLdrImage::insideModule(ULONG address) 1478 { 1479 if((address >= realBaseAddress) && (address < realBaseAddress + imageSize)) { 1480 return TRUE; 1481 } 1482 return FALSE; 1483 } 1484 //****************************************************************************** 1485 //****************************************************************************** 1486 BOOL Win32PeLdrImage::insideModuleCode(ULONG address) 1487 { 1488 Section *sect; 1489 1490 sect = findSectionByOS2Addr(address); 1491 if(sect && (sect->pageflags & PAG_EXECUTE)) { 1492 return TRUE; 1493 } 1494 return FALSE; 1495 } 1496 //****************************************************************************** 1497 //****************************************************************************** 1477 1498 ULONG Win32PeLdrImage::getApi(char *name) 1478 1499 { -
trunk/src/kernel32/winimagepeldr.h
r3074 r3483 1 /* $Id: winimagepeldr.h,v 1. 1 2000-03-10 16:12:03sandervl Exp $ */1 /* $Id: winimagepeldr.h,v 1.2 2000-05-02 20:53:15 sandervl Exp $ */ 2 2 3 3 /* … … 83 83 virtual BOOL init(ULONG reservedMem); 84 84 85 virtual BOOL insideModule(ULONG address); 86 virtual BOOL insideModuleCode(ULONG address); 87 85 88 virtual ULONG getApi(char *name); 86 89 virtual ULONG getApi(int ordinal); -
trunk/src/kernel32/wprocess.cpp
r3404 r3483 1 /* $Id: wprocess.cpp,v 1. 79 2000-04-16 10:42:13sandervl Exp $ */1 /* $Id: wprocess.cpp,v 1.80 2000-05-02 20:53:15 sandervl Exp $ */ 2 2 3 3 /* … … 1295 1295 ulAPIOrdinal = (ULONG)lpszProc; 1296 1296 if (ulAPIOrdinal <= 0x0000FFFF) { 1297 proc = (FARPROC)winmod->getApi((int)ulAPIOrdinal);1297 proc = (FARPROC)winmod->getApi((int)ulAPIOrdinal); 1298 1298 } 1299 1299 else proc = (FARPROC)winmod->getApi((char *)lpszProc); 1300 if(proc == 0) { 1301 SetLastError(ERROR_PROC_NOT_FOUND); 1302 } 1303 return proc; 1300 if(proc == 0) { 1301 #ifdef DEBUG 1302 if(ulAPIOrdinal <= 0x0000FFFF) { 1303 dprintf(("GetProcAddress %x %x not found!", hModule, ulAPIOrdinal)); 1304 } 1305 else dprintf(("GetProcAddress %x %s not found!", hModule, lpszProc)); 1306 #endif 1307 SetLastError(ERROR_PROC_NOT_FOUND); 1308 } 1309 return proc; 1304 1310 } 1305 1311 proc = O32_GetProcAddress(hModule, lpszProc); 1306 1312 if(HIWORD(lpszProc)) 1307 dprintf(("KERNEL32: GetProcAddress %s from %X returned %X\n", lpszProc, hModule, proc));1313 dprintf(("KERNEL32: GetProcAddress %s from %X returned %X\n", lpszProc, hModule, proc)); 1308 1314 else dprintf(("KERNEL32: GetProcAddress %x from %X returned %X\n", lpszProc, hModule, proc)); 1309 1315 return(proc);
Note:
See TracChangeset
for help on using the changeset viewer.