LsaEnumerateAccountsWithUserRight failed for remote computer
- From: "Chris" <chrisforng@xxxxxxxxxxxxxxxx>
- Date: Wed, 15 Mar 2006 11:29:29 -0800
Hi,
My application uses LSA calls. LsaOpenPolicy() is followed by
LsaEnumerateAccountsWithUserRight().
The code works fine if it is for local machine, but failed for remote
machine.
LsaEnumerateAccountsWithUserRight() returns 0x8000001a, by calling
GetLastError() and convert it to string
it says "Overlapped I/O operation is in progress.".
It looks like LsaEnumerateAccountsWithUserRight() is using overlapped I/O
to retrieve information.
My question is.
Is there a mechanism that I can wait the completion of that overlapped I/O?
Or is there a way to disable overlapped I/O and use synchnonized I/O
instead?
One word, how can I make it work for remote computer? The documentation says
LsaOpenPolicy can be used for both
local and remote computer?
Thanks in advance,
Chris
NTSTATUS ntsResult = LsaOpenPolicy(
&systemName, //Name of the target system.
&ObjectAttributes, //Object attributes.
POLICY_LOOKUP_NAMES | POLICY_VIEW_LOCAL_INFORMATION,
//Desired access permissions.
&lsahPolicyHandle //Receives the policy handle.
);
ntsResult = LsaEnumerateAccountsWithUserRight(lsahPolicyHandle,
&priv_name,(void **)&data, &count);
.
- Prev by Date: Changing the error message given on the "change password" action
- Next by Date: Reporting tool for NTFS rights on a server share
- Previous by thread: Changing the error message given on the "change password" action
- Next by thread: Reporting tool for NTFS rights on a server share
- Index(es):
Relevant Pages
|