>>> The Q has arisen because all MSEgui WAITFOR*/TERMINATE*/KILL* function >>> are HANDLE-based. >>> >> Windows probably has a function to open a handle from a PID. >> > > The guys at http://forums.devx.com/showthread.php?t=15316 tell that > own PHANDLE equals to "-1" within application but it shouldn't be passed > to other apps for reference. > Though, "http://msdn.microsoft.com/en-us/library/windows/desktop/ms684868(v=vs.85).aspx" tells:
If you have a process identifier, you can get the process handle by calling the OpenProcess function. OpenProcess enables you to specify the handle's access rights and whether it can be inherited. A process can use the GetCurrentProcess function to retrieve a pseudo handle to its own process object. This pseudo handle is valid only for the calling process; it cannot be inherited or duplicated for use by other processes. To get the real handle to the process, call the DuplicateHandle function. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ mseide-msegui-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

