Click here to Skip to main content
15,666,373 members

Comments by Draco2013 (Top 53 by date)

Draco2013 12-May-22 11:15am View    
Ahhh ok I'm missing the flags in my function parameter thank you
Draco2013 12-May-22 11:09am View    
Thank you I will try to fix the file path with fltQueryinformation and DeviceIoControl should still do the trick for communicating between the filter driver and application?
Draco2013 11-May-22 11:10am View    
OK I understand and thank you very much for this info I will mark this as accepted as I'm sure it will be everything I need. Now comes the part of actually doing it 😁
Draco2013 4-May-22 13:50pm View    
I have changed as much as I can as you suggested and have properly initialized my UNICODE_STRING proc_path but I have a few more questions if I can.

You say:
I'd create a new code to make it easy in the driver to tell the difference between the ulong and the string. 

I have both Variables Global as ULONG and UNICODE_STING
is this what you mean? Also what is meant by the code is just a number?

I have changed the DeviceIo Control from Ulong to IntPtr so that the output buffer can hold a pointer to both the PID and Process Path.

You say:
Your ulong VB code then needs to allocate an unmanaged buffer, call the driver using the pointer to the buffer as the output parameter, then retrieve the ulong value from the pointer. 

I have Proc_id in my application as Ulong which is already a integer type value but says implicit Ulong to Intptr which works well without the AllocHglobal stuff which I couldn't seem to make work. I'm not sure either how to allocate a unmanaged buffer from ulong code or how to call the driver with a buffer when it's intptr. You can probably tell by now I'm pretty confused 😕

You say:
You'll need to revise your driver code to validate the length of the buffer against the length of a ulong

I do this with sizeof(*buffer) is this good enough or may have issues? Once I have the new IOCTL and switch statement do I also need to add the length of the PID and the length of the process to buffer? Please help
Draco2013 3-May-22 11:09am View    
Thank you so much for this explanation I'm very grateful and will try this once I get home today 😊. This is a breath of fresh air as I feel I'm going crazy 🤪