home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 2003 May / VPR0305.ISO / OLS / TAR32223 / tar32223.lzh / tar32_2 / sdk / api_tare.txt next >
Text File  |  2003-01-17  |  16KB  |  405 lines

  1. =======================================================================
  2.                Tar32.DLL Ver 2.xx API Reference
  3. =======================================================================
  4. -----------------------------------------------------------------------
  5. int WINAPI Tar(const HWND hWnd,LPCSTR szCmdLine,LPSTR szOutput,
  6.          const DWORD dwSize);
  7. -----------------------------------------------------------------------
  8.  
  9. Description
  10.     Do Pack & Unpack using command.
  11.     Please check a file "cmd_tare.txt" for more details.
  12.  
  13. Arguments
  14.     hWnd        Window Handle
  15.     szCmdLine    Command Line String. Please see cmd_tare.txt.
  16.     
  17.     szOutput    Buffer that command result.
  18.     dwSize        szOutPut buffer size.
  19.  
  20. Example
  21.     ret = Tar(hWnd,"-zxvf filename.tgz",NULL,0);
  22.  
  23. -----------------------------------------------------------------------
  24. BOOL WINAPI TarCheckArchive(LPCSTR szFileName,const int iMode);
  25. -----------------------------------------------------------------------
  26. Description
  27.     Check whether archiveFile is supported format.
  28.  
  29. Arguments
  30.     szFileName    Filename
  31.     iMode        mode(Current Ignore)
  32.  
  33. Return Value
  34.     1            supported format.
  35.     0            non supported format.(or broken file)
  36.  
  37. -----------------------------------------------------------------------
  38. int WINAPI TarGetArchiveType(LPCSTR szFileName);
  39. -----------------------------------------------------------------------
  40. Description
  41.     Get ArchiveFile Type.
  42.  
  43. Arguments
  44.     szFileName    Filename
  45.     
  46. Return Value
  47.     ARCHIVETYPE_TAR (1)    TAR
  48.     ARCHIVETYPE_TARGZ (2)    TAR.GZ(TGZ)
  49.     ARCHIVETYPE_TARZ (3)    TAR.Z(TAZ)
  50.     ARCHIVETYPE_GZ (4)    GZ
  51.     ARCHIVETYPE_Z (5)    Z
  52.     
  53.     0            other format.
  54.     -1            Error
  55.  
  56. -----------------------------------------------------------------------
  57. BOOL WINAPI TarConfigDialog(const HWND hWnd,LPSTR szOptionBuffer,
  58.             const int iMode);
  59. -----------------------------------------------------------------------
  60.  
  61. Description
  62.     Display Dialog
  63.  
  64.     hwnd        Window Handle
  65.     szOptionBuffer  Buffer(Current Ignore)
  66.     iMode        mode(Current Ignore)
  67.  
  68. Return Value
  69.     ERROR_ALREADY_RUNNING    Error
  70.     TRUE            Success
  71.     FALSE            Cancel
  72.  
  73. Other
  74.     Configration is saved at Registory HKEY_CURRENT_USER 
  75.     Software\ArchiverDLL
  76.  
  77. -----------------------------------------------------------------------
  78. WORD WINAPI TarGetVersion(VOID);
  79. -----------------------------------------------------------------------
  80. Description
  81.     Ger Version Number.(*100)
  82.  
  83. Return
  84.     Current Version   Return Value
  85.     0.12        ->12
  86.     0.3        ->30
  87.     
  88.  
  89. -----------------------------------------------------------------------
  90. BOOL WINAPI TarGetRunning(VOID);
  91. -----------------------------------------------------------------------
  92. -----------------------------------------------------------------------
  93. BOOL WINAPI TarGetBackGroundMode(VOID);
  94. -----------------------------------------------------------------------
  95. -----------------------------------------------------------------------
  96. BOOL WINAPI TarSetBackGroundMode(const BOOL bBackGroundMode);
  97. -----------------------------------------------------------------------
  98. -----------------------------------------------------------------------
  99. BOOL WINAPI TarGetCursorMode(VOID);
  100. -----------------------------------------------------------------------
  101. -----------------------------------------------------------------------
  102. BOOL WINAPI TarSetCursorMode(const BOOL bCursorMode);
  103. -----------------------------------------------------------------------
  104. -----------------------------------------------------------------------
  105. WORD WINAPI TarGetCursorInterval(VOID);
  106. -----------------------------------------------------------------------
  107. -----------------------------------------------------------------------
  108. BOOL WINAPI TarSetCursorInterval(const WORD wInterval);
  109. -----------------------------------------------------------------------
  110. -----------------------------------------------------------------------
  111. int WINAPI TarGetArcFileInfo(LPSTR szFileName, MAININFO *lpMainInfo);
  112. -----------------------------------------------------------------------
  113. -----------------------------------------------------------------------
  114. int WINAPI TarGetFileCount(LPCSTR szArcFile);
  115. -----------------------------------------------------------------------
  116. -----------------------------------------------------------------------
  117. BOOL WINAPI TarQueryFunctionList(const int iFunction);
  118. -----------------------------------------------------------------------
  119. Description
  120.     You get information whether you can use specified API or not.
  121.     
  122. Arguments
  123.     iFunction    Numeric Value that identify API.
  124.             Please refer TAR32.H for concreate value.
  125.             (ex: ISARC_GET_VERSION)
  126.  
  127. Return Value
  128.     TRUE(1)        You can use that API.
  129.     FALSE(0)    cannot.
  130.     
  131. -----------------------------------------------------------------------
  132. HARC WINAPI TarOpenArchive(const HWND hWnd,LPCSTR szFileName,
  133.                 const DWORD dwMode);
  134. -----------------------------------------------------------------------
  135. Description
  136.     Open Archiver-file.and return ARCHIVER-HANDLE.
  137.     You can access archiver using this handle.
  138.     (TarFindFirst/TarFindNext/TarCloseArchive)
  139.     This API only support TAR/TGZ(tar.gz)/TAZ(tar.Z),and not support GZ/Z.
  140.     TarOpenArchive and TarFinfFist API is similar to WIN32 FindFirst() API.
  141.  
  142.             
  143. Arguments.
  144.     hwnd        Window Handle
  145.     szFileName    filename
  146.     dwMode        mode(current ignore)
  147.  
  148. Return Value:
  149.     Archiver Handle.
  150.     If error,return NULL.
  151.  
  152. Example:
  153.         INDIVIDUALINFO info;
  154.         harc = TarOpenArchive(hwnd,"filename.tgz",0);
  155.         if(harc == NULL){ ERROR }
  156.         ret = TarFindFirst(harc,"*.*",info);
  157.         while(ret){
  158.             /* filename is info.szFileName */
  159.             /* ... */
  160.             ret = TarFindNext(harc,&info);
  161.         }
  162.         TarCloseArchive(harc);
  163.  
  164.  
  165. -----------------------------------------------------------------------
  166. int WINAPI TarCloseArchive(HARC hArc);
  167. -----------------------------------------------------------------------
  168. Description
  169.     Release handle that allocated at TarOpenArchive().
  170.     This API is similar to WIN32 FindClose() API.
  171.  
  172. Arguments
  173.     hArc        Handle that allocated at TarOpenArchive()
  174.  
  175. Return Value
  176.     0    OK
  177.     Other    Error
  178.  
  179. -----------------------------------------------------------------------
  180. int WINAPI TarFindFirst(HARC hArc,
  181.             LPCSTR szWildName,LPINDIVIDUALINFO lpSubInfo);
  182. -----------------------------------------------------------------------
  183. Description
  184.     Get Information about the first filename stored in archiver.
  185.     This API is similar to WIN32 FindFirstFile() API.
  186.     TarOpenArchive and TarFinfFist API is similar to WIN32 FindFirst() API.
  187.  
  188. Arguments
  189.     hAac        handle that TarOpenArchive() retun.
  190.     szWildName    Search filename. You can use wildcard(*,?).
  191.             If specified "",Search all filename.( = "*.*")
  192.     lpSubInfo    A Pointer to INDIVIDUALINFO structure that recieve information about each stored file.
  193.  
  194. Return
  195.     0    Success
  196.     -1    End of Search.
  197.  
  198. -----------------------------------------------------------------------
  199. int WINAPI TarFindNext(HARC hArc,LPINDIVIDUALINFO lpSubInfo);
  200. -----------------------------------------------------------------------
  201. Description
  202.     Get stored file information of the next of TarFindFirst() or TarFindNext() API.
  203.     This API is similar to WIN32 FindNextFile() API.
  204.  
  205. Arguments
  206.     hAac        handle that TarOpenArchive() retun.
  207.     szWildName    Search filename. You can use wildcard(*,?).
  208.             If specified "",Search all filename.( = "*.*")
  209.     lpSubInfo    A Pointer to INDIVIDUALINFO structure that recieve information about each stored file.
  210.  
  211. Return
  212.     0    Success
  213.     -1    End of Search.
  214.  
  215. -----------------------------------------------------------------------
  216. int WINAPI TarExtract(HARC hArc,LPCSTR szFileName,
  217.                 LPCSTR szDirName, DWORD dwMode);
  218. -----------------------------------------------------------------------
  219. -----------------------------------------------------------------------
  220. int WINAPI TarAdd(HARC hArc,LPCSTR szFileName,DWORD dwMode);
  221. -----------------------------------------------------------------------
  222. -----------------------------------------------------------------------
  223. int WINAPI TarMove(HARC hArc,LPCSTR szFileName,DWORD dwMode);
  224. -----------------------------------------------------------------------
  225. -----------------------------------------------------------------------
  226. int WINAPI TarDelete(HARC hArc,LPCSTR szFileName,DWORD dwMode);
  227. -----------------------------------------------------------------------
  228. -----------------------------------------------------------------------
  229. int WINAPI TarGetArcFileName(HARC hArc,LPCSTR lpBuffer,int nSize);
  230. -----------------------------------------------------------------------
  231. -----------------------------------------------------------------------
  232. DWORD WINAPI TarGetArcFileSize(HARC hArc);
  233. -----------------------------------------------------------------------
  234. -----------------------------------------------------------------------
  235. DWORD WINAPI TarGetArcOriginalSize(HARC hArc);
  236. -----------------------------------------------------------------------
  237. -----------------------------------------------------------------------
  238. DWORD WINAPI TarGetArcCompressedSize(HARC hArc);
  239. -----------------------------------------------------------------------
  240. -----------------------------------------------------------------------
  241. WORD WINAPI TarGetArcRatio(HARC hArc);
  242. -----------------------------------------------------------------------
  243. -----------------------------------------------------------------------
  244. WORD WINAPI TarGetArcDate(HARC hArc);
  245. -----------------------------------------------------------------------
  246. -----------------------------------------------------------------------
  247. WORD WINAPI TarGetArcTime(HARC hArc);
  248. -----------------------------------------------------------------------
  249. -----------------------------------------------------------------------
  250. UINT WINAPI TarGetArcOSType(HARC hArc);
  251. -----------------------------------------------------------------------
  252. -----------------------------------------------------------------------
  253. int WINAPI TarIsSFXFile(HARC hArc);
  254. -----------------------------------------------------------------------
  255. -----------------------------------------------------------------------
  256. int WINAPI TarGetFileName(HARC hArc,LPCSTR lpBuffer,int nSize);
  257. -----------------------------------------------------------------------
  258. -----------------------------------------------------------------------
  259. DWORD WINAPI TarGetOriginalSize(HARC hArc);
  260. -----------------------------------------------------------------------
  261. -----------------------------------------------------------------------
  262. DWORD WINAPI TarGetCompressedSize(HARC harc);
  263. -----------------------------------------------------------------------
  264. -----------------------------------------------------------------------
  265. WORD WINAPI TarGetRatio(HARC hArc);
  266. -----------------------------------------------------------------------
  267. -----------------------------------------------------------------------
  268. WORD WINAPI TarGetDate(HARC hArc);
  269. -----------------------------------------------------------------------
  270. -----------------------------------------------------------------------
  271. WORD WINAPI TarGetTime(HARC hArc);
  272. -----------------------------------------------------------------------
  273. -----------------------------------------------------------------------
  274. DWORD WINAPI TarGetCRC(HARC hArc);
  275. -----------------------------------------------------------------------
  276. -----------------------------------------------------------------------
  277. int WINAPI TarGetAttribute(HARC hArc);
  278. -----------------------------------------------------------------------
  279. -----------------------------------------------------------------------
  280. UINT WINAPI TarGetOSType(HARC hArc);
  281. -----------------------------------------------------------------------
  282. -----------------------------------------------------------------------
  283. int WINAPI TarExtractMem(const HWND hWnd,LPCSTR szCmdLine,
  284.         LPBYTE szBuffer,const DWORD dwSize,time_t *lpTime,
  285.         LPWORD lpwAttr,LPDWORD lpdwWriteSize);
  286. -----------------------------------------------------------------------
  287. -----------------------------------------------------------------------
  288. int WINAPI TarCompressMem(const HWND hWnd,LPCSTR szCmdLine,
  289.         const LPBYTE szBuffer,const DWORD dwSize,
  290.         const time_t *lpTime,const LPWORD lpwAttr,
  291.         LPDWORD lpdwWriteSize);
  292. -----------------------------------------------------------------------
  293. -----------------------------------------------------------------------
  294. BOOL WINAPI TarSetOwnerWindow(HWND hWnd);
  295. -----------------------------------------------------------------------
  296. -----------------------------------------------------------------------
  297. BOOL WINAPI TarClearOwnerWindow(VOID);
  298. -----------------------------------------------------------------------
  299. -----------------------------------------------------------------------
  300. BOOL WINAPI TarSetOwnerWindowEx(HWND hWnd,LPARCHIVERPROC lpArcProc)
  301. -----------------------------------------------------------------------
  302. -----------------------------------------------------------------------
  303. BOOL WINAPI TarKillOwnerWindowEx(HWND hWnd)
  304. -----------------------------------------------------------------------
  305.  
  306. -----------------------------------------------------------------------
  307. INDIVIDUALINFO Structure
  308. -----------------------------------------------------------------------
  309. Structure Definition
  310.         typedef struct {
  311.             char        szFileName[FNAME_MAX + 1];
  312.             UINT        uFlag;
  313.             DWORD         dwOriginalSize;
  314.             DWORD         dwCompressedSize;
  315.             WORD        wRatio;
  316.             WORD        wDate;
  317.             WORD         wTime;
  318.             DWORD        dwCRC;
  319.             char        szAttribute[5];
  320.             char        szMode[8];
  321.             UINT        uOSType;
  322.         } INDIVIDUALINFO;
  323.  
  324. Member variables
  325.     szFileName        Archive FileName
  326.     uFlag            Not Supported.
  327.     
  328.     dwOriginalSize        Original File Size
  329.     dwCompressedSize    Compressed File Size.(always 0 at TAR32.DLL)
  330.     wRatio            Pack Ratio(always 0 at TAR32.DLL)
  331.     wDate            Stored File's Data
  332.                 Format:
  333.                  0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
  334.                 +---------------+---------------+
  335.                 + Year - 1980 | Month |  Date   |
  336.                 +---------------+---------------+
  337.     wTime            Store's File's Time.
  338.                 Format:
  339.                  0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
  340.                 +---------------+---------------+
  341.                 + Hour    | Minutes   |Second/2 |
  342.                 +---------------+---------------+
  343.     
  344.     dwCRC            CRC
  345.     szAttribute        Attribute of stored file.
  346.     szMode            mode(not supported)
  347.     uOSType            OS(always 0)
  348.  
  349.  
  350. -----------------------------------------------------------------------
  351. Windows Message
  352. -----------------------------------------------------------------------
  353. +wm_arcextract
  354.  
  355. wm_arcextract
  356.  
  357. nMode = (int)wParam            /* Notify Mode */
  358. lpEis = (LPEXTRACTINGINFO)lParam    /* Pointer to Structure */
  359.  
  360.   TAR32.DLL can send wm_arcextract message to the window specified by TarSetOwnerWindow().
  361.   
  362. nMode        wParam value. The state of processing.
  363.  
  364.     0 : Begin
  365.     1 : Processing.
  366.     2 : End.
  367.  
  368. lpEis        lParam value. A pointer to EXTRACTINGINFO that store filename,etc.
  369.  
  370. -----------------------------------------------------------------------
  371. EXTRACTINGINFO Structure
  372. -----------------------------------------------------------------------
  373.         typedef struct {
  374.             char    szSourceFileName[FNAME_MAX + 1];
  375.             char    szDestFileName[FNAME_MAX + 1];
  376.             DWORD    dwFileSize;
  377.             DWORD    dwWriteSize;
  378.         }  EXTRACTINGINFO
  379.  
  380. Member variables.
  381.     szSourceFileName    
  382.     szDestFileName        
  383.     dwFileSize        
  384.     dwWriteSize        
  385.  
  386. ------------------------------------------------------------------------
  387. TAR32.DLL Message Processing
  388. ------------------------------------------------------------------------
  389. foreach file in archiver{
  390.     Send Message by nMode:0
  391.     while unpacking file{
  392.         Send Message by nMode:1
  393.     }
  394. }
  395. Send Message by nMode:2
  396.  
  397. -----------------------------------------------------------------------
  398. Attention
  399. -----------------------------------------------------------------------
  400.  
  401. API Specification may be changed.
  402.  
  403. =======================================================================
  404. </XMP></BODY></HTML>
  405.