Archived

This topic is now archived and is closed to further replies.

NetUserGetInfo = Error 53

This topic is 5968 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites