Hi
I am getting a 7e - c0005 Bug Check , my Schema is published and able to read usign CIM Stuido , but when I try Access from Driver it faults , can any body tell me what is worng with my code
!analyze -v Points to IOWMIOpenBlock Call
Thanks,
Manohara
DEFINE_GUID(XXXXX_GUID,0xa26f5000,0x7f22,0x41ab,0x8d,0x07,0x70,0x13,0x02,0x6b,0xcd,0xcf);
VOID DriverUnload(__in PDRIVER_OBJECT DriverObject);
NTSTATUS DriverEntry(__in PDRIVER_OBJECT DriverObject,__in PUNICODE_STRING RegistryPath)
{
NTSTATUS status = STATUS_SUCCESS;
ULONG ulIndex = 0;
GUID guid;
PVOID myHandle = NULL;
DebugPrint((“Compilet at %s %s \n”,DATE,TIME));
UNREFERENCED_PARAMETER (RegistryPath);
DriverObject->DriverUnload = DriverUnload;
RtlCopyBytes(&guid,&XXXXX_GUID,sizeof(GUID));
status = IoWMIOpenBlock(&guid,WMIGUID_QUERY,myHandle);
if (!NT_SUCCESS(status))
{
DebugPrint((“IoWMIOpenBlock Failure %X\n”,status));
}
//try
if (myHandle)
{
DebugPrint((“Calling ObDereferenceObject \n”,status));
ObDereferenceObject(myHandle);
}
DebugPrint ((“Entered the Driver Entry\n”));
return status;
}
VOID DriverUnload(__in PDRIVER_OBJECT DriverObject)
{
DebugPrint ((“unload\n”));
return;
}