NetUserGetInfo = Error 53

Started by
2 comments, last by MButchers 22 years, 8 months ago
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.
Advertisement
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.
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?

      #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
Cheers JonSteely,

yep im trying to run it on my workstation - explains why
it doesnt work!!

Thanks.

This topic is closed to new replies.

Advertisement