NetUserGetInfo = Error 53
Hi there,
im trying to make a call to NetUserGetInfo with
level 3 on windows 2000
and all i keep getting is a result of 53.
Does anyone know how to resolve this.
Cheers
Mark.
This might be related to the Winsock errors, where error 53 is this:
Software caused connection abort.
An established connection was aborted by the software in your host machine, possibly due to a data transmission timeout or protocol error.
It could be something totally different too I have no idea.
Software caused connection abort.
An established connection was aborted by the software in your host machine, possibly due to a data transmission timeout or protocol error.
It could be something totally different too I have no idea.
The following code works for me. User Info Level 3 is only valid on Windows NT / 2000 Servers, you're not trying to run this on your workstation, are you?
Edited by - JonStelly on August 13, 2001 2:41:38 PM
#include <windows.h>#include <lm.h>#include <atlbase.h>d#include <atlconv.h>int main(int argc, char* argv[]){ PUSER_INFO_3 pUser = NULL; LPCTSTR lpUser = _T("administrator"); USES_CONVERSION; if(NetUserGetInfo(NULL, T2W(lpUser), 3, (LPBYTE*)&pUser) != NERR_Success) return 1; _tprintf(_T("USER: %s\n\tFull Name: %s\n\tComment: %s\n\tLogon Failures:%u\n"), W2T(pUser->usri3_name), W2T(pUser->usri3_full_name), W2T(pUser->usri3_comment), pUser->usri3_bad_pw_count); NetApiBufferFree(pUser); return 0;}
Edited by - JonStelly on August 13, 2001 2:41:38 PM
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement