Class representing a Libusb-1.0 session session handle.
Session handled are wrapped in a CriticalFinalizerObject.

C# | Visual Basic | Visual C++ |
public class MonoUsbSessionHandle : SafeContextHandle
Public Class MonoUsbSessionHandle _ Inherits SafeContextHandle
public ref class MonoUsbSessionHandle : public SafeContextHandle

All Members | Constructors | Properties | |||
Icon | Member | Description |
---|---|---|
![]() | MonoUsbSessionHandle()()()() |
Creates and initialize a Libusb-1.0 USB session handle.
|
![]() ![]() | LastErrorCode |
If the session handle is IsInvalid, gets the MonoUsbError status code indicating the reason.
|
![]() ![]() | LastErrorString |
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.

Object | ||||
![]() | CriticalFinalizerObject | |||
![]() | SafeHandle | |||
![]() | SafeContextHandle | |||
![]() | MonoUsbSessionHandle |