Click here to Skip to main content
15,905,566 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: GDI + to save graphics from the screen into a file Pin
mark novak27-Jul-05 15:04
mark novak27-Jul-05 15:04 
GeneralRe: GDI + to save graphics from the screen into a file Pin
flamy27-Jul-05 15:21
flamy27-Jul-05 15:21 
General'Web' or 'Tree' Display Pin
bugDanny27-Jul-05 10:43
bugDanny27-Jul-05 10:43 
Generaldialog box trouble Pin
DaveHuber27-Jul-05 10:27
DaveHuber27-Jul-05 10:27 
GeneralRe: dialog box trouble Pin
bugDanny27-Jul-05 10:49
bugDanny27-Jul-05 10:49 
GeneralRe: dialog box trouble Pin
DaveHuber28-Jul-05 4:48
DaveHuber28-Jul-05 4:48 
GeneralDriver programming question Pin
JakeTruman27-Jul-05 9:47
JakeTruman27-Jul-05 9:47 
GeneralRe: Driver programming question Pin
Toby Opferman27-Jul-05 14:37
Toby Opferman27-Jul-05 14:37 
If your driver is processing the IRP in the context of the process thread you can use "IoGetCurrentProcess"/"PsGetCurrentProcess" or "PsGetCurrentProcessId" or even "IoGetCurrentThread/PsGetCurrentTHread" or "PsGetCurrentThreadId".

These could help you determine at least the PID of the process. Io/PsGetCurrentProcess actually returns an "undocumented" data structure that represents the current process information. If you do a search on the net or do "dt _EPROCESS" in the kernel debugger you may be able to find out what information you need from it, but of course it may vary from OS to OS or even from Service Pack to Service Pack.

The other method you could use if you are in the current thread process is attempt to find the user mode TEB and PEB if there is one. You can then just traverse this memory and find out all the information as well. Of course this is bad since the memory can go away so you'd need to ensure you protect your driver from this.

Another method would be for you to create a user mode componet that could talk with your driver and communicate some information down to it, such as a mapping of PID's to Processes or vice versa (Your driver could call your service with the PID and it could do the mapping).







8bc7c0ec02c0e404c0cc0680f7018827ebee
GeneralRe: Driver programming question Pin
JakeTruman3-Aug-05 12:01
JakeTruman3-Aug-05 12:01 
QuestionHow to disable the help in VC6 Pin
JWood27-Jul-05 9:22
JWood27-Jul-05 9:22 
AnswerRe: How to disable the help in VC6 Pin
David Crow27-Jul-05 9:45
David Crow27-Jul-05 9:45 
GeneralRe: How to disable the help in VC6 Pin
JWood28-Jul-05 4:57
JWood28-Jul-05 4:57 
AnswerRe: How to disable the help in VC6 Pin
Blake Miller27-Jul-05 12:08
Blake Miller27-Jul-05 12:08 
Generalproblem with multiple defined symbols Pin
Qvicksilver27-Jul-05 9:07
Qvicksilver27-Jul-05 9:07 
GeneralRe: problem with multiple defined symbols Pin
David Crow27-Jul-05 9:43
David Crow27-Jul-05 9:43 
GeneralRe: problem with multiple defined symbols Pin
Qvicksilver27-Jul-05 10:12
Qvicksilver27-Jul-05 10:12 
GeneralRe: problem with multiple defined symbols Pin
John R. Shaw27-Jul-05 11:32
John R. Shaw27-Jul-05 11:32 
GeneralRe: problem with multiple defined symbols Pin
Qvicksilver28-Jul-05 6:42
Qvicksilver28-Jul-05 6:42 
GeneralRe: problem with multiple defined symbols Pin
John R. Shaw28-Jul-05 8:39
John R. Shaw28-Jul-05 8:39 
GeneralRe: problem with multiple defined symbols Pin
sunit527-Jul-05 21:01
sunit527-Jul-05 21:01 
GeneralRe: problem with multiple defined symbols Pin
Qvicksilver28-Jul-05 6:46
Qvicksilver28-Jul-05 6:46 
GeneralSearch for a word in a file from code Pin
bugDanny27-Jul-05 7:45
bugDanny27-Jul-05 7:45 
GeneralRe: Search for a word in a file from code Pin
David Crow27-Jul-05 8:01
David Crow27-Jul-05 8:01 
GeneralRe: Search for a word in a file from code Pin
bugDanny27-Jul-05 8:34
bugDanny27-Jul-05 8:34 
GeneralRe: Search for a word in a file from code Pin
David Crow27-Jul-05 8:36
David Crow27-Jul-05 8:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.