unresolved external symbol __imp__NdisRegisterDeviceEx

I am trying to port Windows USB driver to WEC-7.
I got the following error during build.

error LNK2019: unresolved external symbol __imp__NdisRegisterDeviceEx referenced in function san_test
error LNK2019: unresolved external symbol __imp__NdisDeregisterDeviceEx referenced in function san_test
error LNK2019: unresolved external symbol _ObDereferenceObject referenced in function san_test
error LNK2019: unresolved external symbol _ObReferenceObjectByHandle referenced in function san_test
error LNK2019: unresolved external symbol _PsTerminateSystemThread referenced in function san_test
error LNK2019: unresolved external symbol _IoCompleteRequest referenced in function san_test

  1. I found that NdisRegisterDeviceEx and NdisDeregisterDeviceEx is declared in NDIS.h.
    After including NDIS.h same issue.

  2. Whether ObDereferenceObject, PsTerminateSystemThread, IoCompleteRequest api is possible to use in WEC-7 or
    any corresponding Api is there.

What’s WEC-7?

WEC-7 probably means Windows Embedded Compact 7.

Are you porting a PC or Server USB driver ?

If yes then try with these driver samples first:

https://msdn.microsoft.com/en-us/library/hh802401(v=winembedded.70).aspx

>WEC-7 probably means Windows Embedded Compact 7.

“Compact” is euphemism of Windows CE. It has a different infrastructure, maybe NdisRegisterDeviceEx does not exist there at all, and is not needed in order to create a helper device interface. Instead, create the helper device by native WinCE means.

– pa