- Timestamp:
- Mar 3, 2000, 12:16:00 PM (25 years ago)
- Location:
- trunk/src/kernel32
- Files:
-
- 1 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/KERNEL32.DEF
r2798 r2984 1 ; $Id: KERNEL32.DEF,v 1.7 1 2000-02-15 19:06:12sandervl Exp $1 ; $Id: KERNEL32.DEF,v 1.72 2000-03-03 11:15:58 sandervl Exp $ 2 2 3 3 ;Created by BLAST for IBM's compiler … … 1077 1077 CPUFeatures @2005 1078 1078 1079 ;registry apis imported by advapi32 1080 RegCloseKey = _RegCloseKey@4 @2280 1081 RegConnectRegistryA = _RegConnectRegistryA@12 @2281 1082 RegConnectRegistryW = _RegConnectRegistryW@12 @2282 1083 RegCreateKeyA = _RegCreateKeyA@12 @2283 1084 RegCreateKeyExA = _RegCreateKeyExA@36 @2284 1085 RegCreateKeyExW = _RegCreateKeyExW@36 @2285 1086 RegCreateKeyW = _RegCreateKeyW@12 @2286 1087 RegDeleteKeyA = _RegDeleteKeyA@8 @2287 1088 RegDeleteKeyW = _RegDeleteKeyW@8 @2288 1089 RegDeleteValueA = _RegDeleteValueA@8 @2289 1090 RegDeleteValueW = _RegDeleteValueW@8 @2290 1091 RegEnumKeyA = _RegEnumKeyA@16 @2291 1092 RegEnumKeyExA = _RegEnumKeyExA@32 @2292 1093 RegEnumKeyExW = _RegEnumKeyExW@32 @2293 1094 RegEnumKeyW = _RegEnumKeyW@16 @2294 1095 RegEnumValueA = _RegEnumValueA@32 @2295 1096 RegEnumValueW = _RegEnumValueW@32 @2296 1097 RegFlushKey = _RegFlushKey@4 @2297 1098 RegGetKeySecurity = _RegGetKeySecurity@16 @2298 1099 RegLoadKeyA = _RegLoadKeyA@12 @2299 1100 RegLoadKeyW = _RegLoadKeyW@12 @2300 1101 RegNotifyChangeKeyValue = _RegNotifyChangeKeyValue@20 @2301 1102 RegOpenKeyA = _RegOpenKeyA@12 @2302 1103 RegOpenKeyExA = _RegOpenKeyExA@20 @2303 1104 RegOpenKeyExW = _RegOpenKeyExW@20 @2304 1105 RegOpenKeyW = _RegOpenKeyW@12 @2305 1106 RegQueryInfoKeyA = _RegQueryInfoKeyA@48 @2306 1107 RegQueryInfoKeyW = _RegQueryInfoKeyW@48 @2307 1108 RegQueryMultipleValuesA = _RegQueryMultipleValuesA@20 @2308 1109 RegQueryMultipleValuesW = _RegQueryMultipleValuesW@20 @2309 1110 RegQueryValueA = _RegQueryValueA@16 @2310 1111 RegQueryValueExA = _RegQueryValueExA@24 @2311 1112 RegQueryValueExW = _RegQueryValueExW@24 @2312 1113 RegQueryValueW = _RegQueryValueW@16 @2313 1114 RegReplaceKeyA = _RegReplaceKeyA@16 @2314 1115 RegReplaceKeyW = _RegReplaceKeyW@16 @2315 1116 RegRestoreKeyA = _RegRestoreKeyA@12 @2316 1117 RegRestoreKeyW = _RegRestoreKeyW@12 @2317 1118 RegSaveKeyA = _RegSaveKeyA@12 @2318 1119 RegSaveKeyW = _RegSaveKeyW@12 @2319 1120 RegSetKeySecurity = _RegSetKeySecurity@12 @2320 1121 RegSetValueA = _RegSetValueA@20 @2321 1122 RegSetValueExA = _RegSetValueExA@24 @2322 1123 RegSetValueExW = _RegSetValueExW@24 @2323 1124 RegSetValueW = _RegSetValueW@20 @2324 1125 RegUnLoadKeyA = _RegUnLoadKeyA@8 @2325 1126 RegUnLoadKeyW = _RegUnLoadKeyW@8 @2326 1127 1079 1128 GetDisplayCodepage__Fv @3000 1080 1129 GetWindowsCodepage__Fv @3001 -
trunk/src/kernel32/conbuffer.cpp
r2802 r2984 1 /* $Id: conbuffer.cpp,v 1. 9 2000-02-16 14:25:30sandervl Exp $ */1 /* $Id: conbuffer.cpp,v 1.10 2000-03-03 11:15:56 sandervl Exp $ */ 2 2 3 3 /* … … 64 64 #include <os2wrap.h> //Odin32 OS/2 api wrappers 65 65 66 #include <win32api.h> 66 67 #include <misc.h> 67 68 #include <string.h> … … 77 78 #define DBG_LOCALLOG DBG_conbuffer 78 79 #include "dbglocal.h" 79 80 /***********************************81 * Open32 support for SetLastError *82 ***********************************/83 #include <os2sel.h>84 85 extern "C"86 {87 void _System _O32_SetLastError(DWORD dwError);88 }89 90 inline void SetLastError(DWORD a)91 {92 USHORT sel = GetFS();93 94 _O32_SetLastError(a);95 SetFS(sel);96 }97 80 98 81 … … 144 127 if (pHMHandleData->lpHandlerData == NULL) /* check allocation */ 145 128 { 146 SetLastError(ERROR_NOT_ENOUGH_MEMORY ); /* set error information */129 SetLastError(ERROR_NOT_ENOUGH_MEMORY_W); /* set error information */ 147 130 return (INVALID_HANDLE_VALUE); /* raise error condition */ 148 131 } … … 233 216 #endif 234 217 235 SetLastError(ERROR_ACCESS_DENIED );218 SetLastError(ERROR_ACCESS_DENIED_W); 236 219 return FALSE; 237 220 } … … 273 256 /* check if we're called with non-existing line buffer */ 274 257 if (pConsoleBuffer->ppszLine == NULL) { 275 SetLastError(ERROR_ SYS_INTERNAL);258 SetLastError(ERROR_OUTOFMEMORY_W); 276 259 return FALSE; 277 260 } … … 770 753 #endif 771 754 772 SetLastError(ERROR_INVALID_FUNCTION ); /* request not implemented */755 SetLastError(ERROR_INVALID_FUNCTION_W); /* request not implemented */ 773 756 return(FALSE); /* we assume this indicates API call failed */ 774 757 } … … 816 799 *lpNumberOfAttrsWritten = 0; /* complete error handling */ 817 800 818 SetLastError(ERROR_INVALID_PARAMETER );801 SetLastError(ERROR_INVALID_PARAMETER_W); 819 802 return (FALSE); 820 803 } … … 827 810 *lpNumberOfAttrsWritten = 0; /* complete error handling */ 828 811 829 SetLastError(ERROR_INVALID_PARAMETER );812 SetLastError(ERROR_INVALID_PARAMETER_W); 830 813 return (FALSE); 831 814 } … … 916 899 *lpNumberOfCharsWritten = 0; /* complete error handling */ 917 900 918 SetLastError(ERROR_INVALID_PARAMETER );901 SetLastError(ERROR_INVALID_PARAMETER_W); 919 902 return (FALSE); 920 903 } … … 928 911 *lpNumberOfCharsWritten = 0; /* complete error handling */ 929 912 930 SetLastError(ERROR_INVALID_PARAMETER );913 SetLastError(ERROR_INVALID_PARAMETER_W); 931 914 return (FALSE); 932 915 } … … 1016 999 *lpNumberOfCharsWritten = 0; /* complete error handling */ 1017 1000 1018 SetLastError(ERROR_INVALID_PARAMETER );1001 SetLastError(ERROR_INVALID_PARAMETER_W); 1019 1002 return (FALSE); 1020 1003 } … … 1028 1011 *lpNumberOfCharsWritten = 0; /* complete error handling */ 1029 1012 1030 SetLastError(ERROR_INVALID_PARAMETER );1013 SetLastError(ERROR_INVALID_PARAMETER_W); 1031 1014 return (FALSE); 1032 1015 } … … 1294 1277 (coordDestBufferSize.Y < coordDestBufferCoord.Y) ) 1295 1278 { 1296 SetLastError(ERROR_INVALID_PARAMETER ); /* set detailed error info */1279 SetLastError(ERROR_INVALID_PARAMETER_W); /* set detailed error info */ 1297 1280 return (FALSE); /* API failed */ 1298 1281 } … … 1393 1376 (coordDestBufferSize.Y < coordDestBufferCoord.Y) ) 1394 1377 { 1395 SetLastError(ERROR_INVALID_PARAMETER ); /* set detailed error info */1378 SetLastError(ERROR_INVALID_PARAMETER_W); /* set detailed error info */ 1396 1379 return (FALSE); /* API failed */ 1397 1380 } … … 1482 1465 *lpcNumberRead = 0; /* complete error handling */ 1483 1466 1484 SetLastError(ERROR_INVALID_PARAMETER );1467 SetLastError(ERROR_INVALID_PARAMETER_W); 1485 1468 return (FALSE); 1486 1469 } … … 1493 1476 *lpcNumberRead = 0; /* complete error handling */ 1494 1477 1495 SetLastError(ERROR_INVALID_PARAMETER );1478 SetLastError(ERROR_INVALID_PARAMETER_W); 1496 1479 return (FALSE); 1497 1480 } … … 1574 1557 *lpcNumberRead = 0; /* complete error handling */ 1575 1558 1576 SetLastError(ERROR_INVALID_PARAMETER );1559 SetLastError(ERROR_INVALID_PARAMETER_W); 1577 1560 return (FALSE); 1578 1561 } … … 1585 1568 *lpcNumberRead = 0; /* complete error handling */ 1586 1569 1587 SetLastError(ERROR_INVALID_PARAMETER );1570 SetLastError(ERROR_INVALID_PARAMETER_W); 1588 1571 return (FALSE); 1589 1572 } … … 1666 1649 *lpcNumberRead = 0; /* complete error handling */ 1667 1650 1668 SetLastError(ERROR_INVALID_PARAMETER );1651 SetLastError(ERROR_INVALID_PARAMETER_W); 1669 1652 return (FALSE); 1670 1653 } … … 1677 1660 *lpcNumberRead = 0; /* complete error handling */ 1678 1661 1679 SetLastError(ERROR_INVALID_PARAMETER );1662 SetLastError(ERROR_INVALID_PARAMETER_W); 1680 1663 return (FALSE); 1681 1664 } … … 2100 2083 (pCCI->dwSize > 100) ) 2101 2084 { 2102 SetLastError(ERROR_INVALID_PARAMETER ); /* set extended error info */2085 SetLastError(ERROR_INVALID_PARAMETER_W); /* set extended error info */ 2103 2086 return (FALSE); /* API failed */ 2104 2087 } … … 2392 2375 ) 2393 2376 { 2394 SetLastError(ERROR_INVALID_PARAMETER ); /* set error information */2377 SetLastError(ERROR_INVALID_PARAMETER_W); /* set error information */ 2395 2378 return (FALSE); /* error */ 2396 2379 } … … 2403 2386 ) 2404 2387 { 2405 SetLastError(ERROR_INVALID_PARAMETER ); /* set error information */2388 SetLastError(ERROR_INVALID_PARAMETER_W); /* set error information */ 2406 2389 return (FALSE); /* error */ 2407 2390 } … … 2438 2421 ) 2439 2422 { 2440 SetLastError(ERROR_INVALID_PARAMETER ); /* set error information */2423 SetLastError(ERROR_INVALID_PARAMETER_W); /* set error information */ 2441 2424 return (FALSE); /* error */ 2442 2425 } … … 2615 2598 (coordSrcBufferSize.Y < coordSrcBufferCoord.Y) ) 2616 2599 { 2617 SetLastError(ERROR_INVALID_PARAMETER ); /* set detailed error info */2600 SetLastError(ERROR_INVALID_PARAMETER_W); /* set detailed error info */ 2618 2601 return (FALSE); /* API failed */ 2619 2602 } … … 2721 2704 (coordSrcBufferSize.Y < coordSrcBufferCoord.Y) ) 2722 2705 { 2723 SetLastError(ERROR_INVALID_PARAMETER ); /* set detailed error info */2706 SetLastError(ERROR_INVALID_PARAMETER_W); /* set detailed error info */ 2724 2707 return (FALSE); /* API failed */ 2725 2708 } … … 2817 2800 *lpcWritten = 0; /* complete error handling */ 2818 2801 2819 SetLastError(ERROR_INVALID_PARAMETER );2802 SetLastError(ERROR_INVALID_PARAMETER_W); 2820 2803 return (FALSE); 2821 2804 } … … 2828 2811 *lpcWritten = 0; /* complete error handling */ 2829 2812 2830 SetLastError(ERROR_INVALID_PARAMETER );2813 SetLastError(ERROR_INVALID_PARAMETER_W); 2831 2814 return (FALSE); 2832 2815 } … … 2917 2900 *lpcWritten = 0; /* complete error handling */ 2918 2901 2919 SetLastError(ERROR_INVALID_PARAMETER );2902 SetLastError(ERROR_INVALID_PARAMETER_W); 2920 2903 return (FALSE); 2921 2904 } … … 2928 2911 *lpcWritten = 0; /* complete error handling */ 2929 2912 2930 SetLastError(ERROR_INVALID_PARAMETER );2913 SetLastError(ERROR_INVALID_PARAMETER_W); 2931 2914 return (FALSE); 2932 2915 } … … 3017 3000 *lpcWritten = 0; /* complete error handling */ 3018 3001 3019 SetLastError(ERROR_INVALID_PARAMETER );3002 SetLastError(ERROR_INVALID_PARAMETER_W); 3020 3003 return (FALSE); 3021 3004 } … … 3028 3011 *lpcWritten = 0; /* complete error handling */ 3029 3012 3030 SetLastError(ERROR_INVALID_PARAMETER );3013 SetLastError(ERROR_INVALID_PARAMETER_W); 3031 3014 return (FALSE); 3032 3015 } -
trunk/src/kernel32/conin.cpp
r2802 r2984 1 /* $Id: conin.cpp,v 1. 8 2000-02-16 14:25:31sandervl Exp $ */1 /* $Id: conin.cpp,v 1.9 2000-03-03 11:15:57 sandervl Exp $ */ 2 2 3 3 /* … … 34 34 #include <os2wrap.h> //Odin32 OS/2 api wrappers 35 35 36 #include <win32api.h> 36 37 #include <misc.h> 37 38 #include <string.h> … … 46 47 #define DBG_LOCALLOG DBG_conin 47 48 #include "dbglocal.h" 48 49 /***********************************50 * Open32 support for SetLastError *51 ***********************************/52 #include <os2sel.h>53 54 extern "C"55 {56 void _System _O32_SetLastError(DWORD dwError);57 }58 59 inline void SetLastError(DWORD a)60 {61 USHORT sel = GetFS();62 63 _O32_SetLastError(a);64 SetFS(sel);65 }66 49 67 50 … … 284 267 #endif 285 268 286 SetLastError(ERROR_ACCESS_DENIED );269 SetLastError(ERROR_ACCESS_DENIED_W); 287 270 return FALSE; 288 271 } … … 401 384 #endif 402 385 403 SetLastError(ERROR_INVALID_FUNCTION ); /* request not implemented */386 SetLastError(ERROR_INVALID_FUNCTION_W); /* request not implemented */ 404 387 return(FALSE); /* we assume this indicates API call failed */ 405 388 } -
trunk/src/kernel32/conout.cpp
r2802 r2984 1 /* $Id: conout.cpp,v 1. 6 2000-02-16 14:25:32sandervl Exp $ */1 /* $Id: conout.cpp,v 1.7 2000-03-03 11:15:57 sandervl Exp $ */ 2 2 3 3 /* … … 63 63 64 64 #include <win32type.h> 65 #include <win32api.h> 65 66 #include <misc.h> 66 67 … … 76 77 #define DBG_LOCALLOG DBG_conout 77 78 #include "dbglocal.h" 78 79 80 /***********************************81 * Open32 support for SetLastError *82 ***********************************/83 #include <os2sel.h>84 85 extern "C"86 {87 void _System _O32_SetLastError(DWORD dwError);88 int _System _O32_GetLastError(void);89 }90 91 inline void SetLastError(DWORD a)92 {93 USHORT sel = GetFS();94 95 _O32_SetLastError(a);96 SetFS(sel);97 }98 99 inline int GetLastError(void)100 {101 USHORT sel = GetFS();102 int rc;103 104 rc = _O32_GetLastError();105 SetFS(sel);106 return rc;107 }108 109 79 110 80 /***************************************************************************** … … 234 204 #endif 235 205 236 SetLastError(ERROR_ACCESS_DENIED );206 SetLastError(ERROR_ACCESS_DENIED_W); 237 207 return FALSE; 238 208 } -
trunk/src/kernel32/conprop2.cpp
r2979 r2984 1 /* $Id: conprop2.cpp,v 1. 5 2000-03-03 09:06:19sandervl Exp $ */1 /* $Id: conprop2.cpp,v 1.6 2000-03-03 11:15:57 sandervl Exp $ */ 2 2 3 3 /* … … 40 40 41 41 #include <win32type.h> 42 #include <win32api.h> 42 43 #include <misc.h> 43 44 #include <stdio.h> … … 56 57 * Defines * 57 58 *****************************************************************************/ 58 59 #define ERROR_SUCCESS 060 61 #define REG_NONE 0 /* no type */62 #define REG_SZ 1 /* string type (ASCII) */63 #define REG_EXPAND_SZ 2 /* string, includes %ENVVAR% (expanded by caller) (ASCII) */64 #define REG_BINARY 3 /* binary format, callerspecific */65 /* YES, REG_DWORD == REG_DWORD_LITTLE_ENDIAN */66 #define REG_DWORD 4 /* DWORD in little endian format */67 #define REG_DWORD_LITTLE_ENDIAN 4 /* DWORD in little endian format */68 #define REG_DWORD_BIG_ENDIAN 5 /* DWORD in big endian format */69 #define REG_LINK 6 /* symbolic link (UNICODE) */70 #define REG_MULTI_SZ 7 /* multiple strings, delimited by \0, terminated by \0\0 (ASCII) */71 #define REG_RESOURCE_LIST 8 /* resource list? huh? */72 #define REG_FULL_RESOURCE_DESCRIPTOR 9 /* full resource descriptor? huh? */73 74 #define HKEY_LOCAL_MACHINE_O32 0xFFFFFFEFL75 #define HKEY_CURRENT_USER_O32 0xFFFFFFEEL76 #define HKEY_USERS_O32 0xFFFFFFEDL77 #define HKEY_CLASSES_ROOT_O32 0xFFFFFFECL78 79 #define KEY_ALL_ACCESS 0x0000003f80 81 typedef unsigned long HKEY;82 typedef HKEY* LPHKEY;83 typedef DWORD REGSAM;84 85 LONG _System _O32_RegOpenKeyEx(HKEY,LPCSTR,DWORD,REGSAM,LPHKEY);86 LONG _System _O32_RegCreateKeyEx(HKEY,LPCSTR,DWORD,LPSTR,DWORD,REGSAM,87 LPSECURITY_ATTRIBUTES,LPHKEY,LPDWORD);88 LONG _System _O32_RegQueryValueEx(HKEY,LPSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);89 LONG _System _O32_RegCloseKey(HKEY);90 LONG _System _O32_RegSetValueEx( HKEY, LPCSTR, DWORD, DWORD, LPBYTE, DWORD );91 92 DWORD WIN32API GetModuleFileNameA(HMODULE,LPSTR,DWORD);93 94 59 95 60 /***************************************************************************** … … 175 140 176 141 // HKEY_CURRENT_USER/SOFTWARE/ODIN/ConsoleProperties/<process name>/<option name> 177 LONG lRes = ERROR_SUCCESS ;142 LONG lRes = ERROR_SUCCESS_W; 178 143 HKEY hkConsole; 179 144 char szKey[256]; … … 198 163 szProcessName); 199 164 200 lRes = _O32_RegOpenKeyEx(HKEY_CURRENT_USER_O32,165 lRes = RegOpenKeyExA(HKEY_CURRENT_USER, 201 166 szKey, 202 167 0, … … 206 171 207 172 // try to open DEFAULT 208 if (lRes != ERROR_SUCCESS )209 lRes = _O32_RegOpenKeyEx(HKEY_CURRENT_USER_O32,173 if (lRes != ERROR_SUCCESS_W) 174 lRes = RegOpenKeyExA(HKEY_CURRENT_USER, 210 175 "Software\\ODIN\\ConsoleProperties\\DEFAULT", 211 176 0, … … 214 179 215 180 // now it's time to retrieve information 216 if (lRes != ERROR_SUCCESS )181 if (lRes != ERROR_SUCCESS_W) 217 182 { 218 183 // load hardcoded defaults instead … … 225 190 #define REGQUERYVALUE(name,var) \ 226 191 dwSize = sizeof(pConsoleOptions->var); \ 227 lRes = _O32_RegQueryValueEx(hkConsole, name, NULL, &dwType, \192 lRes = RegQueryValueExA(hkConsole, name, NULL, &dwType, \ 228 193 (LPBYTE)&pConsoleOptions->var, &dwSize); 229 194 … … 253 218 #undef REGQUERYVALUE 254 219 255 _O32_RegCloseKey(hkConsole);220 RegCloseKey(hkConsole); 256 221 257 222 return (NO_ERROR); … … 277 242 278 243 // HKEY_CURRENT_USER/SOFTWARE/ODIN/ConsoleProperties/<process name>/<option name> 279 LONG lRes = ERROR_SUCCESS ;244 LONG lRes = ERROR_SUCCESS_W; 280 245 HKEY hkConsole; 281 246 char szKey[256]; … … 301 266 szProcessName); 302 267 303 lRes = _O32_RegCreateKeyEx(HKEY_CURRENT_USER_O32,268 lRes = RegCreateKeyExA(HKEY_CURRENT_USER, 304 269 szKey, 305 270 0, … … 310 275 &hkConsole, 311 276 &dwDisposition); 312 if (lRes != ERROR_SUCCESS )277 if (lRes != ERROR_SUCCESS_W) 313 278 return lRes; 314 279 } … … 316 281 317 282 #define REGSAVEVALUE(name,var) \ 318 lRes = _O32_RegSetValueEx(hkConsole, name, 0, REG_DWORD, \283 lRes = RegSetValueExA(hkConsole, name, 0, REG_DWORD, \ 319 284 (LPBYTE)&pConsoleOptions->var, sizeof(pConsoleOptions->var)); 320 285 … … 344 309 #undef REGSAVEVALUE 345 310 346 _O32_RegCloseKey(hkConsole);311 RegCloseKey(hkConsole); 347 312 348 313 return (NO_ERROR); -
trunk/src/kernel32/cpu.cpp
r2802 r2984 1 /* $Id: cpu.cpp,v 1. 6 2000-02-16 14:25:36sandervl Exp $ */1 /* $Id: cpu.cpp,v 1.7 2000-03-03 11:15:57 sandervl Exp $ */ 2 2 /* 3 3 * Odin win32 CPU apis … … 21 21 #include "debugtools.h" 22 22 #include <cpuhlp.h> 23 #include "initsystem.h"24 23 25 24 #define DBG_LOCALLOG DBG_cpu … … 102 101 103 102 /* Create this registry key for all systems */ 104 if ( ADVAPI32_RegCreateKeyA(HKEY_LOCAL_MACHINE,"HARDWARE\\DESCRIPTION\\System\\CentralProcessor",&hkey)!=ERROR_SUCCESS) {103 if (RegCreateKeyA(HKEY_LOCAL_MACHINE,"HARDWARE\\DESCRIPTION\\System\\CentralProcessor",&hkey)!=ERROR_SUCCESS) { 105 104 dprintf(("Unable to register CPU information\n")); 106 105 } … … 113 112 sprintf(buf,"%d",i); 114 113 if (xhkey) 115 ADVAPI32_RegCloseKey(xhkey);116 ADVAPI32_RegCreateKeyA(hkey,buf,&xhkey);114 RegCloseKey(xhkey); 115 RegCreateKeyA(hkey,buf,&xhkey); 117 116 118 117 signature = GetCPUSignature(); … … 137 136 sprintf(buf,"CPU %ld",cachedsi.dwProcessorType); 138 137 if (xhkey) { 139 ADVAPI32_RegSetValueExA(xhkey,"Identifier",0,REG_SZ,(LPBYTE)buf,strlen(buf));138 RegSetValueExA(xhkey,"Identifier",0,REG_SZ,(LPBYTE)buf,strlen(buf)); 140 139 memset(buf, 0, sizeof(buf)); 141 140 GetCPUVendorString(buf); 142 ADVAPI32_RegSetValueExA(xhkey,"VendorIdentifier",0,REG_SZ,(LPBYTE)buf,strlen(buf));141 RegSetValueExA(xhkey,"VendorIdentifier",0,REG_SZ,(LPBYTE)buf,strlen(buf)); 143 142 } 144 143 cachedsi.wProcessorRevision = signature & 0xf; … … 162 161 if (features & CPUID_FPU_PRESENT) { 163 162 if (i == 0) { 164 if( ADVAPI32_RegCreateKeyA(HKEY_LOCAL_MACHINE,"HARDWARE\\DESCRIPTION\\System\\FloatingPointProcessor",&fpukey)!=ERROR_SUCCESS)163 if(RegCreateKeyA(HKEY_LOCAL_MACHINE,"HARDWARE\\DESCRIPTION\\System\\FloatingPointProcessor",&fpukey)!=ERROR_SUCCESS) 165 164 dprintf(("Unable to register FPU information\n")); 166 165 } … … 168 167 if(fpukey) { 169 168 sprintf(buf,"%d",i); 170 ADVAPI32_RegCreateKeyA(fpukey,buf,&xhfpukey);169 RegCreateKeyA(fpukey,buf,&xhfpukey); 171 170 } 172 171 } … … 177 176 178 177 if (xhkey) 179 ADVAPI32_RegCloseKey(xhkey);178 RegCloseKey(xhkey); 180 179 if (hkey) 181 ADVAPI32_RegCloseKey(hkey);180 RegCloseKey(hkey); 182 181 if (xhfpukey) 183 ADVAPI32_RegCloseKey(xhfpukey);182 RegCloseKey(xhfpukey); 184 183 if (fpukey) 185 ADVAPI32_RegCloseKey(fpukey);184 RegCloseKey(fpukey); 186 185 187 186 } -
trunk/src/kernel32/initsystem.cpp
r2973 r2984 1 /* $Id: initsystem.cpp,v 1. 5 2000-03-02 19:17:21sandervl Exp $ */1 /* $Id: initsystem.cpp,v 1.6 2000-03-03 11:15:57 sandervl Exp $ */ 2 2 /* 3 3 * Odin system initialization (registry & directories) … … 27 27 #include "dbglocal.h" 28 28 29 static HINSTANCE hInstance = 0;30 31 29 BOOL InitRegistry(); 32 33 LONG (WIN32API *ADVAPI32_RegCloseKey)(HKEY) = 0;34 LONG (WIN32API *ADVAPI32_RegOpenKeyA)(HKEY,LPCSTR,LPHKEY) = 0;35 LONG (WIN32API *ADVAPI32_RegCreateKeyA)(HKEY,LPCSTR,LPHKEY) = 0;36 LONG (WIN32API *ADVAPI32_RegSetValueExA)(HKEY,LPSTR,DWORD,DWORD,LPBYTE,DWORD) = 0;37 30 38 31 //****************************************************************************** … … 40 33 BOOL InitSystemEnvironment(ULONG nrCPUs) 41 34 { 42 hInstance = LoadLibraryA("ADVAPI32.DLL");43 if(hInstance) {44 *(VOID **)&ADVAPI32_RegCloseKey=(void*)GetProcAddress(hInstance, (LPCSTR)"RegCloseKey");45 *(VOID **)&ADVAPI32_RegOpenKeyA=(void*)GetProcAddress(hInstance, (LPCSTR)"RegOpenKeyA");46 *(VOID **)&ADVAPI32_RegCreateKeyA=(void*)GetProcAddress(hInstance, (LPCSTR)"RegCreateKeyA");47 *(VOID **)&ADVAPI32_RegSetValueExA=(void*)GetProcAddress(hInstance, (LPCSTR)"RegSetValueExA");48 }49 35 InitSystemInfo(nrCPUs); 50 36 return InitRegistry(); … … 67 53 char digbuf[16]; 68 54 69 if( ADVAPI32_RegCreateKeyA(HKEY_LOCAL_MACHINE,"SYSTEM\\CurrentControlSet\\Control\\Windows",&hkey)!=ERROR_SUCCESS) {55 if(RegCreateKeyA(HKEY_LOCAL_MACHINE,"SYSTEM\\CurrentControlSet\\Control\\Windows",&hkey)!=ERROR_SUCCESS) { 70 56 dprintf(("InitRegistry: Unable to register system information\n")); 71 57 return FALSE; 72 58 } 73 59 buf = InternalGetWindowsDirectoryA(); 74 ADVAPI32_RegSetValueExA(hkey,"Directory",0,REG_BINARY, (LPBYTE)buf, strlen(buf)+1);60 RegSetValueExA(hkey,"Directory",0,REG_BINARY, (LPBYTE)buf, strlen(buf)+1); 75 61 buf = InternalGetSystemDirectoryA(); 76 ADVAPI32_RegSetValueExA(hkey,"SystemDirectory",0,REG_BINARY, (LPBYTE)buf, strlen(buf)+1);62 RegSetValueExA(hkey,"SystemDirectory",0,REG_BINARY, (LPBYTE)buf, strlen(buf)+1); 77 63 val = 0; 78 ADVAPI32_RegSetValueExA(hkey,"ErrorMode",0,REG_DWORD, (LPBYTE)&val, sizeof(DWORD));64 RegSetValueExA(hkey,"ErrorMode",0,REG_DWORD, (LPBYTE)&val, sizeof(DWORD)); 79 65 val = 0; 80 ADVAPI32_RegSetValueExA(hkey,"NoInteractiveServices",0,REG_DWORD, (LPBYTE)&val, sizeof(DWORD));66 RegSetValueExA(hkey,"NoInteractiveServices",0,REG_DWORD, (LPBYTE)&val, sizeof(DWORD)); 81 67 val = ODINNT_BUILD_NR; 82 ADVAPI32_RegSetValueExA(hkey,"CSDVersion",0,REG_DWORD, (LPBYTE)&val, sizeof(DWORD));83 ADVAPI32_RegSetValueExA(hkey,"ShutdownTime",0,REG_DWORD, (LPBYTE)ShutdownTime, sizeof(ShutdownTime));84 ADVAPI32_RegCloseKey(hkey);68 RegSetValueExA(hkey,"CSDVersion",0,REG_DWORD, (LPBYTE)&val, sizeof(DWORD)); 69 RegSetValueExA(hkey,"ShutdownTime",0,REG_DWORD, (LPBYTE)ShutdownTime, sizeof(ShutdownTime)); 70 RegCloseKey(hkey); 85 71 86 if( ADVAPI32_RegCreateKeyA(HKEY_LOCAL_MACHINE,"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion",&hkey)!=ERROR_SUCCESS) {72 if(RegCreateKeyA(HKEY_LOCAL_MACHINE,"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion",&hkey)!=ERROR_SUCCESS) { 87 73 dprintf(("InitRegistry: Unable to register system information (2)")); 88 74 return FALSE; 89 75 } 90 76 buf = InternalGetSystemDirectoryA(); 91 ADVAPI32_RegSetValueExA(hkey,"SystemRoot",0,REG_SZ, (LPBYTE)buf, strlen(buf)+1);92 ADVAPI32_RegSetValueExA(hkey,"PathName",0,REG_SZ, (LPBYTE)buf, strlen(buf)+1);77 RegSetValueExA(hkey,"SystemRoot",0,REG_SZ, (LPBYTE)buf, strlen(buf)+1); 78 RegSetValueExA(hkey,"PathName",0,REG_SZ, (LPBYTE)buf, strlen(buf)+1); 93 79 sprintf(digbuf, "%d", ODINNT_BUILD_NR); 94 ADVAPI32_RegSetValueExA(hkey,"CurrentBuildNumber",0,REG_SZ, (LPBYTE)digbuf, strlen(digbuf)+1);95 ADVAPI32_RegSetValueExA(hkey,"CurrentType",0,REG_SZ, (LPBYTE)ODINNT_OSTYPE_UNI, sizeof(ODINNT_OSTYPE_UNI));96 ADVAPI32_RegSetValueExA(hkey,"CSDVersion",0,REG_SZ, (LPBYTE)ODINNT_CSDVERSION, sizeof(ODINNT_CSDVERSION));97 ADVAPI32_RegSetValueExA(hkey,"SoftwareType",0,REG_SZ, (LPBYTE)ODINNT_SOFTWARE_TYPE, sizeof(ODINNT_SOFTWARE_TYPE));80 RegSetValueExA(hkey,"CurrentBuildNumber",0,REG_SZ, (LPBYTE)digbuf, strlen(digbuf)+1); 81 RegSetValueExA(hkey,"CurrentType",0,REG_SZ, (LPBYTE)ODINNT_OSTYPE_UNI, sizeof(ODINNT_OSTYPE_UNI)); 82 RegSetValueExA(hkey,"CSDVersion",0,REG_SZ, (LPBYTE)ODINNT_CSDVERSION, sizeof(ODINNT_CSDVERSION)); 83 RegSetValueExA(hkey,"SoftwareType",0,REG_SZ, (LPBYTE)ODINNT_SOFTWARE_TYPE, sizeof(ODINNT_SOFTWARE_TYPE)); 98 84 99 85 sprintf(digbuf, "%d.%d", ODINNT_MAJOR_VERSION, ODINNT_MINOR_VERSION); 100 ADVAPI32_RegSetValueExA(hkey,"CurrentVersion",0,REG_SZ, (LPBYTE)digbuf, strlen(digbuf)+1);86 RegSetValueExA(hkey,"CurrentVersion",0,REG_SZ, (LPBYTE)digbuf, strlen(digbuf)+1); 101 87 102 88 val = (DWORD)time(NULL); //todo: Correct format??? 103 ADVAPI32_RegSetValueExA(hkey,"InstallDate",0,REG_DWORD, (LPBYTE)&val, sizeof(DWORD));89 RegSetValueExA(hkey,"InstallDate",0,REG_DWORD, (LPBYTE)&val, sizeof(DWORD)); 104 90 105 ADVAPI32_RegCloseKey(hkey);91 RegCloseKey(hkey); 106 92 //todo: productid, registered org/owner, sourcepath, 107 93 … … 121 107 char shellpath[260]; 122 108 123 if( ADVAPI32_RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", &hkey) != ERROR_SUCCESS)124 {125 if(ADVAPI32_RegCreateKeyA(HKEY_CURRENT_USER,"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders",&hkey)!=ERROR_SUCCESS) { 126 dprintf(("InitRegistry: Unable to register system information (3)"));127 return FALSE; 128 } 109 if(RegCreateKeyA(HKEY_CURRENT_USER,"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders",&hkey)!=ERROR_SUCCESS) { 110 dprintf(("InitRegistry: Unable to register system information (3)")); 111 return FALSE; 112 } 113 // if(RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", &hkey) != ERROR_SUCCESS) 114 // { 129 115 strcpy(shellpath, InternalGetSystemDirectoryA()); 130 strcat(shellpath, "\\ Favorites");116 strcat(shellpath, "\\WIN\\Favorites"); 131 117 CreateDirectoryA(shellpath, NULL); 132 ADVAPI32_RegSetValueExA(hkey,"Favorites",0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1);118 RegSetValueExA(hkey,"Favorites",0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1); 133 119 strcpy(shellpath, InternalGetSystemDirectoryA()); 134 strcat(shellpath, "\\ Programs\\Startup");120 strcat(shellpath, "\\WIN\\Programs\\Startup"); 135 121 CreateDirectoryA(shellpath, NULL); 136 ADVAPI32_RegSetValueExA(hkey,"Startup",0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1);122 RegSetValueExA(hkey,"Startup",0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1); 137 123 strcpy(shellpath, InternalGetSystemDirectoryA()); 138 strcat(shellpath, "\\ Desktop");124 strcat(shellpath, "\\WIN\\Desktop"); 139 125 CreateDirectoryA(shellpath, NULL); 140 ADVAPI32_RegSetValueExA(hkey,"Desktop",0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1);126 RegSetValueExA(hkey,"Desktop",0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1); 141 127 strcpy(shellpath, InternalGetSystemDirectoryA()); 142 strcat(shellpath, "\\ Start Menu\\Programs");128 strcat(shellpath, "\\WIN\\Start Menu\\Programs"); 143 129 CreateDirectoryA(shellpath, NULL); 144 ADVAPI32_RegSetValueExA(hkey,"Programs",0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1);130 RegSetValueExA(hkey,"Programs",0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1); 145 131 strcpy(shellpath, InternalGetSystemDirectoryA()); 146 strcat(shellpath, "\\ Fonts");132 strcat(shellpath, "\\WIN\\Fonts"); 147 133 CreateDirectoryA(shellpath, NULL); 148 ADVAPI32_RegSetValueExA(hkey,"Fonts",0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1);134 RegSetValueExA(hkey,"Fonts",0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1); 149 135 strcpy(shellpath, InternalGetSystemDirectoryA()); 150 strcat(shellpath, "\\ SendTo");136 strcat(shellpath, "\\WIN\\SendTo"); 151 137 CreateDirectoryA(shellpath, NULL); 152 ADVAPI32_RegSetValueExA(hkey,"SendTo",0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1);138 RegSetValueExA(hkey,"SendTo",0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1); 153 139 strcpy(shellpath, InternalGetSystemDirectoryA()); 154 strcat(shellpath, "\\ Start Menu");140 strcat(shellpath, "\\WIN\\Start Menu"); 155 141 CreateDirectoryA(shellpath, NULL); 156 ADVAPI32_RegSetValueExA(hkey,"Start Menu",0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1);142 RegSetValueExA(hkey,"Start Menu",0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1); 157 143 strcpy(shellpath, InternalGetSystemDirectoryA()); 158 strcat(shellpath, "\\ ShellNew");144 strcat(shellpath, "\\WIN\\ShellNew"); 159 145 CreateDirectoryA(shellpath, NULL); 160 ADVAPI32_RegSetValueExA(hkey,"Templates",0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1);146 RegSetValueExA(hkey,"Templates",0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1); 161 147 strcpy(shellpath, InternalGetSystemDirectoryA()); 162 strcat(shellpath, "\\ Recent");148 strcat(shellpath, "\\WIN\\Recent"); 163 149 CreateDirectoryA(shellpath, NULL); 164 ADVAPI32_RegSetValueExA(hkey,"Recent",0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1);150 RegSetValueExA(hkey,"Recent",0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1); 165 151 strcpy(shellpath, InternalGetSystemDirectoryA()); 166 strcat(shellpath, "\\ NetHood");152 strcat(shellpath, "\\WIN\\NetHood"); 167 153 CreateDirectoryA(shellpath, NULL); 168 ADVAPI32_RegSetValueExA(hkey,"NetHood",0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1);154 RegSetValueExA(hkey,"NetHood",0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1); 169 155 strcpy(shellpath, InternalGetSystemDirectoryA()); 170 strcat(shellpath, "\\ My Documents");156 strcat(shellpath, "\\WIN\\My Documents"); 171 157 CreateDirectoryA(shellpath, NULL); 172 ADVAPI32_RegSetValueExA(hkey,"Personal",0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1);173 }174 ADVAPI32_RegCloseKey(hkey);158 RegSetValueExA(hkey,"Personal",0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1); 159 // } 160 RegCloseKey(hkey); 175 161 return TRUE; 176 162 } -
trunk/src/kernel32/initsystem.h
r2044 r2984 1 /* $Id: initsystem.h,v 1. 1 1999-12-09 11:59:28 sandervl Exp $ */1 /* $Id: initsystem.h,v 1.2 2000-03-03 11:15:58 sandervl Exp $ */ 2 2 3 3 #ifndef _INITSYSTEM_H_ … … 6 6 BOOL InitSystemEnvironment(ULONG nrCPUs); 7 7 8 #ifndef OS2_INCLUDED9 extern LONG (WIN32API *ADVAPI32_RegCloseKey)(HKEY);10 extern LONG (WIN32API *ADVAPI32_RegCreateKeyA)(HKEY,LPCSTR,LPHKEY);11 extern LONG (WIN32API *ADVAPI32_RegSetValueExA)(HKEY,LPSTR,DWORD,DWORD,LPBYTE,DWORD);12 #endif13 14 8 #endif //_INITSYSTEM_H_ -
trunk/src/kernel32/initterm.cpp
r2802 r2984 1 /* $Id: initterm.cpp,v 1.3 5 2000-02-16 14:25:40sandervl Exp $ */1 /* $Id: initterm.cpp,v 1.36 2000-03-03 11:15:58 sandervl Exp $ */ 2 2 3 3 /* … … 59 59 /*-------------------------------------------------------------------*/ 60 60 static void APIENTRY cleanup(ULONG reason); 61 extern void APIENTRY Win32DllExitList(ULONG reason);62 61 63 62 extern "C" { -
trunk/src/kernel32/makefile
r2802 r2984 1 # $Id: makefile,v 1.8 4 2000-02-16 14:25:41sandervl Exp $1 # $Id: makefile,v 1.85 2000-03-03 11:15:58 sandervl Exp $ 2 2 3 3 # … … 48 48 cvtaccel.obj cvticon.obj cvticongrp.obj oslibexcept.obj cpu.obj process.obj \ 49 49 cvtcursor.obj cvtcursorgrp.obj stubs.obj interlock.obj toolhelp.obj codepage.obj \ 50 debug.obj oslibdebug.obj dbglocal.obj 50 debug.obj oslibdebug.obj dbglocal.obj registry.obj 51 51 52 52 -
trunk/src/kernel32/oslibdos.cpp
r2866 r2984 1 /* $Id: oslibdos.cpp,v 1.2 0 2000-02-23 01:06:58 sandervl Exp $ */1 /* $Id: oslibdos.cpp,v 1.21 2000-03-03 11:15:58 sandervl Exp $ */ 2 2 /* 3 3 * Wrappers for OS/2 Dos* API … … 20 20 #include <stdio.h> 21 21 #include <string.h> 22 #include <win32 type.h>22 #include <win32api.h> 23 23 #include <winconst.h> 24 24 #include <misc.h> … … 29 29 #define DBG_LOCALLOG DBG_oslibdos 30 30 #include "dbglocal.h" 31 32 /***********************************33 * PH: fixups for missing os2win.h *34 ***********************************/35 36 void _System _O32_SetLastError(ULONG ulError);37 38 APIRET APIENTRY DosAliasMem(PVOID pb, ULONG cb, PPVOID ppbAlias, ULONG fl);39 31 40 32 //****************************************************************************** … … 621 613 if (nMaxInstances>0xff) 622 614 { 623 _O32_SetLastError(87); // ERROR_INVALID_PARAMETER615 SetLastError(ERROR_INVALID_PARAMETER_W); // ERROR_INVALID_PARAMETER 624 616 return -1; // INVALID_HANDLE_VALUE 625 617 } … … 648 640 if (rc) 649 641 { 650 if ( rc == ERROR_PIPE_BUSY ) _O32_SetLastError(ERROR_PIPE_BUSY_W);642 if ( rc == ERROR_PIPE_BUSY ) SetLastError(ERROR_PIPE_BUSY_W); 651 643 else 652 if ( rc == ERROR_PATH_NOT_FOUND ) _O32_SetLastError(ERROR_PATH_NOT_FOUND_W);644 if ( rc == ERROR_PATH_NOT_FOUND ) SetLastError(ERROR_PATH_NOT_FOUND_W); 653 645 else 654 if ( rc == ERROR_NOT_ENOUGH_MEMORY ) _O32_SetLastError(ERROR_NOT_ENOUGH_MEMORY_W);646 if ( rc == ERROR_NOT_ENOUGH_MEMORY ) SetLastError(ERROR_NOT_ENOUGH_MEMORY_W); 655 647 else 656 if ( rc == ERROR_INVALID_PARAMETER ) _O32_SetLastError(ERROR_INVALID_PARAMETER_W);648 if ( rc == ERROR_INVALID_PARAMETER ) SetLastError(ERROR_INVALID_PARAMETER_W); 657 649 else 658 if ( rc == ERROR_OUT_OF_STRUCTURES ) _O32_SetLastError(ERROR_OUT_OF_STRUCTURES_W);650 if ( rc == ERROR_OUT_OF_STRUCTURES ) SetLastError(ERROR_OUT_OF_STRUCTURES_W); 659 651 else 660 652 // Unknown error 661 _O32_SetLastError(ERROR_INVALID_PARAMETER_W); // fixme!653 SetLastError(ERROR_INVALID_PARAMETER_W); // fixme! 662 654 return -1; // INVALID_HANDLE_VALUE 663 655 } … … 677 669 if (!rc) return (TRUE); 678 670 else 679 if (rc==ERROR_BROKEN_PIPE) _O32_SetLastError(ERROR_BROKEN_PIPE_W);680 else 681 if (rc==ERROR_BAD_PIPE) _O32_SetLastError(ERROR_BAD_PIPE_W);682 else 683 if (rc==ERROR_PIPE_NOT_CONNECTED) _O32_SetLastError(ERROR_PIPE_NOT_CONNECTED_W);671 if (rc==ERROR_BROKEN_PIPE) SetLastError(ERROR_BROKEN_PIPE_W); 672 else 673 if (rc==ERROR_BAD_PIPE) SetLastError(ERROR_BAD_PIPE_W); 674 else 675 if (rc==ERROR_PIPE_NOT_CONNECTED) SetLastError(ERROR_PIPE_NOT_CONNECTED_W); 684 676 else 685 677 // TODO: Implemnt this using Windows Errors 686 678 // if (rc==ERROR_INTERRUPT) 687 _O32_SetLastError(ERROR_PIPE_NOT_CONNECTED_W);679 SetLastError(ERROR_PIPE_NOT_CONNECTED_W); 688 680 689 681 return (FALSE); … … 724 716 if (!rc) return (TRUE); 725 717 else 726 if ( rc==ERROR_FILE_NOT_FOUND ) _O32_SetLastError(ERROR_FILE_NOT_FOUND_W);727 else 728 if ( rc==ERROR_PATH_NOT_FOUND ) _O32_SetLastError(ERROR_PATH_NOT_FOUND_W);729 else 730 if ( rc==ERROR_ACCESS_DENIED ) _O32_SetLastError(ERROR_ACCESS_DENIED_W);731 else 732 if ( rc==ERROR_MORE_DATA ) _O32_SetLastError(ERROR_MORE_DATA_W);733 else 734 if ( rc==ERROR_PIPE_BUSY ) _O32_SetLastError(ERROR_PIPE_BUSY_W);735 else 736 if ( rc==ERROR_BAD_FORMAT ) _O32_SetLastError(ERROR_BAD_FORMAT_W);737 else 738 if ( rc==ERROR_BROKEN_PIPE ) _O32_SetLastError(ERROR_BROKEN_PIPE_W);739 else 740 if ( rc==ERROR_BAD_PIPE ) _O32_SetLastError(ERROR_BAD_PIPE_W);741 else 742 if ( rc==ERROR_PIPE_NOT_CONNECTED ) _O32_SetLastError(ERROR_PIPE_NOT_CONNECTED_W);718 if ( rc==ERROR_FILE_NOT_FOUND ) SetLastError(ERROR_FILE_NOT_FOUND_W); 719 else 720 if ( rc==ERROR_PATH_NOT_FOUND ) SetLastError(ERROR_PATH_NOT_FOUND_W); 721 else 722 if ( rc==ERROR_ACCESS_DENIED ) SetLastError(ERROR_ACCESS_DENIED_W); 723 else 724 if ( rc==ERROR_MORE_DATA ) SetLastError(ERROR_MORE_DATA_W); 725 else 726 if ( rc==ERROR_PIPE_BUSY ) SetLastError(ERROR_PIPE_BUSY_W); 727 else 728 if ( rc==ERROR_BAD_FORMAT ) SetLastError(ERROR_BAD_FORMAT_W); 729 else 730 if ( rc==ERROR_BROKEN_PIPE ) SetLastError(ERROR_BROKEN_PIPE_W); 731 else 732 if ( rc==ERROR_BAD_PIPE ) SetLastError(ERROR_BAD_PIPE_W); 733 else 734 if ( rc==ERROR_PIPE_NOT_CONNECTED ) SetLastError(ERROR_PIPE_NOT_CONNECTED_W); 743 735 else 744 736 // TODO: Implemnt this using Windows Errors 745 737 // if (rc==ERROR_INTERRUPT) 746 _O32_SetLastError(233);738 SetLastError(ERROR_PIPE_NOT_CONNECTED_W); 747 739 748 740 return (FALSE); … … 771 763 if (!rc) return (TRUE); 772 764 else 773 if ( rc==ERROR_ACCESS_DENIED ) _O32_SetLastError(ERROR_ACCESS_DENIED_W);774 else 775 if ( rc==ERROR_MORE_DATA ) _O32_SetLastError(ERROR_MORE_DATA_W);776 else 777 if ( rc==ERROR_PIPE_BUSY ) _O32_SetLastError(ERROR_PIPE_BUSY_W);778 else 779 if ( rc==ERROR_BAD_FORMAT ) _O32_SetLastError(ERROR_BAD_FORMAT_W);780 else 781 if ( rc==ERROR_BROKEN_PIPE ) _O32_SetLastError(ERROR_BROKEN_PIPE_W);782 else 783 if ( rc==ERROR_BAD_PIPE ) _O32_SetLastError(ERROR_BAD_PIPE_W);784 else 785 if ( rc==ERROR_PIPE_NOT_CONNECTED ) _O32_SetLastError(ERROR_PIPE_NOT_CONNECTED_W);765 if ( rc==ERROR_ACCESS_DENIED ) SetLastError(ERROR_ACCESS_DENIED_W); 766 else 767 if ( rc==ERROR_MORE_DATA ) SetLastError(ERROR_MORE_DATA_W); 768 else 769 if ( rc==ERROR_PIPE_BUSY ) SetLastError(ERROR_PIPE_BUSY_W); 770 else 771 if ( rc==ERROR_BAD_FORMAT ) SetLastError(ERROR_BAD_FORMAT_W); 772 else 773 if ( rc==ERROR_BROKEN_PIPE ) SetLastError(ERROR_BROKEN_PIPE_W); 774 else 775 if ( rc==ERROR_BAD_PIPE ) SetLastError(ERROR_BAD_PIPE_W); 776 else 777 if ( rc==ERROR_PIPE_NOT_CONNECTED ) SetLastError(ERROR_PIPE_NOT_CONNECTED_W); 786 778 else 787 779 // Unknown error 788 _O32_SetLastError(ERROR_PIPE_NOT_CONNECTED_W);780 SetLastError(ERROR_PIPE_NOT_CONNECTED_W); 789 781 790 782 return (FALSE); … … 815 807 } 816 808 else 817 if ( rc==ERROR_ACCESS_DENIED ) _O32_SetLastError(ERROR_ACCESS_DENIED_W);818 else 819 if ( rc==ERROR_PIPE_BUSY ) _O32_SetLastError(ERROR_PIPE_BUSY_W);820 else 821 if ( rc==ERROR_BAD_PIPE ) _O32_SetLastError(ERROR_BAD_PIPE_W);822 else 823 if ( rc==ERROR_PIPE_NOT_CONNECTED ) _O32_SetLastError(ERROR_PIPE_NOT_CONNECTED_W);809 if ( rc==ERROR_ACCESS_DENIED ) SetLastError(ERROR_ACCESS_DENIED_W); 810 else 811 if ( rc==ERROR_PIPE_BUSY ) SetLastError(ERROR_PIPE_BUSY_W); 812 else 813 if ( rc==ERROR_BAD_PIPE ) SetLastError(ERROR_BAD_PIPE_W); 814 else 815 if ( rc==ERROR_PIPE_NOT_CONNECTED ) SetLastError(ERROR_PIPE_NOT_CONNECTED_W); 824 816 else 825 817 // Unknown error 826 _O32_SetLastError(ERROR_PIPE_NOT_CONNECTED_W);818 SetLastError(ERROR_PIPE_NOT_CONNECTED_W); 827 819 828 820 return (FALSE); … … 840 832 if (!rc) return TRUE; 841 833 else 842 if ( rc==ERROR_BROKEN_PIPE ) _O32_SetLastError(ERROR_BROKEN_PIPE_W);843 else 844 if ( rc==ERROR_BAD_PIPE ) _O32_SetLastError(ERROR_BAD_PIPE_W);834 if ( rc==ERROR_BROKEN_PIPE ) SetLastError(ERROR_BROKEN_PIPE_W); 835 else 836 if ( rc==ERROR_BAD_PIPE ) SetLastError(ERROR_BAD_PIPE_W); 845 837 else 846 838 // Unknown error 847 _O32_SetLastError(ERROR_PIPE_NOT_CONNECTED_W); // Maybe another?839 SetLastError(ERROR_PIPE_NOT_CONNECTED_W); // Maybe another? 848 840 849 841 return (FALSE); … … 873 865 if (!rc) return TRUE; 874 866 else 875 if ( rc == ERROR_PATH_NOT_FOUND ) _O32_SetLastError(ERROR_PATH_NOT_FOUND_W);876 else 877 if ( rc==ERROR_BAD_PIPE ) _O32_SetLastError(ERROR_BAD_PIPE_W);878 else 879 if ( rc == ERROR_PIPE_BUSY ) _O32_SetLastError(ERROR_PIPE_BUSY_W);880 else 881 if ( rc == ERROR_SEM_TIMEOUT_W ) _O32_SetLastError(ERROR_SEM_TIMEOUT_W);867 if ( rc == ERROR_PATH_NOT_FOUND ) SetLastError(ERROR_PATH_NOT_FOUND_W); 868 else 869 if ( rc==ERROR_BAD_PIPE ) SetLastError(ERROR_BAD_PIPE_W); 870 else 871 if ( rc == ERROR_PIPE_BUSY ) SetLastError(ERROR_PIPE_BUSY_W); 872 else 873 if ( rc == ERROR_SEM_TIMEOUT_W ) SetLastError(ERROR_SEM_TIMEOUT_W); 882 874 else 883 875 // TODO: Implemnt this using Windows Errors 884 876 // if (rc==ERROR_INTERRUPT) 885 _O32_SetLastError(ERROR_PIPE_NOT_CONNECTED_W);877 SetLastError(ERROR_PIPE_NOT_CONNECTED_W); 886 878 887 879 return (FALSE); -
trunk/src/kernel32/wprocess.cpp
r2880 r2984 1 /* $Id: wprocess.cpp,v 1. 69 2000-02-24 19:17:51sandervl Exp $ */1 /* $Id: wprocess.cpp,v 1.70 2000-03-03 11:16:00 sandervl Exp $ */ 2 2 3 3 /* … … 344 344 //****************************************************************************** 345 345 //****************************************************************************** 346 void _System Win32DllExitList(ULONG reason)346 static void _System Win32DllExitList(ULONG reason) 347 347 { 348 348 dprintf(("Win32DllExitList %d\n", reason));
Note:
See TracChangeset
for help on using the changeset viewer.