Skip to main content
GameDev.net gamedev.net
🔒 Locked

NetUserGetInfo = Error 53

Started by MButchers Aug 13, 2001 at 3:25 AM 2 replies 2.9k views
Original Post
MButchers
MButchers
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.
Kylotan
Kylotan
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.
JonStelly
JonStelly
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
MButchers
MButchers
Cheers JonSteely,

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

Thanks.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.