home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 April / Chip_2003-04_cd1.bin / zkuste / digifoto / where / download / WhereIsIt / setup.exe / %MAINDIR% / DescAPI / DescAPI.h < prev    next >
Encoding:
C/C++ Source or Header  |  2002-08-11  |  7.0 KB  |  270 lines

  1. //************************************************************************
  2. //
  3. // DescAPI.h
  4. //
  5. // C/C++ declarations for DescAPI 2.10 (WhereIsIt ver. 3.20 and newer)
  6. //
  7. // (c) Robert Galle, September 2001
  8. //
  9. // Modified by Emanuele Ruffaldi October 2001
  10. // 1) added ifndef block
  11. // 2) modified syntax of stdcall for VC++
  12. //
  13. //************************************************************************
  14.  
  15. #ifndef DESCAPI_H
  16. #define DESCAPI_H
  17.  
  18.  
  19. #define MAXDESCLENGTH   32768
  20. #define MAXALIASLENGTH  255
  21.  
  22. #define ptReserved            0
  23. #define ptSameFile            1
  24. #define ptParentItem          2
  25. #define ptItemList            3
  26. #define ptDiskInfo            4
  27. #define ptCDDB                5
  28. #define ptFormatting          6
  29. #define ptThumbnails          7
  30. #define ptCustomIcons         8
  31. #define ptFileNameFormatting  9
  32.  
  33. #define DT_FLOPPY525_360     0
  34. #define DT_FLOPPY525_12      1
  35. #define DT_FLOPPY35_720      2
  36. #define DT_FLOPPY525_8SD     3
  37. #define DT_FLOPPY525_8DD     4
  38. #define DT_HARDDISK          5
  39. #define DT_TAPEDRIVE         6
  40. #define DT_FLOPPY35_144      7
  41. #define DT_OPTICAL           8
  42. #define DT_FLOPPY35_288      9
  43. #define DT_CDROM             10
  44. #define DT_NETWORK           11
  45. #define DT_RAMDISK           12
  46. #define DT_REMOVABLE         13
  47. #define DT_ZIPDRIVE          14
  48. #define DT_JAZDRIVE          15
  49. #define DT_ZIPDRIVEPLUS      16
  50. #define DT_SEAGATEDIRECTTAPE 17
  51. #define DT_LS120             18
  52. #define DT_MOS320            19
  53. #define DT_MOS332            20
  54. #define DT_M2531A            21
  55. #define DT_JAZ2DRIVE         22
  56. #define DT_ZIP250            23
  57. #define DT_AUDIOCD           24
  58. #define DT_UNKNOWN           255
  59.  
  60.  
  61. // Plugins can use the following error code with SetLastError() function
  62. // to abort disk scanning. This code should be used with unrecoverable
  63. // errors that affect scanning altogether, for example if plugin detects
  64. // that media is no longer available
  65.  
  66. #define ERR_AbortScan = $FFFA8047;
  67.  
  68.  
  69. #define pdsUserDefined_EnabledFirstTime    0
  70. #define pdsUserDefined_DisabledFirstTime   1
  71. #define pdsForceAlwaysEnabled              2
  72. #define pdsForceAlwaysDisabled             3
  73.  
  74.  
  75. // structures
  76.  
  77. typedef struct {
  78.   LPTSTR    lpszModuleName;
  79.   LPTSTR    lpszAuthor;
  80.   LPTSTR    lpszVersion;
  81. } MODULEINFOREC, FAR *LPMODULEINFOREC;
  82.  
  83. typedef struct {
  84.   BOOL      bImportingDesc;     
  85.   BOOL      bImportingAlias;
  86. } PLUGINCAPABILITIESREC, FAR *LPPLUGINCAPABILITIESREC;
  87.  
  88. typedef struct {
  89.   LPTSTR    lpszRootPath;
  90.   LPTSTR    lpszVirtualRoot;
  91.   LPTSTR    lpszVolumeLabel;
  92.   LPTSTR    lpszFSName;
  93.   int       iMaxNameLength;
  94.   DWORD     dwSerialNumber;
  95.   WORD      wDiskNum;
  96.   WORD      wMediaType;
  97.   int        iBytesPerSector;
  98.   int       iSectorsPerCluster;
  99.   int       iTotalClusters;
  100.   int       iFreeClusters;
  101.   int       iNumberOfFiles;
  102.   int       iNumberOfCompressedFiles;
  103.   WORD      wNumberOfDirs;
  104. } DISKINFORECORD, FAR *LPDISKINFOREC;
  105.  
  106. typedef struct {
  107.   LPTSTR    lpszFileName;
  108.   LPTSTR    lpszDesc;
  109.   LPTSTR    lpszAliasName;
  110.   PROC      lpRequireFileProc;
  111.   WORD      wMaxDescSize;
  112.   BOOL      bSilentMode;
  113.   HANDLE    hOwnerWnd;
  114. } IMPORTSAMEFILEREC, FAR *LPIMPORTSAMEFILEREC;
  115.  
  116. typedef struct {
  117.   LPTSTR    lpszParentName;
  118.   LPTSTR    lpszFileList;
  119.   LPTSTR    lpszDesc;
  120.   LPTSTR    lpszAliasName;
  121.   PROC      lpRequireFileProc;
  122.   WORD      wMaxDescSize;
  123.   BOOL      bSilentMode;
  124.   HANDLE    hOwnerWnd;
  125. } IMPORTPARENTITEMREC, FAR *LPIMPORTPARENTITEMREC;
  126.  
  127. typedef struct {
  128.   LPTSTR    lpszParentName;
  129.   LPTSTR    lpszFileList;
  130.   PROC      lpRequireFileProc;
  131.   PROC      lpStoreDescProc;
  132.   PROC      lpStoreAliasProc;
  133.   WORD      wMaxDescSize;
  134.   BOOL      bSilentMode;
  135.   HANDLE    hOwnerWnd;
  136. } IMPORTITEMLISTREC, FAR *LPIMPORTITEMLISTREC;
  137.  
  138. typedef struct {
  139.   LPDISKINFOREC lpDiskInfo;
  140.   LPTSTR    lpszDesc;
  141.   LPTSTR    lpszDiskName;
  142.   LPTSTR    lpszCDDBQueryID;
  143.   WORD      wMaxDescSize;
  144.   BOOL      bSilentMode;
  145.   HANDLE    hOwnerWnd;
  146. } IMPORTDISKINFOREC, FAR *LPIMPORTDISKINFOREC;
  147.  
  148. typedef struct {
  149.   LPTSTR    lpszDesc;
  150.   WORD      wMaxDescSize;
  151.   LPTSTR    lpszSourceModuleFile;
  152.   WORD      wSourcePluginID;
  153.   HANDLE    hOwnerWnd;
  154. } FORMATDESCREC, FAR *LPFORMATDESCREC;
  155.  
  156. typedef struct {
  157.   LPTSTR    lpszFileName;
  158.   LPTSTR    lpszFullPath;
  159.   BOOL      bIsDirectory;
  160.   BOOL      bIsCompressed;
  161.   HANDLE    hOwnerWnd;
  162. } FORMATFILENAMEREC, FAR *LPFORMATFILENAMEREC;
  163.  
  164. typedef struct {
  165.   LPTSTR    lpszFileName;
  166.   WORD      wXSize;
  167.   WORD      wYSize;
  168.   HANDLE    hBitmapHandle;
  169.   PROC      lpRequireFileProc;
  170.   BOOL      bSilentMode;
  171.   HANDLE    hOwnerWnd;
  172. } IMPORTTHUMBNAILREC, FAR *LPIMPORTTHUMBNAILREC;
  173.  
  174. typedef struct {
  175.   LPTSTR    lpszItemPath;
  176.   HANDLE    hIconHandle;
  177.   BOOL      bSilentMode;
  178.   HANDLE    hOwnerWnd;
  179. } IMPORTCUSTOMICONREC, FAR *LPIMPORTCUSTOMICONREC;
  180.  
  181.  
  182. // callback functions
  183.  
  184. typedef void   (__stdcall *TCONFIGPLUGINPROC)
  185.    (HANDLE  hInstance,
  186.     HANDLE  hOwnerWnd,
  187.     WORD    wPluginNumber
  188.    );
  189.  
  190. typedef int (__stdcall *TREGISTERPLUGINPROC)
  191.    (WORD    wPluginID,
  192.     BYTE    wPlugintype,
  193.     LPTSTR  lpszPluginDescription,
  194.     LPTSTR  lpszPluginFileMask,
  195.     TCONFIGPLUGINPROC  PluginConfigurationCallBack
  196.    );
  197.  
  198. typedef LPTSTR (__stdcall *TREQUIREFILEPROC)
  199.    (LPTSTR  lpszFileName
  200.    );
  201.  
  202. typedef BOOL (__stdcall *TSTOREDESCPROC)
  203.    (LPTSTR  lpszFileName,
  204.     LPTSTR  lpszDesc
  205.    );
  206.  
  207. typedef BOOL (__stdcall*TSTOREALIASNAMEPROC)
  208.    (LPTSTR  lpszFileName,
  209.     LPTSTR  lpszAliasName
  210.    );
  211.  
  212.  
  213. // function prototypes
  214. // defined here as function types with added "_Proc" in the name, implement
  215. // in your code as regular functions and export them from your DLL.
  216.  
  217. typedef void (__stdcall*ModuleInfoEx_Proc)
  218.    (LPMODULEINFOREC ModuleInfo);
  219.  
  220. typedef void (__stdcall*RegisterDescPlugins_Proc)
  221.    (TREGISTERPLUGINPROC RegisterPluginProc);
  222.  
  223. typedef BYTE (__stdcall*PluginDefaultState_Proc)
  224.    (WORD wPluginID);
  225.    
  226. typedef int (__stdcall*PluginCapabilities_Proc)
  227.    (WORD wPluginID,
  228.     LPPLUGINCAPABILITIESREC PluginCapabilities);
  229.  
  230. typedef void (__stdcall*InitDescImport_Proc)
  231.    ();
  232.  
  233. typedef void (__stdcall*DoneDescImport_Proc)
  234.    ();
  235.  
  236. typedef int (__stdcall*ImportDesc_SameFileEx_Proc)
  237.    (WORD    wPluginID,
  238.     LPIMPORTSAMEFILEREC ImportSameFile);
  239.  
  240. typedef int (__stdcall*ImportDesc_ParentItemEx_Proc)
  241.    (WORD    wPluginID,
  242.     LPIMPORTPARENTITEMREC ImportParentItem);
  243.  
  244. typedef int (__stdcall*ImportDesc_ItemListEx_Proc)
  245.    (WORD    wPluginID,
  246.     LPIMPORTITEMLISTREC ImportItemList);
  247.  
  248. typedef int (__stdcall*ImportDesc_DiskInfoProcEx_Proc)
  249.    (WORD    wPluginID,
  250.     LPIMPORTDISKINFOREC ImportDiskInfo);
  251.  
  252. typedef int (__stdcall*FormatDescriptionProcEx_Proc)
  253.    (WORD    wPluginID,
  254.     LPFORMATDESCREC FormatDesc);
  255.     
  256. typedef int (__stdcall*FormatFileNameProcEx_Proc)
  257.    (WORD    wPluginID,
  258.     LPFORMATFILENAMEREC FormatFileName);    
  259.  
  260. typedef int (__stdcall*ImportThumbnailProcEx_Proc)
  261.    (WORD    wPluginID,
  262.     LPIMPORTTHUMBNAILREC ThumbnailData);
  263.     
  264. typedef int (__stdcall*ImportCustomIconProcEx_Proc)
  265.    (WORD    wPluginID,
  266.     LPIMPORTCUSTOMICONREC CustomIconData);
  267.  
  268.  
  269. #endif
  270.