Log in

View Full Version : How do a native device driver communicate with application?


cwpun
10-17-2002, 02:12 PM
Dear All,

I am writing a native device driver and want it to communicate with an application. However, native device driver is loaded by GWES, not Device Manager. And native device driver has its own defined interface (ddi) which can be only accessed by GWES. Thus, I cannot use ReadFile, WriteFile or DeviceIoControl in an application to communicate with the native device driver. Any person have any idea?

Thx a lot
George

cnote
12-09-2002, 11:20 AM
Dear All,

I am writing a native device driver and want it to communicate with an application. However, native device driver is loaded by GWES, not Device Manager. And native device driver has its own defined interface (ddi) which can be only accessed by GWES. Thus, I cannot use ReadFile, WriteFile or DeviceIoControl in an application to communicate with the native device driver. Any person have any idea?

Thx a lot
George

If you're writing a display driver you can use the DrvEscape function. If not you'll need to get a little uglier, probably make a thread which waits on an event and looks at a named shared memory mapped file. Or use messages and PostThreadMessage from the app into your driver (you'll still need to create a thread to GetMessage).

If you're doing this on CE 4.0+ you could use message queues (CreateMsgQueue) as well.