Changeset 1472 for trunk/src


Ignore:
Timestamp:
Oct 27, 1999, 12:08:33 PM (26 years ago)
Author:
phaller
Message:

Fix: SetLastError(ERROR_SUCCESS) for most handle based operations

Location:
trunk/src/kernel32
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/HandleManager.cpp

    r780 r1472  
    1 /* $Id: HandleManager.cpp,v 1.20 1999-09-01 19:12:16 phaller Exp $ */
     1/* $Id: HandleManager.cpp,v 1.21 1999-10-27 10:08:32 phaller Exp $ */
    22
    33/*
     
    716716    return FALSE;                           /* signal error */
    717717  }
     718  else
     719    SetLastError(ERROR_SUCCESS); //@@@PH 1999/10/27 rc5desg requires this?
     720
    718721  *desthandle = iIndexNew;
    719722  return TRUE;                                   /* return valid handle */
     
    833836  else
    834837  {
     838    SetLastError(ERROR_SUCCESS); //@@@PH 1999/10/27 rc5desg requires this?
     839
    835840             /* copy data fields that might have been modified by CreateFile */
    836841    memcpy(&TabWin32Handles[iIndexNew].hmHandleData,
     
    956961    return (INVALID_HANDLE_VALUE);                           /* signal error */
    957962  }
     963  else
     964    SetLastError(ERROR_SUCCESS); //@@@PH 1999/10/27 rc5desg requires this?
    958965
    959966#ifdef DEBUG_LOCAL
     
    10161023
    10171024  if (fResult == TRUE)                   /* remove handle if close succeeded */
     1025  {
    10181026    pHMHandle->hmHandleData.hHMHandle = 0;            /* mark handle as free */
     1027    SetLastError(ERROR_SUCCESS); //@@@PH 1999/10/27 rc5desg requires this?
     1028  }
    10191029
    10201030  return (fResult);                                   /* deliver return code */
     
    18731883    return (INVALID_HANDLE_VALUE);                           /* signal error */
    18741884  }
     1885  else
     1886    SetLastError(ERROR_SUCCESS); //@@@PH 1999/10/27 rc5desg requires this?
    18751887
    18761888  return iIndexNew;                                   /* return valid handle */
     
    19391951    return (INVALID_HANDLE_VALUE);                           /* signal error */
    19401952  }
     1953  else
     1954    SetLastError(ERROR_SUCCESS); //@@@PH 1999/10/27 rc5desg requires this?
    19411955
    19421956  return iIndexNew;                                   /* return valid handle */
     
    20042018    return (INVALID_HANDLE_VALUE);                           /* signal error */
    20052019  }
     2020  else
     2021    SetLastError(ERROR_SUCCESS); //@@@PH 1999/10/27 rc5desg requires this?
    20062022
    20072023  return iIndexNew;                                   /* return valid handle */
     
    20692085    return (INVALID_HANDLE_VALUE);                           /* signal error */
    20702086  }
     2087  else
     2088    SetLastError(ERROR_SUCCESS); //@@@PH 1999/10/27 rc5desg requires this?
    20712089
    20722090  return iIndexNew;                                   /* return valid handle */
     
    21372155    return (INVALID_HANDLE_VALUE);                           /* signal error */
    21382156  }
     2157  else
     2158    SetLastError(ERROR_SUCCESS); //@@@PH 1999/10/27 rc5desg requires this?
    21392159
    21402160  return iIndexNew;                                   /* return valid handle */
     
    22022222    return (INVALID_HANDLE_VALUE);                           /* signal error */
    22032223  }
     2224  else
     2225    SetLastError(ERROR_SUCCESS); //@@@PH 1999/10/27 rc5desg requires this?
    22042226
    22052227  return iIndexNew;                                   /* return valid handle */
     
    22342256    return (INVALID_HANDLE_ERROR);                         /* signal failure */
    22352257  }
     2258  else
     2259    SetLastError(ERROR_SUCCESS); //@@@PH 1999/10/27 rc5desg requires this?
    22362260
    22372261  pHMHandle = &TabWin32Handles[iIndex];               /* call device handler */
     
    23152339    return (NULL);                                           /* signal error */
    23162340  }
     2341  else
     2342    SetLastError(ERROR_SUCCESS); //@@@PH 1999/10/27 rc5desg requires this?
    23172343
    23182344  return iIndexNew;                                   /* return valid handle */
     
    23812407    return (NULL);                                           /* signal error */
    23822408  }
     2409  else
     2410    SetLastError(ERROR_SUCCESS); //@@@PH 1999/10/27 rc5desg requires this?
    23832411
    23842412  return iIndexNew;                                   /* return valid handle */
  • trunk/src/kernel32/kernel32exp.def

    r1146 r1472  
    418418    _ReadProcessMemory@20                     @579
    419419    _RegisterServiceProcess@8                 @580
     420    _ReinitializeCriticalSection@4            @581
    420421    _ReleaseMutex@4                           @582
    421422    _ReleaseSemaphore@12                      @583
     
    598599    WriteLog                                  @1202
    599600    WriteLogError                             @1214
    600     _RegisterPe2LxExe@48                      @1203
    601     _RegisterPe2LxDll@48                      @1209
     601    _RegisterPe2LxExe@12                      @1203
     602    _RegisterPe2LxDll@12                      @1209
    602603    _CreateWin32PeLdrExe@8                    @1236
    603604    _RegisterLxExe@8                          @1237
     
    644645    OS2SetExceptionHandler                    @1253
    645646    OS2UnsetExceptionHandler                  @1254
    646     __ct__12Win32MenuResFP14Win32ImageBaseUlN22  @1260
    647     __ct__12Win32MenuResFP14Win32ImageBaseUlN22Pc  @1261
    648     __ct__12Win32MenuResFUl                   @1262
    649     __ct__12Win32MenuResFPv                   @1263
     647    _PROFILE_GetOdinIniString@20              @1264
     648    _PROFILE_SetOdinIniString@12              @1265
     649    _PROFILE_GetOdinIniInt@12                 @1266
     650    _PROFILE_SetOdinIniInt@12                 @1267
     651    _PROFILE_GetOdinIniBool@12                @1268
     652    _PROFILE_SetOdinIniBool@12                @1269
     653    _PROFILE_SaveOdinIni@0                    @1270
Note: See TracChangeset for help on using the changeset viewer.