NetUserGetInfo returns 1008 (GetLastError)
-
Hi, I am developing a dll which uses NetUserGetInfo to retreive the home directory of a Domain user. NetUserGetInfo returns 1008 error code. my usage of function: NetUserGetInfo(Domain-server,domain-user,11,buf) The problem i was thinking was, The dll is launched by a local user(admin privilages) on a system which is in the same domain. SO may be the local user does not have enough permissions to use the NetUserGetInfo function to retreive the necessary information. My questions: 1. Is it possible to provide enough permissions for the local-user, How? 2. The other alternate is to connect to domain-server with some power user and then use the NetUserGetInfo function. But I do not find suitable function to connect to domain server with a power user credentials in windows network management API(netapi32.lib) Thanks for the help
-
Hi, I am developing a dll which uses NetUserGetInfo to retreive the home directory of a Domain user. NetUserGetInfo returns 1008 error code. my usage of function: NetUserGetInfo(Domain-server,domain-user,11,buf) The problem i was thinking was, The dll is launched by a local user(admin privilages) on a system which is in the same domain. SO may be the local user does not have enough permissions to use the NetUserGetInfo function to retreive the necessary information. My questions: 1. Is it possible to provide enough permissions for the local-user, How? 2. The other alternate is to connect to domain-server with some power user and then use the NetUserGetInfo function. But I do not find suitable function to connect to domain server with a power user credentials in windows network management API(netapi32.lib) Thanks for the help
gbabu17 wrote:
NetUserGetInfo returns 1008 error code.
Which is
ERROR_NO_TOKEN
. What areDomain-server
,domain-user
, andbuf
? Do you haveUNICODE
and_UNICODE
defined?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
-
gbabu17 wrote:
NetUserGetInfo returns 1008 error code.
Which is
ERROR_NO_TOKEN
. What areDomain-server
,domain-user
, andbuf
? Do you haveUNICODE
and_UNICODE
defined?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
-
they are passed to the function correctly, because i am printing them just before passing to the NetUserGetInfo.
gbabu17 wrote:
they are passed to the function correctly...
But are they
wchar_t
orTCHAR
types?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
-
gbabu17 wrote:
they are passed to the function correctly...
But are they
wchar_t
orTCHAR
types?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb