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

moved registry apis into kernel32 + cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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  }
Note: See TracChangeset for help on using the changeset viewer.