/*******************************************************************
 *
 *    DESCRIPTION: Virtual CD SDK API
 *
 *    Copyright (c) 2002-2003 by H+H Software GmbH
 *
 *******************************************************************/

#ifndef _VCD_API_DEFS_H_INCLUDED_
#define _VCD_API_DEFS_H_INCLUDED_

#ifdef _BUILD_VCDAPI_DLL_

// Definition für Funktionsexport
#define DECLSPEC_VCDAPI  extern "C" __declspec( dllexport )


#else  
	#ifdef __cplusplus
		#define DECLSPEC_VCDAPI  extern "C" __declspec( dllimport )
	#else
		#define DECLSPEC_VCDAPI  extern __declspec( dllimport )
	#endif
#endif 


#define    VCD_ERROR_INVALIDINDEX       -1
#define    VCD_ERROR_NONE				0 
#define    VCD_ERROR_NOSUCHFILE			1        
#define    VCD_ERROR_PATHNOTFOUND       2    
#define    VCD_ERROR_TOOMANYOPENEDFILES 3
#define    VCD_ERROR_FILEUNSPECIFIC     4     
#define    VCD_ERROR_ACCESSDENIED       5       
#define    VCD_ERROR_NOVCDIMAGE         6         
#define    VCD_ERROR_HEADERCRC          7          
#define    VCD_ERROR_INVALIDPASSWORD    8    
#define    VCD_ERROR_OPENTRACKFILES     9     
#define    VCD_ERROR_IMAGECORRUPT       10       
#define    VCD_ERROR_DEMOEXPIRED        11        
#define    VCD_ERROR_UNKNOWN            12            
#define    VCD_ERROR_RESOURCES          13         
#define    VCD_ERROR_INVALIDDRIVE       14   
#define    VCD_ERROR_INVALIDUNIT        15        
#define    VCD_ERROR_DRIVELOCKED        16        
#define    VCD_ERROR_COMMUNICATION      17    
#define    VCD_ERROR_ARGUMENT           18           
#define    VCD_ERROR_INUSE              19              
#define    VCD_ERROR_EJECTFAILED        20   
#define    VCD_ERROR_NOADMIN            21           
#define    VCD_ERROR_NOPLAYER           22  
#define    VCD_ERROR_SHARING_VIOLATION  32  
#define    VCD_ERROR_NOTIMPLEMENTED     33    
#define    VCD_ERROR_INVALIDPROPERTY    100
#define    VCD_ERROR_REGISTRY           101
#define    VCD_ERROR_REBOOTREQUIRED     102

#define    VCD_PROPERTY_DEFAULTDRIVE     1
#define    VCD_PROPERTY_DESCRIPTION      2
#define    VCD_PROPERTY_PROGRAM          3
#define    VCD_PROPERTY_WORKINGDIR       4
#define    VCD_PROPERTY_COMMENT          5
#define    VCD_PROPERTY_HOTKEY           6
#define    VCD_PROPERTY_EJECTONEND       7


DECLSPEC_VCDAPI DWORD WINAPI VCDApiEject(LPCSTR szDriveOrFileName);
DECLSPEC_VCDAPI DWORD WINAPI VCDApiGetImagePropertiesLong(LPCSTR szFileName, short nProperty);
DECLSPEC_VCDAPI DWORD WINAPI VCDApiGetImagePropertiesString(LPCSTR szFileName, short nProperty, LPSTR lpResult, size_t nResultLen);
DECLSPEC_VCDAPI DWORD WINAPI VCDApiGetLastError();
DECLSPEC_VCDAPI char WINAPI VCDApiGetMountDrive(LPCSTR szFileName);
DECLSPEC_VCDAPI DWORD WINAPI VCDApiGetMountedFileFromDrive(char cDrive, LPSTR lpResult, size_t nResultLen);
DECLSPEC_VCDAPI DWORD WINAPI VCDApiGetVCDDriveLetters(LPSTR lpResult, size_t nResultLen);
DECLSPEC_VCDAPI DWORD WINAPI VCDApiInsert(char cDrive, LPCSTR szFileName, LPCSTR szPassword);
DECLSPEC_VCDAPI void WINAPI VCDApiSetDebug(BOOL bDebug);
DECLSPEC_VCDAPI DWORD WINAPI VCDApiSetDriveLetters(LPCSTR szDriveLetters);
DECLSPEC_VCDAPI DWORD WINAPI VCDApiSetImagePropertiesLong(LPCSTR szFileName, short nProperty, long lNewVal);
DECLSPEC_VCDAPI DWORD WINAPI VCDApiSetImagePropertiesString(LPCSTR szFileName, short nProperty, LPCSTR szNewValue);
DECLSPEC_VCDAPI void WINAPI VCDApiLockVCDDrive(char cDrive);
DECLSPEC_VCDAPI void WINAPI VCDApiUnLockVCDDrive(char cDrive);
DECLSPEC_VCDAPI BOOL WINAPI VCDApiIsVCDDriveLocked(char cDrive);
DECLSPEC_VCDAPI DWORD WINAPI VCDApiIsProperlyInstalled();
DECLSPEC_VCDAPI DWORD WINAPI VCDApiGetNumberOfVCDDevices();


// Automation Interface

/*
[id(1), helpstring("method VCDInsert")] HRESULT VCDInsert(BSTR Drive, BSTR FileName, BSTR Password, [out, retval] long *lResult);
[id(2), helpstring("method VCDEject")] HRESULT VCDEject(BSTR DriveOrFilename, [out, retval] long *lResult);
[id(3), helpstring("method VCDGetVCDDriveLetters")] HRESULT VCDGetVCDDriveLetters([out, retval] BSTR *Drives);
[id(4), helpstring("method VCDGetLastError")] HRESULT VCDGetLastError([out, retval] long *pLastError);
[id(5), helpstring("method VCDGetMountDrive")] HRESULT VCDGetMountDrive([in] BSTR FileName, [out, retval] BSTR *DriveLetter);
[id(6), helpstring("method VCDGetMountedFileFromDrive")] HRESULT VCDGetMountedFileFromDrive([in] BSTR DriveLetter, [out, retval] BSTR *FileName);
[id(8), helpstring("method VCDGetImagePropertiesString")] HRESULT VCDGetImagePropertiesString([in] BSTR FileName, [in] short Property, [out, retval] BSTR *strResult);
[id(9), helpstring("method VCDSetImagePropertiesString")] HRESULT VCDSetImagePropertiesString([in] BSTR FileName, [in] short Property, [in] BSTR newVal, [out, retval] long *lResult);
[id(10), helpstring("method VCDGetImagePropertiesLong")] HRESULT VCDGetImagePropertiesLong([in] BSTR FileName, [in] short Property, [out, retval] long *lResult);
[id(11), helpstring("method VCDSetImagePropertiesLong")] HRESULT VCDSetImagePropertiesLong([in] BSTR FileName, [in] short Property, [in] long lNewVal, [out, retval] long *lResult);
[id(12), helpstring("method VCDSetDebug")] HRESULT VCDSetDebug([in] BOOL bDebugTrace);
[id(13), helpstring("method VCDSetDriveLetters")] HRESULT VCDSetDriveLetters([in] BSTR DriveLetters, [out, retval] long* lResult);
[id(15), helpstring("method VCDLockVCDDrive")] HRESULT VCDLockVCDDrive([in] BSTR Drive);
[id(16), helpstring("method VCDUnLockVCDDrive")] HRESULT VCDUnLockVCDDrive([in] BSTR Drive);
[id(17), helpstring("method VCDIsVCDDriveLocked")] HRESULT VCDIsVCDDriveLocked([in] BSTR Drive, [out, retval] BOOL *bResult);
[id(18), helpstring("method VCDIsProperlyInstalled")] HRESULT VCDIsProperlyInstalled([out, retval] long *lResult);
[id(19), helpstring("method VCDGetNumberOfVCDDevices")] HRESULT VCDGetNumberOfVCDDevices([out, retval] long *lResult);
*/


#endif