CD/DVD/BD Burning

This category covers the calls to access, burn, and erase optical disks.

Functions

HSDCError HSDCAPI HSDCOpticalRecorderGetLetters (char **pJstr)

Obtains the drive letters of the drives that support recording.

HSDCError HSDCAPI HSDCOpticalRecorderGetDriveInformation (const wchar_t *path, char **pJstr)

Retrieves information related to an optical recorder including its capabilities. This function doesn't provide information related to inserted optical disks.

HSDCError HSDCAPI HSDCOpticalRecorderGetDiskInformation (const wchar_t *path, char **pJstr)

Retrieves information related to the inserted optical disk.

HSDCError HSDCAPI HSDCOpticalRecorderBurn (const wchar_t *path, const char *jstr)

Burns an encrypted optical disk. This is an asynchronous call, notifications are provided by the callback registered previously with HSDCRegisterOpticalRecorderNotification.

HSDCError HSDCAPI HSDCOpticalRecorderErase (const wchar_t *path, const char *jstr)

Erases a rewritable optical disk. This is an asynchronous call, notifications are provided by the callback registered previously with HSDCRegisterOpticalRecorderNotification.

HSDCError HSDCAPI HSDCOpticalRecorderCancel (const wchar_t *path)

Cancels a write operation in progress that was previously initiated by HSDCOpticalRecorderBurn or HSDCOpticalRecorderErase.

Function Documentation

HSDCOpticalRecorderGetLetters()

HSDCError HSDCAPI HSDCOpticalRecorderGetLetters ( char ** pJstr )

Obtains the drive letters of the drives that support recording.

Parameters

pJstr

[out] JSON as below:

Copy
{
    "recorders": [
        "E:\\",
        "F:\\"
    ]
}

HSDCOpticalRecorderGetDriveInformation()

HSDCError HSDCAPI HSDCOpticalRecorderGetDriveInformation ( const wchar_t * path, char ** pJstr )

Retrieves information related to an optical recorder including its capabilities. This function doesn't provide information related to inserted optical disks.

Parameters

path

Path of the optical recorder.

pJstr

Copy
{
   "block" : "2048",
   "layer" : "2",
   "path" : "F:",
   "product" : "DVD-RAM DVDR V10",
   "revision" : "88.0",
   "types" : [
      {
         "id" : [ "2" ],
         "name" : [ "CD-R" ]
      },
      {
         "id" : [ "3" ],
         "name" : [ "CD-RW" ]
      },
      {
         "id" : [ "5" ],
         "name" : [ "DVD-RAM" ]
      },
      {
         "id" : [ "6" ],
         "name" : [ "DVD+R" ]
      },
      {
         "id" : [ "7" ],
         "name" : [ "DVD+RW" ]
      },
      {
         "id" : [ "8" ],
         "name" : [ "DVD+R DL" ]
      },
      {
         "id" : [ "9" ],
         "name" : [ "DVD-R" ]
      },
      {
         "id" : [ "10" ],
         "name" : [ "DVD-RW" ]
      },
      {
         "id" : [ "11" ],
         "name" : [ "DVD-R DL" ]
      },
      {
         "id" : [ "18" ],
         "name" : [ "BD-R" ]
      },
      {
         "id" : [ "19" ],
         "name" : [ "BD-RE" ]
      }
   ],
   "vendor" : "PHANTOM"
}

HSDCOpticalRecorderGetDiskInformation()

HSDCError HSDCAPI HSDCOpticalRecorderGetDiskInformation ( const wchar_t * path, char ** pJstr )

Retrieves information related to the inserted optical disk.

Parameters

path

Unicode string identifying the optical recorder.

pJstr

Returns a JSON string with all details, formatted as below:

Copy
{
   "block" : "2048",
   "layer" : "2",
   "path" : "F:",
   "states" : [
      {
         "id" : [ "8192" ],
         "name" : [ "Write Protected" ]
      }
   ],
   "type" : [
      {
         "id" : [ "1" ],
         "name" : [ "CD-ROM" ]
      }
   ]
}

HSDCOpticalRecorderBurn()

HSDCError HSDCAPI HSDCOpticalRecorderBurn ( const wchar_t * path, const char * jstr )

Burns an encrypted optical disk. This is an asynchronous call, notifications are provided by the callback registered previously with HSDCRegisterOpticalRecorderNotification.

Parameters

path

The path of the optical drive.

jstr

JSON string with all inputs, formatted as below:

Copy
{
  "label": "test",
  "eject": true,
  "password": "Trust_N@_1",
  "items": [
    {
      "name": "test_dir_1",
      "directory": true,
      "attributes": 16,
      "items": [
        {
          "name": "test_sub_dir_1",
          "directory": true,
          "attributes": 16,
          "items": [
            {
              "name": "DbgView.exe",
              "source": "C:\\Temp\\DbgView.exe",
              "attributes": 0
            },
            {
              "name": "DbgView(Read Only).exe",
              "source": "C:\\Temp\\DbgView.exe",
              "attributes": 1
            },
            {
              "name": "DbgView(Hidden).exe",
              "source": "C:\\Temp\\DbgView.exe",
              "attributes": 2
            },
            {
              "name": "DbgView(System).exe",
              "source": "C:\\Temp\\DbgView.exe",
              "attributes": 4
            }
          ]
        },
        {
          "name": "test_sub_dir_2",
          "directory": true,
          "attributes": 16
        }
      ]
    },
    {
      "name": "test_dir_2",
      "directory": true,
      "attributes": 16
    }
  ]
}

HSDCOpticalRecorderErase()

HSDCError HSDCAPI HSDCOpticalRecorderErase ( const wchar_t * path, const char * jstr )

Erases a rewritable optical disk. This is an asynchronous call, notifications are provided by the callback registered previously with HSDCRegisterOpticalRecorderNotification.

Parameters

path

Path of the disk to erases

jstr

Operation details as a JSON string:

Copy
{
  "fullerase": false,
  "eject": true,
}

HSDCOpticalRecorderCancel()

HSDCError HSDCAPI HSDCOpticalRecorderCancel ( const wchar_t * path )

Cancels a write operation in progress previously initiated by HSDCOpticalRecorderBurn or HSDCOpticalRecorderErase.

Parameters

path

The optical drive against which the prior write operation was initiated and against which the cancellation should occur.