all groups > dotnet distributed apps > november 2005 >
You're in the

dotnet distributed apps

group:

Does anything like a parent process exist?


Does anything like a parent process exist? Ehsan
11/19/2005 3:57:02 AM
dotnet distributed apps:
Suppose there are executable files A, B and C.
when A is started, it attempts to run B and B also runs C.
Can I ask Windows to tell me who started C? What if executables A and B are
closed, but C is running. In this case, can I know who started C?

If possible, please provide a .NET example (VB or C#)
Re: Does anything like a parent process exist? Manoj G [MVP]
11/21/2005 12:00:00 AM
Hi,

I suppose the System.Diagnostics.Process class is not quite equipped to give
you this information. You need to use PInvoke to call the
NtQueryInformationProcess Win32 API to get this infomation
For more info, you may want to look into this NG post:
http://groups.google.com/group/microsoft.public.dotnet.framework/browse_frm/thread/4f8384daf8eba9c4/

--
HTH,
Manoj G
MVP, Visual Developer
http://msmvps.com/manoj

[quoted text, click to view]

AddThis Social Bookmark Button