home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1998 March / VPR9803A.ISO / OLS / Windows / TAR32023 / TAR32023.EXE / SDK / TAR32.H < prev    next >
C/C++ Source or Header  |  1997-09-02  |  9KB  |  284 lines

  1. /* tar32.h */
  2. /* tar32.DLL DLL transplanted by Yoshioka Tsuneo */
  3.  
  4. #ifndef TAR32_H
  5. #define TAR32_H
  6.  
  7.  
  8. #ifndef FNAME_MAX32
  9. #define FNAME_MAX32        512
  10. #endif
  11. #if defined(__BORLANDC__)
  12. #pragma option -a-
  13. #else
  14. #pragma pack(1)
  15. #endif
  16.  
  17. #ifndef _TIME_T_DEFINED
  18. typedef long time_t;
  19. #define _TIME_T_DEFINED
  20. #endif
  21.  
  22. #ifndef ARC_DECSTRACT
  23. #define ARC_DECSTRACT
  24. /* #define void *HGLOBAL */
  25. typedef    HGLOBAL    HARC;
  26.  
  27. typedef struct {
  28.     DWORD             dwOriginalSize;
  29.     DWORD             dwCompressedSize;
  30.     DWORD            dwCRC;
  31.     UINT            uFlag;
  32.     UINT            uOSType;
  33.     WORD            wRatio;
  34.     WORD            wDate;
  35.     WORD             wTime;
  36.     char            szFileName[FNAME_MAX32 + 1];
  37.     char            dummy1[3];
  38.     char            szAttribute[8];
  39.     char            szMode[8];
  40. }    INDIVIDUALINFO;
  41.  
  42. typedef INDIVIDUALINFO *LPINDIVIDUALINFO;
  43.  
  44. /* only declare struct( NO IMPLEMENTED )*/
  45. typedef struct {
  46.     DWORD             dwFileSize;
  47.     DWORD            dwWriteSize;
  48.     char            szSourceFileName[FNAME_MAX32 + 1];
  49.     char            dummy1[3];
  50.     char            szDestFileName[FNAME_MAX32 + 1];
  51.     char            dummy[3];
  52. }    EXTRACTINGINFO;
  53. #endif
  54.  
  55. #if !defined(__BORLANDC__)
  56. #pragma pack()
  57. #else
  58. #pragma option -a.
  59. #endif
  60.  
  61. #if !defined(__BORLANDC__)
  62. #define    _export
  63. #endif
  64.  
  65. #ifdef __cplusplus
  66. extern "C" {
  67. #endif
  68. WORD WINAPI _export TarGetVersion(VOID);
  69.  
  70. BOOL WINAPI _export TarGetRunning(VOID);
  71.  
  72. BOOL WINAPI _export TarGetBackGroundMode(VOID);/* NO IMPLEMENT:return FALSE */
  73. BOOL WINAPI _export TarSetBackGroundMode(const BOOL _BackGroundMode);/* NO IMPLEMENT:return FALSE */
  74. BOOL WINAPI _export TarGetCursorMode(VOID);/* NO IMPLEMENT:return FALSE */
  75. BOOL WINAPI _export TarSetCursorMode(const BOOL _CursorMode);/* NO IMPLEMENT:return FALSE */
  76. WORD WINAPI _export TarGetCursorInterval(VOID);/* NO IMPLEMENT:return 80 */
  77. BOOL WINAPI _export TarSetCursorInterval(const WORD _Interval);/* NO IMPLEMENT:return FALSE */
  78.  
  79. int WINAPI _export Tar(const HWND _hwnd, LPCSTR _szCmdLine,
  80.                         LPSTR _szOutput, const DWORD _dwSize);
  81. /* NO IMPLEMENT:return -1 */
  82. int WINAPI _export TarExtractMem(const HWND _hwndParent,
  83.         LPCSTR _szCmdLine, LPBYTE _lpBuffer, const DWORD _dwSize,
  84.         time_t *_lpTime, LPWORD _lpwAttr, LPDWORD _lpdwWriteSize);
  85. /* NO IMPLEMENT:return -1 */
  86. int WINAPI _export TarCompressMem(const HWND _hwndParent,
  87.         LPCSTR _szCmdLine, const LPBYTE _lpBuffer, const DWORD _dwSize,
  88.         const time_t *_lpTime, const LPWORD _lpwAttr,
  89.         LPDWORD _lpdwWriteSize);
  90. /* File Existans Check Only */
  91. BOOL WINAPI _export TarCheckArchive(LPCSTR _szFileName, const int _iMode);
  92. /* Simple Dialog Only :return TRUE */
  93. BOOL WINAPI _export TarConfigDialog(const HWND _hwnd, LPSTR _lpszComBuffer,
  94.                         const int _iMode);
  95. int WINAPI _export TarGetFileCount(LPCSTR _szArcFile);
  96.  
  97. HARC WINAPI _export TarOpenArchive(const HWND _hwnd, LPCSTR _szFileName,
  98.                             const DWORD _dwMode);
  99. int WINAPI _export TarCloseArchive(HARC _harc);
  100. int WINAPI _export TarFindFirst(HARC _harc, LPCSTR _szWildName,
  101.                             INDIVIDUALINFO *_lpSubInfo);
  102. int WINAPI _export TarFindNext(HARC _harc, INDIVIDUALINFO *_lpSubInfo);
  103.  
  104.  
  105. int WINAPI _export TarGetArcFileName(HARC _harc, LPSTR _lpBuffer,
  106.                             const int _nSize);
  107.  
  108. DWORD WINAPI _export TarGetArcFileSize(HARC _harc);
  109. DWORD WINAPI _export TarGetArcOriginalSize(HARC _harc);
  110. /* NO IMPLEMENT:return 0: */
  111. DWORD WINAPI _export TarGetArcCompressedSize(HARC _harc);
  112. /* NO IMPLEMENT:return 0: */
  113. WORD WINAPI _export TarGetArcRatio(HARC _harc);
  114. WORD WINAPI _export TarGetArcDate(HARC _harc);
  115. WORD WINAPI _export TarGetArcTime(HARC _harc);
  116. /* NO IMPLEMENT:return -1: */
  117. UINT WINAPI _export TarGetArcOSType(HARC _harc);
  118. int WINAPI _export TarGetFileName(HARC _harc, LPSTR _lpBuffer,
  119.                             const int _nSize);
  120. /* NO IMPLEMENT:return -1:lpBuffer="tar"  */
  121. int WINAPI _export TarGetMethod(HARC _harc, LPSTR _lpBuffer,
  122.                             const int _nSize);
  123. DWORD WINAPI _export TarGetOriginalSize(HARC _harc);
  124. DWORD WINAPI _export TarGetCompressedSize(HARC _harc);
  125. WORD WINAPI _export TarGetRatio(HARC _harc);
  126. WORD WINAPI _export TarGetDate(HARC _harc);
  127. WORD WINAPI _export TarGetTime(HARC _harc);
  128. DWORD WINAPI _export TarGetWriteTime(HARC _harc);
  129. DWORD WINAPI _export TarGetAccessTime(HARC _harc);
  130. DWORD WINAPI _export TarGetCreateTime(HARC _harc);
  131. DWORD WINAPI _export TarGetCRC(HARC _harc);
  132. int WINAPI _export TarGetAttribute(HARC _harc);
  133. UINT WINAPI _export TarGetOSType(HARC _harc);
  134.  
  135. BOOL WINAPI _export TarQueryFunctionList(const int _iFunction);
  136.  
  137. #ifdef __cplusplus
  138. }
  139. #endif
  140.  
  141. #define    UNPACK_CONFIG_MODE        1
  142. #define PACK_CONFIG_MODE        2
  143.  
  144. #define    CHECKARCHIVE_RAPID        0
  145. #define    CHECKARCHIVE_BASIC        1
  146. #define    CHECKARCHIVE_FULLCRC    2
  147.  
  148. #if !defined(EXTRACT_FOUND_FILE)
  149. /* MODE (for ???OpenArchive) */
  150. #define M_INIT_FILE_USE            0x00000001L
  151. #define M_REGARDLESS_INIT_FILE    0x00000002L
  152. #define M_CHECK_ALL_PATH        0x00000100L
  153. #define M_CHECK_FILENAME_ONLY    0x00000200L
  154. #define M_USE_DRIVE_LETTER        0x00001000L
  155. #define M_NOT_USE_DRIVE_LETTER    0x00002000L
  156. #define M_ERROR_MESSAGE_ON        0x00400000L
  157. #define M_ERROR_MESSAGE_OFF        0x00800000L
  158. #define M_ERROR_MESSAGE_ON        0x00400000L    /* エラーメッセージを表示 */
  159. #define M_ERROR_MESSAGE_OFF        0x00800000L    /* 〃を表示しない */
  160. #define M_BAR_WINDOW_ON            0x01000000L
  161. #define M_BAR_WINDOW_OFF        0x02000000L
  162.  
  163. #define EXTRACT_FOUND_FILE        0x40000000L
  164. #define EXTRACT_NAMED_FILE        0x80000000L
  165. #endif /* EXTRACT_FOUND_FILE */
  166.  
  167. #if !defined(ISARC_FUNCTION_START)
  168. #define ISARC_FUNCTION_START            0
  169. #define ISARC                            0
  170. #define ISARC_GET_VERSION                1
  171. #define ISARC_GET_CURSOR_INTERVAL        2
  172. #define ISARC_SET_CURSOR_INTERVAL        3
  173. #define ISARC_GET_BACK_GROUND_MODE        4
  174. #define ISARC_SET_BACK_GROUND_MODE        5
  175. #define ISARC_GET_CURSOR_MODE            6
  176. #define ISARC_SET_CURSOR_MODE            7
  177. #define ISARC_GET_RUNNING                8
  178.  
  179. #define ISARC_CHECK_ARCHIVE                16
  180. #define ISARC_CONFIG_DIALOG                17
  181. #define ISARC_GET_FILE_COUNT            18
  182. #define ISARC_QUERY_FUNCTION_LIST        19
  183. #define ISARC_HOUT                        20
  184. #define ISARC_STRUCTOUT                    21
  185. #define ISARC_GET_ARC_FILE_INFO            22
  186.  
  187. #define ISARC_OPEN_ARCHIVE                23
  188. #define ISARC_CLOSE_ARCHIVE                24
  189. #define ISARC_FIND_FIRST                25
  190. #define ISARC_FIND_NEXT                    26
  191. #define ISARC_EXTRACT                    27
  192. #define ISARC_ADD                        28
  193. #define ISARC_MOVE                        29
  194. #define ISARC_DELETE                    30
  195.  
  196. #define ISARC_GET_ARC_FILE_NAME            40
  197. #define ISARC_GET_ARC_FILE_SIZE            41
  198. #define ISARC_GET_ARC_ORIGINAL_SIZE        42
  199. #define ISARC_GET_ARC_COMPRESSED_SIZE    43
  200. #define ISARC_GET_ARC_RATIO                44
  201. #define ISARC_GET_ARC_DATE                45
  202. #define ISARC_GET_ARC_TIME                46
  203. #define ISARC_GET_ARC_OS_TYPE            47
  204. #define ISARC_GET_ARC_IS_SFX_FILE        48
  205. #define ISARC_GET_FILE_NAME                57
  206. #define ISARC_GET_ORIGINAL_SIZE            58
  207. #define ISARC_GET_COMPRESSED_SIZE        59
  208. #define ISARC_GET_RATIO                    60
  209. #define ISARC_GET_DATE                    61
  210. #define ISARC_GET_TIME                    62
  211. #define ISARC_GET_CRC                    63
  212. #define ISARC_GET_ATTRIBUTE                64
  213. #define ISARC_GET_OS_TYPE                65
  214. #define ISARC_GET_METHOD                66
  215. #define ISARC_GET_WRITE_TIME            67
  216. #define ISARC_GET_CREATE_TIME            68
  217. #define ISARC_GET_ACCESS_TIME            69
  218.  
  219. #define ISARC_FUNCTION_END                69
  220. #endif    /* ISARC_FUNCTION_START */
  221.  
  222. #ifndef FA_RDONLY
  223. /* Attribute */
  224. #define FA_RDONLY       0x01            /* Read only attribute */
  225. #define FA_HIDDEN       0x02            /* Hidden file */
  226. #define FA_SYSTEM       0x04            /* System file */
  227. #define FA_LABEL        0x08            /* Volume label */
  228. #define FA_DIREC        0x10            /* Directory */
  229. #define FA_ARCH         0x20            /* Archive */
  230. #endif
  231.  
  232. #ifndef ERROR_ARC_FILE_OPEN
  233. /* WARNING */
  234. #define ERROR_DISK_SPACE        0x8005
  235. #define ERROR_READ_ONLY            0x8006
  236. #define ERROR_USER_SKIP            0x8007
  237. #define ERROR_UNKNOWN_TYPE        0x8008
  238. #define ERROR_METHOD            0x8009
  239. #define ERROR_PASSWORD_FILE        0x800A
  240. #define ERROR_VERSION            0x800B
  241. #define ERROR_FILE_CRC            0x800C
  242. #define ERROR_FILE_OPEN            0x800D
  243. #define ERROR_MORE_FRESH        0x800E
  244. #define ERROR_NOT_EXIST            0x800F
  245. #define ERROR_ALREADY_EXIST        0x8010
  246.  
  247. #define ERROR_TOO_MANY_FILES    0x8011
  248.  
  249. /* ERROR */
  250. #define ERROR_MAKEDIRECTORY        0x8012
  251. #define ERROR_CANNOT_WRITE        0x8013
  252. #define ERROR_HUFFMAN_CODE        0x8014
  253. #define ERROR_COMMENT_HEADER    0x8015
  254. #define ERROR_HEADER_CRC        0x8016
  255. #define ERROR_HEADER_BROKEN        0x8017
  256. #define ERROR_ARC_FILE_OPEN        0x8018
  257. #define ERROR_NOT_ARC_FILE        0x8019
  258. #define ERROR_CANNOT_READ        0x801A
  259. #define ERROR_FILE_STYLE        0x801B
  260. #define ERROR_COMMAND_NAME        0x801C
  261. #define ERROR_MORE_HEAP_MEMORY    0x801D
  262. #define ERROR_ENOUGH_MEMORY        0x801E
  263. #if !defined(ERROR_ALREADY_RUNNING)
  264. #define ERROR_ALREADY_RUNNING    0x801F
  265. #endif
  266. #define ERROR_USER_CANCEL        0x8020
  267. #define ERROR_HARC_ISNOT_OPENED    0x8021
  268. #define ERROR_NOT_SEARCH_MODE    0x8022
  269. #define ERROR_NOT_SUPPORT        0x8023
  270. #define ERROR_TIME_STAMP        0x8024
  271. #define ERROR_TMP_OPEN            0x8025
  272. #define ERROR_LONG_FILE_NAME    0x8026
  273. #define ERROR_ARC_READ_ONLY        0x8027
  274. #define ERROR_SAME_NAME_FILE    0x8028
  275. #define ERROR_NOT_FIND_ARC_FILE 0x8029
  276. #define ERROR_RESPONSE_READ        0x802A
  277. #define ERROR_NOT_FILENAME        0x802B
  278.  
  279. #define ERROR_END    ERROR_NOT_FILENAME
  280. #endif /* ERROR_ARC_FILE_OPEN */
  281.  
  282. #endif /* TAR32_H*/
  283.  
  284.