win-pvdrivers

changeset 117:92aea8738afb

Added error checking into xenhide
author James Harper <james.harper@bendigoit.com.au>
date Mon Jan 14 23:10:27 2008 +1100 (2008-01-14)
parents ff8c14904e96
children cd5a1abb427d
files xenhide/sources xenhide/xenhide.c
line diff
     1.1 --- a/xenhide/sources	Mon Jan 14 21:26:55 2008 +1100
     1.2 +++ b/xenhide/sources	Mon Jan 14 23:10:27 2008 +1100
     1.3 @@ -1,7 +1,7 @@
     1.4  TARGETNAME=XENHIDE
     1.5  TARGETTYPE=DRIVER
     1.6  TARGETPATH=..\Target\$(DDK_TARGET_OS)
     1.7 -VERSION=0.5.0.7
     1.8 +VERSION=0.5.0.8
     1.9  KMDF_VERSION=1
    1.10  MSC_WARNING_LEVEL=/W4
    1.11  INF_NAME=xenhide
     2.1 --- a/xenhide/xenhide.c	Mon Jan 14 21:26:55 2008 +1100
     2.2 +++ b/xenhide/xenhide.c	Mon Jan 14 23:10:27 2008 +1100
     2.3 @@ -145,7 +145,7 @@ DriverEntry(PDRIVER_OBJECT DriverObject,
     2.4                        WDF_NO_HANDLE);
     2.5    if(!NT_SUCCESS(status))
     2.6    {
     2.7 -    //KdPrint((__DRIVER_NAME " WdfDriverCreate failed with status 0x%08x\n", status));
     2.8 +    KdPrint((__DRIVER_NAME " WdfDriverCreate failed with status 0x%08x\n", status));
     2.9    }
    2.10  
    2.11    KdPrint((__DRIVER_NAME " <-- DriverEntry\n"));
    2.12 @@ -175,7 +175,12 @@ XenHide_AddDevice(
    2.13  
    2.14    WDF_OBJECT_ATTRIBUTES_INIT(&attributes);
    2.15  
    2.16 -  WdfDeviceInitAssignWdmIrpPreprocessCallback(DeviceInit, XenHide_PreprocessWdmIrpPNP, IRP_MJ_PNP, MinorFunctions, 1);
    2.17 +  status = WdfDeviceInitAssignWdmIrpPreprocessCallback(DeviceInit, XenHide_PreprocessWdmIrpPNP, IRP_MJ_PNP, MinorFunctions, 1);
    2.18 +  if(!NT_SUCCESS(status))
    2.19 +  {
    2.20 +    KdPrint((__DRIVER_NAME "     WdfDeviceInitAssignWdmIrpPreprocessCallback failed with status 0x%08x\n", status));
    2.21 +    return status;
    2.22 +  }
    2.23  
    2.24    status = WdfDeviceCreate(&DeviceInit, &attributes, &Device);  
    2.25    if(!NT_SUCCESS(status))