Changeset 2984 for trunk/src


Ignore:
Timestamp:
Mar 3, 2000, 12:16:00 PM (25 years ago)
Author:
sandervl
Message:

moved registry apis into kernel32 + cleanup

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.71 2000-02-15 19:06:12 sandervl Exp $
     1; $Id: KERNEL32.DEF,v 1.72 2000-03-03 11:15:58 sandervl Exp $
    22
    33;Created by BLAST for IBM's compiler
     
    10771077    CPUFeatures          @2005
    10781078
     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
    10791128    GetDisplayCodepage__Fv                  @3000
    10801129    GetWindowsCodepage__Fv                  @3001
  • trunk/src/kernel32/conbuffer.cpp

    r2802 r2984  
    1 /* $Id: conbuffer.cpp,v 1.9 2000-02-16 14:25:30 sandervl Exp $ */
     1/* $Id: conbuffer.cpp,v 1.10 2000-03-03 11:15:56 sandervl Exp $ */
    22
    33/*
     
    6464#include <os2wrap.h>    //Odin32 OS/2 api wrappers
    6565
     66#include <win32api.h>
    6667#include <misc.h>
    6768#include <string.h>
     
    7778#define DBG_LOCALLOG    DBG_conbuffer
    7879#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 }
    9780
    9881
     
    144127  if (pHMHandleData->lpHandlerData == NULL)              /* check allocation */
    145128  {
    146     SetLastError(ERROR_NOT_ENOUGH_MEMORY);          /* set error information */
     129    SetLastError(ERROR_NOT_ENOUGH_MEMORY_W);          /* set error information */
    147130    return (INVALID_HANDLE_VALUE);                  /* raise error condition */
    148131  }
     
    233216#endif
    234217
    235   SetLastError(ERROR_ACCESS_DENIED);
     218  SetLastError(ERROR_ACCESS_DENIED_W);
    236219  return FALSE;
    237220}
     
    273256                      /* check if we're called with non-existing line buffer */
    274257  if (pConsoleBuffer->ppszLine == NULL) {
    275         SetLastError(ERROR_SYS_INTERNAL);
     258        SetLastError(ERROR_OUTOFMEMORY_W);
    276259        return FALSE;
    277260  }
     
    770753#endif
    771754
    772   SetLastError(ERROR_INVALID_FUNCTION);           /* request not implemented */
     755  SetLastError(ERROR_INVALID_FUNCTION_W);           /* request not implemented */
    773756  return(FALSE);                 /* we assume this indicates API call failed */
    774757}
     
    816799      *lpNumberOfAttrsWritten = 0;                /* complete error handling */
    817800
    818     SetLastError(ERROR_INVALID_PARAMETER);
     801    SetLastError(ERROR_INVALID_PARAMETER_W);
    819802    return (FALSE);
    820803  }
     
    827810      *lpNumberOfAttrsWritten = 0;                /* complete error handling */
    828811
    829     SetLastError(ERROR_INVALID_PARAMETER);
     812    SetLastError(ERROR_INVALID_PARAMETER_W);
    830813    return (FALSE);
    831814  }
     
    916899      *lpNumberOfCharsWritten = 0;                /* complete error handling */
    917900
    918     SetLastError(ERROR_INVALID_PARAMETER);
     901    SetLastError(ERROR_INVALID_PARAMETER_W);
    919902    return (FALSE);
    920903  }
     
    928911      *lpNumberOfCharsWritten = 0;                /* complete error handling */
    929912
    930     SetLastError(ERROR_INVALID_PARAMETER);
     913    SetLastError(ERROR_INVALID_PARAMETER_W);
    931914    return (FALSE);
    932915  }
     
    1016999      *lpNumberOfCharsWritten = 0;                /* complete error handling */
    10171000
    1018     SetLastError(ERROR_INVALID_PARAMETER);
     1001    SetLastError(ERROR_INVALID_PARAMETER_W);
    10191002    return (FALSE);
    10201003  }
     
    10281011      *lpNumberOfCharsWritten = 0;                /* complete error handling */
    10291012
    1030     SetLastError(ERROR_INVALID_PARAMETER);
     1013    SetLastError(ERROR_INVALID_PARAMETER_W);
    10311014    return (FALSE);
    10321015  }
     
    12941277       (coordDestBufferSize.Y < coordDestBufferCoord.Y) )
    12951278  {
    1296     SetLastError(ERROR_INVALID_PARAMETER);        /* set detailed error info */
     1279    SetLastError(ERROR_INVALID_PARAMETER_W);        /* set detailed error info */
    12971280    return (FALSE);                                            /* API failed */
    12981281  }
     
    13931376       (coordDestBufferSize.Y < coordDestBufferCoord.Y) )
    13941377  {
    1395     SetLastError(ERROR_INVALID_PARAMETER);        /* set detailed error info */
     1378    SetLastError(ERROR_INVALID_PARAMETER_W);        /* set detailed error info */
    13961379    return (FALSE);                                            /* API failed */
    13971380  }
     
    14821465      *lpcNumberRead = 0;                            /* complete error handling */
    14831466
    1484     SetLastError(ERROR_INVALID_PARAMETER);
     1467    SetLastError(ERROR_INVALID_PARAMETER_W);
    14851468    return (FALSE);
    14861469  }
     
    14931476      *lpcNumberRead = 0;                            /* complete error handling */
    14941477
    1495     SetLastError(ERROR_INVALID_PARAMETER);
     1478    SetLastError(ERROR_INVALID_PARAMETER_W);
    14961479    return (FALSE);
    14971480  }
     
    15741557      *lpcNumberRead = 0;                         /* complete error handling */
    15751558
    1576     SetLastError(ERROR_INVALID_PARAMETER);
     1559    SetLastError(ERROR_INVALID_PARAMETER_W);
    15771560    return (FALSE);
    15781561  }
     
    15851568      *lpcNumberRead = 0;                         /* complete error handling */
    15861569
    1587     SetLastError(ERROR_INVALID_PARAMETER);
     1570    SetLastError(ERROR_INVALID_PARAMETER_W);
    15881571    return (FALSE);
    15891572  }
     
    16661649      *lpcNumberRead = 0;                         /* complete error handling */
    16671650
    1668     SetLastError(ERROR_INVALID_PARAMETER);
     1651    SetLastError(ERROR_INVALID_PARAMETER_W);
    16691652    return (FALSE);
    16701653  }
     
    16771660      *lpcNumberRead = 0;                         /* complete error handling */
    16781661
    1679     SetLastError(ERROR_INVALID_PARAMETER);
     1662    SetLastError(ERROR_INVALID_PARAMETER_W);
    16801663    return (FALSE);
    16811664  }
     
    21002083       (pCCI->dwSize > 100) )
    21012084  {
    2102     SetLastError(ERROR_INVALID_PARAMETER);        /* set extended error info */
     2085    SetLastError(ERROR_INVALID_PARAMETER_W);        /* set extended error info */
    21032086    return (FALSE);                                            /* API failed */
    21042087  }
     
    23922375       )
    23932376    {
    2394       SetLastError(ERROR_INVALID_PARAMETER);        /* set error information */
     2377      SetLastError(ERROR_INVALID_PARAMETER_W);        /* set error information */
    23952378      return (FALSE);                                               /* error */
    23962379    }
     
    24032386       )
    24042387    {
    2405       SetLastError(ERROR_INVALID_PARAMETER);        /* set error information */
     2388      SetLastError(ERROR_INVALID_PARAMETER_W);        /* set error information */
    24062389      return (FALSE);                                               /* error */
    24072390    }
     
    24382421       )
    24392422    {
    2440       SetLastError(ERROR_INVALID_PARAMETER);        /* set error information */
     2423      SetLastError(ERROR_INVALID_PARAMETER_W);        /* set error information */
    24412424      return (FALSE);                                               /* error */
    24422425    }
     
    26152598       (coordSrcBufferSize.Y < coordSrcBufferCoord.Y) )
    26162599  {
    2617     SetLastError(ERROR_INVALID_PARAMETER);        /* set detailed error info */
     2600    SetLastError(ERROR_INVALID_PARAMETER_W);        /* set detailed error info */
    26182601    return (FALSE);                                            /* API failed */
    26192602  }
     
    27212704       (coordSrcBufferSize.Y < coordSrcBufferCoord.Y) )
    27222705  {
    2723     SetLastError(ERROR_INVALID_PARAMETER);        /* set detailed error info */
     2706    SetLastError(ERROR_INVALID_PARAMETER_W);        /* set detailed error info */
    27242707    return (FALSE);                                            /* API failed */
    27252708  }
     
    28172800      *lpcWritten = 0;                            /* complete error handling */
    28182801
    2819     SetLastError(ERROR_INVALID_PARAMETER);
     2802    SetLastError(ERROR_INVALID_PARAMETER_W);
    28202803    return (FALSE);
    28212804  }
     
    28282811      *lpcWritten = 0;                            /* complete error handling */
    28292812
    2830     SetLastError(ERROR_INVALID_PARAMETER);
     2813    SetLastError(ERROR_INVALID_PARAMETER_W);
    28312814    return (FALSE);
    28322815  }
     
    29172900      *lpcWritten = 0;                            /* complete error handling */
    29182901
    2919     SetLastError(ERROR_INVALID_PARAMETER);
     2902    SetLastError(ERROR_INVALID_PARAMETER_W);
    29202903    return (FALSE);
    29212904  }
     
    29282911      *lpcWritten = 0;                            /* complete error handling */
    29292912
    2930     SetLastError(ERROR_INVALID_PARAMETER);
     2913    SetLastError(ERROR_INVALID_PARAMETER_W);
    29312914    return (FALSE);
    29322915  }
     
    30173000      *lpcWritten = 0;                            /* complete error handling */
    30183001
    3019     SetLastError(ERROR_INVALID_PARAMETER);
     3002    SetLastError(ERROR_INVALID_PARAMETER_W);
    30203003    return (FALSE);
    30213004  }
     
    30283011      *lpcWritten = 0;                            /* complete error handling */
    30293012
    3030     SetLastError(ERROR_INVALID_PARAMETER);
     3013    SetLastError(ERROR_INVALID_PARAMETER_W);
    30313014    return (FALSE);
    30323015  }
  • trunk/src/kernel32/conin.cpp

    r2802 r2984  
    1 /* $Id: conin.cpp,v 1.8 2000-02-16 14:25:31 sandervl Exp $ */
     1/* $Id: conin.cpp,v 1.9 2000-03-03 11:15:57 sandervl Exp $ */
    22
    33/*
     
    3434#include <os2wrap.h>    //Odin32 OS/2 api wrappers
    3535
     36#include <win32api.h>
    3637#include <misc.h>
    3738#include <string.h>
     
    4647#define DBG_LOCALLOG    DBG_conin
    4748#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 }
    6649
    6750
     
    284267#endif
    285268
    286   SetLastError(ERROR_ACCESS_DENIED);
     269  SetLastError(ERROR_ACCESS_DENIED_W);
    287270  return FALSE;
    288271}
     
    401384#endif
    402385
    403   SetLastError(ERROR_INVALID_FUNCTION);           /* request not implemented */
     386  SetLastError(ERROR_INVALID_FUNCTION_W);           /* request not implemented */
    404387  return(FALSE);                 /* we assume this indicates API call failed */
    405388}
  • trunk/src/kernel32/conout.cpp

    r2802 r2984  
    1 /* $Id: conout.cpp,v 1.6 2000-02-16 14:25:32 sandervl Exp $ */
     1/* $Id: conout.cpp,v 1.7 2000-03-03 11:15:57 sandervl Exp $ */
    22
    33/*
     
    6363
    6464#include <win32type.h>
     65#include <win32api.h>
    6566#include <misc.h>
    6667
     
    7677#define DBG_LOCALLOG    DBG_conout
    7778#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 
    10979
    11080/*****************************************************************************
     
    234204#endif
    235205
    236   SetLastError(ERROR_ACCESS_DENIED);
     206  SetLastError(ERROR_ACCESS_DENIED_W);
    237207  return FALSE;
    238208}
  • trunk/src/kernel32/conprop2.cpp

    r2979 r2984  
    1 /* $Id: conprop2.cpp,v 1.5 2000-03-03 09:06:19 sandervl Exp $ */
     1/* $Id: conprop2.cpp,v 1.6 2000-03-03 11:15:57 sandervl Exp $ */
    22
    33/*
     
    4040
    4141#include <win32type.h>
     42#include <win32api.h>
    4243#include <misc.h>
    4344#include <stdio.h>
     
    5657 * Defines                                                                   *
    5758 *****************************************************************************/
    58 
    59 #define ERROR_SUCCESS 0
    60 
    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      0xFFFFFFEFL
    75 #define HKEY_CURRENT_USER_O32       0xFFFFFFEEL
    76 #define HKEY_USERS_O32              0xFFFFFFEDL
    77 #define HKEY_CLASSES_ROOT_O32       0xFFFFFFECL
    78 
    79 #define KEY_ALL_ACCESS 0x0000003f
    80 
    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 
    9459
    9560/*****************************************************************************
     
    175140
    176141  // HKEY_CURRENT_USER/SOFTWARE/ODIN/ConsoleProperties/<process name>/<option name>
    177   LONG  lRes = ERROR_SUCCESS;
     142  LONG  lRes = ERROR_SUCCESS_W;
    178143  HKEY  hkConsole;
    179144  char  szKey[256];
     
    198163             szProcessName);
    199164
    200     lRes = _O32_RegOpenKeyEx(HKEY_CURRENT_USER_O32,
     165    lRes = RegOpenKeyExA(HKEY_CURRENT_USER,
    201166                         szKey,
    202167                         0,
     
    206171
    207172  // 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,
    210175                         "Software\\ODIN\\ConsoleProperties\\DEFAULT",
    211176                         0,
     
    214179
    215180  // now it's time to retrieve information
    216   if (lRes != ERROR_SUCCESS)
     181  if (lRes != ERROR_SUCCESS_W)
    217182  {
    218183    // load hardcoded defaults instead
     
    225190#define REGQUERYVALUE(name,var)              \
    226191  dwSize = sizeof(pConsoleOptions->var);             \
    227   lRes = _O32_RegQueryValueEx(hkConsole, name, NULL, &dwType, \
     192  lRes = RegQueryValueExA(hkConsole, name, NULL, &dwType, \
    228193           (LPBYTE)&pConsoleOptions->var, &dwSize);
    229194
     
    253218#undef REGQUERYVALUE
    254219
    255   _O32_RegCloseKey(hkConsole);
     220  RegCloseKey(hkConsole);
    256221
    257222  return (NO_ERROR);
     
    277242
    278243  // HKEY_CURRENT_USER/SOFTWARE/ODIN/ConsoleProperties/<process name>/<option name>
    279   LONG  lRes = ERROR_SUCCESS;
     244  LONG  lRes = ERROR_SUCCESS_W;
    280245  HKEY  hkConsole;
    281246  char  szKey[256];
     
    301266             szProcessName);
    302267
    303     lRes = _O32_RegCreateKeyEx(HKEY_CURRENT_USER_O32,
     268    lRes = RegCreateKeyExA(HKEY_CURRENT_USER,
    304269                               szKey,
    305270                               0,
     
    310275                               &hkConsole,
    311276                               &dwDisposition);
    312     if (lRes != ERROR_SUCCESS)
     277    if (lRes != ERROR_SUCCESS_W)
    313278       return lRes;
    314279  }
     
    316281
    317282#define REGSAVEVALUE(name,var) \
    318   lRes = _O32_RegSetValueEx(hkConsole, name, 0, REG_DWORD, \
     283  lRes = RegSetValueExA(hkConsole, name, 0, REG_DWORD, \
    319284                 (LPBYTE)&pConsoleOptions->var, sizeof(pConsoleOptions->var));
    320285
     
    344309#undef REGSAVEVALUE
    345310
    346   _O32_RegCloseKey(hkConsole);
     311  RegCloseKey(hkConsole);
    347312
    348313  return (NO_ERROR);
  • trunk/src/kernel32/cpu.cpp

    r2802 r2984  
    1 /* $Id: cpu.cpp,v 1.6 2000-02-16 14:25:36 sandervl Exp $ */
     1/* $Id: cpu.cpp,v 1.7 2000-03-03 11:15:57 sandervl Exp $ */
    22/*
    33 * Odin win32 CPU apis
     
    2121#include "debugtools.h"
    2222#include <cpuhlp.h>
    23 #include "initsystem.h"
    2423
    2524#define DBG_LOCALLOG    DBG_cpu
     
    102101
    103102        /* 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) {
    105104            dprintf(("Unable to register CPU information\n"));
    106105        }
     
    113112                sprintf(buf,"%d",i);
    114113                if (xhkey)
    115                         ADVAPI32_RegCloseKey(xhkey);
    116                 ADVAPI32_RegCreateKeyA(hkey,buf,&xhkey);
     114                        RegCloseKey(xhkey);
     115                RegCreateKeyA(hkey,buf,&xhkey);
    117116
    118117                signature = GetCPUSignature();
     
    137136                sprintf(buf,"CPU %ld",cachedsi.dwProcessorType);
    138137                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));
    140139                        memset(buf, 0, sizeof(buf));
    141140                        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));
    143142                }
    144143                cachedsi.wProcessorRevision = signature & 0xf;
     
    162161                if (features & CPUID_FPU_PRESENT) {
    163162                        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)
    165164                                        dprintf(("Unable to register FPU information\n"));
    166165                        }
     
    168167                        if(fpukey) {
    169168                                sprintf(buf,"%d",i);
    170                                 ADVAPI32_RegCreateKeyA(fpukey,buf,&xhfpukey);
     169                                RegCreateKeyA(fpukey,buf,&xhfpukey);
    171170                        }
    172171                }
     
    177176
    178177        if (xhkey)
    179                 ADVAPI32_RegCloseKey(xhkey);
     178                RegCloseKey(xhkey);
    180179        if (hkey)
    181                 ADVAPI32_RegCloseKey(hkey);
     180                RegCloseKey(hkey);
    182181        if (xhfpukey)
    183                 ADVAPI32_RegCloseKey(xhfpukey);
     182                RegCloseKey(xhfpukey);
    184183        if (fpukey)
    185                 ADVAPI32_RegCloseKey(fpukey);
     184                RegCloseKey(fpukey);
    186185
    187186}
  • trunk/src/kernel32/initsystem.cpp

    r2973 r2984  
    1 /* $Id: initsystem.cpp,v 1.5 2000-03-02 19:17:21 sandervl Exp $ */
     1/* $Id: initsystem.cpp,v 1.6 2000-03-03 11:15:57 sandervl Exp $ */
    22/*
    33 * Odin system initialization (registry & directories)
     
    2727#include "dbglocal.h"
    2828
    29 static HINSTANCE hInstance = 0;
    30 
    3129BOOL 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;
    3730
    3831//******************************************************************************
     
    4033BOOL InitSystemEnvironment(ULONG nrCPUs)
    4134{
    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    }
    4935   InitSystemInfo(nrCPUs);
    5036   return InitRegistry();
     
    6753 char  digbuf[16];
    6854
    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) {
    7056        dprintf(("InitRegistry: Unable to register system information\n"));
    7157        return FALSE;
    7258   }
    7359   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);
    7561   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);
    7763   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));
    7965   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));
    8167   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);
    8571
    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) {
    8773        dprintf(("InitRegistry: Unable to register system information (2)"));
    8874        return FALSE;
    8975   }
    9076   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);
    9379   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));
    9884
    9985   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);
    10187
    10288   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));
    10490   
    105    ADVAPI32_RegCloseKey(hkey);
     91   RegCloseKey(hkey);
    10692   //todo: productid, registered org/owner, sourcepath,   
    10793
     
    121107   char shellpath[260];
    122108
    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//   {
    129115        strcpy(shellpath, InternalGetSystemDirectoryA());
    130         strcat(shellpath, "\\Favorites");
     116        strcat(shellpath, "\\WIN\\Favorites");
    131117        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);
    133119        strcpy(shellpath, InternalGetSystemDirectoryA());
    134         strcat(shellpath, "\\Programs\\Startup");
     120        strcat(shellpath, "\\WIN\\Programs\\Startup");
    135121        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);
    137123        strcpy(shellpath, InternalGetSystemDirectoryA());
    138         strcat(shellpath, "\\Desktop");
     124        strcat(shellpath, "\\WIN\\Desktop");
    139125        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);
    141127        strcpy(shellpath, InternalGetSystemDirectoryA());
    142         strcat(shellpath, "\\Start Menu\\Programs");
     128        strcat(shellpath, "\\WIN\\Start Menu\\Programs");
    143129        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);
    145131        strcpy(shellpath, InternalGetSystemDirectoryA());
    146         strcat(shellpath, "\\Fonts");
     132        strcat(shellpath, "\\WIN\\Fonts");
    147133        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);
    149135        strcpy(shellpath, InternalGetSystemDirectoryA());
    150         strcat(shellpath, "\\SendTo");
     136        strcat(shellpath, "\\WIN\\SendTo");
    151137        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);
    153139        strcpy(shellpath, InternalGetSystemDirectoryA());
    154         strcat(shellpath, "\\Start Menu");
     140        strcat(shellpath, "\\WIN\\Start Menu");
    155141        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);
    157143        strcpy(shellpath, InternalGetSystemDirectoryA());
    158         strcat(shellpath, "\\ShellNew");
     144        strcat(shellpath, "\\WIN\\ShellNew");
    159145        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);
    161147        strcpy(shellpath, InternalGetSystemDirectoryA());
    162         strcat(shellpath, "\\Recent");
     148        strcat(shellpath, "\\WIN\\Recent");
    163149        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);
    165151        strcpy(shellpath, InternalGetSystemDirectoryA());
    166         strcat(shellpath, "\\NetHood");
     152        strcat(shellpath, "\\WIN\\NetHood");
    167153        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);
    169155        strcpy(shellpath, InternalGetSystemDirectoryA());
    170         strcat(shellpath, "\\My Documents");
     156        strcat(shellpath, "\\WIN\\My Documents");
    171157        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);
    175161   return TRUE;
    176162}
  • 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 $ */
    22
    33#ifndef _INITSYSTEM_H_
     
    66BOOL InitSystemEnvironment(ULONG nrCPUs);
    77
    8 #ifndef OS2_INCLUDED
    9 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 #endif
    13 
    148#endif //_INITSYSTEM_H_
  • trunk/src/kernel32/initterm.cpp

    r2802 r2984  
    1 /* $Id: initterm.cpp,v 1.35 2000-02-16 14:25:40 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.36 2000-03-03 11:15:58 sandervl Exp $ */
    22
    33/*
     
    5959/*-------------------------------------------------------------------*/
    6060static void APIENTRY cleanup(ULONG reason);
    61 extern void APIENTRY Win32DllExitList(ULONG reason);
    6261
    6362extern "C" {
  • trunk/src/kernel32/makefile

    r2802 r2984  
    1 # $Id: makefile,v 1.84 2000-02-16 14:25:41 sandervl Exp $
     1# $Id: makefile,v 1.85 2000-03-03 11:15:58 sandervl Exp $
    22
    33#
     
    4848cvtaccel.obj cvticon.obj cvticongrp.obj oslibexcept.obj cpu.obj process.obj \
    4949cvtcursor.obj cvtcursorgrp.obj stubs.obj interlock.obj toolhelp.obj codepage.obj \
    50 debug.obj oslibdebug.obj dbglocal.obj
     50debug.obj oslibdebug.obj dbglocal.obj registry.obj
    5151
    5252
  • trunk/src/kernel32/oslibdos.cpp

    r2866 r2984  
    1 /* $Id: oslibdos.cpp,v 1.20 2000-02-23 01:06:58 sandervl Exp $ */
     1/* $Id: oslibdos.cpp,v 1.21 2000-03-03 11:15:58 sandervl Exp $ */
    22/*
    33 * Wrappers for OS/2 Dos* API
     
    2020#include <stdio.h>
    2121#include <string.h>
    22 #include <win32type.h>
     22#include <win32api.h>
    2323#include <winconst.h>
    2424#include <misc.h>
     
    2929#define DBG_LOCALLOG    DBG_oslibdos
    3030#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);
    3931
    4032//******************************************************************************
     
    621613  if (nMaxInstances>0xff)
    622614  {
    623     _O32_SetLastError(87); // ERROR_INVALID_PARAMETER
     615    SetLastError(ERROR_INVALID_PARAMETER_W); // ERROR_INVALID_PARAMETER
    624616    return -1; // INVALID_HANDLE_VALUE
    625617  }
     
    648640  if (rc)
    649641  {
    650      if ( rc == ERROR_PIPE_BUSY         ) _O32_SetLastError(ERROR_PIPE_BUSY_W);
     642     if ( rc == ERROR_PIPE_BUSY         ) SetLastError(ERROR_PIPE_BUSY_W);
    651643       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);
    653645       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);
    655647       else
    656      if ( rc == ERROR_INVALID_PARAMETER ) _O32_SetLastError(ERROR_INVALID_PARAMETER_W);
     648     if ( rc == ERROR_INVALID_PARAMETER ) SetLastError(ERROR_INVALID_PARAMETER_W);
    657649       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);
    659651       else
    660652         // Unknown error
    661          _O32_SetLastError(ERROR_INVALID_PARAMETER_W); // fixme!
     653         SetLastError(ERROR_INVALID_PARAMETER_W); // fixme!
    662654     return -1; // INVALID_HANDLE_VALUE
    663655  }
     
    677669  if (!rc) return (TRUE);
    678670    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);
    684676    else
    685677  // TODO: Implemnt this using Windows Errors
    686678  // if (rc==ERROR_INTERRUPT)
    687   _O32_SetLastError(ERROR_PIPE_NOT_CONNECTED_W);
     679  SetLastError(ERROR_PIPE_NOT_CONNECTED_W);
    688680 
    689681  return (FALSE);
     
    724716  if (!rc) return (TRUE);
    725717   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);
    743735    else
    744736  // TODO: Implemnt this using Windows Errors
    745737  // if (rc==ERROR_INTERRUPT)
    746   _O32_SetLastError(233);
     738  SetLastError(ERROR_PIPE_NOT_CONNECTED_W);
    747739
    748740  return (FALSE);
     
    771763  if (!rc) return (TRUE);
    772764   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);
    786778    else
    787779  // Unknown error
    788   _O32_SetLastError(ERROR_PIPE_NOT_CONNECTED_W);
     780  SetLastError(ERROR_PIPE_NOT_CONNECTED_W);
    789781
    790782  return (FALSE);
     
    815807  }
    816808   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);
    824816    else
    825817  // Unknown error
    826   _O32_SetLastError(ERROR_PIPE_NOT_CONNECTED_W);
     818  SetLastError(ERROR_PIPE_NOT_CONNECTED_W);
    827819
    828820  return (FALSE);
     
    840832  if (!rc) return TRUE;
    841833    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);
    845837    else
    846838     // Unknown error
    847      _O32_SetLastError(ERROR_PIPE_NOT_CONNECTED_W); // Maybe another?
     839     SetLastError(ERROR_PIPE_NOT_CONNECTED_W); // Maybe another?
    848840
    849841  return (FALSE);
     
    873865  if (!rc) return TRUE;
    874866    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);
    882874    else
    883875  // TODO: Implemnt this using Windows Errors
    884876  // if (rc==ERROR_INTERRUPT)
    885   _O32_SetLastError(ERROR_PIPE_NOT_CONNECTED_W);
     877  SetLastError(ERROR_PIPE_NOT_CONNECTED_W);
    886878
    887879  return (FALSE);
  • trunk/src/kernel32/wprocess.cpp

    r2880 r2984  
    1 /* $Id: wprocess.cpp,v 1.69 2000-02-24 19:17:51 sandervl Exp $ */
     1/* $Id: wprocess.cpp,v 1.70 2000-03-03 11:16:00 sandervl Exp $ */
    22
    33/*
     
    344344//******************************************************************************
    345345//******************************************************************************
    346 void _System Win32DllExitList(ULONG reason)
     346static void _System Win32DllExitList(ULONG reason)
    347347{
    348348  dprintf(("Win32DllExitList %d\n", reason));
Note: See TracChangeset for help on using the changeset viewer.