OK ... Re: A strange problem with Service ...
From: Polaris (etpolaris_at_hotmail.com)
Date: 06/17/05
- Next message: Ryan Menezes [MSFT]: "Re: CSP types"
- Previous message: Doug Barlow: "Re: Format of parameters for CryptGet/SetKeyParam with KP_Certificate?"
- In reply to: Polaris: "A strange problem with Service ..."
- Next in thread: Marco van Nieuwenhoven: "RE: OK ... Re: A strange problem with Service ..."
- Reply: Marco van Nieuwenhoven: "RE: OK ... Re: A strange problem with Service ..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 16 Jun 2005 17:25:13 -0700
It seems to be timing issue. The user profile probably has not been fully
loaded at the time I was accessing the reg. If I wait, it seems working
fine. Thanks guys.
Polaris
"Polaris" <etpolaris@hotmail.com> wrote in message
news:u$1IJ3gcFHA.1556@TK2MSFTNGP10.phx.gbl...
> Hi:
>
> I have a very strange problem and could not make any sense out of it:
>
> I wrote a Windows service program (Win-XP). The program impersonates the
> loggedon user (a user with only "Guest" privilege) and access user's
> registry settings from HKEY_CURRENT_USER.
>
> I found out that the program works (which means successfully read values
> from the HKCU) ONLY if I pop up a message box (by calling MessageBox(...),
> does not matter what is shown by the message box) in the service program
> before the impersonating codes. If I do not show the message box in the
> service, I get error "File not found" while trying to read the registry
> values under HKCU. Reproducible each time.
>
> Why does popping up a messagebox make such a difference? Any hints
> welcome.
>
> Thanks In Advance !
> Polaris
>
- Next message: Ryan Menezes [MSFT]: "Re: CSP types"
- Previous message: Doug Barlow: "Re: Format of parameters for CryptGet/SetKeyParam with KP_Certificate?"
- In reply to: Polaris: "A strange problem with Service ..."
- Next in thread: Marco van Nieuwenhoven: "RE: OK ... Re: A strange problem with Service ..."
- Reply: Marco van Nieuwenhoven: "RE: OK ... Re: A strange problem with Service ..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|