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.

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) ;