How to set my driver dll as multi threaded dll

I have an MFC application which is calling the APIs from my driver. I have done it by including the lib and header file which works fine and is also calling the required API from dll.

But the problem is , What ever data I am passing in MFC through dll API, is not being passed to the driver.

I am suspecting this because in my MFC app dlls are as multithreaded and it has to be multithreaded , is there a way I cant make my driver dll aslo as multi threaded?

Multi-threading has nothing to do with it. If you are expecting to directly call a function down in your driver, that will never work, since as you have discovered, kernel space tain’t user space, and what you think you called is not in the kernel and hence not in your driver. I’d love to know how you linked that mess.

Driver/application communication is properly carried out via IO control calls that are created for you via ReadFile/WriteFile, or created by the app and passed to the driver via DeviceIoControl calls. If you have “magic” for your driver to do with your device, you create IOCTL_MAGIC which defines the type of buffering, the device, access, and function to use, and pass IOCTL_MAGIC to your driver using DeviceIoControl. Since that IOCTL is shared via a header file, along with common structures, both app and driver have the same definition.

Gary G. Little

----- Original Message -----
From: “subhendu swain”
To: “Windows System Software Devs Interest List”
Sent: Tuesday, December 28, 2010 5:56:08 AM
Subject: [ntdev] How to set my driver dll as multi threaded dll

I have an MFC application which is calling the APIs from my driver. I have done it by including the lib and header file which works fine and is also calling the required API from dll.

But the problem is , What ever data I am passing in MFC through dll API, is not being passed to the driver.

I am suspecting this because in my MFC app dlls are as multithreaded and it has to be multithreaded , is there a way I cant make my driver dll aslo as multi threaded?


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Does not make much sense? What do you mean by driver dll?

"I have done it by including the lib and header file which works fine and is also calling the required API from dll. "

From this it looks like you have a dll which pass calls some driver. Who wrote the dll, what is it doing.

What driver is it to which it is communicating?

>What ever data I am passing in MFC through dll API, is not being passed to the driver.

How did you checked it?

>I am suspecting this because in my MFC app dlls are as multithreaded and it has to be multithreaded , is there a way I cant make my driver dll aslo as multi threaded?

Useless thought.

Unless we are speaking about some UM driver the only thing I can say here is “Where is Chris”…

Anton Bassov