C# 클래스 MonoLibUsb.Profile.MonoUsbProfileHandle

Wraps a profile handle into a System.Runtime.ConstrainedExecution.CriticalFinalizerObject. Profile handles are used for getting device descriptor information and opening the device. Profile handles are known connected and usually supported usb device that can be opened and used.

When a MonoUsbProfileHandle instance is created and wrapped around the libusb_device pointer, MonoUsbApi.RefDevice is called. When all references to this MonoUsbProfileHandle instance are out-of-scope or have all been closed, this profile handle is de-referenced with MonoUsbApi.UnrefDevice. When the reference count equals zero, memory is freed and resources are released.

The MonoUsbProfileHandle class ensures all device profiles get closed and freed regardless of abnormal program terminations or coding errors.

Certain operations can be performed using just the MonoUsbProfileHandle, but in order to do any I/O you will have to first obtain a MonoUsbDeviceHandle using MonoUsbApi.Open.

상속: LibUsbDotNet.Main.SafeContextHandle
파일 보기 프로젝트 열기: arvydas/BlinkStickDotNet 1 사용 예제들

Private Properties

프로퍼티 타입 설명

공개 메소드들

메소드 설명
MonoUsbProfileHandle ( IntPtr pProfileHandle ) : System

Wraps a raw usb device profile handle pointer in a MonoUsbProfileHandle class.

보호된 메소드들

메소드 설명
ReleaseHandle ( ) : bool

When overridden in a derived class, executes the code required to free the handle.

메소드 상세

MonoUsbProfileHandle() 공개 메소드

Wraps a raw usb device profile handle pointer in a MonoUsbProfileHandle class.
public MonoUsbProfileHandle ( IntPtr pProfileHandle ) : System
pProfileHandle System.IntPtr the profile handle to wrap.
리턴 System

ReleaseHandle() 보호된 메소드

When overridden in a derived class, executes the code required to free the handle.
protected ReleaseHandle ( ) : bool
리턴 bool