NeroPacketWriting.h 3.6 KB

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