|
|
Determine the process ID of a process that created a named object
Say, if I create a named object like this in one process:
CreateEvent(NULL, FALSE, FALSE, _T("MyNamedEvent"));
and then open it in another process (service):
HANDLE hEvent = CreateEvent(NULL, FALSE, FALSE, _T("MyNamedEvent"));
if(hEvent && GetLastError() == ERROR_ALREADY_EXISTS)
{
//What process created hEvent event originally?
}
Is there any way to determine what process created it originally?
That's how I'm intending to see if any of the client processes that are
connected to this service process are still "alive". To up the security I
need to get a process that created such named event and if I have its ID
I'll be able to tell that it's "my process" and not some imposter setting
that named event.
|
|
0
|
|
|
|
Reply
|
nki00
|
6/10/2010 10:01:34 PM |
|
On Jun 10, 3:01=A0pm, "nki00" <lukkycha...@gmail.com> wrote:
> That's how I'm intending to see if any of the client processes that are
> connected to this service process are still "alive". To up the security I
> need to get a process that created such named event and if I have its ID
> I'll be able to tell that it's "my process" and not some imposter setting
> that named event.
The first parameter to CreateEvent controls who can and can't access
the named event, so you don't have to worry about impostors. If all
your processes are cooperating (as they must be), just have them
register in some known place, such as an agreed-upon file whose
location is tracked in the registry.
DS
|
|
0
|
|
|
|
Reply
|
David
|
6/11/2010 12:11:03 AM
|
|
Thanks. But what exactly should I specify for the first parameter to the
CreateEvent?
|
|
0
|
|
|
|
Reply
|
nki00
|
6/11/2010 1:06:44 AM
|
|
On Jun 10, 6:06=A0pm, "nki00" <lukkycha...@gmail.com> wrote:
> Thanks. But what exactly should I specify for the first parameter to the
> CreateEvent?
It all depends on what constitutes an "impostor".
DS
|
|
0
|
|
|
|
Reply
|
David
|
6/11/2010 7:48:35 PM
|
|
|
3 Replies
325 Views
(page loaded in 0.081 seconds)
Similiar Articles: Determine the process ID of a process that created a named object ...Say, if I create a named object like this in one process: CreateEvent(NULL, FALSE, FALSE, _T("MyNamedEvent")); and then open it in another proce... how to check if an object has already been created - comp.lang ...Determine the process ID of a process that created a named object ... That's how I'm intending to see if any of the ... Determine the process ID of a process that created ... Windows7 run python script / sub process with elevated privileges ...Determine the process ID of a process that created a named object ... Windows7 run python script / sub process with elevated privileges ..... cmd_wrap = "PowerShell ... how to check if a process still exists in a C app - comp.unix ...Determine the process ID of a process that created a named object ..... That's how I'm intending to see if any of the client processes that are > connected to this ... Hung processes - comp.databases.mysqlDetermine the process ID of a process that created a named object ... Hung processes - comp.databases.mysql Determine the process ID of a process that created a named ... Print a Constant Number of Lines on a report - comp.databases.ms ...I have created a report that lists students in a class. ... data - comp.lang.awk PROC REPORT ... in a column (ID ... SDK is going to be your constant ... can I find out more ... Getting info on hung process - comp.unix.aix... but so far we have been unable to determine this. ... isg3T1011956 It has a link to a tool named ... signal which default > handler will create a core... but if the process ... Finding environment variables usage - comp.unix.programmer ...... replace PID with the numerical process ID ... environment variables a certain process is using? Any > ideas? > One way to find out ... task but differ in that they are created ... size of a derived type containing pointers... - comp.lang.fortran ...Hello, In my code I need to determine the size of ... of pointers to different parts of the same object, such ... information about these matters, see the file named ... improve strlen - comp.lang.asm.x86... now the next problem is to determine ... Labourous and error prone process. Enter ANSI C. You can write your intention with named ... so we return > temporary object created ... Determine the process ID of the process that created a named objectSay, if I create a named object like this in one process: CreateEvent(NULL, FALSE, FALSE, _T("MyNamedEvent")); and then open it in another process (service ... Determine the process ID of a process that created a named object ...Say, if I create a named object like this in one process: CreateEvent(NULL, FALSE, FALSE, _T("MyNamedEvent")); and then open it in another proce... 7/25/2012 1:34:37 AM
|
|
|
|
|
|
|
|
|