Re: LsaEnumerateAccountsWithUserRight failed with "Overlapped I/O operation is in progress"
- From: "Chris" <chrisforng@xxxxxxxxxxxxxxxx>
- Date: Wed, 22 Mar 2006 11:04:42 -0800
Thanks very much, very valuable information.
Chris
"Skywing" <skywing_NO_SPAM_@xxxxxxxxxxxxxxxxxxx> wrote in message
news:O4Zrg5dTGHA.196@xxxxxxxxxxxxxxxxxxxxxxx
0x8000001a is STATUS_NO_MORE_ENTRIES.
In general, the Lsa* functions exported by advapi32 don't set the last
error value. Don't use GetLastError() with them (unless the function
documentation explicitly says you can - which it doesn't for this
function).
In this case, LSA is telling you that it is has finished the enumeration.
If this is your first call to LsaEnumerateAccountsWithUserRight, then no
accounts had the privileges you requested.
"Chris" <chrisforng@xxxxxxxxxxxxxxxx> wrote in message
news:OsqUnudTGHA.5924@xxxxxxxxxxxxxxxxxxxxxxx
Hi,
My application uses LSA calls. LsaOpenPolicy() is followed by
LsaEnumerateAccountsWithUserRight().
The code works fine for some computers but failed for other.
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?
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);
.
- References:
- Prev by Date: Re: LsaEnumerateAccountsWithUserRight failed with "Overlapped I/O operation is in progress"
- Next by Date: Importing a Private Key into the Microsoft Base Smart Card Crypto Provider
- Previous by thread: Re: LsaEnumerateAccountsWithUserRight failed with "Overlapped I/O operation is in progress"
- Next by thread: Importing a Private Key into the Microsoft Base Smart Card Crypto Provider
- Index(es):
Relevant Pages
|