Re: LsaEnumerateAccountsWithUserRight failed with "Overlapped I/O operation is in progress"



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);







.



Relevant Pages

  • Re: LsaEnumerateAccountsWithUserRight failed with "Overlapped I/O operation is in progress"
    ... Don't use GetLastError() with them (unless the function ... LSA is telling you that it is has finished the enumeration. ... If this is your first call to LsaEnumerateAccountsWithUserRight, ... It looks like LsaEnumerateAccountsWithUserRightis using overlapped I/O ...
    (microsoft.public.platformsdk.security)
  • Re: Palatable Windows IO using Ada
    ... This is a higher level protocol. ... So the communication item becomes one byte. ... In my opinion it is overkill to use overlapped I/O for serial ... overlapped I/O and asynchronous system trap could nicely fit to Ada's ...
    (comp.lang.ada)
  • Re: Asynch COM under Win98
    ... I am mostly not a Windows programmer however about 3 years ago I wrote an MFC ... GUI control program that did serial I/O and our objective was to be compatible ... another view states that serial overlapped I/O works in W9X but non-serial ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Writing to Serial Port
    ... I can run WriteFile() and allow my program to run without waiting for the ... > This is overlapped I/O. ... One reason for doing it is that it is necessary ... > to use overlapped I/O with a serial port if one wants full duplex (send ...
    (microsoft.public.vc.mfc)
  • what is Synchronous file access?
    ... ce only support Synchronous file acess,This is the reason why overlapped I/O ... asynchronous => means multiple file access can be done..overlapped i/o is ...
    (microsoft.public.windowsce.platbuilder)