Ignore:
Timestamp:
Oct 2, 2000, 3:51:35 PM (25 years ago)
Author:
phaller
Message:

.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wnetap32/oslibnet.cpp

    r4362 r4373  
    2727#include <netcons.h>
    2828#include <wksta.h>
     29#include <neterr.h>
    2930
    3031
     
    3334// NOTE: add all codes you need, list is not complete!
    3435//******************************************************************************
    35 static DWORD error2WinError(APIRET rc,DWORD defaultCode = ERROR_NOT_ENOUGH_MEMORY_W)
     36static DWORD error2WinError(APIRET rc)
    3637{
    3738  switch (rc)
    3839  {
     40    // NT/LAN Manager specific error codes
     41  case NERR_NetNotStarted:     return NERR_NetNotStarted;
     42  case NERR_UnknownServer:     return NERR_UnknownServer;
     43  case NERR_ShareMem:          return NERR_ShareMem;
     44  case NERR_NoNetworkResource: return NERR_NoNetworkResource;
     45  case NERR_RemoteOnly:        return NERR_RemoteOnly;
     46  case NERR_DevNotRedirected:  return NERR_DevNotRedirected;
     47  case NERR_ServerNotStarted:  return NERR_ServerNotStarted;
     48  case NERR_ItemNotFound:      return NERR_ItemNotFound;
     49  case NERR_UnknownDevDir:     return NERR_UnknownDevDir;
     50  case NERR_RedirectedPath:    return NERR_RedirectedPath;
     51  case NERR_DuplicateShare:    return NERR_DuplicateShare;
     52  case NERR_NoRoom:            return NERR_NoRoom;
     53  case NERR_TooManyItems:      return NERR_TooManyItems;
     54  case NERR_InvalidMaxUsers:   return NERR_InvalidMaxUsers;
     55  case NERR_BufTooSmall:       return NERR_BufTooSmall;
     56  case NERR_RemoteErr:         return NERR_RemoteErr;
     57  case NERR_LanmanIniError:    return NERR_LanmanIniError;
     58    // case NERR_OS2IoctlError
     59  case NERR_NetworkError:      return NERR_NetworkError;
     60  case NERR_WkstaNotStarted:   return NERR_WkstaNotStarted;
     61  case NERR_BASE + 39:         return NERR_BASE + 39;    // NERR_BrowserNotStarted
     62  case NERR_InternalError:     return NERR_InternalError;
     63  case NERR_BadTransactConfig: return NERR_BadTransactConfig;
     64  case NERR_InvalidAPI:        return NERR_InvalidAPI;
     65  case NERR_BadEventName:      return NERR_BadEventName;
     66  case NERR_BASE + 44:         return NERR_BASE + 44; // NERR_DupNameReboot
     67   
     68  // ...
     69   
    3970    case NO_ERROR: //0
    4071        return ERROR_SUCCESS_W;
     
    168199    default:
    169200      dprintf(("WARNING: error2WinError: error %d not included!!!!", rc));
    170         return defaultCode;
     201        return rc;
    171202  }
    172203}
Note: See TracChangeset for help on using the changeset viewer.