Like GetLastError, this returns extended error information, which is maintained on a per-thread basis. Unlike GetLastError, this function can also return a string for reporting errors that are not described by any existing error code. It is primarily used for returning network vendor specific errors, and should be called when GetLastError returns WN_EXTENDED_ERROR. It returns error information associated with the last NP that reported an error.
DWORD WNetGetLastError (
LPDWORD lpError,
LPTSTR lpErrorBuf,
DWORD nErrorBufSize,
LPTSTR lpNameBuf,
DWORD nNameBufSize
);
WN_NO_ERROR | no error was previously reported by a network provider in this thread. |
WN_BAD_POINTER | a pointer to a buffer or a buffersize is invalid. |