keyboard filter errors

I’m trying to compile my keyboard filter driver which is similar to kbfiltr sample but I seem to get some errors on the rawpdo.obj with regards to unresolved externals, I get the following errors:

1.error LNK2001: unresolved external symbol _SDDL_DEVOBJ_SYS_ALL_ADM_ALL
2.error LNK2019: unresolved external symbol _RtlUnicodeStringValidateDestWorker@24 referenced in function _RtlUnicodeStringPrintf
3.error LNK2019: unresolved external symbol _RtlWideCharArrayVPrintfWorker@20 referenced in function _RtlUnicodeStringPrintf
4.error LNK2019: unresolved external symbol xxxxx@4 referenced in function _CreateRawPdo@8

The raw pdo is basically a copy of the rawpdo for kbfiltr, the following is the inf file, rawpdo, and mainFilter.h:
http://codetidy.com/6705/
http://codetidy.com/6706/
http://codetidy.com/6707/

You need to link against $(ddk_lib_path)\wdmsec.lib, ntstrsafe.lib

Sent from Outlook Mailhttp: for Windows 10

From: xxxxx@edu.salford.ac.uk
Sent: Friday, June 26, 2015 7:49 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] keyboard filter errors

I’m trying to compile my keyboard filter driver which is similar to kbfiltr sample but I seem to get some errors on the rawpdo.obj with regards to unresolved externals, I get the following errors:

1.error LNK2001: unresolved external symbol _SDDL_DEVOBJ_SYS_ALL_ADM_ALL
2.error LNK2019: unresolved external symbol _RtlUnicodeStringValidateDestWorker@24 referenced in function _RtlUnicodeStringPrintf
3.error LNK2019: unresolved external symbol _RtlWideCharArrayVPrintfWorker@20 referenced in function _RtlUnicodeStringPrintf
4.error LNK2019: unresolved external symbol xxxxx@4 referenced in function _CreateRawPdo@8

The raw pdo is basically a copy of the rawpdo for kbfiltr, the following is the inf file, rawpdo, and mainFilter.h:
http://codetidy.com/6705/
http://codetidy.com/6706/
http://codetidy.com/6707/


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

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</http:>

Thanks I added it to projects settings additional dependencies, though I’m still getting one error:
error LNK1181: cannot open input file ‘C:\Program Files (x86)\Windows Kits\8.1\lib\winV6.3\KM\x86\wdmsec.lib, ntstrsafe.lib’

That was meant as a list and you needed to add both entries, both with the same qualified path. Not a literal copy and paste string

Sent from Outlook Mailhttp: for Windows 10

From: xxxxx@edu.salford.ac.uk
Sent: Friday, June 26, 2015 8:49 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] keyboard filter errors

Thanks I added it to projects settings additional dependencies, though I’m still getting one error:
error LNK1181: cannot open input file ‘C:\Program Files (x86)\Windows Kits\8.1\lib\winV6.3\KM\x86\wdmsec.lib, ntstrsafe.lib’


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

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</http:>

I still seem to be getting an error, the following is the additional dependencies I have added:
%(AdditionalDependencies);$(ddk_lib_path)\wdmsec.lib;$(ddk_lib_path)\ntstrsafe.lib;

This is the error:
error LNK2019: unresolved external symbol xxxxx@4 referenced in function _CreateRawPdo@8

Have you tried adding wdmlib.lib? The import name is giving you a big hint

Sent from Outlook Mailhttp: for Windows 10

From: xxxxx@edu.salford.ac.uk
Sent: Saturday, June 27, 2015 7:05 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] keyboard filter errors

I still seem to be getting an error, the following is the additional dependencies I have added:
%(AdditionalDependencies);$(ddk_lib_path)\wdmsec.lib;$(ddk_lib_path)\ntstrsafe.lib;

This is the error:
error LNK2019: unresolved external symbol xxxxx@4 referenced in function _CreateRawPdo@8


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

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</http:>

I have no wdmlib.lib file.

What is the need for additional dependencies, shouldn’t kbfiltr similar project build as it is in visual studio?

Could this be due to wdk installation problem?

Depends on how you copied the sample. https://msdn.microsoft.com/en-us/library/windows/hardware/ff561954(v=vs.85).aspx tells you which lib to link against

Sent from Outlook Mailhttp: for Windows 10

From: xxxxx@edu.salford.ac.uk
Sent: Saturday, June 27, 2015 12:45 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] keyboard filter errors

I have no wdmlib.lib file.

What is the need for additional dependencies, shouldn’t kbfiltr similar project build as it is in visual studio?

Could this be due to wdk installation problem?


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

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</http:>

Thanks managed to get rid of the errors.