home *** CD-ROM | disk | FTP | other *** search
- const
- {$IFDEF DescAPI_10}
- MaxDescLength = 4096;
- {$ELSE}
- MaxDescLength = 32768;
- {$ENDIF}
- MaxAliasLength = 255;
- MaxDiskNameLength = 255;
-
- DT_Floppy525_360 = 0;
- DT_Floppy525_12 = 1;
- DT_Floppy35_720 = 2;
- DT_Floppy525_8SD = 3;
- DT_Floppy525_8DD = 4;
- DT_HardDisk = 5;
- DT_TapeDrive = 6;
- DT_Floppy35_144 = 7;
- DT_Optical = 8;
- DT_Floppy35_288 = 9;
- DT_CDROM = 10;
- DT_Network = 11;
- DT_RamDisk = 12;
- DT_Removable = 13;
- DT_ZipDrive = 14;
- DT_JazDrive = 15;
- DT_ZipDrivePlus = 16;
- DT_SeagateDirectTape = 17;
- DT_LS120 = 18;
- DT_MOS320 = 19;
- DT_MOS332 = 20;
- DT_M2531A = 21;
- DT_Jaz2Drive = 22;
- DT_Zip250 = 23;
- {$IFDEF DescAPI_20}
- DT_AudioCD = 24;
- {$ENDIF}
- DT_Unknown = $FF;
-
- // 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
- ERR_AbortScan = $FFFA8047;
-
- type
- TPluginType =
- (ptReserved, ptSameFile, ptParentItem, ptItemList, ptDiskInfo, ptCDDB,
- ptFormatting, ptThumbnails, ptCustomIcons, ptFileNameFormatting);
-
- TPluginDefaultState =
- (pdsUserDefined_EnabledFirstTime, pdsUserDefined_DisabledFirstTime,
- pdsForceAlwaysEnabled, pdsForceAlwaysDisabled);
-
- TDescInfoRecord = record
- lpszRootPath: PChar;
- lpszVirtualRoot: PChar;
- lpszVolumeLabel: PChar;
- lpszFSName: PChar;
- iMaxNameLength: Integer;
- dwSerialNumber: DWORD;
- wDiskNum: Word;
- wMediaType: Word;
- iBytesPerSector: Integer;
- iSectorsPerCluster: Integer;
- iTotalClusters: Integer;
- iFreeClusters: Integer;
- iNumberOfFiles: Integer;
- iNumberOfCompressedFiles: Integer;
- wNumberOfDirs: Word;
- end;
-
-
- //********** Common functions to both DescAPI 1.0 and DescAPI 2.0 **********
-
- TConfigPluginProc = procedure(HInstance: THandle; OwnerWnd: THandle;
- PluginID: Word); stdcall;
-
- TRegisterPlugin = function (PluginID: Word; PluginType: TPluginType; PluginName,
- FileMask: PChar; ConfigProc: TConfigPluginProc): Integer; stdcall;
-
- TRegisterDescPlugins = procedure (RegisterPlugin: TRegisterPlugin); stdcall;
-
- TInitDescImport = procedure; stdcall;
-
- TDoneDescImport = procedure; stdcall;
-
- TRequireFileProc = function(FileName: PChar): PChar; stdcall;
-
- TStoreDescProc = function(FileName, Desc: PChar): Boolean; stdcall;
-
-
- //****************** DescAPI 1.0 specific functions ************************
-
- TModuleInfo = procedure(ModuleName, Author, Version: PChar); stdcall;
-
- TImportDesc_SameFile = function(PluginID: Word; FileName,Desc: PChar;
- RequireFile: TRequireFileProc): Boolean; stdcall;
-
- TImportDesc_ParentItem = function(PluginID: Word; ParentName,FoundList,Desc: PChar;
- RequireFile: TRequireFileProc): Boolean; stdcall;
-
- TImportDesc_ItemList = procedure(PluginID: Word; ParentName,FoundList: PChar;
- RequireFile: TRequireFileProc; StoreDescProc: TStoreDescProc); stdcall;
-
- TImportDesc_DiskInfoProc = function(PluginID: Word; DescInfo: TDescInfoRecord;
- Desc: PChar): Boolean; stdcall;
-
- //****************** DescAPI 2.0 specific functions ************************
-
- TStoreAliasNameProc = function(FileName, AliasName: PChar): Boolean; stdcall;
-
- TModuleInfoRec = record
- lpszModuleName: PChar;
- lpszAuthor: PChar;
- lpszVersion: PChar
- end;
- TModuleInfoPtr = ^TModuleInfoRec;
- TModuleInfoEx = procedure(ModuleInfo: TModuleInfoPtr); stdcall;
-
- TPluginDefaultStateProc = function(PluginID: Word): TPluginDefaultState; stdcall;
-
- TPluginCapabilitiesRec = record
- ImportingDesc: Boolean;
- ImportingAlias: Boolean;
- end;
- TPluginCapabilitiesPtr = ^TPluginCapabilitiesRec;
-
- TPluginCapabilitiesProc = function(PluginID: Word; PluginCapabilities: TPluginCapabilitiesPtr): Integer; stdcall;
-
- TImportSameFileRec = record
- FileName: PChar;
- Desc: PChar;
- AliasName: PChar;
- RequireFileProc: TRequireFileProc;
- MaxDescSize: Word;
- SilentMode: Boolean;
- OwnerWnd: THandle;
- end;
- TImportSameFilePtr = ^TImportSameFileRec;
- TImportDesc_SameFileEx = function(PluginID: Word; ImportSameFile: TImportSameFilePtr): Integer; stdcall;
-
- TImportParentItemRec = record
- ParentName: PChar;
- FoundList: PChar;
- Desc: PChar;
- AliasName: PChar;
- RequireFileProc: TRequireFileProc;
- MaxDescSize: Word;
- SilentMode: Boolean;
- OwnerWnd: THandle;
- end;
- TImportParentItemPtr = ^TImportParentItemRec;
- TImportDesc_ParentItemEx = function(PluginID: Word; ImportParentItem: TImportParentItemPtr): Integer; stdcall;
-
- TImportItemListRec = record
- ParentName: PChar;
- FoundList: PChar;
- RequireFileProc: TRequireFileProc;
- StoreDescProc: TStoreDescProc;
- StoreAliasNameProc: TStoreAliasNameProc;
- MaxDescSize: Word;
- SilentMode: Boolean;
- OwnerWnd: THandle;
- end;
- TImportItemListPtr = ^TImportItemListRec;
- TImportDesc_ItemListEx = function(PluginID: Word; ImportItemList: TImportItemListPtr): Integer; stdcall;
-
- TImportDiskInfoRec = record
- DescInfo: TDescInfoRecord;
- Desc: PChar;
- DiskName: PChar;
- CDDBQueryID: PChar;
- MaxDescSize: Word;
- SilentMode: Boolean;
- OwnerWnd: THandle;
- end;
- TImportDiskInfoPtr = ^TImportDiskInfoRec;
- TImportDesc_DiskInfoProcEx = function(PluginID: Word; ImportDiskInfo: TImportDiskInfoPtr): Integer; stdcall;
-
- TFormatDescRec = record
- Desc: PChar;
- MaxDescSize: Word;
- SourceModuleFile: PChar;
- SourcePluginID: Word;
- OwnerWnd: THandle;
- end;
- TFormatDescPtr = ^TFormatDescRec;
- TFormatDescriptionProcEx = function(PluginID: Word; FormatDesc: TFormatDescPtr): Integer; stdcall;
-
- TThumbnailRec = record
- FileName: PChar;
- XSize,YSize: Word;
- BitmapHandle: HBitmap;
- RequireFileProc: TRequireFileProc;
- SilentMode: Boolean;
- OwnerWnd: THandle;
- end;
- TThumbnailPtr = ^TThumbnailRec;
- TImportThumbnailProcEx = function(PluginID: Word; ThumbnailPtr: TThumbnailPtr): Integer; stdcall;
-
- //****************** DescAPI 2.10 specific functions ******************
-
- TFormatFileNameRec = record
- FileName: PChar;
- FullPath: PChar;
- IsDirectory: Boolean;
- IsCompressed: Boolean;
- OwnerWnd: THandle;
- end;
- TFormatFileNamePtr = ^TFormatFileNameRec;
- TFormatFileNameProcEx = function(PluginID: Word; FormatFileName: TFormatFileNamePtr): Integer; stdcall;
-
- TCustomIconRec = record
- ItemPath: PChar;
- IconHandle: HIcon;
- SilentMode: Boolean;
- OwnerWnd: THandle;
- end;
- TCustomIconPtr = ^TCustomIconRec;
- TImportCustomIconProcEx = function(PluginID: Word; CustomIconPtr: TCustomIconPtr): Integer; stdcall;
-