-
Notifications
You must be signed in to change notification settings - Fork 0
/
NeroPacketWriting.h
90 lines (77 loc) · 3.37 KB
/
NeroPacketWriting.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/******************************************************************************
|* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
|* ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
|* PARTICULAR PURPOSE.
|*
|* Copyright 1995-2004 Ahead Software AG. All Rights Reserved.
|*-----------------------------------------------------------------------------
|* NeroSDK / NeroAPI
|*
|* PROGRAM: NeroPacketWriting.h
|*
|* PURPOSE: This file defines a lowlevel packetwriting/MRW API for NeroAPI
******************************************************************************/
#ifndef NEROPACKETWRITING_H
#define NEROPACKETWRITING_H
#include "NeroAPI.h"
#if defined(__BORLANDC__)
// NEROAPI expects structs to be 8byte aligned
#pragma pack(push, 8)
// tell Borland C++ Builder to treat enums as int
#pragma option push -b
#endif
#ifdef __cplusplus
class INeroFileSystemBlockAccess;
class INeroFileSystemBlockReader;
extern "C" {
#else
typedef void INeroFileSystemBlockAccess;
typedef void INeroFileSystemBlockReader;
#endif
typedef enum
{
eNoWriting =0x0000, /* Use this to instantiate an INeroFileSystemBlockAccess object for read-only access */
ePacketWriting =0x0001, /* Use this for DVD+RW,DVD-RW,CD-RW media in non-MRW mode */
eManagedMRW =0x0002, /* Use this for defective managed MRW mode for all media types */
eRawMRW =0x0004, /* Use this for raw MRW mode (defective management turned off) */
eIllegalAccessMode =0xffffffff
} AccessMode;
/*
// Use the following two functions to obtain a block reader/writer to a specified NeroAPI device.
// Please note that ownership of the aDeviceHandle is *not* transferred to the block writer/reader so you're
// still responsible to dispose of the device handle after disposing of the writer/reader interface.
//
// Please note that only one object created by either NeroCreateBlockWriterInterface or
// NeroCreateBlockReaderInterface may exist at a time. Also make sure to delete the object before using
// the referred drive for another purpose (e.g. importing multisession data, starting a recording- or
// digital audio extraction process).
// Opening a secondary device handle for the drive is *not* sufficient!
*/
NEROAPI_API INeroFileSystemBlockAccess* NADLL_ATTR NeroCreateBlockWriterInterface(NERO_DEVICEHANDLE aDeviceHandle,AccessMode eAccessMode);
NEROAPI_API INeroFileSystemBlockReader* NADLL_ATTR NeroCreateBlockReaderInterface(NERO_DEVICEHANDLE aDeviceHandle,AccessMode eAccessMode);
typedef enum
{
eIAReadOnly = 0x0000,
eIAReadWrite = 0x0001,
eIAIllegalAccessMode = 0xffffffff
} ImageAccessMode;
/*
// Create a block access interface for the specified image file
// Instead of an image file, you may pass a drive letter
// here to read from a specific device supported by the operating system
*/
NEROAPI_API INeroFileSystemBlockAccess* NADLL_ATTR NeroCreateBlockAccessFromImage(const char *szFilename, ImageAccessMode eAccessMode);
/*
// This function will return a DWORD mask containing values as declared in enum AccessMode.
// Use ((result&eDesiredMode)!=0) to determine whether a specific mode is supported.
*/
NEROAPI_API DWORD NADLL_ATTR NeroGetSupportedAccessModesForDevice(NERO_DEVICEHANDLE aDeviceHandle);
#ifdef __cplusplus
}
#endif
#if defined(__BORLANDC__)
#pragma pack(pop)
#pragma option pop
#endif
#endif // NEROPACKETWRITING_H