|
From: <an...@us...> - 2007-03-06 15:07:18
|
Revision: 162
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=162&view=rev
Author: and-81
Date: 2007-03-06 07:07:16 -0800 (Tue, 06 Mar 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/XBCDRC/XBCDRCPlugin.cs
Modified: trunk/plugins/XBCDRC/XBCDRCPlugin.cs
===================================================================
--- trunk/plugins/XBCDRC/XBCDRCPlugin.cs 2007-03-06 02:54:38 UTC (rev 161)
+++ trunk/plugins/XBCDRC/XBCDRCPlugin.cs 2007-03-06 15:07:16 UTC (rev 162)
@@ -281,12 +281,12 @@
{
int lastError;
- // 0x12 = DIGCF_PRESENT or DIGCF_DEVICEINTERFACE
+ // 0x12 = DIGCF_PRESENT | DIGCF_DEVICEINTERFACE
IntPtr handle = SetupDiGetClassDevs(ref classGuid, "", IntPtr.Zero, 0x12);
lastError = Marshal.GetLastWin32Error();
if (handle.ToInt32() == -1)
- Marshal.ThrowExceptionForHR(lastError);
+ throw new Win32Exception(lastError);
string devicePath = null;
@@ -302,7 +302,7 @@
if (lastError != 0x0103 && lastError != 0x007E)
{
SetupDiDestroyDeviceInfoList(handle);
- Marshal.ThrowExceptionForHR(Marshal.GetLastWin32Error());
+ throw new Win32Exception(Marshal.GetLastWin32Error());
}
SetupDiDestroyDeviceInfoList(handle);
@@ -315,7 +315,7 @@
if (SetupDiEnumDeviceInterfaces(handle, ref deviceInfoData, ref classGuid, 0, ref deviceInterfaceData) == false)
{
SetupDiDestroyDeviceInfoList(handle);
- Marshal.ThrowExceptionForHR(Marshal.GetLastWin32Error());
+ throw new Win32Exception(Marshal.GetLastWin32Error());
}
uint cbData = 0;
@@ -323,7 +323,7 @@
if (SetupDiGetDeviceInterfaceDetail(handle, ref deviceInterfaceData, IntPtr.Zero, 0, ref cbData, IntPtr.Zero) == false && cbData == 0)
{
SetupDiDestroyDeviceInfoList(handle);
- Marshal.ThrowExceptionForHR(Marshal.GetLastWin32Error());
+ throw new Win32Exception(Marshal.GetLastWin32Error());
}
DeviceInterfaceDetailData deviceInterfaceDetailData = new DeviceInterfaceDetailData();
@@ -332,7 +332,7 @@
if (SetupDiGetDeviceInterfaceDetail(handle, ref deviceInterfaceData, ref deviceInterfaceDetailData, cbData, IntPtr.Zero, IntPtr.Zero) == false)
{
SetupDiDestroyDeviceInfoList(handle);
- Marshal.ThrowExceptionForHR(Marshal.GetLastWin32Error());
+ throw new Win32Exception(Marshal.GetLastWin32Error());
}
if (deviceInterfaceDetailData.DevicePath.IndexOf("vid_045e&pid_0284") != -1)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|