Re: Get Handle Owner,...

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Kerem,

Kerem Gümrükcü wrote:
Hi Jeroen ,

the point is, that i operate from Mannaged .NET Code
and i have several Process Handles and Ids and Service
Handles. I need to know in which Context they Run. I
expressed myelf a little unclear. I need a reliable way to
get the user context in which they run. I used the method
of GetTheToken->DuplicateIt->Impersonate->GetThe
UserName->RevertToSelf->CloseTheToken. But is there
another way? I got the process and service handles. The
more Problem are the Service Handles here: How do i get
the User Context from just a service handle?


QueryServiceConfig and the lpServiceStartName member of the QUERY_SERVICE_CONFIG struct?

--
Stefan
.