PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

How do a native device driver communicate with application?

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
ExtEscape.
ExtEscape only works in display driver. By my native display driver is a touch panel driver.
Offhand I don't know of a documented way to do this with non-display drivers that are loaded into GWES.

I suppose you could add private entry points to your driver that an app could call directly. You'd probably want to create a shared memory area in the driver so that you could share state info between the two processes.

Have you tried asking this question in the MS Windows Embedded newsgroups (news://microsoft.public.windowsce.embedded)?
I also would recomment adding privat entry points (exported functions) to your driver. Because drivers are DLL's it's easy to get the module handle and entry points and use this in your application.

In general, I do not recomment using shared memory area. To syncronise processes or threads you can use events or mutexes.
I don't know exactly what you're trying to do, but this may be of interest:

I have done some research and programming on this software. I have to code at least two drivers. One is display driver and the other one is touch panel driver. Also, I need a program communicating with two drivers, but it is not a problem for me. I successfully code the touch panel driver. I use functiion GetProcAddress get the exported functions of the original driver touch.dll and substitute with my functions. That means the driver I coded resides between the kernel and touch.dll. This works prefectly and I can easily alter the returned coordinates by touch.dll.


From this thread:
http://forums.pocketmatrix.com/viewtopic.php?t=7358

Dan East