Stas,
I guess that IoGetCurrentProcess will return the process ID that you can use
somehow in Win32 API to retrieve the app name of the application that
created this prossess. The problem is that IoGetCurrentProcess you can call
only in “upper”/“highest-level” drivers that run in the context of that
application process. If you will try to call it from a “lower” driver it
will most probably return 0 for the “0” system process.
Roman.
-----Original Message-----
From: Gary G. Little [mailto:xxxxx@inland.net]
Sent: Sunday, April 15, 2001 5:52 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Getting app name from my drv
Why would you want to tie a driver to an application? Why should it care
whether it was an application or another driver that called it? A driver
gets an IRP, pends it, or completes it. With rare exceptions it does nothing
else. Are trying to take logic path Z if called by application BUGS, and
logic path Y if called by application PORKY? Ok so what if application DAFFY
calls driver BUBBA which then calls your driver? In the latter, your driver
is called in an arbitrary thread context that is not associated with any
thread, which is why it is “arbitrary”.
Perhaps it would be better, provide IOCTL calls for logic path Z and Y. That
way the driver doesn’t care who called it, it just gets an IRP, and
completes it or pends it.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of STAS
Sent: Sunday, April 15, 2001 3:11 AM
To: NT Developers Interest List
Subject: [ntdev] Getting app name from my drv
Hi All,
A little while ago I asked how can one identify an IRP originator. What I
was looking for is actually how I can get application name that issued this
IRP.
I tried to fish this info from DDK with not much luck,
PsGetCurrentProcessID, PS…ThreadID return a structure that is not
documented at all.
Can anyone please help me ?
Regards,
Stas,
Powernet.
You are currently subscribed to ntdev as: xxxxx@delphieng.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: xxxxx@envara.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com