RSPaspi lib 0.2.3
Documentation and or tutorial to Adaptec ASPI and ISO 9660
Loading...
Searching...
No Matches
cd_dvd.util Class Reference

main class More...

Public Member Functions

static int GetTickCount ()
 To retrieve the number of miliseconds the system is running.
 
static int ControlName (StringBuilder data)
 To retrieve the name of the dll.
 
static int DriveCount ()
 It will retrieve the number of (valid) CDROM devices on the system.
 
static int GetDriveHandle (string drive, ref int handle)
 This function will get a handle to the CDROM device , it is required to identify the device on some functions.
 
static int GetDriveLetter (int index, StringBuilder drive)
 It will retrieve the drive letter based on the index, it range from 0 to the number of returned by DriveCount - 1.
 
static int GetDriveData (int handle, StringBuilder vendspec, StringBuilder drivedata)
 It will get the drive information.
 
delegate int CallBack (int clear, int isdata, int tracknumber, int minutes, int seconds, int _max_speed, int cur_speed, int buffer_size)
 This callback will be called from inside the DLL and will retrieve the data.
 
static int ReadToc (int handle, CallBack function)
 To read the data from the drive device.
 
static int ExtractTrack (int handle, int track, string wav_or_iso)
 This function will extract the selected track.
 
static int GetProgress ()
 To show the progress of the required function.
 
static int GetExtractReturnValue ()
 It will return the last error for the track extraction code called.
 
static int GetExtractStatus ()
 It will return the current extraction mode.
 
static int SetCDSpeed (int handle, int speed)
 To set the CD speed.
 
static int LoadUnload (int handle, int load)
 to open or close the cd tray
 

Static Public Member Functions

static void dprintf (string data)
 Our internal debug function (arabcoder)
 

Detailed Description

main class

Member Function Documentation

◆ CallBack()

delegate int cd_dvd.util.CallBack ( int clear,
int isdata,
int tracknumber,
int minutes,
int seconds,
int _max_speed,
int cur_speed,
int buffer_size )

This callback will be called from inside the DLL and will retrieve the data.

Parameters
clearIf 0 it will process, if 1 then it is only to clear the combobox or listview
isdataIf is data or not
tracknumberthe number of the track
minutesnumber of minutes
secondsnumber of secvonds
_max_speedthe max speed for this drive
cur_speedthe current speed of the drive
buffer_sizethe size of the buffer
Returns

◆ ControlName()

static int cd_dvd.util.ControlName ( StringBuilder data)

To retrieve the name of the dll.

Parameters
data
Returns
nothing

◆ dprintf()

static void cd_dvd.util.dprintf ( string data)
static

Our internal debug function (arabcoder)

Parameters
datathe data to send

◆ DriveCount()

static int cd_dvd.util.DriveCount ( )

It will retrieve the number of (valid) CDROM devices on the system.

Returns
the number of devices or -1 if no devices are found or error or system busy

◆ ExtractTrack()

static int cd_dvd.util.ExtractTrack ( int handle,
int track,
string wav_or_iso )

This function will extract the selected track.

Parameters
handleThe handle to use, you got one with GetDriveHandle
trackthe selected track
wav_or_isothe filename to use for the dumped track
Returns
0 if ok, 1 if already running

◆ GetDriveData()

static int cd_dvd.util.GetDriveData ( int handle,
StringBuilder vendspec,
StringBuilder drivedata )

It will get the drive information.

Parameters
handlethe drive handle
vendspecVendor specfifications
drivedataThe drive information and description
Returns
0 - no error, 1 - error or invalid device

◆ GetDriveHandle()

static int cd_dvd.util.GetDriveHandle ( string drive,
ref int handle )

This function will get a handle to the CDROM device , it is required to identify the device on some functions.

Parameters
drivethe drive letter
handlereturns the device handle or -1 if handle not valid
Returns
0 if no error, 2 - invalid drive, 1 - device don't have a valid handle

◆ GetDriveLetter()

static int cd_dvd.util.GetDriveLetter ( int index,
StringBuilder drive )

It will retrieve the drive letter based on the index, it range from 0 to the number of returned by DriveCount - 1.

Parameters
indexthe number of the device detected on the system
drivereturn the drive letter
Returns
0 - no error, 1 - invalid index, -1 - no valid cdrom devices on the system or error, 2 - index is larger than the number of devices on the system

◆ GetExtractReturnValue()

static int cd_dvd.util.GetExtractReturnValue ( )

It will return the last error for the track extraction code called.

Returns

◆ GetExtractStatus()

static int cd_dvd.util.GetExtractStatus ( )

It will return the current extraction mode.

Returns
0 if not running, 1 to inform that the code is yet running

◆ GetProgress()

static int cd_dvd.util.GetProgress ( )

To show the progress of the required function.

Returns
the progress value, range from 0 to 100

◆ GetTickCount()

static int cd_dvd.util.GetTickCount ( )

To retrieve the number of miliseconds the system is running.

Returns
the count

◆ LoadUnload()

static int cd_dvd.util.LoadUnload ( int handle,
int load )

to open or close the cd tray

Parameters
handlethe open handle for the drive
load0 will open the tray, 1 will close
Returns

◆ ReadToc()

static int cd_dvd.util.ReadToc ( int handle,
CallBack function )

To read the data from the drive device.

Parameters
handlethe handle to use, it comes froma call to GetDriveHandle
functionthe callback to use
Returns
0 if no error, 1 otherwise

◆ SetCDSpeed()

static int cd_dvd.util.SetCDSpeed ( int handle,
int speed )

To set the CD speed.

Parameters
handlethe open handle for the drive
speedthe required speed multiplied to 176, check the sample code
Returns
0 if not error, 1 otherwise

The documentation for this class was generated from the following file: