Desktop Functions: Smart Device Functions:
|
Search Results for "CM_Request_Device_Eject" in [All]setupapi
static extern int CM_Request_Device_EjectA(int dnDevInst, ref int pVetoType, StringBuilder pszVetoName, int ulNameLength, int ulFlags);
static extern int CM_Request_Device_Eject(UInt32 devinst, out PNP_VETO_TYPE pVetoType, System.Text.StringBuilder pszVetoName, int ulNameLength, int ulFlags);
Declare Function CM_Request_Device_Eject Lib "setupapi.dll" (TODO) As TODO
CM_Request_Device_Eject_NoUi also can be used to eject a device. It has the same signature too.
bool success = (CR_SUCCESS == CM_Request_Device_Eject(devinst, out pnp_veto_type, sb, sb.Capacity, 0));
CM_Request_Device_Eject_NoUi((int)USBData.DevInst, IntPtr.Zero, null, 0, 0); // USBData, a SP_DEVINFO_DATA structure.
int hr = CM_Request_Device_Eject((int)USBData.DevInst, out veto, sb, sb.Capacity, 0); |