示例#1
0
 public static bool CloseDeviceDriverHandle(IntPtr nHandle)
 {
     if (nHandle != (IntPtr.Zero - 1))
     {
         return(Win32fileOp.CloseHandle(nHandle));
     }
     return(false);
 }
示例#2
0
 public static IntPtr GetDeviceDriverHandle()
 {
     //In this eample we call the ASrock driver (Asrock101.sys)
     return(Win32fileOp.CreateFile("\\\\.\\AsrDrv101", 0xC0000000U, 3U, IntPtr.Zero, 3U, 0x4000000u, IntPtr.Zero));
 }