NPSSetExtendedError
DWORD NPSSetExtendedError (
DWORD NetSpecificError,
LPTSTR lpExtendedErrorText
);
- NetSpecificError
- A network specific error code indicating the error that occurred. This is the value that is returned in the lpdwErrorCode parameter of WNetGetLastError.
- lpExtendedErrorText
- Network specific string describing the error. This field should contain a valid description of the error, but if it is NULL or an empty string then the system will format it's own error text based upon the NetSpecificError number.
- The return value is the error return status that the NP should return for the operation in error. It will typically be ERROR_EXTENDED_ERROR but may be some other value (such as WN_OUT_OF_MEMORY).
For example, when an NP wants to return ERROR_EXTENDED_ERROR:
// setup NetErrorCode and lpErrorText to be the error to be reported
Error = NPSSetExtendedError( NetErrorCode, lpErrorText) ;
return(Error) ;