schwups, on 10 July 2012 - 09:22 AM, said:
A search for "NetUseEnum function msdn" yields:
NetUseEnum function - MSDN - Microsoft
Quote
NET_API_STATUS NetUseEnum( __in LMSTR UncServerName, __in DWORD Level, __out LPBYTE *BufPtr, __in DWORD PreferedMaximumSize, __out LPDWORD EntriesRead, __out LPDWORD TotalEntries, __inout LPDWORD ResumeHandle );
Seven parameters.
Quote
If the function succeeds, the return value is NERR_Success.
If the function fails, the return value is a system error code. For a list of error codes, see System Error Codes.
So return something other than zero. For Netapi32 functions, error code 1 works well.
No reference to SetLastError.
New definition should be:
[Netapi32.dll] NetUseEnum=o7



Help


Back to top









