Click here to Skip to main content
16,006,013 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: DAO/ADO/ODBC Pin
Tara142-Aug-06 21:48
Tara142-Aug-06 21:48 
Questionget date from COleDateTime Pin
Sam_the_xalan2-Aug-06 20:21
Sam_the_xalan2-Aug-06 20:21 
AnswerRe: get date from COleDateTime Pin
Steve Echols2-Aug-06 21:12
Steve Echols2-Aug-06 21:12 
QuestionFile does not open Pin
Ratish Philip2-Aug-06 19:52
Ratish Philip2-Aug-06 19:52 
AnswerRe: File does not open Pin
Christian Graus2-Aug-06 19:58
protectorChristian Graus2-Aug-06 19:58 
AnswerRe: File does not open Pin
toxcct2-Aug-06 20:45
toxcct2-Aug-06 20:45 
AnswerRe: File does not open Pin
Sarath C2-Aug-06 21:22
Sarath C2-Aug-06 21:22 
QuestionQuestion: @ DavidCrow about NetUserGetInfo() Pin
Programm3r2-Aug-06 19:50
Programm3r2-Aug-06 19:50 
Well the function returns:

If the function succeeds, the return value is NERR_Success.
If the function fails, the return value can be one of the following error codes.
- ERROR_ACCESS_DENIED The user does not have access to the requested information.
- NERR_InvalidComputer The computer name is invalid.
- NERR_UserNotFound The user name could not be found.

So the thing is I hard code the username and the servername is NULL (servername is NULL, the local computer is used.)

But still the function is not equal to NERR_Success, thus it returns a false.

For example:
============

LPWSTR domaincontroller = NULL;

NET_API_STATUS nStatus;
WCHAR *uni_username = NULL;
uni_username =L"richardb"

nStatus = NetUserGetInfo(domaincontroller, uni_username, 3, (LPBYTE*)&buffer);

if(nStatus != NERR_Success){
retval = NULL;
return false;
}else{
return true;
}
}
===========
I have no idea what could be wrong. WTF | :WTF:
David could you plz help or know of a site or something ... anything

Thanx

Regards

Programm3r

AnswerRe: Question: @ DavidCrow about NetUserGetInfo() Pin
Hamid_RT2-Aug-06 20:28
Hamid_RT2-Aug-06 20:28 
QuestionRe: Question: @ DavidCrow about NetUserGetInfo() Pin
Programm3r2-Aug-06 20:39
Programm3r2-Aug-06 20:39 
AnswerRe: Question: @ DavidCrow about NetUserGetInfo() Pin
ThatsAlok2-Aug-06 22:03
ThatsAlok2-Aug-06 22:03 
AnswerRe: Question: @ DavidCrow about NetUserGetInfo() Pin
toxcct2-Aug-06 20:43
toxcct2-Aug-06 20:43 
QuestionRe: Question: @ DavidCrow about NetUserGetInfo() Pin
Programm3r2-Aug-06 20:49
Programm3r2-Aug-06 20:49 
AnswerRe: Question: @ DavidCrow about NetUserGetInfo() Pin
toxcct2-Aug-06 20:55
toxcct2-Aug-06 20:55 
QuestionRe: Question: @ DavidCrow about NetUserGetInfo() Pin
Programm3r2-Aug-06 20:58
Programm3r2-Aug-06 20:58 
GeneralRe: Question: @ DavidCrow about NetUserGetInfo() Pin
Hamid_RT2-Aug-06 21:03
Hamid_RT2-Aug-06 21:03 
GeneralRe: Question: @ DavidCrow about NetUserGetInfo() Pin
toxcct2-Aug-06 21:19
toxcct2-Aug-06 21:19 
GeneralRe: Question: @ DavidCrow about NetUserGetInfo() Pin
Programm3r2-Aug-06 21:24
Programm3r2-Aug-06 21:24 
GeneralRe: Question: @ DavidCrow about NetUserGetInfo() Pin
ThatsAlok2-Aug-06 22:04
ThatsAlok2-Aug-06 22:04 
AnswerRe: Question: @ DavidCrow about NetUserGetInfo() Pin
ThatsAlok2-Aug-06 21:25
ThatsAlok2-Aug-06 21:25 
GeneralRe: Question: @ DavidCrow about NetUserGetInfo() Pin
toxcct2-Aug-06 21:29
toxcct2-Aug-06 21:29 
GeneralRe: Question: @ DavidCrow about NetUserGetInfo() Pin
Hamid_RT2-Aug-06 21:43
Hamid_RT2-Aug-06 21:43 
AnswerRe: Question: @ DavidCrow about NetUserGetInfo() Pin
Parthi_Appu2-Aug-06 21:39
Parthi_Appu2-Aug-06 21:39 
GeneralRe: Question: @ DavidCrow about NetUserGetInfo() Pin
Programm3r2-Aug-06 22:22
Programm3r2-Aug-06 22:22 
Questioncovert time_t ot LONG Pin
sach!!2-Aug-06 19:48
sach!!2-Aug-06 19:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.