MonoUsbProfileHandle Class

LibUsbDotNet

LibUsbDotNet 2.2.8 MonoUsbProfileHandle Class
Library ReferenceMonoLibUsb.ProfileMonoUsbProfileHandle
LibUsbDotNet on SourceForge
Wraps a profile handle into a 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.
Declaration Syntax
C# Visual Basic Visual C++
public class MonoUsbProfileHandle : SafeContextHandle
Public Class MonoUsbProfileHandle _
	Inherits SafeContextHandle
public ref class MonoUsbProfileHandle : public SafeContextHandle
Members
All Members Constructors



Icon Member Description
MonoUsbProfileHandle(IntPtr)
Wraps a raw usb device profile handle pointer in a MonoUsbProfileHandle class.

Remarks

When a MonoUsbProfileHandle instance is created and wrapped around the libusb_device pointer, RefDevice(IntPtr) 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 UnrefDevice(IntPtr). 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 Open(MonoUsbProfileHandle, IntPtr%).

Inheritance Hierarchy
Object
CriticalFinalizerObject
  SafeHandle
    SafeContextHandle
      MonoUsbProfileHandle

Assembly: LibUsbDotNet (Module: LibUsbDotNet) Version: 2.2.8.104 (2.2.8.104)