C# Class MonoLibUsb.MonoUsbSessionHandle

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

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 MonoUsbApi.SetDebug will not affect the other user of the library, and SafeHandle.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 SafeHandle.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: LibUsbDotNet.Main.SafeContextHandle
Mostra file Open project: arvydas/BlinkStickDotNet Class Usage Examples

Public Methods

Method Description
MonoUsbSessionHandle ( ) : System

Creates and initialize a Libusb-1.0 USB session handle.

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

Protected Methods

Method Description
ReleaseHandle ( ) : bool

Method Details

MonoUsbSessionHandle() public method

Creates and initialize a Libusb-1.0 USB session handle.

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

public MonoUsbSessionHandle ( ) : System
return System

ReleaseHandle() protected method

protected ReleaseHandle ( ) : bool
return bool