PrimoBurner for .NET  4.6
CD, DVD and Blu-ray Software Development Kit
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
Engine Class Reference

Burner Engine. More...

Inherits IDisposable.

Public Member Functions

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

Properties

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

Detailed Description

Constructor & Destructor Documentation

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

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.
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
void Dispose ( )

Disposes Engine and reclaims the resources used by the object.

bool Initialize ( )

Initializes the Engine.

Returns
Is successful returns true, otherwise returns false.
Exceptions
ObjectDisposedExceptionThe Engine object was already disposed.
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

ErrorInfo Error
get

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

Exceptions
ObjectDisposedExceptionThe DeviceEnumerator object was already disposed.
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.

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.