internal bool SetPowerPolicy(PowerPolicyType policyType, int valueLength, IntPtr pBuffer) { bool bSuccess = WinUsbAPI.WinUsb_SetPowerPolicy(mUsbHandle, policyType, valueLength, pBuffer); if (!bSuccess) { UsbError.Error(ErrorCode.Win32Error, Marshal.GetLastWin32Error(), "SetPowerPolicy", this); } return(bSuccess); }
internal static extern bool WinUsb_GetPowerPolicy([In] SafeHandle InterfaceHandle, PowerPolicyType policyType, ref int ValueLength, IntPtr Value);
internal static extern bool WinUsb_GetPowerPolicy([In] SafeHandle InterfaceHandle, PowerPolicyType policyType, ref int ValueLength, IntPtr Value);
internal bool SetPowerPolicy(PowerPolicyType policyType, int valueLength, IntPtr pBuffer) { bool bSuccess = WinUsbAPI.WinUsb_SetPowerPolicy(mUsbHandle, policyType, valueLength, pBuffer); if (!bSuccess) UsbError.Error(ErrorCode.Win32Error, Marshal.GetLastWin32Error(), "SetPowerPolicy", this); return bSuccess; }