阅读:2185回复:0
两个驱动程序互相通信
我再驱动程序A的DriverEntry立面调用了 status = IoCreateDevice(DriverObject,
0, &DriverNameStr, FILE_DEVICE_UNKNOWN, 0, FALSE, &pDeviceObject); 这个函数,比如说DriverNameStr是RtlInitUnicodeString( &DriverNameStr, L"\\device\\kabc" );,然后安装,启动。 然后我在驱动B的DriverEntry里面调用 status = ObReferenceObjectByName( &DriverNameStr, OBJ_CASE_INSENSITIVE, NULL, 0, IoDriverObjectType, KernelMode, NULL, &pDriverObject //保存得到的驱动对象 ); DriverNameStr同样是RtlInitUnicodeString( &DriverNameStr, L"\\device\\kabc" ); 不知道为什么确实返回#define STATUS_OBJECT_NAME_NOT_FOUND ((NTSTATUS)0xC0000034L)这个值,就是说Object Name not found.没有找到,不知道为什么,请各位帮帮忙,刚学习。。。呵呵 |
|