LibUsbDotNet 2.2.8
MonoUsbSessionHandle Class
Library ReferenceMonoLibUsbMonoUsbSessionHandle
LibUsbDotNet on SourceForge
Class representing a Libusb-1.0 session session handle. Session handled are wrapped in a CriticalFinalizerObject.
Declaration Syntax
C#Visual BasicVisual C++
public class MonoUsbSessionHandle : SafeContextHandle
Public Class MonoUsbSessionHandle _
	Inherits SafeContextHandle
public ref class MonoUsbSessionHandle : public SafeContextHandle
All MembersConstructorsProperties

Creates and initialize a Libusb-1.0 USB session handle.

If the session handle is IsInvalid, gets the MonoUsbError status code indicating the reason.

If the session handle is IsInvalid, gets a descriptive string for the LastErrorCode.


The concept of individual Libusb-1.0 sessions allows for your program to use two libraries (or dynamically load two modules) which both independently use libusb. This will prevent interference between the individual libusb users - for example SetDebug(MonoUsbSessionHandle, Int32) will not affect the other user of the library, and Close()()()() will not destroy resources that the other user is still using.

Sessions are created when a new MonoUsbSessionHandle instance is created and destroyed through Close()()()().

A MonoUsbSessionHandle instance must be created before calling any other Libusb-1.0 API function.

Session handles are equivalent to a libusb_context.

Inheritance Hierarchy

Assembly: LibUsbDotNet (Module: LibUsbDotNet) Version: (