#define DMF_CDTEXT 0x00000002 // if set and medium inserted will try to get info from cdtext
#define DMF_CDDB 0x00000004 // if set and medium inserted will try to get info from gracenote
#define DMF_DRIVEDESCRIPTION 0x00000010 // will use PrimoSDK to get drive info
// valid with DM_MCI_PARAM
#define DMF_READY 0x00000004 //
#define DMF_MEDIUMPRESENT 0x00000002 //
#define DMF_MODE 0x00000001 //
#define DMF_TRACKCOUNT 0x00000008 //
#define DMF_TRACKSINFO 0x00000010 //
#define DMF_MEDIUMUID 0x00000020 //
#define DMF_MEDIUMUPC 0x00000040 //
// valid with DM_IMAPI_PARAM
#define DMF_BASEPNPID 0x00000001
#define DMF_DISPLAYNAMES 0x00000002
#define DMF_PATH 0x00000004
#define DMF_DRIVESTATE 0x00000008
#define DMF_DRIVETYPE 0x00000010
#define DMF_QUERYMEDIATYPE 0x00000020
#define DMF_QUERYMEDIAINFO 0x00000040
// Operation Codes
#define DMOP_GENERAL 0x0000
#define DMOP_UNITINFO 0x0001
#define DMOP_UNITINFO2 0x0002
#define DMOP_DISCINFO 0x0003
#define DMOP_DISCINFO2 0x0004
#define DMOP_TITLE 0x0005
#define DMOP_MCIINFO 0x0006
#define DMOP_IMAPIINFO 0x0007
// Drive modes
#define DM_MODE_ERROR ((CHAR)(0 - 1))
#define DM_MODE_READY 0x00
#define DM_MODE_BURNING 0x01
#define DM_MODE_RIPPING 0x02
#define DM_MODE_COPYING 0x03
typedefstruct_DM_NOTIFY_PARAM
{
INT_PTRcallback;// pointer to the callback. If uMsg != 0 callback is HWND, otherwise it is DMNPROC
UINTuMsg;// specify message code to post notification. if 0 callback points to DMNPROC.
CHARcLetter;// drive letter.
UINTfFlags;// DMF_XXX
DWORDresult;// result code. Set by async func.
WORDopCode;// completed opCode (DMOP_XXX). Set by async func.
DMFREEPROCfnFree;// you can specify function that need to be called to free data
HANDLEhReserved;// reserved;
}DM_NOTIFY_PARAM;
typedefstruct_DM_UNITINFO_PARAM
{
DM_NOTIFY_PARAMheader;
DWORDdwType;// unit type
BOOLbReady;// unit ready flag
LPSTRpszDesc;// pointer to the buffer with unit description.
INTcchDesc;// [in] length of the decription buffer in chars. [out] number of characters written. If error value is negative and show minimum required buffer
LPSTRpszFirmware;// pointer to the buffer with FirmWare ( firmware version is always 4 chars)
INTcchFirmware;// [in] length of the firmware buffer in chars. [out] number of characters written. If error value is negative and show minimum required buffer
}DM_UNITINFO_PARAM;
typedefstruct_DM_UNITINFO2_PARAM
{
DM_NOTIFY_PARAMheader;
DWORD*pdwTypes;// unit types vector
INTnTypes;// vector length (in DWORDS)
DWORDdwClassId;// class identifier assigned to the unit.
DWORDdwBusType;// type of bus to which the device is connected.
}DM_UNITINFO2_PARAM;
typedefstruct_DM_DISCINFOEX_PARAM
{
DM_NOTIFY_PARAMheader;
DWORDdwMediumType;// type of the medium.
DWORDdwMediumFormat;// format of the media
BOOLbErasable;//
DWORDdwTracks;// number of tracks in the disc.
DWORDdwUsed;// total number of sectors used on the disc.
DWORDdwFree;// total number of free sectors on the disc.
}DM_DISCINFOEX_PARAM;
typedefstruct_DM_DISCINFO2_PARAM
{
DM_NOTIFY_PARAMheader;
DWORDdwMedium;// physical type of the media.
BOOLbProtectedDVD;// DVD containing copy-protected content.
BOOLbPacketWritten;// if the media is formatted by packet writing software.
DWORDdwMediumEx;// physical type of the medium.
}DM_DISCINFO2_PARAM;
typedefstruct_DM_TITLE_PARAM
{
DM_NOTIFY_PARAMheader;
LPWSTRpszTitle;
INTcchTitle;
}DM_TITLE_PARAM;
typedefstruct_DM_MCI_PARAM
{
DM_NOTIFY_PARAMheader;
BOOLbReady;
BOOLbMediumPresent;
UINTuMode;
DWORD*pTracks;// this contains track info (first bit set to '1' if track is audio, other bits track length
INTnTracks;
LPWSTRpszMediumUID;
INTcchMediumUID;
LPWSTRpszMediumUPC;
INTcchMediumUPC;
}DM_MCI_PARAM;
// you responsible for freeing all bstrs (use SysFreeString())
typedefstruct_DM_IMAPI_PARAM
{
DM_NOTIFY_PARAMheader;// header result contains HRESULT