vbAccelerator - Contents of code file: IVBIMAPI.odl

This file is part of the download IVBIMAPI Type Library Source, which is described in the article VB IMAPI (CD Burning) Interfaces (IVBIMAPI.tlb).

[
    uuid(392EC006-8D8E-436d-9D62-9F3D0953527D),
    helpstring("VB CD Mastering API Type Library"),
    version(1.0)
]

library IVBIMAPI
{
   importlib("stdole2.tlb");

   //
    ----------------------------------------------------------------------------
   -----
   // Types
   //
    ----------------------------------------------------------------------------
   -----
   typedef unsigned char BYTE;
   typedef LPWSTR SNB;


   //
    ----------------------------------------------------------------------------
   -----
   // Enums
   //
    ----------------------------------------------------------------------------
   -----
    typedef enum PROPSETFLAG {
        PROPSETFLAG_DEFAULT    = 0,
        PROPSETFLAG_NONSIMPLE  = 1,
        PROPSETFLAG_ANSI       = 2,
        PROPSETFLAG_UNBUFFERED = 4,
    } PROPSETFLAG;

    typedef enum PRPSPEC {
        PRSPEC_LPWSTR  = 0,
        PRSPEC_PROPID  = 1,
        PRSPEC_INVALID = 0xffffffff,
    } PRPSPEC;

    typedef enum 
    {
      CLSCTX_INPROC_SERVER   = 1, 
      CLSCTX_INPROC_HANDLER  = 2,     
      CLSCTX_LOCAL_SERVER    = 4, 
      CLSCTX_REMOTE_SERVER   = 16
   } CLSCTX;

    typedef enum
    {
      MEDIA_CDDA_CDROM   = 1,
      MEDIA_CD_ROM_XA      = 2,
      MEDIA_CD_I         = 3,
      MEDIA_CD_EXTRA      = 4,
      MEDIA_CD_OTHER      = 5,
      MEDIA_SPECIAL      = 6      
    } MEDIA_TYPES;

   typedef enum 
   {
       MEDIA_BLANK   = 0x1,
      MEDIA_RW   = 0x2,
      MEDIA_WRITABLE   = 0x4,
      MEDIA_FORMAT_UNUSABLE_BY_IMAPI   = 0x8
   } MEDIA_FLAGS;

   typedef enum
   {
      RECORDER_CDR   = 0x1,
      RECORDER_CDRW   = 0x2
   } RECORDER_TYPES;

   typedef enum 
   {
      RECORDER_DOING_NOTHING = 0,
      RECORDER_OPENED = 0x1,
      RECORDER_BURNING = 0x2
   } RECORDER_STATE;

   typedef enum STGC {
      STGC_DEFAULT = 0,
      STGC_OVERWRITE = 1,
      STGC_ONLYIFCURRENT = 2,
      STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE = 4,
      STGC_CONSOLIDATE = 8
   } STGC;

   /* Storage instantiation modes */
   typedef enum STGM 
   {
      STGM_DIRECT = 0x00000000,
      STGM_TRANSACTED = 0x00010000,
      STGM_SIMPLE = 0x08000000,

      STGM_READ = 0x00000000,
      STGM_WRITE = 0x00000001,
      STGM_READWRITE = 0x00000002,

      STGM_SHARE_DENY_NONE = 0x00000040,
      STGM_SHARE_DENY_READ = 0x00000030,
      STGM_SHARE_DENY_WRITE = 0x00000020,
      STGM_SHARE_EXCLUSIVE = 0x00000010,

      STGM_PRIORITY = 0x00040000,
      STGM_DELETEONRELEASE = 0x04000000,
      STGM_NOSCRATCH = 0x00100000,

      STGM_CREATE = 0x00001000,
      STGM_CONVERT = 0x00020000,
      STGM_FAILIFTHERE = 0x00000000,

      STGM_NOSNAPSHOT = 0x00200000,
      STGM_DIRECT_SWMR = 0x00400000,
   } STGM;

   typedef enum STGMOVE 
   {
      STGMOVE_MOVE = 0,
      STGMOVE_COPY = 1,
      STGMOVE_SHALLOWCOPY = 2
   } STGMOVE;

   typedef enum STATFLAG 
   {
       STATFLAG_DEFAULT = 0,
      STATFLAG_NONAME = 1,
      STATFLAG_NOOPEN = 2
   } STATFLAG;

   typedef enum STGTY {
      STGTY_STORAGE = 1,
      STGTY_STREAM = 2,
      STGTY_LOCKBYTES = 3,
      STGTY_PROPERTY = 4
   } STGTY;

   typedef enum LOCKTYPE {
      LOCK_WRITE = 1,
      LOCK_EXCLUSIVE = 2,
      LOCK_ONLYONCE = 4
   } LOCKTYPE;

   typedef enum STREAM_SEEK {
      STREAM_SEEK_SET = 0,
      STREAM_SEEK_CUR = 1,
      STREAM_SEEK_END = 2
   } STREAM_SEEK;

   //
    ----------------------------------------------------------------------------
   -----
   // Structures
   //
    ----------------------------------------------------------------------------
   -----
    typedef struct tagUUID
   {
          long Data1;
      short Data2;
      short Data3;
      unsigned char Data4[8];
   } UUID;

   typedef struct STATPROPSTG 
   {
        LONG  lpwstrName;
        LONG  propid;
        short vt;
   } STATPROPSTG;

    typedef struct PROPSPEC 
   {
        PRPSPEC ulKind;
        LONG    ID_or_LPWSTR;
    } PROPSPEC;

    typedef struct STATPROPSETSTG 
   {
        UUID     fmtid;
        UUID     clsid;
        LONG     grfFlags;
        CURRENCY mtime;
        CURRENCY ctime;
        CURRENCY atime;
        LONG     dwOSVersion;
    } STATPROPSETSTG;

   typedef struct STATSTG {
      LONG pwcsName;
      STGTY type;
      CURRENCY cbSize;
      CURRENCY mtime;
      CURRENCY ctime;
      CURRENCY atime;
      STGM grfMode;
      LOCKTYPE grfLocksSupported;
      UUID clsid;
      LONG grfStateBits;
      LONG reserved;
   } STATSTG;
   
   
   //
    ----------------------------------------------------------------------------
   -----
   // IUnknown
   //
    ----------------------------------------------------------------------------
   -----
   [
      odl,
      uuid(00000000-0000-0000-C000-000000000046),
   ]
   interface IUnknown
   {
    
      LONG QueryInterface(
         [in, out] UUID *riid,
         [in, out] void *ppvObject);

      LONG AddRef();
      LONG Release();
   }


   //
    ----------------------------------------------------------------------------
   -----
   // IMalloc
   //
    ----------------------------------------------------------------------------
   -----
   [
        odl,
        uuid(00000002-0000-0000-C000-000000000046),
        helpstring("Visual Basic version of IMalloc interface")
   ]
   interface IVBMalloc : stdole.IUnknown 
   {
      long _stdcall Alloc([in] long cb);

       long _stdcall Realloc(
                    [in] long __MIDL_0000, 
                    [in] long cb);

      void _stdcall Free([in] long pv);

       long _stdcall GetSize([in] long pv);

       long _stdcall DidAlloc([in] long pv);

       void _stdcall HeapMinimize();
   };


   //
    ----------------------------------------------------------------------------
   -----
   // IEnumSTATPROGSTG
   //
    ----------------------------------------------------------------------------
   -----
   [
      odl,
      uuid(00000139-0000-0000-C000-000000000046),
      helpstring("IEnumSTATPROPSTG interface")
   ]
   interface IEnumSTATPROPSTG : IUnknown 
   {
      LONG Next(
         [in] LONG celt,
         [in, out] STATPROPSTG *pSTATPROPSTG,
         [out, defaultvalue(0)] LONG *pceltFetched);

      HRESULT Skip(
            [in] LONG celt);

      HRESULT Reset();

      HRESULT Clone(
         [out, retval] IEnumSTATPROPSTG **ppenum);
   }

   //
    ----------------------------------------------------------------------------
   -----
   // IPropertyStorage
   //
    ----------------------------------------------------------------------------
   -----
    [
        odl,
        uuid(00000138-0000-0000-C000-000000000046),
        helpstring("IPropertyStorage interface")
    ]
    interface IPropertyStorage : IUnknown 
   {
        HRESULT ReadMultiple(
            [in] LONG cpspec,
            [in] PROPSPEC *rgpspec,
            [in] VARIANT *rgpropvar);

        HRESULT WriteMultiple(
            [in] LONG cpspec,
            [in] PROPSPEC *rgpspec,
            [in] VARIANT *rgPropvar,
            [in, defaultvalue(2)] LONG propidNameFirst);

        HRESULT DeleteMultiple(
            [in] LONG cpspec,
            [in] PROPSPEC *rgpspec);

        HRESULT ReadPropertyNames(
            [in] LONG cpropid,
            [in] LONG *rgpropid,
            [out, retval] LONG *rglpwstrName);

        HRESULT WritePropertyNames(
            [in] LONG cpropid,
            [in] LONG *rgpropid,
            [in] LPWSTR *rglpwstrName);

        HRESULT DeletePropertyNames(
            [in] LONG cpropid,
            [in] LONG *rgpropid);

        HRESULT Commit(
            [in, defaultvalue(0)] STGC grfCommitFlags);

        HRESULT Revert();

        HRESULT Enum(
            [out, retval] IEnumSTATPROPSTG **ppenum);

        HRESULT SetTimes(
            [in] CURRENCY *pctime,
            [in] CURRENCY *patime,
            [in] CURRENCY *pmtime);

        HRESULT SetClass(
            [in] UUID *clsid);

        HRESULT Stat(
            [out] STATPROPSETSTG *pstatpsstg);
    }

   //
    ----------------------------------------------------------------------------
   -----
   // IStream
   //
    ----------------------------------------------------------------------------
   -----
    [
        odl,
        uuid(0000000c-0000-0000-C000-000000000046),
      helpstring("IStream interface")
    ]
    interface IStream : stdole.IUnknown {

        HRESULT Read(
            [in] LONG pv,
            [in] LONG cb,
            [in, out] LONG *pcbRead);

        HRESULT Write(
            [in] LONG pv,
            [in] LONG cb,
            [in, out] LONG *pcbWritten);

        HRESULT Seek(
            [in] CURRENCY dlibMove,
            [in] STREAM_SEEK dwOrigin,
            [in, out] CURRENCY *plibNewPosition);

        HRESULT SetSize(
            [in] CURRENCY libNewSize);

        HRESULT CopyTo(
            [in] IStream *pstm,
            [in] CURRENCY cb,
            [in, out] CURRENCY *pcbRead,
            [in, out] CURRENCY *pcbWritten);

        HRESULT Commit(
            [in] STGC grfCommitFlags);

        HRESULT Revert();

        HRESULT LockRegion(
            [in] CURRENCY libOffset,
            [in] CURRENCY cb,
            [in] LONG dwLockType);

        HRESULT UnlockRegion(
            [in] CURRENCY libOffset,
            [in] CURRENCY cb,
            [in] LONG dwLockType);

        HRESULT Stat(
            [in, out] STATSTG *pstatstg,
            [in] STATFLAG grfStatFlag);

        HRESULT Clone(
            [out, retval] IStream **ppstm);


    }

   //
    ----------------------------------------------------------------------------
   -----
   // IEnumSTATSTG
   //
    ----------------------------------------------------------------------------
   -----
   [
      odl,
      uuid(0000000d-0000-0000-C000-000000000046),
      helpstring("IEnumSTATSTG interface")
   ]
   interface IEnumSTATSTG : stdole.IUnknown {

      LONG Next(
         [in] LONG celt,
         [out] STATSTG *rgelt,
         [out, defaultvalue(0)] LONG *pceltFetched);

      HRESULT Skip(
         [in] LONG celt);

      HRESULT Reset();

      HRESULT Clone(
         [out, retval] IEnumSTATSTG **ppenum);
   }

   //
    ----------------------------------------------------------------------------
   -----
   // IStorage
   //
    ----------------------------------------------------------------------------
   -----
    [
        odl,
        uuid(0000000b-0000-0000-C000-000000000046),
        helpstring("IStorage interface")
    ]
    interface IStorage : stdole.IUnknown {

        HRESULT CreateStream(
            [in] LPWSTR pwcsName,
            [in] STGM grfMode,
            [in, defaultvalue(0)] LONG reserved1,
            [in, defaultvalue(0)] LONG reserved2,
            [out, retval] IStream **ppstm);

        HRESULT OpenStream(
            [in] LPWSTR pwcsName,
            [in] LONG reserved1,
            [in] STGM grfMode,
            [in, defaultvalue(0)] LONG reserved2,
            [out, retval] IStream **ppstm);

        HRESULT CreateStorage(
            [in] LPWSTR pwcsName,
            [in] STGM grfMode,
            [in, defaultvalue(0)] LONG reserved1,
            [in, defaultvalue(0)] LONG reserved2,
            [out, retval] IStorage **ppstg);

        HRESULT OpenStorage(
            [in] LPWSTR pwcsName,
            [in] LONG pstgPriority,
            [in] STGM grfMode,
            [in, defaultvalue(0)] LONG snbExclude,
            [in, defaultvalue(0)] LONG reserved,
            [out, retval] IStorage **ppstg);

        HRESULT CopyTo(
            [in] LONG ciidExclude,
            [in] UUID *rgiidExclude,
            [in] SNB snbExclude,
            [in] IStorage *pstgDest);

        HRESULT MoveElementTo(
            [in] LPWSTR pwcsName,
            [in] IStorage *pstgDest,
            [in] LPWSTR *pwcsNewName,
            [in] STGMOVE grfFlags);

        HRESULT Commit(
            [in, defaultvalue(0)] STGC grfCommitFlags);

        HRESULT Revert();

        HRESULT EnumElements(
            [in, defaultvalue(0)] LONG reserved1,
            [in, defaultvalue(0)] LONG reserved2,
            [in, defaultvalue(0)] LONG reserved3,
            [out, retval] IEnumSTATSTG **ppenum);

        HRESULT DestroyElement(
            [in] LPWSTR pwcsName);

        HRESULT RenameElement(
            [in] LPWSTR pwcsOldName,
            [in] LPWSTR pwcsNewName);

        HRESULT SetElementTimes(
            [in] LPWSTR pwcsName,
            [in] CURRENCY *pctime,
            [in] CURRENCY *patime,
            [in] CURRENCY *pmtime);

        HRESULT SetClass(
            [in] UUID *clsid);

        HRESULT SetStateBits(
            [in] LONG grfStateBits,
            [in] LONG grfMask);

        HRESULT Stat(
            [out] STATSTG *pstatstg,
            [in, defaultvalue(0)] STATFLAG grfStatFlag);
    }

   //
    ----------------------------------------------------------------------------
   -----
   // ICDBurn
   //
    ----------------------------------------------------------------------------
   -----
   [
        odl,
        uuid(3d73a659-e5d0-4d42-afc0-5121ba425c8d),
        helpstring("ICDBurn interface")
   ]
   interface ICDBurn : IUnknown 
   {

      [helpstring("Gets the drive letter of the default recorder")]
      HRESULT _stdcall GetRecorderDriveLetter(
                    [out] LPWSTR pszDrive, 
                    [in] long cch );

      [helpstring("Burns the files in the staging area to disc")]
        HRESULT _stdcall Burn(
                    [in] long hWnd );

      [helpstring("Gets whether the system has a recordable drive")]
      HRESULT _stdcall HasRecordableDrive(
                    [out] long *pfHasRecorder);
      
   };

   
   //
    ----------------------------------------------------------------------------
   -----
   // IDiscRecorder
   //
    ----------------------------------------------------------------------------
   -----
   [
      odl,
      uuid(85AC9776-CA88-4cf2-894E-09598C078A41),
      helpstring("Visual Basic version of IDiscRecorder interface")
   ]
   interface IVBDiscRecorder : IUnknown
   {
      [helpstring("Initializes the object for an underlying device.  Used
       internally only.")]
      HRESULT _stdcall Init(
         [in] BYTE *pbyUniqueID,
         [in] long nulIDSize,
         [in] long nulDriveNumber );

      [helpstring("Retrieves the underlying device GUID.")]
      HRESULT _stdcall GetRecorderGUID(
         [in] BYTE *pbyUniqueID,
         [in] long ulBufferSize,
         [out] long *pulReturnSizeRequired);

      [helpstring("Identifies the device as CD-R or CD-RW")]
      HRESULT _stdcall GetRecorderType(
         [out] long *fTypeCode);

      [helpstring("Retrieves a name suitable for GUI display")]
      HRESULT _stdcall GetDisplayNames(
         [out, in] BSTR *pbstrVendorID,
         [out, in] BSTR *pbstrProductID,
         [out, in] BSTR *pbstrRevision);

      [helpstring("Returns an identifier unique to the device class")]
      HRESULT _stdcall GetBasePnPID(
         [out] BSTR *pbstrPath);

      [helpstring("Returns an OS Path to the device")]
      HRESULT _stdcall GetPath(
         [out] BSTR *pbstrPath);

      [helpstring("Retrieves a pointer to the IPropertyStorage interface for
       the recorder")]
      HRESULT _stdcall GetRecorderProperties(
         [out] IPropertyStorage **ppPropStg);

      [helpstring("Sets properties for the recorder")]
      HRESULT _stdcall SetRecorderProperties(
         [in] IPropertyStorage *ppPropStg);

      [helpstring("Checks if the recorder is ready to burn")]
      HRESULT _stdcall GetRecorderState(
         [out] long *pulDevStateFlags);

      [helpstring("Opens a device for exclusive use")]
      HRESULT _stdcall OpenExclusive();

      [helpstring("Identifies the type of media in the recorder")]
      HRESULT _stdcall QueryMediaType(
         [out] long *fMediaType,
         [out] long *fMediaFlags);

      [helpstring("Retrieves the media properties")]
      HRESULT _stdcall QueryMediaInfo(
         [out] BYTE *pbSessions,
         [out] BYTE *pbLastTrack,
         [out] long *ulStartAddress,
         [out] long *ulNextWritable,
         [out] long *ulFreeBlocks);

      [helpstring("Ejects a recorder's tray, if possible")]
      HRESULT _stdcall Eject();

      [helpstring("Erases CD-RW media, if possible")]
      HRESULT _stdcall Erase(
         [in] long bFulLErase);

      [helpstring("Closes a recorder after exclusive access")]
      HRESULT _stdcall Close();

   }

   //
    ----------------------------------------------------------------------------
   -----
   // IEnumDiscMasterFormats
   //
    ----------------------------------------------------------------------------
   -----
   [
      odl,
      uuid(DDF445E1-54BA-11d3-9144-00104BA11C5E),
      helpstring("Visual Basic version of IEnumDiscMasterFormats interface")
   ]
   interface IVBEnumDiscMasterFormats : IUnknown
   {
      long _stdcall Next(
         [in] long cFormats,
         [out] UUID *lpiidFormatID,
         [out] long *pcFetched);

      HRESULT _stdcall Skip(
         [in] long cFormats);

      HRESULT _stdcall Reset();

      HRESULT _stdcall Clone(
         [out] IVBEnumDiscMasterFormats **ppEnum);
   }

   //
    ----------------------------------------------------------------------------
   -----
   // IEnumDiscRecorders
   //
    ----------------------------------------------------------------------------
   -----
   [
      odl,
      uuid(9B1921E1-54AC-11d3-9144-00104BA11C5E),
      helpstring("Visual Basic version of IEnumDiscRecorders interface")
   ]
   interface IVBEnumDiscRecorders : IUnknown
   {
      long _stdcall Next(
         [in] long cRecorders,
         [out] IVBDiscRecorder **ppRecorder,
         [out] long *pcFetched);

      HRESULT _stdcall Skip(
         [in] long cRecorders);

      HRESULT _stdcall Reset();

      HRESULT _stdcall Clone(
         [out] IVBEnumDiscRecorders **ppEnum);
   }

   //
    ----------------------------------------------------------------------------
   -----
   // IDiscMasterProgressEvents
   //
    ----------------------------------------------------------------------------
   -----
   [
      odl,
      uuid(EC9E51C1-4E5D-11D3-9144-00104BA11C5E),
      helpstring("Visual Basic version of IDiscMasterProgressEvents interface")
   ]
   interface IVBDiscMasterProgressEvents : stdole.IUnknown
   {
      [helpstring("Called to request whether the burn event should be
       cancelled")]
      HRESULT _stdcall QueryCancel(
         [out, retval] LONG *pbCancel);

      [helpstring("Notifies that a Plug and Play activity has occurred that has
       changed the list of recorders.")]
      HRESULT _stdcall NotifyPnPActivity();

      [helpstring("Notifies addition of data to the CD image in the stash.")]
      HRESULT _stdcall NotifyAddProgress(
         [in] LONG nCompleted,
         [in] LONG nTotal);

      [helpstring("Notifies an application of block progress whilst burning a
       disc.")]
      HRESULT _stdcall NotifyBlockProgress(
         [in] LONG nCurrentBlock,
         [in] LONG nTotalBlocks);

      [helpstring("Notifies an application of track progress whilst burning an
       audio disc.")]
      HRESULT _stdcall NotifyTrackProgress(
         [in] LONG nCurrentTrack,
         [in] LONG nTotalTracks);

      [helpstring("Notifies an application that IMAPI is preparing to burn a
       disc.")]
      HRESULT _stdcall NotifyPreparingBurn(
         [in] LONG nEstimatedSeconds);

      [helpstring("Notifies an application that IMAPI is closing a disc.")]
      HRESULT _stdcall NotifyClosingDisc(
         [in] LONG nEstimatedSeconds);

      [helpstring("Notifies an application that IMAPI has completed burning a
       disc.")]
      HRESULT _stdcall NotifyBurnComplete(
         [in] LONG status);

      [helpstring("Notifies an application that IMAPI has completed erasing a
       disc.")]
      HRESULT _stdcall NotifyEraseComplete(
         [in] LONG status);
   }

   //
    ----------------------------------------------------------------------------
   -----
   // IDiscMaster
   //
    ----------------------------------------------------------------------------
   -----
   [
      odl,
      uuid(520CCA62-51A5-11D3-9144-00104BA11C5E),
      helpstring("Visual Basic version of IDiscMaster interface")
   ]
   interface IVBDiscMaster : IUnknown
   {
      [helpstring("Opens an IMAPI object")]
      HRESULT _stdcall Open();

      [helpstring("Retrieves a format enumerator")]
      HRESULT _stdcall EnumDiscMasterFormats(
         [out] IVBEnumDiscMasterFormats **ppEnum);

      [helpstring("Retrieves the currently selected recorder format")]
      HRESULT _stdcall GetActiveDiscMasterFormat(
         [out] UUID *lpiid);

      [helpstring("Sets a new active recorder format")]
      HRESULT _stdcall SetActiveDiscMasterFormat(
         [in] UUID *riid,
         [out] stdole.IUnknown **ppUnk);

      [helpstring("Retrieves a recorder enumerator")]
      HRESULT _stdcall EnumDiscRecorders(
         [out] IVBEnumDiscRecorders **ppEnum);

      [helpstring("Gets the active disc recorder")]
      HRESULT _stdcall GetActiveDiscRecorder(
         [out] IVBDiscRecorder **ppRecorder);

      [helpstring("Sets the active disc recorder")]
      HRESULT _stdcall SetActiveDiscRecorder(
         [in] IVBDiscRecorder *pRecorder);

      [helpstring("Clears the contents of an unburnt image")]
      HRESULT _stdcall ClearFormatContent();

      [helpstring("Registers for progress notifications")]
      HRESULT _stdcall ProgressAdvise(
         [in] IVBDiscMasterProgressEvents *pEvents,
         [out] long *pvCookie);

      [helpstring("Cancels progress notifications")]
      HRESULT _stdcall ProgressUnadvise(
         [in] long vCookie);

      [helpstring("Burns the staged image to the active recorder")]
      HRESULT _stdcall RecordDisc(
         [in] long bSimulate,
         [in] long bEjectAfterBurn);

      [helpstring("Closes the interface")]
      HRESULT _stdcall Close();

   }

   //
    ----------------------------------------------------------------------------
   -----
   // IRedbookDiscMaster
   //
    ----------------------------------------------------------------------------
   -----
   [
      odl,
      uuid(E3BC42CD-4E5C-11D3-9144-00104BA11C5E),
      helpstring("Visual Basic version of IRedbookDiscMaster interface")
   ]
   interface IVBRedbookDiscMaster : IUnknown
   {
      [helpstring("Gets the total number of audio tracks")]
      HRESULT _stdcall GetTotalAudioTracks(
         [out] long *pnTracks);

      [helpstring("Gets the total number of audio blocks")]
      HRESULT _stdcall GetTotalAudioBlocks(
         [out] long *pnBlocks);

      [helpstring("Gets the used number of audio blocks")]
      HRESULT _stdcall GetUsedAudioBlocks(
         [out] long *pnBlocks);

      [helpstring("Gets the number of available audio track blocks")]
      HRESULT _stdcall GetAvailableAudioTrackBlocks(
         [out] long *pnBlocks);

      [helpstring("Gets the size of an audio block in bytes")]
      HRESULT _stdcall GetAudioBlockSize(
         [out] long *pnBlockBytes);

      [helpstring("Creates a new audio track in the staging area")]
      HRESULT _stdcall CreateAudioTrack(
         [in] long nBlocks);

      [helpstring("Adds a block to the current audio track")]
      HRESULT _stdcall AddAudioTrackBlocks(
         [in] long pby,
         [in] long cb);

      [helpstring("Closes the current audio track")]
      HRESULT _stdcall CloseAudioTrack();
   }
   
   //
    ----------------------------------------------------------------------------
   -----
   // IJolietDiscMaster
   //
    ----------------------------------------------------------------------------
   -----
   [
      odl,
      uuid(E3BC42CE-4E5C-11D3-9144-00104BA11C5E),
      helpstring("Visual Basic version of IJolietDiscMaster interface")
   ]
   interface IVBJolietDiscMaster : IUnknown
   {
      [helpstring("Gets the total number of data blocks")]
      HRESULT _stdcall GetTotalDataBlocks(
         [out] long *pnBlocks);

      [helpstring("Gets the number of used data blocks")]
      HRESULT _stdcall GetUsedDataBlocks(
         [out] long *pnBlocks);

      [helpstring("Gets the size of a data block")]
      HRESULT _stdcall GetDataBlockSize(
         [out] long *pnBlockBytes);

      [helpstring("Adds data from an IStorage interface")]
      HRESULT _stdcall AddData(
         [in] IStorage *pStorage,
         [in] long lFileOverwrite);

      [helpstring("Gets the properties of the Joliet writer")]
      HRESULT _stdcall GetJolietProperties(
         [out] IPropertyStorage **ppPropStg);

      [helpstring("Sets the properties of the Joliet writer")]
      HRESULT _stdcall SetJolietProperties(
         [in] IPropertyStorage *pPropStg);
   }


   //
    ----------------------------------------------------------------------------
   -----
   // General declares and constants
   //
    ----------------------------------------------------------------------------
   -----
   [
      dllname("OLE32.DLL"),
      uuid(C41EDB47-7F41-4539-966E-1F2499CB0FD1),
      helpstring("Object Base Function Entries and Constants")
   ]
   module VBObjBase 
   {
      [
         entry("IIDFromString"), 
         helpstring("Converts a string in the IID format generated by the
          StringFromIID function into an IID")
      ]
      long IIDFromString(
                [in] LPWSTR lpsz, 
                [out] UUID *lpiid);


      [
         entry("CoCreateInstance"),
         helpstring("Creates a single uninitialized object of the class
          associated with a specified CLSID")
      ]
      LONG CoCreateInstance(
         [in] UUID *CLSID,
         [in] stdole.IUnknown *pUnkOuter,
         [in] CLSCTX dwClsContext,
         [in] UUID *IID,
         [out] void *ppv);

   };

}