b2s2
asked on
How I can use NT DDK PACKET driver with VC++ ?
I've built the packet driver from ddk/network/packet directory, I've
got a packet32.dll, packet32.lib etc..., the testapp.c works fine. But
when I build my project in VC++ (with MFC) I get "unresolved external
symbol _PacketOpenAdapter" (obviusly for all packet functions), but
I've linked the library packet32.lib and I've put the 'extern "C"' in
all function prototypes in packet32.h, but it still don't work.
Anybody can help me ? How I can use packet32.lib under VC++ 4.2 ?
I've used packet driver that come with MSDN of August 1996, I don't
know if newer version works, anyone knows ?
Regards.
got a packet32.dll, packet32.lib etc..., the testapp.c works fine. But
when I build my project in VC++ (with MFC) I get "unresolved external
symbol _PacketOpenAdapter" (obviusly for all packet functions), but
I've linked the library packet32.lib and I've put the 'extern "C"' in
all function prototypes in packet32.h, but it still don't work.
Anybody can help me ? How I can use packet32.lib under VC++ 4.2 ?
I've used packet driver that come with MSDN of August 1996, I don't
know if newer version works, anyone knows ?
Regards.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The problem might be calling convention. In C++ the standard call calling convention. As well as the extern "C", you might need to add a declaration that indicates the calling convention as well. An incorrect calling convetions will obviously cause run-time errors, but it can cause link errors as well, because the standard call (VC's default) calling convention decorates the name by adding an underscrore to the start and appending a "@XX to the end where the XX is the byte size fo the parameters.