question

VictorMehta-3520 avatar image
0 Votes"
VictorMehta-3520 asked VictorMehta-3520 answered

How to statically link a library (.lib) file in a KMDF driver project

I downloaded the infinityhook project from the website below and cannot get it to work. The InfinityHook project compiles and builds successfully but when I try to link the library created from the InfinityHook project with the kernel mode (KMDF) driver project I get the error LNK 2019 unresolved external symbol referencing the function name that is unresolved. This applies to both functions which are exported by the InfinityHook project. Any help would be appreciated.

Infinityhook


windows-hardware-wdk
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

VictorMehta-3520 avatar image
0 Votes"
VictorMehta-3520 answered

Problem solved. I was calling the two C++ defined functions, declared in a .cpp file from a "C" based module from a .c file.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

VictorMehta-3520 avatar image
0 Votes"
VictorMehta-3520 answered VictorMehta-3520 commented

I forgot to mention that I'm using Visual Studio 2017 Enterprise with WDK 1709.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

The code is wrong you can fix it with a pull request

0 Votes 0 ·