RtlInitUnicodeString ( &TcpipName, L"\\Driver\\Tcpip" );
ObReferenceObjectByName( &TcpipName,
OBJ_CASE_INSENSITIVE,
NULL,
0,
*IoDriverObjectType,
KernelMode,
NULL,
&TcpipDrvObj);
CurrentDevice = TcpipDrvObj->DeviceObject;
while(CurrentDevice != NULL )
{
CurrentDevice->AttachedDevice=0;
CurrentDevice = CurrentDevice->NextDevice;
}