Driver Development Kit (DDK)

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem With DDK

Dear friends

I am trying to develop a device driver with WinXP DDK. i have written C functions which can communicate with my hardware. But i need to run these functions in Visual C++ to add GUI and other features to my program.

I tried to create '.lib' and also '.dll' libraries out of these functions in DDK but the resulting library wouldn't work! and i could not  call functions in Visual C++.

Can anybody help me?
 (How can i write simple libraries in DDK and use them in Visual C++? Either '.lib' or '.dll')


Tnx

Erfan Azarkhish
0 Kudos
Message 1 of 3
(7,231 Views)

Hi Erfan-

This is more of a general programming question than anything specific to the DDK examples.  I would recommend reading up on the method to export functions for external use from within your driver .dll.  This page seems like a good reference.

Hopefully this helps-

Tom W
National Instruments
0 Kudos
Message 2 of 3
(7,230 Views)
Dear TOM

Thank you for your help

But the problem is that:

I can build the DLL and bring it to VC++ (Actually my IDE is Visual Studio .Net 2005, but i work with VC++ project)
But when i run my application and call the dll I get this error:

"The value of ESP was not properly set during a function call, This is result of calling a function declared with one CALLING CONVENTION and called by another"

You know, my problem is that my DLL's calling convention is different from my caller in VC++
I have tried to use all methods of dllexport and others but didnt work




0 Kudos
Message 3 of 3
(7,182 Views)