C# 클래스 Mirror.UsbLibrary.Win32Usb

Class that wraps USB API calls and structures.
파일 보기 프로젝트 열기: suan/mirlite

공개 프로퍼티들

프로퍼티 타입 설명
NullHandle System.IntPtr

보호된 프로퍼티들

프로퍼티 타입 설명
InvalidHandleValue System.IntPtr

공개 메소드들

메소드 설명
RegisterForUsbEvents ( IntPtr hWnd, System.Guid gClass ) : IntPtr

Registers a window to receive windows messages when a device is inserted/removed. Need to call this from a form when its handle has been created, not in the form constructor. Use form's OnHandleCreated override.

UnregisterForUsbEvents ( IntPtr hHandle ) : bool

Unregisters notifications. Can be used in form dispose

비공개 메소드들

메소드 설명
CloseHandle ( IntPtr hFile ) : int
CreateFile ( [ strName, uint nAccess, uint nShareMode, IntPtr lpSecurity, uint nCreationFlags, uint nAttributes, IntPtr lpTemplate ) : IntPtr
HidD_FreePreparsedData ( IntPtr &pData ) : bool
HidD_GetHidGuid ( System.Guid &gHid ) : void
HidD_GetPreparsedData ( IntPtr hFile, IntPtr &lpData ) : bool
HidP_GetCaps ( IntPtr lpData, HidCaps &oCaps ) : int
RegisterDeviceNotification ( IntPtr hwnd, DeviceBroadcastInterface oInterface, uint nFlags ) : IntPtr
SetupDiDestroyDeviceInfoList ( IntPtr lpInfoSet ) : int
SetupDiEnumDeviceInterfaces ( IntPtr lpDeviceInfoSet, uint nDeviceInfoData, System.Guid &gClass, uint nIndex, DeviceInterfaceData &oInterfaceData ) : bool
SetupDiGetClassDevs ( System.Guid &gClass, [ strEnumerator, IntPtr hParent, uint nFlags ) : IntPtr
SetupDiGetDeviceInterfaceDetail ( IntPtr lpDeviceInfoSet, DeviceInterfaceData &oInterfaceData, DeviceInterfaceDetailData &oDetailData, uint nDeviceInterfaceDetailDataSize, uint &nRequiredSize, IntPtr lpDeviceInfoData ) : bool
SetupDiGetDeviceInterfaceDetail ( IntPtr lpDeviceInfoSet, DeviceInterfaceData &oInterfaceData, IntPtr lpDeviceInterfaceDetailData, uint nDeviceInterfaceDetailDataSize, uint &nRequiredSize, IntPtr lpDeviceInfoData ) : bool
UnregisterDeviceNotification ( IntPtr hHandle ) : bool

메소드 상세

RegisterForUsbEvents() 공개 정적인 메소드

Registers a window to receive windows messages when a device is inserted/removed. Need to call this from a form when its handle has been created, not in the form constructor. Use form's OnHandleCreated override.
public static RegisterForUsbEvents ( IntPtr hWnd, System.Guid gClass ) : IntPtr
hWnd System.IntPtr Handle to window that will receive messages
gClass System.Guid Class of devices to get messages for
리턴 System.IntPtr

UnregisterForUsbEvents() 공개 정적인 메소드

Unregisters notifications. Can be used in form dispose
public static UnregisterForUsbEvents ( IntPtr hHandle ) : bool
hHandle System.IntPtr Handle returned from RegisterForUSBEvents
리턴 bool

프로퍼티 상세

InvalidHandleValue 보호되어 있는 정적으로 프로퍼티

Simple representation of the handle returned when CreateFile fails.
protected static IntPtr,System InvalidHandleValue
리턴 System.IntPtr

NullHandle 공개적으로 정적으로 프로퍼티

Simple representation of a null handle : a closed stream will get this handle. Note it is public for comparison by higher level classes.
public static IntPtr,System NullHandle
리턴 System.IntPtr