home *** CD-ROM | disk | FTP | other *** search
- //************************************************************************
- //
- // DescAPI.h
- //
- // C/C++ declarations for DescAPI 2.10 (WhereIsIt ver. 3.20 and newer)
- //
- // (c) Robert Galle, September 2001
- //
- // Modified by Emanuele Ruffaldi October 2001
- // 1) added ifndef block
- // 2) modified syntax of stdcall for VC++
- //
- //************************************************************************
-
- #ifndef DESCAPI_H
- #define DESCAPI_H
-
-
- #define MAXDESCLENGTH 32768
- #define MAXALIASLENGTH 255
-
- #define ptReserved 0
- #define ptSameFile 1
- #define ptParentItem 2
- #define ptItemList 3
- #define ptDiskInfo 4
- #define ptCDDB 5
- #define ptFormatting 6
- #define ptThumbnails 7
- #define ptCustomIcons 8
- #define ptFileNameFormatting 9
-
- #define DT_FLOPPY525_360 0
- #define DT_FLOPPY525_12 1
- #define DT_FLOPPY35_720 2
- #define DT_FLOPPY525_8SD 3
- #define DT_FLOPPY525_8DD 4
- #define DT_HARDDISK 5
- #define DT_TAPEDRIVE 6
- #define DT_FLOPPY35_144 7
- #define DT_OPTICAL 8
- #define DT_FLOPPY35_288 9
- #define DT_CDROM 10
- #define DT_NETWORK 11
- #define DT_RAMDISK 12
- #define DT_REMOVABLE 13
- #define DT_ZIPDRIVE 14
- #define DT_JAZDRIVE 15
- #define DT_ZIPDRIVEPLUS 16
- #define DT_SEAGATEDIRECTTAPE 17
- #define DT_LS120 18
- #define DT_MOS320 19
- #define DT_MOS332 20
- #define DT_M2531A 21
- #define DT_JAZ2DRIVE 22
- #define DT_ZIP250 23
- #define DT_AUDIOCD 24
- #define DT_UNKNOWN 255
-
-
- // Plugins can use the following error code with SetLastError() function
- // to abort disk scanning. This code should be used with unrecoverable
- // errors that affect scanning altogether, for example if plugin detects
- // that media is no longer available
-
- #define ERR_AbortScan = $FFFA8047;
-
-
- #define pdsUserDefined_EnabledFirstTime 0
- #define pdsUserDefined_DisabledFirstTime 1
- #define pdsForceAlwaysEnabled 2
- #define pdsForceAlwaysDisabled 3
-
-
- // structures
-
- typedef struct {
- LPTSTR lpszModuleName;
- LPTSTR lpszAuthor;
- LPTSTR lpszVersion;
- } MODULEINFOREC, FAR *LPMODULEINFOREC;
-
- typedef struct {
- BOOL bImportingDesc;
- BOOL bImportingAlias;
- } PLUGINCAPABILITIESREC, FAR *LPPLUGINCAPABILITIESREC;
-
- typedef struct {
- LPTSTR lpszRootPath;
- LPTSTR lpszVirtualRoot;
- LPTSTR lpszVolumeLabel;
- LPTSTR lpszFSName;
- int iMaxNameLength;
- DWORD dwSerialNumber;
- WORD wDiskNum;
- WORD wMediaType;
- int iBytesPerSector;
- int iSectorsPerCluster;
- int iTotalClusters;
- int iFreeClusters;
- int iNumberOfFiles;
- int iNumberOfCompressedFiles;
- WORD wNumberOfDirs;
- } DISKINFORECORD, FAR *LPDISKINFOREC;
-
- typedef struct {
- LPTSTR lpszFileName;
- LPTSTR lpszDesc;
- LPTSTR lpszAliasName;
- PROC lpRequireFileProc;
- WORD wMaxDescSize;
- BOOL bSilentMode;
- HANDLE hOwnerWnd;
- } IMPORTSAMEFILEREC, FAR *LPIMPORTSAMEFILEREC;
-
- typedef struct {
- LPTSTR lpszParentName;
- LPTSTR lpszFileList;
- LPTSTR lpszDesc;
- LPTSTR lpszAliasName;
- PROC lpRequireFileProc;
- WORD wMaxDescSize;
- BOOL bSilentMode;
- HANDLE hOwnerWnd;
- } IMPORTPARENTITEMREC, FAR *LPIMPORTPARENTITEMREC;
-
- typedef struct {
- LPTSTR lpszParentName;
- LPTSTR lpszFileList;
- PROC lpRequireFileProc;
- PROC lpStoreDescProc;
- PROC lpStoreAliasProc;
- WORD wMaxDescSize;
- BOOL bSilentMode;
- HANDLE hOwnerWnd;
- } IMPORTITEMLISTREC, FAR *LPIMPORTITEMLISTREC;
-
- typedef struct {
- LPDISKINFOREC lpDiskInfo;
- LPTSTR lpszDesc;
- LPTSTR lpszDiskName;
- LPTSTR lpszCDDBQueryID;
- WORD wMaxDescSize;
- BOOL bSilentMode;
- HANDLE hOwnerWnd;
- } IMPORTDISKINFOREC, FAR *LPIMPORTDISKINFOREC;
-
- typedef struct {
- LPTSTR lpszDesc;
- WORD wMaxDescSize;
- LPTSTR lpszSourceModuleFile;
- WORD wSourcePluginID;
- HANDLE hOwnerWnd;
- } FORMATDESCREC, FAR *LPFORMATDESCREC;
-
- typedef struct {
- LPTSTR lpszFileName;
- LPTSTR lpszFullPath;
- BOOL bIsDirectory;
- BOOL bIsCompressed;
- HANDLE hOwnerWnd;
- } FORMATFILENAMEREC, FAR *LPFORMATFILENAMEREC;
-
- typedef struct {
- LPTSTR lpszFileName;
- WORD wXSize;
- WORD wYSize;
- HANDLE hBitmapHandle;
- PROC lpRequireFileProc;
- BOOL bSilentMode;
- HANDLE hOwnerWnd;
- } IMPORTTHUMBNAILREC, FAR *LPIMPORTTHUMBNAILREC;
-
- typedef struct {
- LPTSTR lpszItemPath;
- HANDLE hIconHandle;
- BOOL bSilentMode;
- HANDLE hOwnerWnd;
- } IMPORTCUSTOMICONREC, FAR *LPIMPORTCUSTOMICONREC;
-
-
- // callback functions
-
- typedef void (__stdcall *TCONFIGPLUGINPROC)
- (HANDLE hInstance,
- HANDLE hOwnerWnd,
- WORD wPluginNumber
- );
-
- typedef int (__stdcall *TREGISTERPLUGINPROC)
- (WORD wPluginID,
- BYTE wPlugintype,
- LPTSTR lpszPluginDescription,
- LPTSTR lpszPluginFileMask,
- TCONFIGPLUGINPROC PluginConfigurationCallBack
- );
-
- typedef LPTSTR (__stdcall *TREQUIREFILEPROC)
- (LPTSTR lpszFileName
- );
-
- typedef BOOL (__stdcall *TSTOREDESCPROC)
- (LPTSTR lpszFileName,
- LPTSTR lpszDesc
- );
-
- typedef BOOL (__stdcall*TSTOREALIASNAMEPROC)
- (LPTSTR lpszFileName,
- LPTSTR lpszAliasName
- );
-
-
- // function prototypes
- // defined here as function types with added "_Proc" in the name, implement
- // in your code as regular functions and export them from your DLL.
-
- typedef void (__stdcall*ModuleInfoEx_Proc)
- (LPMODULEINFOREC ModuleInfo);
-
- typedef void (__stdcall*RegisterDescPlugins_Proc)
- (TREGISTERPLUGINPROC RegisterPluginProc);
-
- typedef BYTE (__stdcall*PluginDefaultState_Proc)
- (WORD wPluginID);
-
- typedef int (__stdcall*PluginCapabilities_Proc)
- (WORD wPluginID,
- LPPLUGINCAPABILITIESREC PluginCapabilities);
-
- typedef void (__stdcall*InitDescImport_Proc)
- ();
-
- typedef void (__stdcall*DoneDescImport_Proc)
- ();
-
- typedef int (__stdcall*ImportDesc_SameFileEx_Proc)
- (WORD wPluginID,
- LPIMPORTSAMEFILEREC ImportSameFile);
-
- typedef int (__stdcall*ImportDesc_ParentItemEx_Proc)
- (WORD wPluginID,
- LPIMPORTPARENTITEMREC ImportParentItem);
-
- typedef int (__stdcall*ImportDesc_ItemListEx_Proc)
- (WORD wPluginID,
- LPIMPORTITEMLISTREC ImportItemList);
-
- typedef int (__stdcall*ImportDesc_DiskInfoProcEx_Proc)
- (WORD wPluginID,
- LPIMPORTDISKINFOREC ImportDiskInfo);
-
- typedef int (__stdcall*FormatDescriptionProcEx_Proc)
- (WORD wPluginID,
- LPFORMATDESCREC FormatDesc);
-
- typedef int (__stdcall*FormatFileNameProcEx_Proc)
- (WORD wPluginID,
- LPFORMATFILENAMEREC FormatFileName);
-
- typedef int (__stdcall*ImportThumbnailProcEx_Proc)
- (WORD wPluginID,
- LPIMPORTTHUMBNAILREC ThumbnailData);
-
- typedef int (__stdcall*ImportCustomIconProcEx_Proc)
- (WORD wPluginID,
- LPIMPORTCUSTOMICONREC CustomIconData);
-
-
- #endif
-