阅读:2270回复:0
ActivateDeviceEx 加载设备问题
我目前正在自己写一个bus driver
需要自己调用ActivateDeviceEx新建设备 bus driver 注册表如下 [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\StreamDrv] "Dll" = "test_bus_driver.Dll" "Prefix" = "DEM" "Order" = dword:0 "FriendlyName" = "Test Bus Driver" "Ioctl" = dword:0 并且加载、工作均正常 随后我建立了测试用的设备驱动,其注册表内容如下 [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\StreamDrv\TestDevice] "Dll" = "test_device_driver.Dll" "Prefix" = "TEM" "Order" = dword:0 "FriendlyName" = "Test Device Driver" "Ioctl" = dword:0 并且在bus driver的init函数中加入了如下代码: hSubDevice=ActivateDeviceEx(L"HKEY_LOCAL_MACHINE\\Drivers\\BuiltIn\\StreamDrv\\TestDevice",NULL,0,NULL); 但是在模拟器上运行时却提示如下错误: 4294772986 PID:83f9cf72 TID:83f9c782 0x83fca800: DEVICE!RegReadActivationValues RegOpenKeyEx(HKEY_LOCAL_MACHINE\Drivers\BuiltIn\StreamDrv\TestDevice) returned 2. 4294772986 PID:83f9cf72 TID:83f9c782 0x83fca800: DEVICE!I_ActivateDeviceEx: can't find all required activation values in 'HKEY_LOCAL_MACHINE\Drivers\BuiltIn\StreamDrv\TestDevice' 目前可以确认bus driver已正确加载,但是设备驱动由于以上错误未能加载 我通过搜索发现有朋友说那个注册表位置应该从drivers开始些,可是我更改之后仍然出现相同的错误 |
|