PrimoBurner for .NET  5.0
CD, DVD and Blu-ray Software Development Kit
Loading...
Searching...
No Matches
Engine Class Reference

Burner Engine. More...

Inherits IDisposable.

Public Member Functions

 Engine ()
 Creates a new instance of Engine class.
 
DeviceEnumerator CreateDeviceEnumerator ()
 Enumerates the optical devices installed in the system.
 
Device CreateDeviceFromHandle (IntPtr handle)
 Creates a Device object from a handle.
 
void Dispose ()
 Disposes Engine and reclaims the resources used by the object.
 
bool Initialize ()
 Initializes the Engine.
 
void Shutdown ()
 Shuts the engine down, unlocks any devices that have been locked and frees the internal structures associated with every device.
 

Properties

ErrorInfo Error [get]
 Returns information about the last error that occurred while using the Engine object.
 
EventHandler< EngineDeviceChangeEventArgsOnDeviceChange
 Raised to report that a device has been connected to/removed from the machine.
 
EventHandler< EngineMediaChangeEventArgsOnMediaChange
 Raised to report that a disc has been inserted into or ejected from a device.
 

Detailed Description

Burner Engine.

Constructor & Destructor Documentation

◆ Engine()

Engine ( )

Creates a new instance of Engine class.

The object needs to be disposed when it is not needed anymore.

See also
Engine.Dispose

Member Function Documentation

◆ CreateDeviceEnumerator()

DeviceEnumerator CreateDeviceEnumerator ( )

Enumerates the optical devices installed in the system.

The DeviceEnumerator object needs to be disposed when it is not needed anymore.

Returns

DeviceEnumerator object that can be used for creating device instances. Returns null if engine has not been initialized and also sets
Exceptions
ObjectDisposedExceptionThe Engine object was already disposed.
Engine.Error.Code to EngineError.NotInitialized.

◆ CreateDeviceFromHandle()

Device CreateDeviceFromHandle ( IntPtr  handle)

Creates a Device object from a handle.

Parameters
handleAn operating system handle to an existing device.
Returns
A new instance of the Device type. You must call the Dispose method to free the device instance. Returns null if the engine has not been initialized and also sets
Exceptions
ObjectDisposedExceptionThe Engine object was already disposed.
Engine.Error.Code to EngineError.NotInitialized.
See also
EngineError

◆ Initialize()

bool Initialize ( )

Initializes the Engine.

Returns
Is successful returns true, otherwise returns false.
Exceptions
ObjectDisposedExceptionThe Engine object was already disposed.

◆ Shutdown()

void Shutdown ( )

Shuts the engine down, unlocks any devices that have been locked and frees the internal structures associated with every device.

Exceptions
ObjectDisposedExceptionThe Engine object was already disposed.

Property Documentation

◆ Error

ErrorInfo Error
get

Returns information about the last error that occurred while using the Engine object.

Exceptions
ObjectDisposedExceptionThe DeviceEnumerator object was already disposed.

◆ OnDeviceChange

EventHandler<EngineDeviceChangeEventArgs> OnDeviceChange
addremove

Raised to report that a device has been connected to/removed from the machine.

The event handler receives an argument of type EngineDeviceChangeEventArgs containing data related to this event.

NOTE:

Call Engine.Initialize to be able to receive device change notifications. The event is raised from a thread different than the one in which the Engine instance is created
or in which the event subscription is made.

◆ OnMediaChange

EventHandler<EngineMediaChangeEventArgs> OnMediaChange
addremove

Raised to report that a disc has been inserted into or ejected from a device.

The event handler receives an argument of type EngineMediaChangeEventArgs containing data related to this event.

NOTE:

Call Engine.Initialize to be able to receive media change notifications.

If an exclusive access is obtained for a device through the Device interface then media change notifications for that device will not be received.
After the Device object is disposed media change notifications for that device may be received. If a non-exclusive access is obtained for a device then media change notifications for that device may be received.

The event is raised from a thread different than the one in which the Engine instance is created or in which the event subscription is made.