Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 internal static extern bool WinUsb_GetPowerPolicy([In] SafeHandle InterfaceHandle,
                                                   PowerPolicyType policyType,
                                                   ref int ValueLength,
                                                   IntPtr Value);
Exemplo n.º 3
0
 internal static extern bool WinUsb_GetPowerPolicy([In] SafeHandle InterfaceHandle,
                                                   PowerPolicyType policyType,
                                                   ref int ValueLength,
                                                   IntPtr Value);
Exemplo n.º 4
0
        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;
        }