我有這個驅動程序不會編譯。我一直在網上搜索錯誤,並沒有找到解決方案。有什麼想法嗎?錯誤建立Windows 7驅動程序
#include <wdm.h>
VOID Unload(IN PDRIVER_OBJECT pDriverObject)
{
DbgPrint("Received signal to unload the driver");
return;
}
NTSTATUS DriverEntry(IN PDRIVER_OBJECT pDriverObject, IN PUNICODE_STRING regPath)
{
DbgPrint("Driver has been loaded");
(*pDriverObject).DriverUnload = Unload;
return(STATUS_SUCCESS);
}
錯誤下:
1>------ Build started: Project: KMDF Test, Configuration: Win7 Debug Win32 ------
1> Stamping Win7Debug\KMDFTest.inf [Version] section with DriverVer=12/04/2012,10.12.25.726
1> cl wpp
1>wpp : error : (WppCreateFile)Cannot open file trace.h, error 2
2>------ Build started: Project: KMDF Test Package, Configuration: Win7 Debug Win32 ------
2>C:\Program Files\Windows Kits\8.0\build\WindowsDriver8.0.common.targets(1347,5): error MSB3030: Could not copy the file "C:\Users\Administrator\documents\visual studio 2012\Projects\KMDF Test\Win7Debug\KMDFTest.sys" because it was not found.
========== Build: 0 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========
這是您的驅動程序使用的WPP日誌記錄機制的錯誤。您發佈的代碼與此無關。 – SomeWittyUsername
那麼,我該如何解決它? –
從發佈相關代碼開始。並在網上做一個體面的搜索。這是搜索結果中出現的第一個鏈接:https://www.osronline.com/showthread.cfm?link=228192 – SomeWittyUsername