Re: ProcessIdToSessionId () problem on win2008

Tech-Archive recommends: Fix windows errors by optimizing your registry



On Nov 7, 9:22 am, "Soo Kuan Teo [MSFT]"
<sooku...@xxxxxxxxxxxxxxxxxxxx> wrote:
What user account are you using to run the app that calls
ProcessIdToSessionId()?
First thing I would check is if you're being protected by 'User Account
Control'. For more info:http://technet.microsoft.com/en-us/windowsvista/aa906021.aspx#EBBAChttp://www.microsoft.com/windows/products/windowsvista/features/detai...

Thanks
Soo Kuan

--
This posting is provided "AS IS" with no warranties, and confers no rights.

<amitman...@xxxxxxxxx> wrote in message

news:1194354163.856376.252530@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

HI All,

On win2003 i was using ProcessIdToSessionId () api to get sessionID
for given processID. But when i use same code on longhorn (win2k8)
ProcessIdToSessionId () api fails with error "Acess Denied".

If any one have any idea about this problem then please guide
me.
Thanks in advance.

Thanks,
Amit.

Hi Soo,

Thanks for your help.

I have written a service which uses given processID to get it's
corresponding sessionID.
For this service account UAC is enabled.

Thanks,
Amit

.