阅读:1208回复:2
如何定义GUID?
在网卡驱动程序中,我想定义一个像普通PCI设备的GUID,为我自己的应用程序提供一个接口,比方说让我可以用IoDeviceControl()函数和我的网卡驱动程序交流,绕开NDIS。我该怎么做???
谢谢! |
|
|
沙发#
发布于:2002-03-14 14:43
是用NdisMRegisterDevice()吗?
|
|
|
板凳#
发布于:2002-03-14 19:07
VOID
RegInterface( ) { NDIS_STATUS NdisStatus; NdisZeroMemory(MajorFunction, sizeof(MajorFunction)); MajorFunction[IRP_MJ_CREATE] = MajorFunction[IRP_MJ_CLOSE] = MajorFunction[IRP_MJ_CLEANUP] = MajorFunction[IRP_MJ_READ] = MajorFunction[IRP_MJ_WRITE] = MajorFunction[IRP_MJ_DEVICE_CONTROL] = IOCTL; if(NULL != g_WrapperHandle) { NdisStatus = NdisMRegisterDevice( g_WrapperHandle, &devicename, &symlinkname, MajorFunction, &CommDeviceObj, &CommHandle ); } return; } VOID DeRegInt( ) { NDIS_STATUS NdisStatus; if(CommHandle) { NdisStatus = NdisMDeregisterDevice (CommHandle); if(NDIS_STATUS_SUCCESS == NdisStatus) { CommHandle = NULL; } } return; } |
|
|