home *** CD-ROM | disk | FTP | other *** search
/ Hot Shareware 35 / hot35.iso / ficheros / LVB / T2W32534.ZIP / T2WIN-32.BAS < prev    next >
BASIC Source File  |  1998-05-02  |  143KB  |  2,169 lines

  1. Attribute VB_Name = "T2WIN_32_DEF"
  2. Option Explicit
  3.  
  4. ' Version : 5.34
  5.  
  6. ' object
  7.  
  8. ' definition for enum objects
  9.  
  10. Public Const ENUMOBJECTS_FORMAT1 = 1
  11. Public Const ENUMOBJECTS_FORMAT2 = 2
  12.  
  13. Declare Function cEnumObjects Lib "t2win-32.dll" (ByVal Frm As Form, ByVal NameIndexFormat As Integer, ByVal FirstNext As Integer, ObjectNameIndex As String, Obj As Object) As Integer
  14.  
  15. Declare Function cObjectGetBoolean Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String) As Boolean
  16. Declare Function cObjectGetByte Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String) As Byte
  17. Declare Function cObjectGetInteger Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String) As Integer
  18. Declare Function cObjectGetLong Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String) As Long
  19. Declare Function cObjectGetString Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String) As String
  20. Declare Function cObjectGetStringW Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String) As String
  21. Declare Function cObjectGetVariant Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String) As Variant
  22. Declare Function cObjectGetIndex Lib "t2win-32.dll" (ByVal Obj As Object) As Integer
  23.  
  24. Declare Function cGetObjCaption Lib "t2win-32.dll" (ByVal Obj As Object) As String
  25. Declare Function cGetObjContainer Lib "t2win-32.dll" (ByVal Obj As Object) As String
  26. Declare Function cGetObjParent Lib "t2win-32.dll" (ByVal Obj As Object) As String
  27. Declare Function cGetObjTag Lib "t2win-32.dll" (ByVal Obj As Object) As String
  28. Declare Function cGetObjText Lib "t2win-32.dll" (ByVal Obj As Object) As String
  29. Declare Function cGetObjDataField Lib "t2win-32.dll" (ByVal Obj As Object) As String
  30. Declare Function cGetObjDataSource Lib "t2win-32.dll" (ByVal Obj As Object) As String
  31. Declare Function cGetObjName Lib "t2win-32.dll" (ByVal Obj As Object) As String
  32. Declare Function cGetObjIndex Lib "t2win-32.dll" (ByVal Obj As Object) As Integer
  33. Declare Function cGetObjNameIndex Lib "t2win-32.dll" (ByVal Obj As Object) As String
  34. Declare Function cGetObjNameIndex2 Lib "t2win-32.dll" (ByVal Obj As Object) As String
  35. Declare Function cGetObjClassName Lib "t2win-32.dll" (ByVal Obj As Object) As String
  36.  
  37. Declare Sub cObjectPutBoolean Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String, ByVal Value As Boolean)
  38. Declare Sub cObjectPutByte Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String, ByVal Value As Byte)
  39. Declare Sub cObjectPutInteger Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String, ByVal Value As Integer)
  40. Declare Sub cObjectPutLong Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String, ByVal Value As Long)
  41. Declare Sub cObjectPutString Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String, ByVal Value As String)
  42. Declare Sub cObjectPutVariant Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String, ByVal Value As Variant)
  43.  
  44. Declare Sub cPutObjCaption Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Value As String)
  45. Declare Sub cPutObjDataField Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Value As String)
  46. Declare Sub cPutObjDataSource Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Value As String)
  47. Declare Sub cPutObjTag Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Value As String)
  48. Declare Sub cPutObjText Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Value As String)
  49.  
  50. Declare Sub cObjectMethod Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Method As String, ByVal Value As Variant)
  51.  
  52. Declare Sub cDisableFI Lib "t2win-32.dll" (ByVal Obj As Object)
  53. Declare Sub cEnableFI Lib "t2win-32.dll" (ByVal Obj As Object)
  54.  
  55. Declare Function cCloseAllEditForm Lib "t2win-32.dll" () As Integer
  56. Declare Function cHideAllEditForm Lib "t2win-32.dll" () As Integer
  57. Declare Function cHideDebugForm Lib "t2win-32.dll" () As Integer
  58. Declare Function cUnHideAllEditForm Lib "t2win-32.dll" () As Integer
  59. Declare Function cUnHideDebugForm Lib "t2win-32.dll" () As Integer
  60.  
  61. Declare Sub cEnableForm Lib "t2win-32.dll" (ByVal hwnd As Long)
  62. Declare Sub cEnableRedraw Lib "t2win-32.dll" (ByVal hwnd As Long)
  63. Declare Sub cObjEnableRedraw Lib "t2win-32.dll" (ByVal Obj As Object)
  64. Declare Sub cDisableForm Lib "t2win-32.dll" (ByVal hwnd As Long)
  65. Declare Sub cDisableRedraw Lib "t2win-32.dll" (ByVal hwnd As Long)
  66. Declare Sub cObjDisableRedraw Lib "t2win-32.dll" (ByVal Obj As Object)
  67.  
  68. Public Enum mcGradientGranularityEnum
  69.    mcDefault = 0
  70.    mcHigh = 1
  71.    mcMedium = 2
  72.    mcLow = 3
  73.    mcVeryLow = 4
  74. End Enum
  75.  
  76. Public Enum mcGradientStyleEnum
  77.    mcNoneGradient = 0
  78.    mcLeftHGradient = 1
  79.    mcRightHGradient = 2
  80.    mcTopVGradient = 3
  81.    mcBottomVGradient = 4
  82.    mcInnerHGradient = 5
  83.    mcOuterHGradient = 6
  84.    mcInnerVGradient = 7
  85.    mcOuterVGradient = 8
  86. End Enum
  87.  
  88. Declare Sub cGradient Lib "t2win-32.dll" (ByVal hDC As Long, ByVal iLeft As Integer, ByVal iTop As Integer, ByVal iWidth As Integer, ByVal iHeight As Integer, ByVal iGradientStyle As Integer, ByVal iGradientGranularity As Integer, ByVal lGradientColor As Long)
  89. Declare Sub cTitleGradient Lib "t2win-32.dll" (ByVal hwnd As Long, ByVal hIcon As Long, ByVal iGradientStyle As Integer, ByVal iGradientGranularity As Integer, ByVal lGradientColor As Long)
  90.  
  91. ' windows 95 / windows NT 4.00
  92.  
  93. ' definition for shortcut file
  94.  
  95. Public Const SHORTCUTFILE_GETPATH = 1
  96. Public Const SHORTCUTFILE_GETPATH83 = 2
  97. Public Const SHORTCUTFILE_GETWORKDIR = 3
  98. Public Const SHORTCUTFILE_GETDESCRIPTION = 4
  99. Public Const SHORTCUTFILE_GETARGUMENTS = 5
  100.  
  101. Public Const SHORTCUTFILE_SETPATH = -1
  102. Public Const SHORTCUTFILE_SETWORKDIR = -2
  103. Public Const SHORTCUTFILE_SETDESCRIPTION = -3
  104. Public Const SHORTCUTFILE_SETARGUMENTS = -4
  105.  
  106. ' structure for windows 95 memory
  107. Type tagMEMORYSTATUS
  108.    dwLength             As Long        'sizeof(MEMORYSTATUS)
  109.    dwMemoryLoad         As Long        'percent of memory in use
  110.    dwTotalPhys          As Long        'bytes of physical memory
  111.    dwAvailPhys          As Long        'free physical memory bytes
  112.    dwTotalPageFile      As Long        'bytes of paging file
  113.    dwAvailPageFile      As Long        'free bytes of paging file
  114.    dwTotalVirtual       As Long        'user bytes of address space
  115.    dwAvailVirtual       As Long        'free user bytes
  116. End Type
  117.  
  118. ' constant for tray bar
  119.  
  120. Public Const TRAYBAR_HIDE = -1
  121. Public Const TRAYBAR_SHOW = 0
  122.  
  123. ' constant for os platform id
  124.  
  125. Public Const VER_PLATFORM_WIN32s = 0
  126. Public Const VER_PLATFORM_WIN32_WINDOWS = 1
  127. Public Const VER_PLATFORM_WIN32_NT = 2
  128.  
  129. ' constant for ShortcutCreate
  130.  
  131. Public Const SC_DESKTOP = &H0
  132. Public Const SC_PROGRAMS = &H2
  133. Public Const SC_CONTROLS = &H3
  134. Public Const SC_PRINTERS = &H4
  135. Public Const SC_PERSONAL = &H5
  136. Public Const SC_FAVORITES = &H6
  137. Public Const SC_STARTUP = &H7
  138. Public Const SC_RECENT = &H8
  139. Public Const SC_SENDTO = &H9
  140. Public Const SC_BITBUCKET = &HA
  141. Public Const SC_STARTMENU = &HB
  142. Public Const SC_DESKTOPDIRECTORY = &H10
  143. Public Const SC_DRIVES = &H11
  144. Public Const SC_NETWORK = &H12
  145. Public Const SC_NETHOOD = &H13
  146. Public Const SC_FONTS = &H14
  147. Public Const SC_TEMPLATES = &H15
  148. Public Const SC_COMMON_STARTMENU = &H16
  149. Public Const SC_COMMON_PROGRAMS = &H17
  150. Public Const SC_COMMON_STARTUP = &H18
  151. Public Const SC_COMMON_DESKTOPDIRECTORY = &H19
  152. Public Const SC_APPDATA = &H1A
  153. Public Const SC_PRINTHOOD = &H1B
  154.  
  155. ' constant for RunFile
  156.  
  157. Public Const SW_HIDE = 0
  158. Public Const SW_SHOWNORMAL = 1
  159. Public Const SW_NORMAL = 1
  160. Public Const SW_SHOWMINIMIZED = 2
  161. Public Const SW_SHOWMAXIMIZED = 3
  162. Public Const SW_MAXIMIZE = 3
  163. Public Const SW_SHOWNOACTIVATE = 4
  164. Public Const SW_SHOW = 5
  165. Public Const SW_MINIMIZE = 6
  166. Public Const SW_SHOWMINNOACTIVE = 7
  167. Public Const SW_SHOWNA = 8
  168. Public Const SW_RESTORE = 9
  169. Public Const SW_SHOWDEFAULT = 10
  170. Public Const SW_MAX = 10
  171.  
  172. Declare Sub cExplorerAddToRecentDocs Lib "t2win-32.dll" (ByVal nFileName As String)
  173. Declare Sub cExplorerClearAllRecentDocs Lib "t2win-32.dll" ()
  174. Declare Sub cMemoryStatus Lib "t2win-32.dll" (MEMORYSTATUS As tagMEMORYSTATUS)
  175. Declare Sub cMultitasksKeys Lib "t2win-32.dll" (ByVal status As Integer)
  176. Declare Function cPBFileCopy Lib "t2win-32.dll" (ByVal hWndParent As Long, ByVal FileNameIn As String, ByVal FileNameOut As String) As Integer
  177. Declare Function cDBFileCopy Lib "t2win-32.dll" (ByVal Title As String, ByVal CaptionFrom As String, ByVal CaptionTo As String, ByVal CaptionButton As String, ByVal FileNameIn As String, ByVal FileNameOut As String) As Integer
  178. Declare Function cGetFileDisplayName Lib "t2win-32.dll" (ByVal nFileName As String) As String
  179. Declare Function cGetFileTypeName Lib "t2win-32.dll" (ByVal nFileName As String) As String
  180. Declare Function cGetOSBuildNumber Lib "t2win-32.dll" () As Long
  181. Declare Function cGetOSCSDVersion Lib "t2win-32.dll" () As String
  182. Declare Function cGetOSMajorVersion Lib "t2win-32.dll" () As Long
  183. Declare Function cGetOSMinorVersion Lib "t2win-32.dll" () As Long
  184. Declare Function cGetOSVersion Lib "t2win-32.dll" () As String
  185. Declare Function cGetOSPlatformId Lib "t2win-32.dll" () As Long
  186. Declare Function cGetOSPlatformName Lib "t2win-32.dll" () As String
  187. Declare Function cGetShortPathName Lib "t2win-32.dll" (ByVal sLongPath As String) As String
  188. Declare Function cIsCapsLockOn Lib "t2win-32.dll" () As Integer
  189. Declare Function cIsInsertOn Lib "t2win-32.dll" () As Integer
  190. Declare Function cIsNumLockOn Lib "t2win-32.dll" () As Integer
  191. Declare Function cIsScrollLockOn Lib "t2win-32.dll" () As Integer
  192. Declare Function cIsWin95OSR2 Lib "t2win-32.dll" () As Integer
  193. Declare Function cRunFile Lib "t2win-32.dll" (ByVal sFileName As String, ByVal sFileParameter As String, ByVal sFilePath As String, ByVal iRunStyle As Integer) As Long
  194. Declare Function cSetInsert Lib "t2win-32.dll" (ByVal iOnOff As Integer) As Integer
  195. Declare Function cSetCapsLock Lib "t2win-32.dll" (ByVal iOnOff As Integer) As Integer
  196. Declare Function cSetNumLock Lib "t2win-32.dll" (ByVal iOnOff As Integer) As Integer
  197. Declare Function cSetScrollLock Lib "t2win-32.dll" (ByVal iOnOff As Integer) As Integer
  198. Declare Function cShortcutCreate Lib "t2win-32.dll" (ByVal sFileName As String, ByVal sLinkName As String, ByVal lFolderType As Long) As Integer
  199. Declare Function cShortcutFileGetInfo Lib "t2win-32.dll" (ByVal pszShortcutFile As String, ByVal nFunction As Integer) As String
  200. Declare Function cShortcutFileGetArguments Lib "t2win-32.dll" (ByVal pszShortcutFile As String) As String
  201. Declare Function cShortcutFileGetIconLocation Lib "t2win-32.dll" (ByVal pszShortcutFile As String, lIconOffset As Long) As String
  202. Declare Function cShortcutFileGetDescription Lib "t2win-32.dll" (ByVal pszShortcutFile As String) As String
  203. Declare Function cShortcutFileGetPath Lib "t2win-32.dll" (ByVal pszShortcutFile As String) As String
  204. Declare Function cShortcutFileGetPath83 Lib "t2win-32.dll" (ByVal pszShortcutFile As String) As String
  205. Declare Function cShortcutFileGetWorkingDir Lib "t2win-32.dll" (ByVal pszShortcutFile As String) As String
  206. Declare Function cShortcutFileSetInfo Lib "t2win-32.dll" (ByVal pszShortcutFile As String, ByVal pszValue As String, ByVal nFunction As Integer) As Integer
  207. Declare Function cShortcutFileSetArguments Lib "t2win-32.dll" (ByVal pszShortcutFile As String, ByVal pszValue As String) As Integer
  208. Declare Function cShortcutFileSetDescription Lib "t2win-32.dll" (ByVal pszShortcutFile As String, ByVal pszValue As String) As Integer
  209. Declare Function cShortcutFileSetIconLocation Lib "t2win-32.dll" (ByVal pszShortcutFile As String, ByVal pszValue As String, ByVal lIconOffset As Long) As Integer
  210. Declare Function cShortcutFileSetPath Lib "t2win-32.dll" (ByVal pszShortcutFile As String, ByVal pszValue As String) As Integer
  211. Declare Function cShortcutFileSetWorkingDir Lib "t2win-32.dll" (ByVal pszShortcutFile As String, ByVal pszValue As String) As Integer
  212. Declare Function cTrashFile Lib "t2win-32.dll" (ByVal sFileName As String, ByVal iPermanent As Integer, ByVal iConfirm As Integer) As Integer
  213. Declare Sub cTrayBar Lib "t2win-32.dll" (ByVal HideOrShow As Integer)
  214.  
  215. ' file
  216.  
  217. ' definition for error type for ISFileNameVALID
  218. Public Const IFV_ERROR = 0
  219. Public Const IFV_NAME_TOO_LONG = 1
  220. Public Const IFV_EXT_TOO_LONG = 2
  221. Public Const IFV_TOO_MANY_BACKSLASH = 3
  222. Public Const IFV_BAD_DRIVE_LETTER = 4
  223. Public Const IFV_BAD_COLON_POS = 5
  224. Public Const IFV_EXT_WITHOUT_NAME = 6
  225.  
  226. ' definition for sFile attributes
  227. Public Const A_RDONLY = &H1             'Read only file
  228. Public Const A_HIDDEN = &H2             'Hidden file
  229. Public Const A_SYSTEM = &H4             'System file
  230. Public Const A_SUBDIR = &H10            'Subdirectory
  231. Public Const A_ARCHIVE = &H20           'Archive file
  232. Public Const A_NORMAL = &H80            'Normal sFile - No read/write restrictions
  233. Public Const A_COMPRESSED = &H800       'Compressed file
  234. Public Const A_NORMAL_ARCHIVE = &HFE    'Normal, Archive
  235. Public Const A_ALL = &HFF               'Normal, Archive, Read-Only, Hidden, System
  236.  
  237. ' definition for drive type
  238. Public Const DRIVE_UNKNOWN = 0
  239. Public Const DRIVE_NO_ROOT_DIR = 1
  240. Public Const DRIVE_REMOVABLE = 2
  241. Public Const DRIVE_FIXED = 3
  242. Public Const DRIVE_REMOTE = 4
  243. Public Const DRIVE_CDROM = 5
  244. Public Const DRIVE_RAMDISK = 6
  245.  
  246. '  definition for sFile sort
  247. Public Const SORT_ASCENDING = 1
  248. Public Const SORT_DESCENDING = 2
  249. Public Const SORT_CASE_SENSITIVE = 4
  250. Public Const SORT_CASE_INSENSITIVE = 8
  251.  
  252. ' definition for sFile I/O
  253. Public Const EOFILE = -1
  254. Public Const SEEK_CUR = 1
  255. Public Const SEEK_END = 2
  256. Public Const SEEK_SET = 0
  257.  
  258. ' definition for sFile uucp
  259. Public Const MODE_UUENCODE = 0
  260. Public Const MODE_UUDECODE = 1
  261.  
  262. ' definition for FilesCopy
  263. Public Const FC_OVERWRITE_EXISTING = 1
  264. Public Const FC_INCLUDE_SUB_DIRECTORY = 2
  265. Public Const FC_DONT_COPY_EMPTY_DIRECTORY = 4
  266. Public Const FC_DISPLAY_2_LINES = 8
  267.  
  268. ' definition for FilesMove
  269. Public Const FM_REPLACE_EXISTING = 1
  270. Public Const FM_INCLUDE_SUB_DIRECTORY = 2
  271. Public Const FM_DONT_COPY_EMPTY_DIRECTORY = 4
  272. Public Const FM_DISPLAY_2_LINES = 8
  273.  
  274. ' definition for error type for SplitFile
  275. Public Const SPLIT_BAD_PARTSIZE = -1
  276. Public Const SPLIT_BAD_SOURCE_FILENAME = -2
  277. Public Const SPLIT_BAD_TARGET_FILENAME = -3
  278. Public Const SPLIT_CANT_OPEN_SOURCE = -4
  279. Public Const SPLIT_CANT_CREATE_TARGET = -5
  280.  
  281. ' definition for error type for CutFile
  282. Public Const CUT_BAD_POSITION = -1
  283. Public Const CUT_BAD_SOURCE_FILENAME = -2
  284. Public Const CUT_BAD_TARGET1_FILENAME = -3
  285. Public Const CUT_BAD_TARGET2_FILENAME = -4
  286. Public Const CUT_POSITION_TOO_BIG = -5
  287. Public Const CUT_CANT_OPEN_SOURCE = -6
  288. Public Const CUT_CANT_CREATE_TARGET1 = -7
  289. Public Const CUT_CANT_CREATE_TARGET2 = -8
  290.  
  291. ' definition for error type for CopyFilePart
  292. Public Const COPY_BAD_POSITION = -1
  293. Public Const COPY_BAD_SOURCE_FILENAME = -2
  294. Public Const COPY_BAD_TARGET_FILENAME = -3
  295. Public Const COPY_POSITION_TOO_BIG = -4
  296. Public Const COPY_CANT_OPEN_SOURCE = -5
  297. Public Const COPY_CANT_CREATE_TARGET = -6
  298.  
  299. ' definition for error type for GetFileDateTime
  300. Public Const GET_FILE_DT_NO_ERROR = -1
  301. Public Const GET_FILE_DT_CANT_OPEN_FILE = 8
  302. Public Const GET_FILE_DT_CANT_GET_TIME = 9
  303. Public Const GET_FILE_DT_CANT_CNV_CREATION = 1
  304. Public Const GET_FILE_DT_CANT_CNV_LAST_ACCESS = 2
  305. Public Const GET_FILE_DT_CANT_CNV_LAST_WRITE = 4
  306.  
  307. ' definition for error type for SetFileDateTime
  308. Public Const SET_FILE_DT_NO_ERROR = -1
  309. Public Const SET_FILE_DT_CANT_OPEN_FILE = 8
  310. Public Const SET_FILE_DT_CANT_SET_TIME = 9
  311. Public Const SET_FILE_DT_CANT_CNV_CREATION = 1
  312. Public Const SET_FILE_DT_CANT_CNV_LAST_ACCESS = 2
  313. Public Const SET_FILE_DT_CANT_CNV_LAST_WRITE = 4
  314.  
  315. ' definition for error type for FileMergeExt
  316. Public Const FILE_MERGE_NO_ERROR = -1
  317. Public Const FILE_MERGE_EMPTY_TARGET_FILENAME = -2
  318. Public Const FILE_MERGE_EMPTY_BAD_TARGET_FILENAME = -3
  319. Public Const FILE_MERGE_CANT_SET_FILE_BUFFER = -4
  320. Public Const FILE_MERGE_CANT_CREATE_TARGET_FILE = -5
  321. Public Const FILE_MERGE_ERROR_READING_FILE = -6
  322. Public Const FILE_MERGE_ERROR_WRITING_FILE = -7
  323. Public Const FILE_MERGE_ERROR_BAD_WRITE = -8
  324. Public Const FILE_MERGE_BAD_FILE_AT_POSITION = -10
  325.  
  326. ' definition for error type for FileWrapLine
  327.  
  328. Public Const WRAP_SEPARATOR_IS_EMPTY = -1
  329. Public Const WRAP_EOL_IS_EMPTY = -2
  330. Public Const WRAP_BAD_LENGTH_OF_LINE = -3
  331. Public Const WRAP_CANT_INITIALIZE_IN_LINE_BUFFER = -4
  332. Public Const WRAP_CANT_INITIALIZE_OUT_LINE_BUFFER = -5
  333. Public Const WRAP_CANT_INITIALIZE_WORD_BUFFER = -6
  334. Public Const WRAP_CANT_INITIALIZE_BUFFER_1 = -7
  335. Public Const WRAP_CANT_OPEN_SOURCE = -8
  336. Public Const WRAP_CANT_CREATE_TARGET = -9
  337. Public Const WRAP_CANT_READ_LINE = -10
  338. Public Const WRAP_CANT_WRITE_LINE = -11
  339.  
  340. ' structure for sFile attributes
  341. Type FileAttributeType
  342.    ErrNo             As Integer
  343.    Archive           As Integer
  344.    Hidden            As Integer
  345.    Normal            As Integer
  346.    ReadOnly          As Integer
  347.    SubDir            As Integer
  348.    System            As Integer
  349.    Compressed        As Integer
  350. End Type
  351.  
  352. ' structure for split path
  353. Type tagSPLITPATH
  354.    nDrive            As String
  355.    nDir              As String
  356.    nName             As String
  357.    nExt              As String
  358. End Type
  359.  
  360. ' structure for GetFileDateTime & SetFileDateTime
  361. Type tagSYSTEMTIME
  362.    wYear             As Integer
  363.    wMonth            As Integer
  364.    wDayOfWeek        As Integer
  365.    wDay              As Integer
  366.    wHour             As Integer
  367.    wMinute           As Integer
  368.    wSecond           As Integer
  369.    wMilliseconds     As Integer
  370. End Type
  371.  
  372. Declare Function cAllSubDirectories Lib "t2win-32.dll" (ByVal lpBaseDirectory As String, nDir As Long) As String
  373. Declare Function cChDir Lib "t2win-32.dll" (ByVal lpDir As String) As Integer
  374. Declare Function cChDrive Lib "t2win-32.dll" (ByVal lpDrive As String) As Integer
  375. Declare Function cCmpFileAttribute Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Integer
  376. Declare Function cCmpFileContents Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String, ByVal Sensitivity As Integer) As Integer
  377. Declare Function cCmpFileSize Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Integer
  378. Declare Function cCmpFileTime Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Integer
  379. Declare Function cCountDirectories Lib "t2win-32.dll" (ByVal lpFilename As String) As Integer
  380. Declare Function cCountFiles Lib "t2win-32.dll" (ByVal lpFilename As String) As Integer
  381. Declare Function cCutFile Lib "t2win-32.dll" (ByVal SourceFile As String, ByVal TargetFile1 As String, ByVal TargetFile2 As String, ByVal CutPosition As Long) As Long
  382. Declare Function cFileChangeChars Lib "t2win-32.dll" (ByVal nFileName As String, CharSet As String, NewCharSet As String, ByVal nFileTemp As String) As Long
  383. Declare Function cFileCompressTab Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String, ByVal nTab As Long) As Long
  384. Declare Function cFileCopy Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Long
  385. Declare Function cFileCopy2 Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Long
  386. Declare Function cFileDateCreated Lib "t2win-32.dll" (ByVal lpFilename As String) As String
  387. Declare Function cFileDrive Lib "t2win-32.dll" (ByVal lpFilename As String) As String
  388. Declare Function cFileExpandTab Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String, ByVal nTab As Long) As Long
  389. Declare Function cFileFilter Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String, Filter As String) As Long
  390. Declare Function cFileFilterNot Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String, Filter As String) As Long
  391. Declare Function cFileForceCopy Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String, ByVal ForceOrNot As Integer) As Long
  392. Declare Function cFileGetAttrib Lib "t2win-32.dll" (ByVal nFileName As String, nFileAttribute As Any) As Integer
  393. Declare Function cFileLastDateAccess Lib "t2win-32.dll" (ByVal lpFilename As String) As String
  394. Declare Function cFileLastDateModified Lib "t2win-32.dll" (ByVal lpFilename As String) As String
  395. Declare Function cFileLastTimeAccess Lib "t2win-32.dll" (ByVal lpFilename As String) As String
  396. Declare Function cFileLastTimeModified Lib "t2win-32.dll" (ByVal lpFilename As String) As String
  397. Declare Function cFileLineCount Lib "t2win-32.dll" (ByVal lpFilename As String) As Long
  398. Declare Function cFileLineCount2 Lib "t2win-32.dll" (ByVal lpFilename As String) As Long
  399. Declare Function cFileMerge Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String, ByVal FileTo As String) As Long
  400. Declare Function cFileMergeExt Lib "t2win-32.dll" (FileArray() As String, ByVal TargetFile As String) As Long
  401. Declare Function cFileMove Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Long
  402. Declare Function cFilePartAppend Lib "t2win-32.dll" (ByVal SourceFile As String, ByVal TargetFile As String, ByVal Offset As Long, ByVal FirstPart As Integer) As Long
  403. Declare Function cFilePartCopy Lib "t2win-32.dll" (ByVal SourceFile As String, ByVal TargetFile As String, ByVal Offset As Long, ByVal FirstPart As Integer) As Long
  404. Declare Function cFilePathExists Lib "t2win-32.dll" (ByVal lpFilename As String) As Integer
  405. Declare Function cFileResetAllAttrib Lib "t2win-32.dll" (ByVal nFileName As String) As Integer
  406. Declare Function cFileResetArchive Lib "t2win-32.dll" (ByVal nFileName As String) As Integer
  407. Declare Function cFileResetFlag Lib "t2win-32.dll" (ByVal nFileName As String, ByVal nStatus As Integer) As Integer
  408. Declare Function cFileResetHidden Lib "t2win-32.dll" (ByVal nFileName As String) As Integer
  409. Declare Function cFileResetReadOnly Lib "t2win-32.dll" (ByVal nFileName As String) As Integer
  410. Declare Function cFileResetSystem Lib "t2win-32.dll" (ByVal nFileName As String) As Integer
  411. Declare Function cFileScanHeader Lib "t2win-32.dll" (ByVal nFileName As String, ByVal Search As String, ByVal FieldSep As String, StartLine As Long, ByVal Sensitivity As Integer) As String
  412. Declare Function cFileScanHeaderForRecipients Lib "t2win-32.dll" (ByVal nFileName As String, ByVal Search As String, ByVal FieldSep As String, ByVal ExtractOnlyAddress As Integer, ByVal ExtractAddressSep As String, StartLine As Long, ByVal Sensitivity As Integer) As String
  413. Declare Function cFileSearch Lib "t2win-32.dll" (ByVal nFileName As String, ByVal Search As String, ByVal Sensitivity As Integer) As Long
  414. Declare Function cFileSearchAndReplace Lib "t2win-32.dll" (ByVal nFileName As String, ByVal Search As String, ByVal Replace As String, ByVal nFileTemp As String, ByVal Sensitivity As Integer) As Long
  415. Declare Function cFileSearchCount Lib "t2win-32.dll" (ByVal nFileName As String, ByVal Search As String, ByVal Sensitivity As Integer) As Long
  416. Declare Function cFileSearchFromLine Lib "t2win-32.dll" (ByVal nFileName As String, ByVal Search As String, StartLine As Long, ByVal Sensitivity As Integer) As String
  417. Declare Function cFileSearchPatternFromLine Lib "t2win-32.dll" (ByVal nFileName As String, ByVal Search As String, StartLine As Long, ByVal Sensitivity As Integer) As String
  418. Declare Function cFileSetAllAttrib Lib "t2win-32.dll" (ByVal nFileName As String) As Integer
  419. Declare Function cFileSetArchive Lib "t2win-32.dll" (ByVal nFileName As String) As Integer
  420. Declare Function cFileSetAttrib Lib "t2win-32.dll" (ByVal nFileName As String, nFileAttribute As Any) As Integer
  421. Declare Function cFileSetFlag Lib "t2win-32.dll" (ByVal nFileName As String, ByVal nStatus As Integer) As Integer
  422. Declare Function cFileSetHidden Lib "t2win-32.dll" (ByVal nFileName As String) As Integer
  423. Declare Function cFileSetReadOnly Lib "t2win-32.dll" (ByVal nFileName As String) As Integer
  424. Declare Function cFileSetSystem Lib "t2win-32.dll" (ByVal nFileName As String) As Integer
  425. Declare Function cFileSize Lib "t2win-32.dll" (ByVal lpFilename As String) As Long
  426. Declare Function cFileSort Lib "t2win-32.dll" (ByVal FileIn As String, ByVal FileOut As String, ByVal SortMethod As Integer, ByVal RecordLength As Long, ByVal KeyOffset As Long, ByVal KeyLength As Long, rRecords As Long) As Long
  427. Declare Function cFileStatistics Lib "t2win-32.dll" (ByVal nFileName As String, nLines As Long, nWords As Long, nChars As Long) As Long
  428. Declare Function cFileTimeCreated Lib "t2win-32.dll" (ByVal lpFilename As String) As String
  429. Declare Function cFileToLower Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Long
  430. Declare Function cFileToUpper Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Long
  431. Declare Function cFileUUCP Lib "t2win-32.dll" (ByVal lpFilename1 As String, ByVal lpFilename2 As String, ByVal EncodeDecode As Integer, ByVal HeaderOrNot As Integer) As Long
  432. Declare Function cFilesCopy Lib "t2win-32.dll" (ByVal SourcePath As String, ByVal DestinationPath As String, ByVal CopyPattern As String, ByVal Flags As Integer) As Long
  433. Declare Function cFilesCopyExt Lib "t2win-32.dll" (ByVal Obj As Object, ByVal SourcePath As String, ByVal DestinationPath As String, ByVal CopyPattern As String, ByVal Flags As Integer) As Long
  434. Declare Function cFilesInDirOnDisk Lib "t2win-32.dll" (ByVal nFile As String, ByVal nFileName As String, ByVal nAttribute As Integer) As Integer
  435. Declare Function cFilesInDirToArray Lib "t2win-32.dll" (ByVal nFileName As String, ByVal nAttribute As Integer, FileArray() As String) As Integer
  436. Declare Function cFilesInDirectory Lib "t2win-32.dll" (ByVal nFileName As String, ByVal FirstNext As Integer) As String
  437. Declare Function cFilesMove Lib "t2win-32.dll" (ByVal SourcePath As String, ByVal DestinationPath As String, ByVal MovePattern As String, ByVal Flags As Integer) As Long
  438. Declare Function cFilesMoveExt Lib "t2win-32.dll" (ByVal Obj As Object, ByVal SourcePath As String, ByVal DestinationPath As String, ByVal CopyPattern As String, ByVal Flags As Integer) As Long
  439. Declare Function cFilesSize Lib "t2win-32.dll" (ByVal nFileName As String) As Double
  440. Declare Function cFilesSizeOnDisk Lib "t2win-32.dll" (ByVal nFileName As String) As Double
  441. Declare Function cFilesSlack Lib "t2win-32.dll" (ByVal nFileName As String, Size1 As Double, Size2 As Double) As Integer
  442. Declare Function cFileWrapLine Lib "t2win-32.dll" (ByVal sSourceFile As String, ByVal sTargetFile As String, ByVal Length As Long, ByVal Separator As String, ByVal EndOfLine As String) As Long
  443. Declare Function cFullPath Lib "t2win-32.dll" (ByVal nFileName As String) As String
  444. Declare Function cGetDiskClusterSize Lib "t2win-32.dll" (ByVal lpDrive As String) As Double
  445. Declare Function cGetDiskFree Lib "t2win-32.dll" (ByVal lpDrive As String) As Double
  446. Declare Function cGetDiskSpace Lib "t2win-32.dll" (ByVal lpDrive As String) As Double
  447. Declare Function cGetDiskUsed Lib "t2win-32.dll" (ByVal lpDrive As String) As Double
  448. Declare Function cGetDriveType Lib "t2win-32.dll" (ByVal lpDrive As String) As Integer
  449. Declare Function cGetFileDateTime Lib "t2win-32.dll" (ByVal nFileName As String, SysCreation As Any, SysLastAccess As Any, SysLastWrite As Any) As Integer
  450. Declare Function cIsFilenameValid Lib "t2win-32.dll" (ByVal nFileName As String) As Integer
  451. Declare Function cKillDir Lib "t2win-32.dll" (ByVal lpFilename As String) As Integer
  452. Declare Function cKillDirFilesAll Lib "t2win-32.dll" (ByVal lpDir As String, ByVal lpMask As String) As Integer
  453. Declare Function cKillDirs Lib "t2win-32.dll" (ByVal lpDir As String, ByVal HeaderDirectory As Integer) As Integer
  454. Declare Function cKillFile Lib "t2win-32.dll" (ByVal lpFilename As String) As Integer
  455. Declare Function cKillFileAll Lib "t2win-32.dll" (ByVal lpFilename As String) As Integer
  456. Declare Function cKillFiles Lib "t2win-32.dll" (ByVal lpFilename As String) As Integer
  457. Declare Function cKillFilesAll Lib "t2win-32.dll" (ByVal lpFilename As String) As Integer
  458. Declare Function cMakeDir Lib "t2win-32.dll" (ByVal lpFilename As String) As Integer
  459. Declare Function cMakeMultipleDir Lib "t2win-32.dll" (ByVal lpFilename As String) As Integer
  460. Declare Function cMakePath Lib "t2win-32.dll" (ByVal nDrive As String, ByVal nDir As String, ByVal nFileName As String, ByVal Ext As String) As String
  461. Declare Function cRcsCountFileDir Lib "t2win-32.dll" (ByVal FileOrDir As Integer, ByVal FirstFileOrDir As String, ByVal MaskDir As String, ByVal Recurse As Integer) As Long
  462. Declare Function cRcsFilesSize Lib "t2win-32.dll" (ByVal FirstDir As String, ByVal MaskDir As String, ByVal Recurse As Integer) As Double
  463. Declare Function cRcsFilesSizeOnDisk Lib "t2win-32.dll" (ByVal FirstDir As String, ByVal MaskDir As String, ByVal Recurse As Integer) As Double
  464. Declare Function cRcsFilesSlack Lib "t2win-32.dll" (ByVal FirstDir As String, ByVal MaskDir As String, ByVal Recurse As Integer, Size1 As Double, Size2 As Double) As Integer
  465. Declare Function cRenameFile Lib "t2win-32.dll" (ByVal lpFilename1 As String, ByVal lpFilename2 As String) As Integer
  466. Declare Function cSearchDir Lib "t2win-32.dll" (ByVal lpStartPath As String, ByVal lpFileMask As String, ByVal lpFileResult As String) As Long
  467. Declare Function cSearchFile Lib "t2win-32.dll" (ByVal lpStartPath As String, ByVal lpFileMask As String, ByVal lpFileResult As String) As Long
  468. Declare Function cSearchFileAttrib Lib "t2win-32.dll" (ByVal lpStartPath As String, ByVal lpFileMask As String, ByVal iSearchAttribute As Integer, ByVal lpFileResult As String) As Long
  469. Declare Function cSetFileDateTime Lib "t2win-32.dll" (ByVal nFileName As String, SysCreation As Any, SysLastAccess As Any, SysLastWrite As Any) As Integer
  470. Declare Function cSplitFile Lib "t2win-32.dll" (ByVal SourceFile As String, ByVal TargetFiles As String, ByVal PartSize As Long) As Long
  471. Declare Function cSplitPath Lib "t2win-32.dll" (ByVal nFileName As String, SPLITPATH As Any) As Integer
  472. Declare Function cSubDirectory Lib "t2win-32.dll" (ByVal nFileName As String, ByVal FirstNext As Integer) As String
  473. Declare Function cTruncatePath Lib "t2win-32.dll" (ByVal nFileName As String, ByVal NewLength As Long) As String
  474. Declare Function cUniqueFileName Lib "t2win-32.dll" (Text As String) As String
  475. Declare Function cWriteLogFile Lib "t2win-32.dll" (ByVal sSection As String, ByVal sEntry As String, ByVal sLogEntry As String, ByVal sLogFile As String) As Integer
  476.  
  477. ' binary
  478.  
  479. Declare Function cCreateBits Lib "t2win-32.dll" (ByVal nBits As Long) As String
  480. Declare Function cFindBitReset Lib "t2win-32.dll" (Text As String, ByVal Position As Long) As Long
  481. Declare Function cFindBitSet Lib "t2win-32.dll" (Text As String, ByVal Position As Long) As Long
  482. Declare Function cGetBit Lib "t2win-32.dll" (Text As String, ByVal Position As Long) As Integer
  483. Declare Function cGetBitB Lib "t2win-32.dll" (ByVal Value As Byte, ByVal Position As Integer) As Integer
  484. Declare Function cGetBitD Lib "t2win-32.dll" (ByVal Value As Double, ByVal Position As Integer) As Integer
  485. Declare Function cGetBitI Lib "t2win-32.dll" (ByVal Value As Integer, ByVal Position As Integer) As Integer
  486. Declare Function cGetBitL Lib "t2win-32.dll" (ByVal Value As Long, ByVal Position As Integer) As Integer
  487. Declare Function cGetBitS Lib "t2win-32.dll" (ByVal Value As Single, ByVal Position As Integer) As Integer
  488. Declare Function cGetBitB2 Lib "t2win-32.dll" (ByVal Value As Byte, ByVal Position As Integer) As Integer
  489. Declare Function cGetBitI2 Lib "t2win-32.dll" (ByVal Value As Integer, ByVal Position As Integer) As Integer
  490. Declare Function cGetBitL2 Lib "t2win-32.dll" (ByVal Value As Long, ByVal Position As Integer) As Integer
  491. Declare Function cGiveBitPalindrome Lib "t2win-32.dll" () As String
  492. Declare Function cIsBitPalindrome Lib "t2win-32.dll" (Text As String) As Integer
  493. Declare Sub cReverseAllBits Lib "t2win-32.dll" (Text As String)
  494. Declare Sub cReverseAllBitsByChar Lib "t2win-32.dll" (Text As String)
  495. Declare Sub cSetAllBits Lib "t2win-32.dll" (Text As String, ByVal Value As Integer)
  496. Declare Sub cSetBit Lib "t2win-32.dll" (Text As String, ByVal Position As Long, ByVal Value As Integer)
  497. Declare Sub cSetBitToFalse Lib "t2win-32.dll" (Text As String, ByVal Position As Long)
  498. Declare Sub cSetBitToTrue Lib "t2win-32.dll" (Text As String, ByVal Position As Long)
  499. Declare Sub cSetBitB Lib "t2win-32.dll" (Value As Byte, ByVal Position As Integer, ByVal BitValue As Integer)
  500. Declare Sub cSetBitD Lib "t2win-32.dll" (Value As Double, ByVal Position As Integer, ByVal BitValue As Integer)
  501. Declare Sub cSetBitI Lib "t2win-32.dll" (Value As Integer, ByVal Position As Integer, ByVal BitValue As Integer)
  502. Declare Sub cSetBitL Lib "t2win-32.dll" (Value As Long, ByVal Position As Integer, ByVal BitValue As Integer)
  503. Declare Sub cSetBitS Lib "t2win-32.dll" (Value As Single, ByVal Position As Integer, ByVal BitValue As Integer)
  504. Declare Sub cSetBitB2 Lib "t2win-32.dll" (Value As Byte, ByVal Position As Integer, ByVal BitValue As Integer)
  505. Declare Sub cSetBitI2 Lib "t2win-32.dll" (Value As Integer, ByVal Position As Integer, ByVal BitValue As Integer)
  506. Declare Sub cSetBitL2 Lib "t2win-32.dll" (Value As Long, ByVal Position As Integer, ByVal BitValue As Integer)
  507. Declare Sub cToggleAllBits Lib "t2win-32.dll" (Text As String)
  508. Declare Sub cToggleBit Lib "t2win-32.dll" (Text As String, ByVal Position As Long)
  509. Declare Function cB2I Lib "t2win-32.dll" (ByVal Text As String) As Integer
  510. Declare Function cB2L Lib "t2win-32.dll" (ByVal Text As String) As Long
  511. Declare Function cI2B Lib "t2win-32.dll" (ByVal Value As Integer) As String
  512. Declare Function cI2Bext Lib "t2win-32.dll" (ByVal Value As Integer, Bin As String) As String
  513. Declare Function cL2B Lib "t2win-32.dll" (ByVal Value As Long) As String
  514. Declare Function cL2Bext Lib "t2win-32.dll" (ByVal Value As Long, Bin As String) As String
  515. Declare Function cFromBinary Lib "t2win-32.dll" (Text As String) As String
  516. Declare Function cFromBinary2 Lib "t2win-32.dll" (Text As String, Bin As String) As String
  517. Declare Function cToBinary Lib "t2win-32.dll" (Text As String) As String
  518. Declare Function cToBinary2 Lib "t2win-32.dll" (Text As String, Bin As String) As String
  519.  
  520. ' compress
  521.  
  522. Public Const CMPEXP_FILEIN_CANT_BE_NULL = -1
  523. Public Const CMPEXP_FILEOUT_CANT_BE_NULL = -2
  524. Public Const CMPEXP_FILEIN_AND_FILEOUT_CANT_BE_THE_SAME = -3
  525. Public Const CMPEXP_FILEIN_CANT_BE_OPENED = -4
  526. Public Const CMPEXP_FILEOUT_CANT_BE_CREATED = -5
  527. Public Const CMPEXP_COMPRESS_OR_EXPAND_ERROR = -6
  528. Public Const CMPEXP_CANT_GET_FILEOUT_SIZE = -7
  529.  
  530. Declare Function cASHFileCompress Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String, ByVal order As Integer) As Long
  531. Declare Function cASHFileExpand Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String, ByVal order As Integer) As Long
  532. Declare Function cFileCompress Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Long
  533. Declare Function cFileExpand Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Long
  534. Declare Function cGZIPFileCompress Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Long
  535. Declare Function cGZIPFileExpand Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Long
  536. Declare Function cGZIPStringCompress Lib "t2win-32.dll" (Text As String) As String
  537. Declare Function cGZIPStringExpand Lib "t2win-32.dll" (Text As String) As String
  538. Declare Function cLZARIcompress Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Long
  539. Declare Function cLZARIexpand Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Long
  540. Declare Function cStringCompress Lib "t2win-32.dll" (Text As String) As String
  541. Declare Function cStringExpand Lib "t2win-32.dll" (Text As String) As String
  542.  
  543. ' timer
  544.  
  545. Declare Function cCheckWait Lib "t2win-32.dll" (ByVal nTimer As Integer) As Integer
  546. Declare Function cReadBasisTimer Lib "t2win-32.dll" () As Long
  547. Declare Function cReadTimer Lib "t2win-32.dll" (ByVal nTimer As Integer) As Long
  548. Declare Sub cSetWait Lib "t2win-32.dll" (ByVal nTimer As Integer, ByVal nValue As Long)
  549. Declare Function cSleep Lib "t2win-32.dll" (ByVal delay As Long) As Integer
  550. Declare Sub cStartBasisTimer Lib "t2win-32.dll" ()
  551. Declare Sub cStartTimer Lib "t2win-32.dll" (ByVal nTimer As Integer)
  552. Declare Sub cStartWait Lib "t2win-32.dll" (ByVal nTimer As Integer)
  553. Declare Sub cStopBasisTimer Lib "t2win-32.dll" ()
  554. Declare Function cStopTimer Lib "t2win-32.dll" (ByVal nTimer As Integer) As Long
  555. Declare Function cTimerClose Lib "t2win-32.dll" (ByVal TimerHandle As Integer) As Integer
  556. Declare Function cTimerOpen Lib "t2win-32.dll" () As Integer
  557. Declare Function cTimerRead Lib "t2win-32.dll" (ByVal TimerHandle As Integer) As Long
  558. Declare Function cTimerStart Lib "t2win-32.dll" (ByVal TimerHandle As Integer) As Integer
  559.  
  560. ' array
  561.  
  562. '  definition for array on disk
  563. Public Const PUT_ARRAY_ON_DISK = 0
  564. Public Const GET_ARRAY_ON_DISK = 1
  565.  
  566. '  definition for SortTypedArray
  567. '   success/error code
  568. Public Const ERR_STA_NO_ERROR = -1
  569. Public Const ERR_STA_NO_ITEMS_TO_SORT = 0
  570.  
  571. '   standard data type
  572. Public Const STA_BOOLEAN = 1                                   ' internal size = 2
  573. Public Const STA_BYTE = 2                                      ' internal size = 1
  574. Public Const STA_INTEGER = 3                                   ' internal size = 2
  575. Public Const STA_LONG = 4                                      ' internal size = 4
  576. Public Const STA_SINGLE = 5                                    ' internal size = 4
  577. Public Const STA_DOUBLE = 6                                    ' internal size = 8
  578. Public Const STA_CURRENCY = 7                                  ' internal size = 8
  579. Public Const STA_DATE = 8                                      ' internal size = 8
  580. Public Const STA_FIXSTRING_CI = 9                              ' internal size = * : fixed string length (case insensitive)
  581. Public Const STA_FIXSTRING_CS = 10                             ' internal size = * : fixed string length (case sensitive)
  582. Public Const STA_VARSTRING_CI = 11                             ' internal size = 4 : variable string length (case insensitive)
  583. Public Const STA_VARSTRING_CS = 12                             ' internal size = 4 : variable string length (case sensitive)
  584. Public Const STA_FIXSTRING_NUMBER = 13                         ' internal size = * : fixed string length (only number)
  585. Public Const STA_VARSTRING_NUMBER = 14                         ' internal size = 4 : variable string length (only number)
  586.  
  587. '   variant data type
  588. Public Const STA_VT_BOOLEAN = -STA_BOOLEAN                     ' internal size = 16
  589. Public Const STA_VT_BYTE = -STA_BYTE                           ' internal size = 16
  590. Public Const STA_VT_INTEGER = -STA_INTEGER                     ' internal size = 16
  591. Public Const STA_VT_LONG = -STA_LONG                           ' internal size = 16
  592. Public Const STA_VT_SINGLE = -STA_SINGLE                       ' internal size = 16
  593. Public Const STA_VT_DOUBLE = -STA_DOUBLE                       ' internal size = 16
  594. Public Const STA_VT_CURRENCY = -STA_CURRENCY                   ' internal size = 16
  595. Public Const STA_VT_DATE = -STA_DATE                           ' internal size = 16
  596. Public Const STA_VT_FIXSTRING_CI = -STA_VARSTRING_CI           ' internal size = 16
  597. Public Const STA_VT_FIXSTRING_CS = -STA_VARSTRING_CS           ' internal size = 16
  598. Public Const STA_VT_VARSTRING_CI = -STA_VARSTRING_CI           ' internal size = 16
  599. Public Const STA_VT_VARSTRING_CS = -STA_VARSTRING_CS           ' internal size = 16
  600. Public Const STA_VT_FIXSTRING_NUMBER = -STA_VARSTRING_NUMBER   ' internal size = 16
  601. Public Const STA_VT_VARSTRING_NUMBER = -STA_VARSTRING_NUMBER   ' internal size = 16
  602.  
  603. '  structure for VB array
  604. Type ArrayType
  605.    Bounds               As Long
  606.    LBound               As Integer
  607.    UBound               As Integer
  608.    ElemSize             As Integer
  609.    IndexCount           As Integer
  610.    TotalElem            As Integer
  611. End Type
  612.  
  613. '  structure for SortTypedArray
  614. Type tagCONFIGARRAY
  615.    RecordLength         As Long     ' internal use
  616.    ActualKey            As Integer  ' internal use
  617.    PreviousKey          As Integer  ' internal use
  618.    KeyOffset(1 To 10)   As Integer  ' 0 is the higher key, 10 is the lower key
  619.    KeyLength(1 To 10)   As Integer  ' length of the key (only for fixed string)
  620.    KeyType(1 To 10)     As Integer  ' type of the key (see standard/variant data type)
  621.    KeyOrder(1 To 10)    As Integer  ' -1 is reverse order, 0 is not used, 1 is ascending order
  622. End Type
  623.  
  624. Declare Function cAddD Lib "t2win-32.dll" (Darray() As Double, ByVal nValue As Double) As Integer
  625. Declare Function cAddI Lib "t2win-32.dll" (Iarray() As Integer, ByVal nValue As Integer) As Integer
  626. Declare Function cAddL Lib "t2win-32.dll" (Larray() As Long, ByVal nValue As Long) As Integer
  627. Declare Function cAddS Lib "t2win-32.dll" (Sarray() As Single, ByVal nValue As Single) As Integer
  628. Declare Function cArrayLookUp Lib "t2win-32.dll" (Strarray() As String, ByVal Value As String, ByVal Sensitivity As Integer) As String
  629. Declare Function cArrayOnDisk Lib "t2win-32.dll" (ByVal sFile As String, Tarray() As Any, ByVal GetPut As Integer) As Long
  630. Declare Function cArrayPrm Lib "t2win-32.dll" (Tarray() As Any, nArray As ArrayType) As Integer
  631. Declare Function cArrayStringOnDisk Lib "t2win-32.dll" (ByVal sFile As String, Strarray() As String, ByVal GetPut As Integer, rRecords As Long) As Long
  632. Declare Function cCountD Lib "t2win-32.dll" (Darray() As Double, ByVal Value As Double) As Long
  633. Declare Function cCountI Lib "t2win-32.dll" (Iarray() As Integer, ByVal Value As Integer) As Long
  634. Declare Function cCountL Lib "t2win-32.dll" (Larray() As Long, ByVal Value As Long) As Long
  635. Declare Function cCountS Lib "t2win-32.dll" (Sarray() As Single, ByVal Value As Single) As Long
  636. Declare Function cDeviationD Lib "t2win-32.dll" (Darray() As Double) As Double
  637. Declare Function cDeviationI Lib "t2win-32.dll" (Iarray() As Integer) As Double
  638. Declare Function cDeviationL Lib "t2win-32.dll" (Larray() As Long) As Double
  639. Declare Function cDeviationS Lib "t2win-32.dll" (Sarray() As Single) As Double
  640. Declare Function cFillD Lib "t2win-32.dll" (Darray() As Double, ByVal nValue As Double) As Integer
  641. Declare Function cFillI Lib "t2win-32.dll" (Iarray() As Integer, ByVal nValue As Integer) As Integer
  642. Declare Function cFillL Lib "t2win-32.dll" (Larray() As Long, ByVal nValue As Long) As Integer
  643. Declare Function cFillS Lib "t2win-32.dll" (Sarray() As Single, ByVal nValue As Single) As Integer
  644. Declare Function cFillIncrD Lib "t2win-32.dll" (Darray() As Double, ByVal nValue As Double, ByVal Increment As Double) As Integer
  645. Declare Function cFillIncrI Lib "t2win-32.dll" (Iarray() As Integer, ByVal nValue As Integer, ByVal Increment As Integer) As Integer
  646. Declare Function cFillIncrL Lib "t2win-32.dll" (Larray() As Long, ByVal nValue As Long, ByVal Increment As Long) As Integer
  647. Declare Function cFillIncrS Lib "t2win-32.dll" (Sarray() As Single, ByVal nValue As Single, ByVal Increment As Single) As Integer
  648. Declare Function cMaxD Lib "t2win-32.dll" (Darray() As Double) As Double
  649. Declare Function cMaxI Lib "t2win-32.dll" (Iarray() As Integer) As Integer
  650. Declare Function cMaxL Lib "t2win-32.dll" (Larray() As Long) As Long
  651. Declare Function cMaxS Lib "t2win-32.dll" (Sarray() As Single) As Single
  652. Declare Function cMaxNotXD Lib "t2win-32.dll" (Darray() As Double, ByVal ValueNotToReturn As Double) As Double
  653. Declare Function cMaxNotXI Lib "t2win-32.dll" (Iarray() As Integer, ByVal ValueNotToReturn As Integer) As Integer
  654. Declare Function cMaxNotXL Lib "t2win-32.dll" (Larray() As Long, ByVal ValueNotToReturn As Long) As Long
  655. Declare Function cMaxNotXS Lib "t2win-32.dll" (Sarray() As Single, ByVal ValueNotToReturn As Single) As Single
  656. Declare Function cMeanD Lib "t2win-32.dll" (Darray() As Double) As Double
  657. Declare Function cMeanI Lib "t2win-32.dll" (Iarray() As Integer) As Double
  658. Declare Function cMeanL Lib "t2win-32.dll" (Larray() As Long) As Double
  659. Declare Function cMeanS Lib "t2win-32.dll" (Sarray() As Single) As Double
  660. Declare Function cMinD Lib "t2win-32.dll" (Darray() As Double) As Double
  661. Declare Function cMinI Lib "t2win-32.dll" (Iarray() As Integer) As Integer
  662. Declare Function cMinL Lib "t2win-32.dll" (Larray() As Long) As Long
  663. Declare Function cMinS Lib "t2win-32.dll" (Sarray() As Single) As Single
  664. Declare Function cMinNotXD Lib "t2win-32.dll" (Darray() As Double, ByVal ValueNotToReturn As Double) As Double
  665. Declare Function cMinNotXI Lib "t2win-32.dll" (Iarray() As Integer, ByVal ValueNotToReturn As Integer) As Integer
  666. Declare Function cMinNotXL Lib "t2win-32.dll" (Larray() As Long, ByVal ValueNotToReturn As Long) As Long
  667. Declare Function cMinNotXS Lib "t2win-32.dll" (Sarray() As Single, ByVal ValueNotToReturn As Single) As Single
  668. Declare Function cReverseSortD Lib "t2win-32.dll" (Darray() As Double) As Integer
  669. Declare Function cReverseSortI Lib "t2win-32.dll" (Iarray() As Integer) As Integer
  670. Declare Function cReverseSortL Lib "t2win-32.dll" (Larray() As Long) As Integer
  671. Declare Function cReverseSortS Lib "t2win-32.dll" (Sarray() As Single) As Integer
  672. Declare Function cRmvDupD Lib "t2win-32.dll" (Darray() As Double, ByVal UseFileTemp As Integer, ByVal FileTemp As String, ByVal AutomaticResize As Integer) As Long
  673. Declare Function cRmvDupI Lib "t2win-32.dll" (Iarray() As Integer, ByVal UseFileTemp As Integer, ByVal FileTemp As String, ByVal AutomaticResize As Integer) As Long
  674. Declare Function cRmvDupL Lib "t2win-32.dll" (Larray() As Long, ByVal UseFileTemp As Integer, ByVal FileTemp As String, ByVal AutomaticResize As Integer) As Long
  675. Declare Function cRmvDupS Lib "t2win-32.dll" (Sarray() As Single, ByVal UseFileTemp As Integer, ByVal FileTemp As String, ByVal AutomaticResize As Integer) As Long
  676. Declare Function cSearchD Lib "t2win-32.dll" (Darray() As Double, ByVal Value As Double) As Long
  677. Declare Function cSearchI Lib "t2win-32.dll" (Iarray() As Integer, ByVal Value As Integer) As Long
  678. Declare Function cSearchL Lib "t2win-32.dll" (Larray() As Long, ByVal Value As Long) As Long
  679. Declare Function cSearchS Lib "t2win-32.dll" (Sarray() As Single, ByVal Value As Single) As Long
  680. Declare Function cSearchStr Lib "t2win-32.dll" (Strarray() As String, ByVal Value As String, ByVal Sensitivity As Integer) As Long
  681. Declare Function cSetD Lib "t2win-32.dll" (Darray() As Double, ByVal nValue As Double) As Integer
  682. Declare Function cSetI Lib "t2win-32.dll" (Iarray() As Integer, ByVal nValue As Integer) As Integer
  683. Declare Function cSetL Lib "t2win-32.dll" (Larray() As Long, ByVal nValue As Long) As Integer
  684. Declare Function cSetS Lib "t2win-32.dll" (Sarray() As Single, ByVal nValue As Single) As Integer
  685. Declare Function cShiftLeftB Lib "t2win-32.dll" (Barray() As Byte, ByVal nValue As Byte) As Integer
  686. Declare Function cShiftLeftD Lib "t2win-32.dll" (Darray() As Double, ByVal nValue As Double) As Integer
  687. Declare Function cShiftLeftI Lib "t2win-32.dll" (Iarray() As Integer, ByVal nValue As Integer) As Integer
  688. Declare Function cShiftLeftL Lib "t2win-32.dll" (Larray() As Long, ByVal nValue As Long) As Integer
  689. Declare Function cShiftLeftS Lib "t2win-32.dll" (Sarray() As Single, ByVal nValue As Single) As Integer
  690. Declare Function cShiftRightB Lib "t2win-32.dll" (Barray() As Byte, ByVal nValue As Byte) As Integer
  691. Declare Function cShiftRightD Lib "t2win-32.dll" (Darray() As Double, ByVal nValue As Double) As Integer
  692. Declare Function cShiftRightI Lib "t2win-32.dll" (Iarray() As Integer, ByVal nValue As Integer) As Integer
  693. Declare Function cShiftRightL Lib "t2win-32.dll" (Larray() As Long, ByVal nValue As Long) As Integer
  694. Declare Function cShiftRightS Lib "t2win-32.dll" (Sarray() As Single, ByVal nValue As Single) As Integer
  695. Declare Function cSortD Lib "t2win-32.dll" (Darray() As Double) As Integer
  696. Declare Function cSortI Lib "t2win-32.dll" (Iarray() As Integer) As Integer
  697. Declare Function cSortL Lib "t2win-32.dll" (Larray() As Long) As Integer
  698. Declare Function cSortS Lib "t2win-32.dll" (Sarray() As Single) As Integer
  699. Declare Function cSumD Lib "t2win-32.dll" (Darray() As Double) As Double
  700. Declare Function cSumI Lib "t2win-32.dll" (Iarray() As Integer) As Double
  701. Declare Function cSumL Lib "t2win-32.dll" (Larray() As Long) As Double
  702. Declare Function cSumS Lib "t2win-32.dll" (Sarray() As Single) As Double
  703. Declare Function cSortTypedArray Lib "t2win-32.dll" (TypedArray() As Any, ConfigArray As tagCONFIGARRAY) As Integer
  704.  
  705. ' ieeenum
  706.  
  707. Declare Function cCVB Lib "t2win-32.dll" (Value As String) As Byte
  708. Declare Function cCVC Lib "t2win-32.dll" (Value As String) As Currency
  709. Declare Function cCVD Lib "t2win-32.dll" (Value As String) As Double
  710. Declare Function cCVI Lib "t2win-32.dll" (Value As String) As Integer
  711. Declare Function cCVL Lib "t2win-32.dll" (Value As String) As Long
  712. Declare Function cCVS Lib "t2win-32.dll" (Value As String) As Single
  713. Declare Function cCVSMBF Lib "t2win-32.dll" (Value As String) As Single
  714. Declare Function cGetCVB Lib "t2win-32.dll" (Value As String, ByVal iPosition As Integer) As Byte
  715. Declare Function cGetCVC Lib "t2win-32.dll" (Value As String, ByVal iPosition As Integer) As Currency
  716. Declare Function cGetCVD Lib "t2win-32.dll" (Value As String, ByVal iPosition As Integer) As Double
  717. Declare Function cGetCVI Lib "t2win-32.dll" (Value As String, ByVal iPosition As Integer) As Integer
  718. Declare Function cGetCVL Lib "t2win-32.dll" (Value As String, ByVal iPosition As Integer) As Long
  719. Declare Function cGetCVS Lib "t2win-32.dll" (Value As String, ByVal iPosition As Integer) As Single
  720. Declare Function cMKB Lib "t2win-32.dll" (ByVal Value As Byte) As String
  721. Declare Function cMKC Lib "t2win-32.dll" (ByVal Value As Currency) As String
  722. Declare Function cMKD Lib "t2win-32.dll" (ByVal Value As Double) As String
  723. Declare Function cMKI Lib "t2win-32.dll" (ByVal Value As Integer) As String
  724. Declare Function cMKL Lib "t2win-32.dll" (ByVal Value As Long) As String
  725. Declare Function cMKN Lib "t2win-32.dll" (ByVal Value As String) As String
  726. Declare Function cMKS Lib "t2win-32.dll" (ByVal Value As Single) As String
  727. Declare Function cMKSMBF Lib "t2win-32.dll" (ByVal Value As Single) As String
  728. Declare Sub cPutMKB Lib "t2win-32.dll" (Value As String, ByVal iPosition As Integer, ByVal bValue As Byte)
  729. Declare Sub cPutMKC Lib "t2win-32.dll" (Value As String, ByVal iPosition As Integer, ByVal cValue As Currency)
  730. Declare Sub cPutMKD Lib "t2win-32.dll" (Value As String, ByVal iPosition As Integer, ByVal dValue As Double)
  731. Declare Sub cPutMKI Lib "t2win-32.dll" (Value As String, ByVal iPosition As Integer, ByVal iValue As Integer)
  732. Declare Sub cPutMKL Lib "t2win-32.dll" (Value As String, ByVal iPosition As Integer, ByVal lvalue As Long)
  733. Declare Sub cPutMKS Lib "t2win-32.dll" (Value As String, ByVal iPosition As Integer, ByVal sValue As Single)
  734. Declare Function cPutMKBs Lib "t2win-32.dll" (Value As String, ByVal iPosition As Integer, ByVal bValue As Byte) As String
  735. Declare Function cPutMKCs Lib "t2win-32.dll" (Value As String, ByVal iPosition As Integer, ByVal cValue As Currency) As String
  736. Declare Function cPutMKDs Lib "t2win-32.dll" (Value As String, ByVal iPosition As Integer, ByVal dValue As Double) As String
  737. Declare Function cPutMKIs Lib "t2win-32.dll" (Value As String, ByVal iPosition As Integer, ByVal iValue As Integer) As String
  738. Declare Function cPutMKLs Lib "t2win-32.dll" (Value As String, ByVal iPosition As Integer, ByVal lvalue As Long) As String
  739. Declare Function cPutMKSs Lib "t2win-32.dll" (Value As String, ByVal iPosition As Integer, ByVal sValue As Single) As String
  740.  
  741. ' disk array
  742.  
  743. '  structure for disk array
  744. Type tagDISKARRAY
  745.    daSize            As Integer           'size of the type'd
  746.    signature         As String * 7        'signature
  747.    nFileName         As String * 128      'name of the file
  748.    nType             As Integer           'variable type
  749.    nRows             As Long              'number of rows
  750.    nCols             As Long              'number of cols
  751.    nSheets           As Long              'number of sheets
  752.    rHandle           As Long              'returned handle for use with other functions
  753.    rElementSize      As Long              'returned size of a element
  754.    rFileSize         As Long              'returned size of the file
  755.    rParts            As Long              'returned total part
  756.    rRemain           As Long              'returned size of the remain part
  757.    rSheetSize        As Long              'size of a sheet
  758.    rOffset1          As Long              'returned offset 1
  759.    rOffset2          As Long              'returned offset 2
  760.    rTime             As Long              'time for the last correct transaction
  761.    nIsTyped          As Integer           'is nType a type'd variable
  762.    Dummy             As String * 7        'reserved for future use
  763. End Type
  764.  
  765. '  definition for variable type in DISK ARRAY
  766. Public Const DA_TYPE = 0
  767. Public Const DA_BYTE = -1
  768. Public Const DA_INTEGER = -2
  769. Public Const DA_LONG = -3
  770. Public Const DA_SINGLE = -4
  771. Public Const DA_DOUBLE = -5
  772. Public Const DA_CURRENCY = -6
  773.  
  774. '  definition for error type in DISK ARRAY
  775. Public Const DA_NO_ERROR = True
  776. Public Const DA_EMPTY_FILENAME = 1
  777. Public Const DA_BAD_FILENAME = 2
  778. Public Const DA_CAN_KILL_FILE = 3
  779. Public Const DA_CAN_NOT_OPEN_FILE = 4
  780. Public Const DA_FILE_NOT_FOUND = 5
  781. Public Const DA_BAD_TYPE = 6
  782. Public Const DA_BAD_ROWS = 7
  783. Public Const DA_BAD_COLS = 8
  784. Public Const DA_BAD_SHEETS = 9
  785. Public Const DA_CAN_NOT_WRITE_HEADER = 10
  786. Public Const DA_CAN_NOT_WRITE_PART = 11
  787. Public Const DA_CAN_NOT_WRITE_REMAIN = 12
  788. Public Const DA_CAN_NOT_READ_HEADER = 13
  789. Public Const DA_HEADER_SIZE = 14
  790. Public Const DA_BAD_SIGNATURE = 15
  791. Public Const DA_FILE_SIZE_MISMATCH = 16
  792. Public Const DA_CAN_NOT_SEEK = 17
  793. Public Const DA_INVALID_HANDLE = 18
  794. Public Const DA_CAN_NOT_READ_PART = 19
  795. Public Const DA_CAN_NOT_READ_REMAIN = 20
  796.  
  797. Declare Function cDAClear Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY) As Integer
  798. Declare Function cDAClearCol Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Col As Long, ByVal sheet As Long) As Integer
  799. Declare Function cDAClearRow Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Row As Long, ByVal sheet As Long) As Integer
  800. Declare Function cDAClearSheet Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal sheet As Long) As Integer
  801. Declare Sub cDAClose Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal DeleteFile As Integer)
  802. Declare Function cDACreate Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal CreateOrUse As Integer) As Integer
  803. Declare Function cDAGet Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Row As Long, ByVal Col As Long, ByVal sheet As Long) As Variant
  804. Declare Sub cDAGetType Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Row As Long, ByVal Col As Long, ByVal sheet As Long, nType As Any)
  805. Declare Sub cDAPut Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Row As Long, ByVal Col As Long, ByVal sheet As Long, Var As Variant)
  806. Declare Sub cDAPutType Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Row As Long, ByVal Col As Long, ByVal sheet As Long, nType As Any)
  807. Declare Sub cDArGet Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Col As Long, Var As Variant)
  808. Declare Sub cDArGetType Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Col As Long, nType As Any)
  809. Declare Sub cDArPut Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Col As Long, Var As Variant)
  810. Declare Sub cDArPutType Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Col As Long, nType As Any)
  811. Declare Function cDAsClearCol Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Col As Long) As Integer
  812. Declare Function cDAsClearRow Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Row As Long) As Integer
  813. Declare Sub cDAsGet Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Row As Long, ByVal Col As Long, Var As Variant)
  814. Declare Sub cDAsGetType Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Row As Long, ByVal Col As Long, nType As Any)
  815. Declare Sub cDAsPut Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Row As Long, ByVal Col As Long, Var As Variant)
  816. Declare Sub cDAsPutType Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Row As Long, ByVal Col As Long, nType As Any)
  817.  
  818. ' huge memory array
  819.  
  820. '  structure for huge memory array
  821. Type tagHMA
  822.    daSize            As Integer           'size of the type'd
  823.    nType             As Integer           'variable type
  824.    nRows             As Long              'number of rows
  825.    nCols             As Long              'number of cols
  826.    nSheets           As Long              'number of sheets
  827.    rHandle           As Long              'returned handle for use with other functions
  828.    rElementSize      As Long              'returned size of a element
  829.    rMemorySize       As Long              'returned size of the memory used
  830.    rParts            As Long              'returned total part
  831.    rRemain           As Long              'returned size of the remain part
  832.    rSheetSize        As Long              'size of a sheet
  833.    rOffset           As Long              'returned offset
  834.    nIsTyped          As Integer           'is nType a type'd variable
  835.    Dummy             As String * 20       'reserved for future use
  836. End Type
  837.  
  838. '  definition for variable type in HUGE MEMORY ARRAY
  839. Public Const HMA_TYPE = 0
  840. Public Const HMA_BYTE = -1
  841. Public Const HMA_INTEGER = -2
  842. Public Const HMA_LONG = -3
  843. Public Const HMA_SINGLE = -4
  844. Public Const HMA_DOUBLE = -5
  845. Public Const HMA_CURRENCY = -6
  846.  
  847. '  definition for error type in HUGE MEMORY ARRAY
  848. Public Const HMA_NO_ERROR = True
  849. Public Const HMA_NO_MEMORY = 1
  850. Public Const HMA_BAD_TYPE = 2
  851. Public Const HMA_BAD_ROWS = 3
  852. Public Const HMA_BAD_COLS = 4
  853. Public Const HMA_BAD_SHEETS = 5
  854. Public Const HMA_INVALID_HANDLE = 6
  855.  
  856. Declare Function cHMAClear Lib "t2win-32.dll" (HMA As tagHMA) As Integer
  857. Declare Function cHMAClearCol Lib "t2win-32.dll" (HMA As tagHMA, ByVal Col As Long, ByVal sheet As Long) As Integer
  858. Declare Function cHMAClearRow Lib "t2win-32.dll" (HMA As tagHMA, ByVal Row As Long, ByVal sheet As Long) As Integer
  859. Declare Function cHMAClearSheet Lib "t2win-32.dll" (HMA As tagHMA, ByVal sheet As Long) As Integer
  860. Declare Function cHMACreate Lib "t2win-32.dll" (HMA As tagHMA) As Integer
  861. Declare Function cHMAFree Lib "t2win-32.dll" (HMA As tagHMA) As Integer
  862. Declare Function cHMAGet Lib "t2win-32.dll" (HMA As tagHMA, ByVal Row As Long, ByVal Col As Long, ByVal sheet As Long) As Variant
  863. Declare Sub cHMAGetType Lib "t2win-32.dll" (HMA As tagHMA, ByVal Row As Long, ByVal Col As Long, ByVal sheet As Long, nType As Any)
  864. Declare Sub cHMAPut Lib "t2win-32.dll" (HMA As tagHMA, ByVal Row As Long, ByVal Col As Long, ByVal sheet As Long, Var As Variant)
  865. Declare Sub cHMAPutType Lib "t2win-32.dll" (HMA As tagHMA, ByVal Row As Long, ByVal Col As Long, ByVal sheet As Long, nType As Any)
  866. Declare Sub cHMArGet Lib "t2win-32.dll" (HMA As tagHMA, ByVal Col As Long, Var As Variant)
  867. Declare Sub cHMArGetType Lib "t2win-32.dll" (HMA As tagHMA, ByVal Col As Long, nType As Any)
  868. Declare Sub cHMArPut Lib "t2win-32.dll" (HMA As tagHMA, ByVal Col As Long, Var As Variant)
  869. Declare Sub cHMArPutType Lib "t2win-32.dll" (HMA As tagHMA, ByVal Col As Long, nType As Any)
  870. Declare Sub cHMAsGet Lib "t2win-32.dll" (HMA As tagHMA, ByVal Row As Long, ByVal Col As Long, Var As Variant)
  871. Declare Sub cHMAsGetType Lib "t2win-32.dll" (HMA As tagHMA, ByVal Row As Long, ByVal Col As Long, nType As Any)
  872. Declare Sub cHMAsPut Lib "t2win-32.dll" (HMA As tagHMA, ByVal Row As Long, ByVal Col As Long, Var As Variant)
  873. Declare Sub cHMAsPutType Lib "t2win-32.dll" (HMA As tagHMA, ByVal Row As Long, ByVal Col As Long, nType As Any)
  874. Declare Function cHMAsClearCol Lib "t2win-32.dll" (HMA As tagHMA, ByVal Col As Long) As Integer
  875. Declare Function cHMAsClearRow Lib "t2win-32.dll" (HMA As tagHMA, ByVal Row As Long) As Integer
  876. Declare Function cHMAOnDisk Lib "t2win-32.dll" (HMA As tagHMA, ByVal hsFile As String, ByVal hsGetPut As Integer) As Long
  877.  
  878. '  structure for multiple disk array
  879. Type tagMULTIPLEDISKARRAY
  880.    daSize               As Integer        'size of the structure
  881.    signature            As String * 7     'signature
  882.    nFileName            As String * 128   'name of the file
  883.    nType(1 To 20)       As Integer        'standard variable type (for 20 arrays)
  884.    nIsTyped(1 To 20)    As Integer        'is a type'd (for 20 arrays)
  885.    nRows(1 To 20)       As Long           'number of rows (for 20 arrays)
  886.    nCols(1 To 20)       As Long           'number of cols (for 20 arrays)
  887.    nSheets(1 To 20)     As Long           'number of sheets (for 20 arrays)
  888.    rHandle              As Long           'returned handle for use with other functions
  889.    rFileSize            As Long           'returned size of the file
  890.    rElementSz(1 To 20)  As Long           'returned size of a element (for 20 arrays)
  891.    rSheetSz(1 To 20)    As Long           'size of a sheet (for 20 arrays)
  892.    rOffsetPos(1 To 20)  As Long           'position of each array in the sFile (for 20 arrays)
  893.    rOffset1             As Long           'returned offset 1
  894.    rOffset2             As Long           'returned offset 2
  895.    rTime                As Long           'time for the last correct transaction
  896.    Dummy                As String * 28    'reserved for future use
  897. End Type
  898.  
  899. '  definition for variable type in HUGE MEMORY ARRAY
  900. Public Const MDA_TYPE = 0
  901. Public Const MDA_BYTE = -1
  902. Public Const MDA_INTEGER = -2
  903. Public Const MDA_LONG = -3
  904. Public Const MDA_SINGLE = -4
  905. Public Const MDA_DOUBLE = -5
  906. Public Const MDA_CURRENCY = -6
  907.  
  908. '  definition for error type in MULTIPLE DISK ARRAY
  909. Public Const MDA_NO_ERROR = -1
  910. Public Const MDA_EMPTY_FileName = 1
  911. Public Const MDA_BAD_FileName = 2
  912. Public Const MDA_CAN_KILL_FILE = 3
  913. Public Const MDA_CAN_NOT_OPEN_FILE = 4
  914. Public Const MDA_FILE_NOT_FOUND = 5
  915. Public Const MDA_BAD_TYPE = 6
  916. Public Const MDA_BAD_ROWS = 7
  917. Public Const MDA_BAD_COLS = 8
  918. Public Const MDA_BAD_SHEETS = 9
  919. Public Const MDA_CAN_NOT_WRITE_HEADER = 10
  920. Public Const MDA_CAN_NOT_WRITE_PART = 11
  921. Public Const MDA_CAN_NOT_WRITE_REMAIN = 12
  922. Public Const MDA_CAN_NOT_READ_HEADER = 13
  923. Public Const MDA_HEADER_SIZE = 14
  924. Public Const MDA_BAD_SIGNATURE = 15
  925. Public Const MDA_FILE_SIZE_MISMATCH = 16
  926. Public Const MDA_CAN_NOT_SEEK = 17
  927. Public Const MDA_INVALID_HANDLE = 18
  928. Public Const MDA_CAN_NOT_READ_PART = 19
  929. Public Const MDA_CAN_NOT_READ_REMAIN = 20
  930. Public Const MDA_BAD_MULTIPLE_ARRAY = 21
  931.  
  932. Declare Function cMDAClear Lib "t2win-32.dll" (ByVal ArrayNum As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY) As Integer
  933. Declare Function cMDAClearCol Lib "t2win-32.dll" (ByVal ArrayNum As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Col As Long, ByVal sheet As Long) As Integer
  934. Declare Function cMDAClearRow Lib "t2win-32.dll" (ByVal ArrayNum As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Row As Long, ByVal sheet As Long) As Integer
  935. Declare Function cMDAClearSheet Lib "t2win-32.dll" (ByVal ArrayNum As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal sheet As Long) As Integer
  936. Declare Sub cMDAClose Lib "t2win-32.dll" (MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal DeleteFile As Integer)
  937. Declare Function cMDACreate Lib "t2win-32.dll" (MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal CreateOrUse As Integer) As Integer
  938. Declare Function cMDAGet Lib "t2win-32.dll" (ByVal ArrayNum As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Row As Long, ByVal Col As Long, ByVal sheet As Long) As Variant
  939. Declare Sub cMDAGetType Lib "t2win-32.dll" (ByVal ArrayNum As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Row As Long, ByVal Col As Long, ByVal sheet As Long, nType As Any)
  940. Declare Sub cMDAPut Lib "t2win-32.dll" (ByVal ArrayNum As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Row As Long, ByVal Col As Long, ByVal sheet As Long, Var As Variant)
  941. Declare Sub cMDAPutType Lib "t2win-32.dll" (ByVal ArrayNum As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Row As Long, ByVal Col As Long, ByVal sheet As Long, nType As Any)
  942. Declare Sub cMDArGet Lib "t2win-32.dll" (ByVal ArrayNum As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Col As Long, Var As Variant)
  943. Declare Sub cMDArGetType Lib "t2win-32.dll" (ByVal ArrayNum As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Col As Long, nType As Any)
  944. Declare Sub cMDArPut Lib "t2win-32.dll" (ByVal ArrayNum As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Col As Long, Var As Variant)
  945. Declare Sub cMDArPutType Lib "t2win-32.dll" (ByVal ArrayNum As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Col As Long, nType As Any)
  946. Declare Function cMDAsClearCol Lib "t2win-32.dll" (ByVal ArrayNum As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Col As Long) As Integer
  947. Declare Function cMDAsClearRow Lib "t2win-32.dll" (ByVal ArrayNum As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Row As Long) As Integer
  948. Declare Sub cMDAsGet Lib "t2win-32.dll" (ByVal ArrayNum As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Row As Long, ByVal Col As Long, Var As Variant)
  949. Declare Sub cMDAsGetType Lib "t2win-32.dll" (ByVal ArrayNum As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Row As Long, ByVal Col As Long, nType As Any)
  950. Declare Sub cMDAsPut Lib "t2win-32.dll" (ByVal ArrayNum As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Row As Long, ByVal Col As Long, Var As Variant)
  951. Declare Sub cMDAsPutType Lib "t2win-32.dll" (ByVal ArrayNum As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Row As Long, ByVal Col As Long, nType As Any)
  952.  
  953. ' serialization
  954.  
  955. '  structure for serialization
  956. Type tagSERIALDATA
  957.    Description1      As String * 52       'serialization description 1
  958.    Description2      As String * 52       'serialization description 2
  959.    Number            As Long              'serialization number
  960.    Dummy             As String * 52       'reserved for future use
  961. End Type
  962.  
  963. '  definition for error type in SERIAL DATA
  964. Public Const SD_SERIAL_NOT_FOUND = 1
  965. Public Const SD_CAN_NOT_OPEN_FILE = 2
  966.  
  967. Declare Function cIsSerial Lib "t2win-32.dll" (ByVal sFile As String) As Integer
  968. Declare Function cSerialGet Lib "t2win-32.dll" (ByVal sFile As String, SERIALDATA As tagSERIALDATA) As Integer
  969. Declare Function cSerialInc Lib "t2win-32.dll" (ByVal sFile As String, ByVal Increment As Long) As Integer
  970. Declare Function cSerialPut Lib "t2win-32.dll" (ByVal sFile As String, SERIALDATA As tagSERIALDATA) As Integer
  971. Declare Function cSerialRmv Lib "t2win-32.dll" (ByVal sFile As String) As Integer
  972.  
  973. ' language control
  974.  
  975. '  definition for properties for language management
  976. Public Const RS_CAPTION = 1
  977. Public Const RS_TEXT = 2
  978. Public Const RS_DATAFIELD = 4
  979. Public Const RS_DATASOURCE = 8
  980. Public Const RS_TAG = 16
  981. Public Const RS_MENU = 32
  982. Public Const RS_ALL = 255
  983.  
  984. Declare Function cReadCtlLanguage Lib "t2win-32.dll" (ByVal Frm As Form, ByVal Property As Integer, ByVal FileLanguage As String) As Integer
  985. Declare Function cReadCtlLanguageExt Lib "t2win-32.dll" (ByVal Frm As Form, ByVal Property As Integer, ByVal FileLanguage As String) As Integer
  986. Declare Function cSaveCtlLanguage Lib "t2win-32.dll" (ByVal Frm As Form, ByVal Property As Integer, ByVal FileLanguage As String) As Integer
  987. Declare Function cSaveCtlLanguageExt Lib "t2win-32.dll" (ByVal Frm As Form, ByVal Property As Integer, ByVal FileLanguage As String) As Integer
  988.  
  989. ' interest rate
  990. Declare Function cAtoF Lib "t2win-32.dll" (ByVal Interest As Double, ByVal n As Integer) As Double
  991. Declare Function cAtoFC Lib "t2win-32.dll" (ByVal Rates As Double, ByVal n As Integer) As Double
  992. Declare Function cAtoP Lib "t2win-32.dll" (ByVal Interest As Double, ByVal n As Integer) As Double
  993. Declare Function cAtoPC Lib "t2win-32.dll" (ByVal Rates As Double, ByVal n As Integer) As Double
  994. Declare Function cFtoA Lib "t2win-32.dll" (ByVal Interest As Double, ByVal n As Integer) As Double
  995. Declare Function cFtoAC Lib "t2win-32.dll" (ByVal Rates As Double, ByVal n As Integer) As Double
  996. Declare Function cFtoP Lib "t2win-32.dll" (ByVal Interest As Double, ByVal n As Integer) As Double
  997. Declare Function cFtoPC Lib "t2win-32.dll" (ByVal Rates As Double, ByVal n As Integer) As Double
  998. Declare Function cPtoA Lib "t2win-32.dll" (ByVal Interest As Double, ByVal n As Integer) As Double
  999. Declare Function cPtoAC Lib "t2win-32.dll" (ByVal Rates As Double, ByVal n As Integer) As Double
  1000. Declare Function cPtoF Lib "t2win-32.dll" (ByVal Interest As Double, ByVal n As Integer) As Double
  1001. Declare Function cPtoFC Lib "t2win-32.dll" (ByVal Rates As Double, ByVal n As Integer) As Double
  1002.  
  1003. ' matrix
  1004.  
  1005. '  definition for matrix fill
  1006. Public Const MATRIX_ZERO = 0
  1007. Public Const MATRIX_UNIT = 1
  1008.  
  1009. Declare Sub cMatrixAdd Lib "t2win-32.dll" (ByVal Size As Integer, ArrayA() As Double, ArrayB() As Double, ArrayC() As Double)
  1010. Declare Function cMatrixCoFactor Lib "t2win-32.dll" (ByVal Size As Integer, ArrayA() As Double, ByVal Row As Integer, ByVal Col As Integer) As Double
  1011. Declare Function cMatrixCompare Lib "t2win-32.dll" (ByVal Size As Integer, ArrayA() As Double, ArrayC() As Double) As Integer
  1012. Declare Sub cMatrixCopy Lib "t2win-32.dll" (ByVal Size As Integer, ArrayA() As Double, ArrayC() As Double)
  1013. Declare Function cMatrixDet Lib "t2win-32.dll" (ByVal Size As Integer, ArrayA() As Double) As Double
  1014. Declare Function cMatrixFill Lib "t2win-32.dll" (ByVal Size As Integer, ArrayA() As Double, ByVal nInit As Integer) As Integer
  1015. Declare Function cMatrixInv Lib "t2win-32.dll" (ByVal Size As Integer, ArrayA() As Double, ArrayC() As Double) As Integer
  1016. Declare Function cMatrixMinor Lib "t2win-32.dll" (ByVal Size As Integer, ArrayA() As Double, ByVal Row As Integer, ByVal Col As Integer) As Double
  1017. Declare Sub cMatrixMul Lib "t2win-32.dll" (ByVal Size As Integer, ArrayA() As Double, ArrayB() As Double, ArrayC() As Double)
  1018. Declare Sub cMatrixSub Lib "t2win-32.dll" (ByVal Size As Integer, ArrayA() As Double, ArrayB() As Double, ArrayC() As Double)
  1019. Declare Function cMatrixSymToeplitz Lib "t2win-32.dll" (ByVal Size As Integer, ArrayA() As Double, ArrayC() As Double) As Integer
  1020. Declare Sub cMatrixTranspose Lib "t2win-32.dll" (ByVal Size As Integer, ArrayA() As Double, ArrayC() As Double)
  1021.  
  1022. ' is
  1023.  
  1024. Declare Function cIsAlnum Lib "t2win-32.dll" (Text As String) As Integer
  1025. Declare Function cIsAlpha Lib "t2win-32.dll" (Text As String) As Integer
  1026. Declare Function cIsAscii Lib "t2win-32.dll" (Text As String) As Integer
  1027. Declare Function cIsBalance Lib "t2win-32.dll" (ByVal nHour As Long, ByVal nMinute As Integer, ByVal nSecond As Integer) As Integer
  1028. Declare Function cIsCsym Lib "t2win-32.dll" (Text As String) As Integer
  1029. Declare Function cIsCsymf Lib "t2win-32.dll" (Text As String) As Integer
  1030. Declare Function cIsDate Lib "t2win-32.dll" (ByVal nYear As Integer, ByVal nMonth As Integer, ByVal nDay As Integer) As Integer
  1031. Declare Function cIsDigit Lib "t2win-32.dll" (Text As String) As Integer
  1032. Declare Function cIsFileArchive Lib "t2win-32.dll" (ByVal nFileName As String) As Integer
  1033. Declare Function cIsFileEmpty Lib "t2win-32.dll" (ByVal nFileName As String) As Integer
  1034. Declare Function cIsFileFlag Lib "t2win-32.dll" (ByVal nFileName As String, ByVal nStatus As Integer) As Integer
  1035. Declare Function cIsFileHidden Lib "t2win-32.dll" (ByVal nFileName As String) As Integer
  1036. Declare Function cIsFileNormal Lib "t2win-32.dll" (ByVal nFileName As String) As Integer
  1037. Declare Function cIsFileReadOnly Lib "t2win-32.dll" (ByVal nFileName As String) As Integer
  1038. Declare Function cIsFileSubDir Lib "t2win-32.dll" (ByVal nFileName As String) As Integer
  1039. Declare Function cIsFileSystem Lib "t2win-32.dll" (ByVal nFileName As String) As Integer
  1040. Declare Function cIsFileCompressed Lib "t2win-32.dll" (ByVal nFileName As String) As Integer
  1041. Declare Function cIsFormEnabled Lib "t2win-32.dll" (ByVal hwnd As Long) As Integer
  1042. Declare Function cIsHour Lib "t2win-32.dll" (ByVal nHour As Integer, ByVal nMinute As Integer, ByVal nSecond As Integer) As Integer
  1043. Declare Function cIsISBN Lib "t2win-32.dll" (Text As String) As Integer
  1044. Declare Function cIsLeapYear Lib "t2win-32.dll" (ByVal nYear As Integer) As Integer
  1045. Declare Function cIsLower Lib "t2win-32.dll" (Text As String) As Integer
  1046. Declare Function cIsPalindrome Lib "t2win-32.dll" (Text As String) As Integer
  1047. Declare Function cIsPrime Lib "t2win-32.dll" (ByVal Value As Long) As Integer
  1048. Declare Function cIsPunct Lib "t2win-32.dll" (Text As String) As Integer
  1049. Declare Function cIsSpace Lib "t2win-32.dll" (Text As String) As Integer
  1050. Declare Function cIsUpper Lib "t2win-32.dll" (Text As String) As Integer
  1051. Declare Function cIsXdigit Lib "t2win-32.dll" (Text As String) As Integer
  1052.  
  1053. ' encrypt/decrypt
  1054.  
  1055. '  definition for encrypt/decrypt
  1056. Public Const ENCRYPT_LEVEL_0 = 0
  1057. Public Const ENCRYPT_LEVEL_1 = 1
  1058. Public Const ENCRYPT_LEVEL_2 = 2
  1059. Public Const ENCRYPT_LEVEL_3 = 3
  1060. Public Const ENCRYPT_LEVEL_4 = 4
  1061.  
  1062. Declare Function cDecrypt Lib "t2win-32.dll" (Text As String, Password As String, ByVal Level As Integer) As String
  1063. Declare Function cEncrypt Lib "t2win-32.dll" (Text As String, Password As String, ByVal Level As Integer) As String
  1064. Declare Function cFileDecrypt Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String, Password As String, ByVal Level As Integer) As Long
  1065. Declare Function cFileEncrypt Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String, Password As String, ByVal Level As Integer) As Long
  1066.  
  1067. ' hicrypt
  1068.  
  1069. Declare Function cCrypt Lib "t2win-32.dll" (Text As String, ByVal Password As String) As String
  1070. Declare Function cFileCrypt Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String, ByVal Password As String) As Long
  1071.  
  1072. ' crc32
  1073.  
  1074. '  definition for crc32
  1075. Public Const OPEN_MODE_BINARY = 0
  1076. Public Const OPEN_MODE_TEXT = 1
  1077.  
  1078. Declare Function cFileCRC32 Lib "t2win-32.dll" (ByVal lpFilename As String, ByVal Mode As Integer) As Long
  1079. Declare Function cStringCRC32 Lib "t2win-32.dll" (Text As String) As Long
  1080.  
  1081. ' string
  1082.  
  1083. '  definition for error type for PATTERNMATCHEXT
  1084. Public Const MATCH_HEXA = 17
  1085. Public Const MATCH_INTERNAL_ERROR = 16
  1086. Public Const MATCH_PATTERN = 15
  1087. Public Const MATCH_LITERAL = 14
  1088. Public Const MATCH_RANGE = 13
  1089. Public Const MATCH_ABORT = 12
  1090. Public Const MATCH_END = 11
  1091. Public Const MATCH_VALID = -1
  1092.  
  1093. Public Const PATTERN_VALID = 0
  1094. Public Const PATTERN_INVALID = 1
  1095. Public Const PATTERN_ESC = 2
  1096. Public Const PATTERN_RANGE = 3
  1097. Public Const PATTERN_CLOSE = 4
  1098. Public Const PATTERN_EMPTY = 5
  1099. Public Const PATTERN_INTERNAL_ERROR = 6
  1100. Public Const PATTERN_HEXA = 7
  1101.  
  1102. ' definition for PROPERNAME2
  1103. Public Const PN_UPPERCASE = 1
  1104. Public Const PN_PUNCTUATION = 2
  1105. Public Const PN_KEEP_ORIGINAL = 4
  1106. Public Const PN_ONLY_LEADER_SPACE = 8
  1107.  
  1108. ' definition for EXTRACTISOLATE
  1109. Public Const EXTRACT_ISOLATE_LEFT = -1
  1110. Public Const EXTRACT_ISOLATE_RIGHT = 0
  1111.  
  1112. Declare Function cAddDigit Lib "t2win-32.dll" (Text As String) As Integer
  1113. Declare Function cAlign Lib "t2win-32.dll" (Text As String, ByVal TypeAlign As Integer, ByVal NewLength As Long) As String
  1114. Declare Function cAndToken Lib "t2win-32.dll" (ByVal Text As String, ByVal Token As String) As Integer
  1115. Declare Function cAndTokenIn Lib "t2win-32.dll" (ByVal Text As String, ByVal Token As String, ByVal Separator As String) As Integer
  1116. Declare Function cArabicToRoman Lib "t2win-32.dll" (Var As Variant) As String
  1117. Declare Function cBlockCharFromLeft Lib "t2win-32.dll" (Text As String, ByVal Position As Long) As String
  1118. Declare Function cBlockCharFromRight Lib "t2win-32.dll" (Text As String, ByVal Position As Long) As String
  1119. Declare Sub cChangeChars Lib "t2win-32.dll" (Text As String, CharSet As String, NewCharSet As String)
  1120. Declare Sub cChangeCharsUntil Lib "t2win-32.dll" (Text As String, CharSet As String, NewCharSet As String, nUntil As String)
  1121. Declare Function cCheckChars Lib "t2win-32.dll" (Text As String, CharSet As String) As Integer
  1122. Declare Function cCheckNumericity Lib "t2win-32.dll" (Text As String) As Integer
  1123. Declare Sub cCnvASCIItoEBCDIC Lib "t2win-32.dll" (Text As String)
  1124. Declare Sub cCnvEBCDICtoASCII Lib "t2win-32.dll" (Text As String)
  1125. Declare Function cCompact Lib "t2win-32.dll" (Text As String) As String
  1126. Declare Function cCompress Lib "t2win-32.dll" (Text As String) As String
  1127. Declare Function cCompressTab Lib "t2win-32.dll" (Text As String, ByVal nTab As Long) As String
  1128. Declare Function cCount Lib "t2win-32.dll" (Text As String, Separator As String) As Integer
  1129. Declare Function cCplAlpha Lib "t2win-32.dll" (Text As String) As String
  1130. Declare Function cCplDigit Lib "t2win-32.dll" (Text As String) As String
  1131. Declare Function cCreateAndFill Lib "t2win-32.dll" (ByVal Length As Long, Text As String) As String
  1132. Declare Function cDeleteSubString Lib "t2win-32.dll" (ByVal Text As String, ByVal SubString As String, ByVal Sensitivity As Integer) As String
  1133. Declare Function cExpandTab Lib "t2win-32.dll" (Text As String, ByVal nTab As Long) As String
  1134. Declare Function cExtract Lib "t2win-32.dll" (ByVal Text As String, ByVal Key As String, ByVal FieldSep As String, ByVal Sensitivity As Integer) As String
  1135. Declare Function cExtractIsolate Lib "t2win-32.dll" (ByVal Text As String, ByVal Key As String, ByVal FieldSep As String, ByVal LeftOrRight As Integer, ByVal Sensitivity As Integer) As String
  1136. Declare Sub cFill Lib "t2win-32.dll" (Text As String, Fill As String)
  1137. Declare Function cFilterBlocks Lib "t2win-32.dll" (Text As String, Delimitor As String) As String
  1138. Declare Function cFilterChars Lib "t2win-32.dll" (Text As String, CharSet As String) As String
  1139. Declare Function cFilterFirstChars Lib "t2win-32.dll" (Text As String, CharSet As String) As String
  1140. Declare Function cFilterNotChars Lib "t2win-32.dll" (Text As String, CharSet As String) As String
  1141. Declare Function cFromHexa Lib "t2win-32.dll" (Text As String) As String
  1142. Declare Function cFromZ9 Lib "t2win-32.dll" (Text As String) As String
  1143. Declare Function cGet Lib "t2win-32.dll" (Text As String, ByVal Position As Long) As String
  1144. Declare Function cGetBlock Lib "t2win-32.dll" (Text As String, ByVal Position As Long, ByVal Length As Long) As String
  1145. Declare Function cGetIn Lib "t2win-32.dll" (Text As String, Separator As String, ByVal Position As Long) As String
  1146. Declare Function cGetInPart Lib "t2win-32.dll" (Text As String, Separator As String, ByVal Position As Long) As String
  1147. Declare Function cGetInPartR Lib "t2win-32.dll" (Text As String, Separator As String, ByVal Position As Long) As String
  1148. Declare Function cGetInR Lib "t2win-32.dll" (Text As String, Separator As String, ByVal Position As Long) As String
  1149. Declare Function cH2I Lib "t2win-32.dll" (ByVal Text As String) As Integer
  1150. Declare Function cH2L Lib "t2win-32.dll" (ByVal Text As String) As Long
  1151. Declare Function cInsertBlocks Lib "t2win-32.dll" (Text As String, Insert As String) As String
  1152. Declare Function cInsertBlocksBy Lib "t2win-32.dll" (Text As String, Insert As String, Delimitor As String) As String
  1153. Declare Function cInsertBlocksExt Lib "t2win-32.dll" (Text As String, Insert As String) As String
  1154. Declare Function cInsertByMask Lib "t2win-32.dll" (Text As String, Mask As String, Insert As String) As String
  1155. Declare Function cInsertChars Lib "t2win-32.dll" (Text As String, ByVal Position As Long, Insert As String) As String
  1156. Declare Function cInStr Lib "t2win-32.dll" (ByVal StartPosition As Long, ByVal Text As String, ByVal Search As String, ByVal Sensitivity As Integer) As Long
  1157. Declare Function cLFill Lib "t2win-32.dll" (ByVal Text As String, ByVal CharToFill As String, ByVal Length As Long) As String
  1158. Declare Function cLrc Lib "t2win-32.dll" (Text As String) As String
  1159. Declare Function cLSetIn Lib "t2win-32.dll" (ByVal Text As String, ByVal Separator As String, ByVal Position As Long, ByVal StringToInsert As String) As String
  1160. Declare Function cMatchTable Lib "t2win-32.dll" (ByVal Text As String, ByVal Match As String, ByVal Separator As String, ByVal Sensitivity As Integer) As Integer
  1161. Declare Function cMixChars Lib "t2win-32.dll" (Text As String) As String
  1162. Declare Function cMorse Lib "t2win-32.dll" (ByVal morse As String) As String
  1163. Declare Function cNumDigit Lib "t2win-32.dll" (Text As String) As Integer
  1164. Declare Function cOneCharFromLeft Lib "t2win-32.dll" (Text As String, ByVal Position As Long) As String
  1165. Declare Function cOneCharFromRight Lib "t2win-32.dll" (Text As String, ByVal Position As Long) As String
  1166. Declare Function cOrToken Lib "t2win-32.dll" (ByVal Text As String, ByVal Token As String) As Integer
  1167. Declare Function cOrTokenIn Lib "t2win-32.dll" (ByVal Text As String, ByVal Token As String, ByVal Separator As String) As Integer
  1168. Declare Function cPatternMatch Lib "t2win-32.dll" (ByVal Text As String, ByVal Pattern As String) As Integer
  1169. Declare Function cPatternMatchS Lib "t2win-32.dll" (ByVal Text As String, ByVal Pattern As String, ByVal Sensitivity As Integer) As Integer
  1170. Declare Function cPatternExtMatch Lib "t2win-32.dll" (ByVal Text As String, ByVal Pattern As String) As Integer
  1171. Declare Function cPatternExtMatchS Lib "t2win-32.dll" (ByVal Text As String, ByVal Pattern As String, ByVal Sensitivity As Integer) As Integer
  1172. Declare Function cProperName Lib "t2win-32.dll" (Text As String) As String
  1173. Declare Function cProperName2 Lib "t2win-32.dll" (Text As String, ByVal TokenToUse As String, ByVal Options As Integer) As String
  1174. Declare Function cRemoveBlockChar Lib "t2win-32.dll" (Text As String, ByVal Position As Long, ByVal Length As Long) As String
  1175. Declare Function cRemoveOneChar Lib "t2win-32.dll" (Text As String, ByVal Position As Long) As String
  1176. Declare Function cResizeString Lib "t2win-32.dll" (Text As String, ByVal NewLength As Long) As String
  1177. Declare Function cResizeStringAndFill Lib "t2win-32.dll" (Text As String, ByVal NewLength As Long, Fill As String) As String
  1178. Declare Function cReverse Lib "t2win-32.dll" (Text As String) As String
  1179. Declare Function cReverseSortStr Lib "t2win-32.dll" (Text As String, ByVal nItem As Integer, ByVal ItemLength As Integer) As Integer
  1180. Declare Function cRFill Lib "t2win-32.dll" (ByVal Text As String, ByVal CharToFill As String, ByVal Length As Long) As String
  1181. Declare Function cRomanToArabic Lib "t2win-32.dll" (Text As String) As Variant
  1182. Declare Function cRSetIn Lib "t2win-32.dll" (ByVal Text As String, ByVal Separator As String, ByVal Position As Long, ByVal StringToInsert As String) As String
  1183. Declare Function cScrollL Lib "t2win-32.dll" (Text As String) As String
  1184. Declare Function cScrollR Lib "t2win-32.dll" (Text As String) As String
  1185. Declare Sub cSetDefaultSeparator Lib "t2win-32.dll" (Separator As String)
  1186. Declare Function cSortStr Lib "t2win-32.dll" (Text As String, ByVal nItem As Integer, ByVal ItemLength As Integer) As Integer
  1187. Declare Function cStringReplace Lib "t2win-32.dll" (ByVal Text As String, ByVal Pattern As String, ByVal Sensitivity As Integer) As String
  1188. Declare Function cStringSAR Lib "t2win-32.dll" (ByVal Text As String, ByVal Search As String, ByVal Replace As String, ByVal Sensitivity As Integer) As String
  1189. Declare Function cToHexa Lib "t2win-32.dll" (Text As String) As String
  1190. Declare Function cTokenIn Lib "t2win-32.dll" (Text As String, Separator As String, ByVal Position As Integer) As String
  1191. Declare Function cToZ9 Lib "t2win-32.dll" (Text As String) As String
  1192. Declare Function cUncompact Lib "t2win-32.dll" (Text As String) As String
  1193. Declare Function cWrapLine Lib "t2win-32.dll" (ByVal Text As String, ByVal Length As Long, ByVal Separator As String, ByVal EndOfLine As String) As String
  1194.  
  1195. ' random
  1196.  
  1197. Declare Sub cRndInit Lib "t2win-32.dll" (ByVal nRnd As Long)
  1198. Declare Function cRnd Lib "t2win-32.dll" () As Double
  1199. Declare Function cRndD Lib "t2win-32.dll" () As Double
  1200. Declare Function cRndI Lib "t2win-32.dll" () As Integer
  1201. Declare Function cRndL Lib "t2win-32.dll" () As Long
  1202. Declare Function cRndS Lib "t2win-32.dll" () As Single
  1203.  
  1204. ' swap
  1205.  
  1206. Declare Sub cSwapB Lib "t2win-32.dll" (swap1 As Byte, swap2 As Byte)
  1207. Declare Sub cSwapD Lib "t2win-32.dll" (swap1 As Double, swap2 As Double)
  1208. Declare Sub cSwapI Lib "t2win-32.dll" (swap1 As Integer, swap2 As Integer)
  1209. Declare Sub cSwapL Lib "t2win-32.dll" (swap1 As Long, swap2 As Long)
  1210. Declare Sub cSwapS Lib "t2win-32.dll" (swap1 As Single, swap2 As Single)
  1211. Declare Sub cSwapStr Lib "t2win-32.dll" (swap1 As String, swap2 As String)
  1212.  
  1213. ' type
  1214.  
  1215. Declare Function cCompareTypeString Lib "t2win-32.dll" Alias "cTypesCompare" (TypeSrc As Any, ByVal Dst As String, ByVal lenTypeSrc As Integer) As Integer
  1216. Declare Function cCompareStringType Lib "t2win-32.dll" Alias "cTypesCompare" (ByVal Src As String, TypeDst As Any, ByVal lenTypeSrc As Integer) As Integer
  1217. Declare Sub cStringToType Lib "t2win-32.dll" Alias "cTypesCopy" (ByVal Src As String, TypeDst As Any, ByVal lenTypeSrc As Integer)
  1218. Declare Sub cTypeClear Lib "t2win-32.dll" (TypeSrc As Any, ByVal lenTypeSrc As Integer)
  1219. Declare Function cTypeMid Lib "t2win-32.dll" (TypeSrc As Any, ByVal Offset As Integer, ByVal Length As Integer) As String
  1220. Declare Function cTypesCompare Lib "t2win-32.dll" (Type1 As Any, Type2 As Any, ByVal lenType1 As Integer) As Integer
  1221. Declare Sub cTypesCopy Lib "t2win-32.dll" (TypeSrc As Any, TypeDst As Any, ByVal lenTypeSrc As Integer)
  1222. Declare Function cTypeTransfert Lib "t2win-32.dll" (TypeSrc As Any, ByVal lenTypeSrc As Integer) As String
  1223. Declare Sub cTypeToString Lib "t2win-32.dll" Alias "cTypesCopy" (TypeSrc As Any, ByVal Dst As String, ByVal lenTypeSrc As Integer)
  1224.  
  1225. ' miscelleanous
  1226.  
  1227. '  definition for error code for CONVERT
  1228. Public Const CNV_NO_ERROR = -1
  1229. Public Const CNV_ERROR_NO_CONVERSION_AVAILABLE = 0
  1230. Public Const CNV_ERROR_CONVERSION_TO_STRING = 1
  1231. Public Const CNV_ERROR_TIME_OUTSIDE_LIMIT = 2
  1232. Public Const CNV_ERROR_MISSING_TIME_SEPARATOR = 3
  1233. Public Const CNV_ERROR_BAD_HOUR = 4
  1234. Public Const CNV_ERROR_BAD_MINUTE = 5
  1235. Public Const CNV_ERROR_MISSING_DATE_SEPARATOR = 6
  1236. Public Const CNV_ERROR_BAD_DATE = 7
  1237.  
  1238. '  definition for conversion parameter for CONVERT
  1239. Public Const CNV_TIME_FILL_ZERO = 100
  1240. Public Const CNV_TIME = 101
  1241.  
  1242. Public Const CNV_HUNDRED_TIME_FILL_ZERO = 105
  1243. Public Const CNV_HUNDRED_TIME = 106
  1244.  
  1245. Public Const CNV_HOUR_FILL_ZERO_AND_WITH_ALWAYS_SIGN = 110
  1246. Public Const CNV_HOUR_FILL_ZERO_AND_WITH_SIGN = 111
  1247. Public Const CNV_HOUR_WITH_ALWAYS_SIGN = 112
  1248. Public Const CNV_HOUR_AND_WITH_SIGN = 113
  1249.  
  1250. Public Const CNV_HUNDRED_HOUR_FILL_ZERO_AND_WITH_ALWAYS_SIGN = 115
  1251. Public Const CNV_HUNDRED_HOUR_FILL_ZERO_AND_WITH_SIGN = 116
  1252. Public Const CNV_HUNDRED_HOUR_WITH_ALWAYS_SIGN = 117
  1253. Public Const CNV_HUNDRED_HOUR_AND_WITH_SIGN = 118
  1254.  
  1255. Public Const CNV_BALANCE_FILL_ZERO_AND_WITH_ALWAYS_SIGN = 120
  1256. Public Const CNV_BALANCE_FILL_ZERO_AND_WITH_SIGN = 121
  1257. Public Const CNV_BALANCE_WITH_ALWAYS_SIGN = 122
  1258. Public Const CNV_BALANCE_AND_WITH_SIGN = 123
  1259.  
  1260. Public Const CNV_HUNDRED_BALANCE_FILL_ZERO_AND_WITH_ALWAYS_SIGN = 125
  1261. Public Const CNV_HUNDRED_BALANCE_FILL_ZERO_AND_WITH_SIGN = 126
  1262. Public Const CNV_HUNDRED_BALANCE_WITH_ALWAYS_SIGN = 127
  1263. Public Const CNV_HUNDRED_BALANCE_AND_WITH_SIGN = 128
  1264.  
  1265. Public Const CNV_DATE_SHORT = 200
  1266. Public Const CNV_DATE_LONG = 201
  1267.  
  1268. Public Const CNV_DATE_HOUR_WITH_EXTRA = 205
  1269. Public Const CNV_DATE_HOUR_WITH_EXTRA_IN_SECONDS = 206
  1270. Public Const CNV_DATE_HOUR_WITHOUT_EXTRA = 207
  1271.  
  1272. Declare Function cMax Lib "t2win-32.dll" (Var1 As Variant, Var2 As Variant) As Variant
  1273. Declare Function cMin Lib "t2win-32.dll" (Var1 As Variant, Var2 As Variant) As Variant
  1274. Declare Sub cIncrI Lib "t2win-32.dll" (Value As Integer)
  1275. Declare Sub cIncrL Lib "t2win-32.dll" (Value As Long)
  1276. Declare Sub cDecrI Lib "t2win-32.dll" (Value As Integer)
  1277. Declare Sub cDecrL Lib "t2win-32.dll" (Value As Long)
  1278. Declare Function cSpellMoney Lib "t2win-32.dll" (ByVal Value As Double, ByVal Units As String, ByVal Cents As String) As String
  1279. Declare Function cFraction Lib "t2win-32.dll" (ByVal nValue As Double, nNumerator As Double, nDenominator As Double) As Double
  1280. Declare Function cCombination Lib "t2win-32.dll" (ByVal nItems As Integer, ByVal mTimes As Integer) As Double
  1281. Declare Function cSgn Lib "t2win-32.dll" (ByVal Value As Integer) As Integer
  1282. Declare Function cBetween Lib "t2win-32.dll" (Var As Variant, Var1 As Variant, Var2 As Variant) As Integer
  1283. Declare Function cGetPid Lib "t2win-32.dll" () As Integer
  1284. Declare Function cBaseConversion Lib "t2win-32.dll" (ByVal Num As String, ByVal RadixIn As Integer, ByVal RadixOut As Integer) As String
  1285. Declare Function cConvert Lib "t2win-32.dll" (ByVal WhichConversion As Integer, WhichValue As Variant, ConvertError As Integer) As String
  1286.  
  1287. ' windows
  1288.  
  1289. '  definition for win.ini section
  1290. Public Const GET_TIME_SEPARATOR = 1
  1291. Public Const GET_DATE_SEPARATOR = 2
  1292. Public Const GET_TIME_FORMAT = 3
  1293. Public Const GET_DATE_FORMAT = 4
  1294. Public Const GET_CURRENCY = 5
  1295. Public Const GET_LANGUAGE = 6
  1296. Public Const GET_COUNTRY = 7
  1297. Public Const GET_COUNTRY_CODE = 8
  1298. Public Const GET_LIST_SEPARATOR = 9
  1299. Public Const GET_DEFAULT_PRINTER = 10
  1300. Public Const GET_DECIMAL_SEPARATOR = 11
  1301. Public Const GET_THOUSAND_SEPARATOR = 12
  1302.  
  1303. Declare Sub cArrangeDesktopIcons Lib "t2win-32.dll" ()
  1304. Declare Sub cCenterWindow Lib "t2win-32.dll" (ByVal hwnd As Long)
  1305. Declare Function cEXEnameActiveWindow Lib "t2win-32.dll" () As String
  1306. Declare Function cEXEnameWindow Lib "t2win-32.dll" (ByVal hwnd As Long) As String
  1307. Declare Function cEXEnameTask Lib "t2win-32.dll" (ByVal nFileName As String) As String
  1308. Declare Function cExitWindowsAndExecute Lib "t2win-32.dll" (ByVal lpszExe As String, ByVal lpszParams As String) As Integer
  1309. Declare Function cFindFileInEnv Lib "t2win-32.dll" (ByVal lpFilename As String, ByVal lpEnv As String) As Integer
  1310. Declare Function cFindFileInPath Lib "t2win-32.dll" (ByVal lpFilename As String) As Integer
  1311. Declare Function cGetClassName Lib "t2win-32.dll" (ByVal hwnd As Long) As String
  1312. Declare Function cGetCountry Lib "t2win-32.dll" () As String
  1313. Declare Function cGetCountryCode Lib "t2win-32.dll" () As String
  1314. Declare Function cGetCurrency Lib "t2win-32.dll" () As String
  1315. Declare Function cGetCurrentDrive Lib "t2win-32.dll" () As String
  1316. Declare Function cGetDateFormat Lib "t2win-32.dll" () As String
  1317. Declare Function cGetDateSeparator Lib "t2win-32.dll" () As String
  1318. Declare Function cGetDefaultCurrentDir Lib "t2win-32.dll" () As String
  1319. Declare Function cGetDefaultPrinter Lib "t2win-32.dll" () As String
  1320. Declare Function cGetDevices Lib "t2win-32.dll" () As String
  1321. Declare Function cGetDriveCurrentDir Lib "t2win-32.dll" (ByVal lpDrive As String) As String
  1322. Declare Function cGetFullNameInEnv Lib "t2win-32.dll" (ByVal lpFilename As String, ByVal lpEnv As String) As String
  1323. Declare Function cGetFullNameInPath Lib "t2win-32.dll" (ByVal lpFilename As String) As String
  1324. Declare Function cGetHourFormat Lib "t2win-32.dll" () As String
  1325. Declare Function cGetIni Lib "t2win-32.dll" (ByVal AppName As String, ByVal szItem As String, ByVal szDefault As String, ByVal InitFile As String) As String
  1326. Declare Function cGetLanguage Lib "t2win-32.dll" () As String
  1327. Declare Function cGetListSeparator Lib "t2win-32.dll" () As String
  1328. Declare Function cGetSystemDirectory Lib "t2win-32.dll" () As String
  1329. Declare Function cGetTimeSeparator Lib "t2win-32.dll" () As String
  1330. Declare Function cGetWindowsDirectory Lib "t2win-32.dll" () As String
  1331. Declare Function cGetWinINI Lib "t2win-32.dll" (ByVal Info As Integer) As String
  1332. Declare Function cGetWinSection Lib "t2win-32.dll" (ByVal Section As String) As String
  1333. Declare Sub cPutIni Lib "t2win-32.dll" (ByVal AppName As String, ByVal szItem As String, ByVal szDefault As String, ByVal InitFile As String)
  1334. Declare Function cRebootSystem Lib "t2win-32.dll" () As Integer
  1335. Declare Function cRestartWindows Lib "t2win-32.dll" () As Integer
  1336. Declare Function cSetHandleCount Lib "t2win-32.dll" (ByVal nHandle As Integer) As Integer
  1337. Declare Sub cShowWindow Lib "t2win-32.dll" (ByVal hwnd As Long, ByVal Method As Integer, ByVal interval As Integer)
  1338. Declare Function cGetSectionItems Lib "t2win-32.dll" (ByVal Section As String, ByVal InitFile As String, nItems As Integer) As String
  1339. Declare Function cTaskBarAddIcon Lib "t2win-32.dll" (ByVal hwnd As Long, ByVal hIcon As Long, ByVal lpszTip As String) As Integer
  1340. Declare Function cTaskBarDeleteIcon Lib "t2win-32.dll" (ByVal hwnd As Long) As Integer
  1341. Declare Function cTaskBarModifyIcon Lib "t2win-32.dll" (ByVal hwnd As Long, ByVal hIcon As Long, ByVal lpszTip As String) As Integer
  1342.  
  1343. ' list/combo box
  1344.  
  1345. Public Const DDL_READWRITE = &H0
  1346. Public Const DDL_READONLY = &H1
  1347. Public Const DDL_HIDDEN = &H2
  1348. Public Const DDL_SYSTEM = &H4
  1349. Public Const DDL_DIRECTORY = &H10
  1350. Public Const DDL_ARCHIVE = &H20
  1351. Public Const DDL_POSTMSGS = &H2000
  1352. Public Const DDL_DRIVES = &H4000
  1353. Public Const DDL_EXCLUSIVE = &H8000
  1354.  
  1355. Declare Function cArrayToComboBox Lib "t2win-32.dll" (ByVal hwnd As Long, Strarray() As String) As Integer
  1356. Declare Function cArrayToListBox Lib "t2win-32.dll" (ByVal hwnd As Long, Strarray() As String) As Integer
  1357. Declare Function cComboFiles Lib "t2win-32.dll" (ByVal hwnd As Long, ByVal Attributes As Long, ByVal FilePathMask As String) As Integer
  1358. Declare Function cComboSearchDir Lib "t2win-32.dll" (ByVal hwnd As Long, ByVal StartPath As String, ByVal FileMask As String) As Long
  1359. Declare Function cComboSearchFile Lib "t2win-32.dll" (ByVal hwnd As Long, ByVal StartPath As String, ByVal FileMask As String) As Long
  1360. Declare Function cComboSearchFileAttrib Lib "t2win-32.dll" (ByVal hwnd As Long, ByVal StartPath As String, ByVal FileMask As String, ByVal iSearchAttribute As Integer) As Long
  1361. Declare Function cFileToComboBox Lib "t2win-32.dll" (ByVal hwnd As Long, ByVal nFile As String) As Integer
  1362. Declare Function cFileToListBox Lib "t2win-32.dll" (ByVal hwnd As Long, ByVal nFile As String) As Integer
  1363. Declare Function cListFiles Lib "t2win-32.dll" (ByVal hwnd As Long, ByVal Attributes As Long, ByVal FilePathMask As String) As Integer
  1364. Declare Function cListSearchDir Lib "t2win-32.dll" (ByVal hwnd As Long, ByVal StartPath As String, ByVal FileMask As String) As Long
  1365. Declare Function cListSearchFile Lib "t2win-32.dll" (ByVal hwnd As Long, ByVal StartPath As String, ByVal FileMask As String) As Long
  1366. Declare Function cListSearchFileAttrib Lib "t2win-32.dll" (ByVal hwnd As Long, ByVal StartPath As String, ByVal FileMask As String, ByVal iSearchAttribute As Integer) As Long
  1367. Declare Function cListSetTabs Lib "t2win-32.dll" (ByVal hwnd As Long, TabArray() As Long) As Integer
  1368.  
  1369. ' mdtkfv
  1370.  
  1371. '  definition for sFile version information
  1372. Public Const VER_VERSION_PRODUCT = -1
  1373. Public Const VER_VERSION_FILE = 0
  1374. Public Const VER_COMPANY_NAME = 1
  1375. Public Const VER_FILE_DESCRIPTION = 2
  1376. Public Const VER_FILE_VERSION = 3
  1377. Public Const VER_INTERNAL_NAME = 4
  1378. Public Const VER_LEGAL_COPYRIGHT = 5
  1379. Public Const VER_LEGAL_TRADEMARKS = 6
  1380. Public Const VER_PRODUCT_NAME = 7
  1381. Public Const VER_PRODUCT_VERSION = 8
  1382.  
  1383. '  structure for sFile version information
  1384. Type tagFILEVERSIONINFO
  1385.    VersionProduct    As String
  1386.    VersionFile       As String
  1387.    CompanyName       As String
  1388.    FileDescription   As String
  1389.    FileVersion       As String
  1390.    InternalName      As String
  1391.    LegalCopyright    As String
  1392.    LegalTrademarks   As String
  1393.    Comments          As String
  1394.    ProductName       As String
  1395.    ProductVersion    As String
  1396. End Type
  1397.  
  1398. ' structure for modules
  1399. Type tagMODULEENTRY
  1400.    dwSize               As Long
  1401.    th32ModuleID         As Long
  1402.    th32ProcessID        As Long
  1403.    GlblcntUsage         As Long
  1404.    ProccntUsage         As Long
  1405.    modBaseAddr          As Byte
  1406.    modBaseSize          As Long
  1407.    hModule              As Long
  1408.    szModule             As String * 256
  1409.    szExePath            As String * 260
  1410. End Type
  1411.  
  1412. Type tagPROCESSENTRY
  1413.    dwSize               As Long
  1414.    cntUsage             As Long
  1415.    th32ProcessID        As Long
  1416.    th32DefaultHeapID    As Long
  1417.    th32ModuleID         As Long
  1418.    cntThreads           As Long
  1419.    th32ParentProcessID  As Long
  1420.    pcPriClassBase       As Long
  1421.    dwFlags              As Long
  1422.    szExeFile            As String * 260
  1423. End Type
  1424.  
  1425. Type tagTHREADENTRY
  1426.    dwSize               As Long
  1427.    cntUsage             As Long
  1428.    th32ThreadID         As Long
  1429.    th32OwnerProcessID   As Long
  1430.    tpBasePri            As Long
  1431.    tpDeltaPri           As Long
  1432.    dwFlags              As Long
  1433. End Type
  1434.  
  1435. Declare Sub cChangeTaskName Lib "t2win-32.dll" (ByVal hwnd As Long, ByVal Text As String)
  1436. Declare Function cGetFileVersion Lib "t2win-32.dll" (ByVal FileName As String, ByVal nFonction As Integer) As String
  1437. Declare Function cGetFileVersionInfo Lib "t2win-32.dll" (ByVal FileName As String, FILEVERSIONINFO As Any) As Integer
  1438. Declare Function cGetChangeTaskName Lib "t2win-32.dll" (ByVal hwnd As Long, ByVal Text As String) As String
  1439. Declare Function cGetTaskName Lib "t2win-32.dll" (ByVal hwnd As Long) As String
  1440. Declare Function cModule Lib "t2w32mpt.dll" (MODULEENTRY As tagMODULEENTRY, ByVal FirstNext As Integer) As Integer
  1441. Declare Function cProcess Lib "t2w32mpt.dll" (PROCESSENTRY As tagPROCESSENTRY, ByVal FirstNext As Integer) As Integer
  1442. Declare Function cThread Lib "t2w32mpt.dll" (THREADENTRY As tagTHREADENTRY, ByVal FirstNext As Integer) As Integer
  1443. Declare Function cWalkThruWindow Lib "t2win-32.dll" (Class As String, Caption As String, OwnerHwnd As Long, OwnerClass As String, OwnerCaption As String, ByVal FirstNext As Integer) As Long
  1444.  
  1445. ' date - time
  1446.  
  1447. Declare Function cAddTime Lib "t2win-32.dll" (ByVal Hr As Integer) As Integer
  1448. Declare Function cAddTwoTimes Lib "t2win-32.dll" (ByVal Time1 As String, ByVal Time2 As String) As String
  1449. Declare Function cCheckTime Lib "t2win-32.dll" (ByVal Hr As Integer, ByVal Hr1 As Integer, ByVal Hr2 As Integer) As Integer
  1450. Declare Function cCurrentTime Lib "t2win-32.dll" () As Integer
  1451. Declare Function cDateHourToLong Lib "t2win-32.dll" (ByVal nYear As Integer, ByVal nMonth As Integer, ByVal nDay As Integer, ByVal nHour As Integer, ByVal nMinute As Integer, ByVal nExtra As Integer) As Long
  1452. Declare Function cDateToInt Lib "t2win-32.dll" (ByVal nYear As Integer, ByVal nMonth As Integer, ByVal nDay As Integer) As Integer
  1453. Declare Function cDateToScalar Lib "t2win-32.dll" (ByVal nYear As Integer, ByVal nMonth As Integer, ByVal nDay As Integer) As Long
  1454. Declare Function cDayOfWeek Lib "t2win-32.dll" (ByVal nYear As Integer, ByVal nMonth As Integer, ByVal nDay As Integer, ByVal nISO As Integer) As Integer
  1455. Declare Function cDayOfYear Lib "t2win-32.dll" (ByVal nYear As Integer, ByVal nMonth As Integer, ByVal nDay As Integer) As Integer
  1456. Declare Function cDaysInMonth Lib "t2win-32.dll" (ByVal nYear As Integer, ByVal nMonth As Integer) As Integer
  1457. Declare Function cExtCurrentTime Lib "t2win-32.dll" () As Long
  1458. Declare Function cHourTo Lib "t2win-32.dll" (Text As String) As Variant
  1459. Declare Function cIntoBalance Lib "t2win-32.dll" (Var As Variant) As String
  1460. Declare Function cIntoBalanceFill Lib "t2win-32.dll" (Var As Variant) As String
  1461. Declare Function cIntoDate Lib "t2win-32.dll" (ByVal nDate As Long) As String
  1462. Declare Function cIntoDateFill Lib "t2win-32.dll" (ByVal nDate As Long) As String
  1463. Declare Function cIntoDateNull Lib "t2win-32.dll" (ByVal nDate As Long) As String
  1464. Declare Function cIntoFixHour Lib "t2win-32.dll" (Var As Variant, ByVal Length As Integer, ByVal fillZero As Integer, ByVal CentiΦme As Integer) As String
  1465. Declare Function cIntoHour Lib "t2win-32.dll" (Var As Variant) As String
  1466. Declare Function cIntoVarHour Lib "t2win-32.dll" (Var As Variant) As String
  1467. Declare Sub cIntToDate Lib "t2win-32.dll" (ByVal Scalar As Integer, nYear As Integer, nMonth As Integer, nDay As Integer)
  1468. Declare Sub cLongToDateHour Lib "t2win-32.dll" (ByVal Scalar As Long, nYear As Integer, nMonth As Integer, nDay As Integer, nHour As Integer, nMinute As Integer, nExtra As Integer)
  1469. Declare Sub cScalarToDate Lib "t2win-32.dll" (ByVal Scalar As Long, nYear As Integer, nMonth As Integer, nDay As Integer)
  1470. Declare Sub cScalarToTime Lib "t2win-32.dll" (ByVal Scalar As Long, nHour As Integer, nMin As Integer, nSec As Integer)
  1471. Declare Function cTimeBetween Lib "t2win-32.dll" (ByVal Hr1 As Integer, ByVal Hr2 As Integer) As Integer
  1472. Declare Function cTimeToScalar Lib "t2win-32.dll" (ByVal nHour As Integer, ByVal nMin As Integer, ByVal nSec As Integer) As Long
  1473. Declare Function cTrueBetween Lib "t2win-32.dll" (Var As Variant, Var1 As Variant, Var2 As Variant) As Integer
  1474. Declare Function cWeekOfYear Lib "t2win-32.dll" (ByVal nYear As Integer, ByVal nMonth As Integer, ByVal nDay As Integer, ByVal nISO As Integer) As Integer
  1475.  
  1476. ' process id
  1477.  
  1478. Declare Sub cPushID Lib "t2win-32.dll" (IDArray() As Integer, ByVal nID As Integer)
  1479. Declare Sub cPopID Lib "t2win-32.dll" (IDArray() As Integer, ByVal nID As Integer)
  1480. Declare Sub cPopLastID Lib "t2win-32.dll" (IDArray() As Integer)
  1481. Declare Function cGetID Lib "t2win-32.dll" (IDArray() As Integer, ByVal nPosition As Integer) As Integer
  1482. Declare Sub cClearID Lib "t2win-32.dll" (IDArray() As Integer)
  1483.  
  1484. ' sFile I/O, direct routines issued from C functionnalities
  1485.  
  1486. Declare Function cFopen Lib "t2win-32.dll" (ByVal sFile As String, ByVal Mode As String) As Long
  1487. Declare Function cFclose Lib "t2win-32.dll" (ByVal IOstream As Long) As Integer
  1488. Declare Function cFgetc Lib "t2win-32.dll" (ByVal IOstream As Long) As Integer
  1489. Declare Function cFputc Lib "t2win-32.dll" (ByVal char As Integer, ByVal IOstream As Long) As Integer
  1490. Declare Function cFputs Lib "t2win-32.dll" (ByVal Text As String, ByVal IOstream As Long) As Integer
  1491. Declare Function cFgets Lib "t2win-32.dll" (Text As String, ByVal Length As Integer, ByVal IOstream As Long) As Integer
  1492. Declare Function cFwrite Lib "t2win-32.dll" (Text As String, ByVal IOstream As Long) As Integer
  1493. Declare Function cFread Lib "t2win-32.dll" (Text As String, ByVal Length As Integer, ByVal IOstream As Long) As Integer
  1494. Declare Function cFcloseall Lib "t2win-32.dll" () As Integer
  1495. Declare Function cFflush Lib "t2win-32.dll" (ByVal IOstream As Long) As Integer
  1496. Declare Function cFflushall Lib "t2win-32.dll" () As Integer
  1497. Declare Function cFeof Lib "t2win-32.dll" (ByVal IOstream As Long) As Integer
  1498. Declare Function cFerror Lib "t2win-32.dll" (ByVal IOstream As Long) As Integer
  1499. Declare Sub cFclearerr Lib "t2win-32.dll" (ByVal IOstream As Long)
  1500. Declare Function cFseek Lib "t2win-32.dll" (ByVal IOstream As Long, ByVal Offset As Long, ByVal origin As Integer) As Integer
  1501. Declare Function cFtell Lib "t2win-32.dll" (ByVal IOstream As Long) As Long
  1502. Declare Sub cFrewind Lib "t2win-32.dll" (ByVal IOstream As Long)
  1503. Declare Function cFProcessAsciiFile Lib "t2win-32.dll" (ByVal IOstream As Long, AsciiOffset() As Long) As Long
  1504. Declare Function cFGotoRecord Lib "t2win-32.dll" (ByVal IOstream As Long, AsciiOffset() As Long, ByVal Record As Long) As Integer
  1505. Declare Function cFStdIn Lib "t2win-32.dll" () As Long
  1506. Declare Function cFStdOut Lib "t2win-32.dll" () As Long
  1507. Declare Function cFStdErr Lib "t2win-32.dll" () As Long
  1508.  
  1509. ' day - month
  1510.  
  1511. '  definition for language in multi-language management
  1512. Public Const LNG_FRENCH = 1
  1513. Public Const LNG_DUTCH = 2
  1514. Public Const LNG_GERMAN = 3
  1515. Public Const LNG_ENGLISH = 4
  1516. Public Const LNG_ITALIAN = 5
  1517. Public Const LNG_SPANISH = 6
  1518. Public Const LNG_CATALAN = 7
  1519. Public Const LNG_POLISH = 8
  1520. Public Const LNG_NORWAY = 9
  1521. Public Const LNG_SWEDISH = 10
  1522.  
  1523. Declare Function cGetAscTime Lib "t2win-32.dll" (ByVal nLanguage As Integer) As String
  1524. Declare Function cGetLongDay Lib "t2win-32.dll" (ByVal nLanguage As Integer, ByVal nDay As Integer) As String
  1525. Declare Function cGetLongMonth Lib "t2win-32.dll" (ByVal nLanguage As Integer, ByVal nMonth As Integer) As String
  1526. Declare Function cGetShortDay Lib "t2win-32.dll" (ByVal nLanguage As Integer, ByVal nDay As Integer) As String
  1527. Declare Function cGetShortMonth Lib "t2win-32.dll" (ByVal nLanguage As Integer, ByVal nMonth As Integer) As String
  1528. Declare Function cGetSmallDay Lib "t2win-32.dll" (ByVal nLanguage As Integer, ByVal nDay As Integer) As String
  1529. Declare Function cGetTinyDay Lib "t2win-32.dll" (ByVal nLanguage As Integer, ByVal nDay As Integer) As String
  1530. Declare Function cGetTinyMonth Lib "t2win-32.dll" (ByVal nLanguage As Integer, ByVal nMonth As Integer) As String
  1531. Declare Sub cSysMenuChange Lib "t2win-32.dll" (ByVal hwnd As Long, ByVal Position As Integer, ByVal NewMessage As String)
  1532.  
  1533. ' Functions for calculating 2-D geometry
  1534.  
  1535. '  structure for 2-D geometry types
  1536. Type tagVECTOR2
  1537.    x              As Double
  1538.    y              As Double
  1539. End Type
  1540.  
  1541. Declare Sub cV2Add Lib "t2win-32.dll" (u As tagVECTOR2, v As tagVECTOR2, w As tagVECTOR2)
  1542. Declare Sub cV2Sub Lib "t2win-32.dll" (u As tagVECTOR2, v As tagVECTOR2, w As tagVECTOR2)
  1543. Declare Sub cV2Combine Lib "t2win-32.dll" (u As tagVECTOR2, ByVal c1 As Double, v As tagVECTOR2, ByVal c2 As Double, w As tagVECTOR2)
  1544. Declare Sub cV2Copy Lib "t2win-32.dll" (u As tagVECTOR2, w As tagVECTOR2)
  1545. Declare Function cV2Dot Lib "t2win-32.dll" (u As tagVECTOR2, v As tagVECTOR2) As Double
  1546. Declare Function cV2Length Lib "t2win-32.dll" (u As tagVECTOR2) As Double
  1547. Declare Function cV2LengthSquared Lib "t2win-32.dll" (u As tagVECTOR2) As Double
  1548. Declare Sub cV2LinearIp Lib "t2win-32.dll" (lo As tagVECTOR2, hi As tagVECTOR2, ByVal alpha As Double, w As tagVECTOR2)
  1549. Declare Sub cV2Mul Lib "t2win-32.dll" (u As tagVECTOR2, v As tagVECTOR2, w As tagVECTOR2)
  1550. Declare Sub cV2Neg Lib "t2win-32.dll" (u As tagVECTOR2)
  1551. Declare Sub cV2Normalized Lib "t2win-32.dll" (u As tagVECTOR2)
  1552. Declare Sub cV2Ortho Lib "t2win-32.dll" (u As tagVECTOR2, w As tagVECTOR2)
  1553. Declare Sub cV2ScaledNewLength Lib "t2win-32.dll" (u As tagVECTOR2, ByVal newlen As Double)
  1554. Declare Function cV2SegmentLength Lib "t2win-32.dll" (p As tagVECTOR2, q As tagVECTOR2) As Double
  1555.  
  1556. ' Functions for calculating 3-D geometry
  1557.  
  1558. '  structure for 3-D geometry types
  1559. Type tagVECTOR3
  1560.    x              As Double
  1561.    y              As Double
  1562.    z              As Double
  1563. End Type
  1564.  
  1565. Declare Sub cV3Add Lib "t2win-32.dll" (u As tagVECTOR3, v As tagVECTOR3, w As tagVECTOR3)
  1566. Declare Sub cV3Sub Lib "t2win-32.dll" (u As tagVECTOR3, v As tagVECTOR3, w As tagVECTOR3)
  1567. Declare Sub cV3Combine Lib "t2win-32.dll" (u As tagVECTOR3, ByVal c1 As Double, v As tagVECTOR3, ByVal c2 As Double, w As tagVECTOR3)
  1568. Declare Sub cV3Copy Lib "t2win-32.dll" (u As tagVECTOR3, w As tagVECTOR3)
  1569. Declare Sub cV3Cross Lib "t2win-32.dll" (u As tagVECTOR3, v As tagVECTOR3, w As tagVECTOR3)
  1570. Declare Function cV3Dot Lib "t2win-32.dll" (u As tagVECTOR3, v As tagVECTOR3) As Double
  1571. Declare Function cV3Length Lib "t2win-32.dll" (u As tagVECTOR3) As Double
  1572. Declare Function cV3LengthSquared Lib "t2win-32.dll" (u As tagVECTOR3) As Double
  1573. Declare Sub cV3LinearIp Lib "t2win-32.dll" (lo As tagVECTOR3, hi As tagVECTOR3, ByVal alpha As Double, w As tagVECTOR3)
  1574. Declare Sub cV3Mul Lib "t2win-32.dll" (u As tagVECTOR3, v As tagVECTOR3, w As tagVECTOR3)
  1575. Declare Sub cV3Neg Lib "t2win-32.dll" (u As tagVECTOR3)
  1576. Declare Sub cV3Normalized Lib "t2win-32.dll" (u As tagVECTOR3)
  1577. Declare Sub cV3ScaledNewLength Lib "t2win-32.dll" (u As tagVECTOR3, ByVal newlen As Double)
  1578. Declare Function cV3SegmentLength Lib "t2win-32.dll" (p As tagVECTOR3, q As tagVECTOR3) As Double
  1579.  
  1580. Declare Function c3DWeightAverage Lib "t2win-32.dll" (ul3D As tagVECTOR3, ll3D As tagVECTOR3, lr3D As tagVECTOR3, ur3D As tagVECTOR3, ptToLocate3D As tagVECTOR3) As Double
  1581.  
  1582. ' huge string
  1583.  
  1584. Declare Function cHugeStrAdd Lib "t2win-32.dll" (ByVal hsHandle As Long, hsText As String) As Integer
  1585. Declare Function cHugeStrAddress Lib "t2win-32.dll" (ByVal hsHandle As Long) As Long
  1586. Declare Function cHugeStrAppend Lib "t2win-32.dll" (ByVal hsHandle As Long, hsText As String) As Integer
  1587. Declare Function cHugeStrBlocks Lib "t2win-32.dll" (ByVal hsHandle As Long) As Long
  1588. Declare Function cHugeStrClear Lib "t2win-32.dll" (ByVal hsHandle As Long) As Integer
  1589. Declare Function cHugeStrCreate Lib "t2win-32.dll" (ByVal hsSize As Long) As Long
  1590. Declare Function cHugeStrFree Lib "t2win-32.dll" (ByVal hsHandle As Long) As Integer
  1591. Declare Function cHugeStrGetNP Lib "t2win-32.dll" (ByVal hsHandle As Long) As Long
  1592. Declare Function cHugeStrGetWP Lib "t2win-32.dll" (ByVal hsHandle As Long) As Long
  1593. Declare Function cHugeStrLength Lib "t2win-32.dll" (ByVal hsHandle As Long) As Long
  1594. Declare Function cHugeStrMid Lib "t2win-32.dll" (ByVal hsHandle As Long, ByVal hsStart As Long, ByVal hsLength As Long) As String
  1595. Declare Function cHugeStrNext Lib "t2win-32.dll" (ByVal hsHandle As Long, ByVal hsNext As Long) As String
  1596. Declare Function cHugeStrOnDisk Lib "t2win-32.dll" (ByVal hsHandle As Long, ByVal hsFile As String, ByVal hsGetPut As Integer) As Long
  1597. Declare Function cHugeStrRead Lib "t2win-32.dll" (ByVal hsHandle As Long, ByVal hsBlock As Long) As String
  1598. Declare Function cHugeStrSetNP Lib "t2win-32.dll" (ByVal hsHandle As Long, ByVal hsPtr As Long) As Integer
  1599. Declare Function cHugeStrSetWP Lib "t2win-32.dll" (ByVal hsHandle As Long, ByVal hsPtr As Long) As Integer
  1600. Declare Function cHugeStrSize Lib "t2win-32.dll" (ByVal hsHandle As Long) As Long
  1601.  
  1602. ' t2win-32 version
  1603.  
  1604. Declare Function cGetVersion Lib "t2win-32.dll" () As Single
  1605. Declare Function cIsRegistered Lib "t2win-32.dll" () As Integer
  1606.  
  1607. ' protect
  1608.  
  1609. Declare Function cDESencrypt Lib "t2win-32.dll" (Text As String, Key As String) As String
  1610. Declare Function cDESdecrypt Lib "t2win-32.dll" (Text As String, Key As String) As String
  1611. Declare Function cDIAMONDencrypt Lib "t2win-32.dll" (Text As String, Key As String, ByVal Mode As Integer) As String
  1612. Declare Function cDIAMONDdecrypt Lib "t2win-32.dll" (Text As String, Key As String, ByVal Mode As Integer) As String
  1613. Declare Function cHashMD5 Lib "t2win-32.dll" (Text As String) As String
  1614. Declare Function cIDEAencrypt Lib "t2win-32.dll" (Text As String, Key As String) As String
  1615. Declare Function cIDEAdecrypt Lib "t2win-32.dll" (Text As String, Key As String) As String
  1616. Declare Function cMod10 Lib "t2win-32.dll" (ByVal Text As String) As Integer
  1617. Declare Function cMod10R Lib "t2win-32.dll" (ByVal Text As String) As Integer
  1618. Declare Function cMod11 Lib "t2win-32.dll" (ByVal Text As String) As Integer
  1619. Declare Function cMod11R Lib "t2win-32.dll" (ByVal Text As String) As Integer
  1620. Declare Function cMod137 Lib "t2win-32.dll" (ByVal Text As String) As Integer
  1621. Declare Function cMod137R Lib "t2win-32.dll" (ByVal Text As String) As Integer
  1622. Declare Function cRegistrationKey Lib "t2win-32.dll" (ByVal RegText As String, ByVal RegKey1 As Long) As Long
  1623. Declare Function cRegistrationKey2 Lib "t2win-32.dll" (ByVal RegText As String, ByVal RegKey1 As Long, ByVal RegKey2 As Long) As Long
  1624. Declare Function cRegistrationKey3 Lib "t2win-32.dll" (ByVal RegText As String, ByVal RegKey1 As Long, ByVal RegKey2 As Long, ByVal RegKey3 As Long) As Long
  1625. Declare Function cRUBYencrypt Lib "t2win-32.dll" (Text As String, Key As String, ByVal Mode As Integer) As String
  1626. Declare Function cRUBYdecrypt Lib "t2win-32.dll" (Text As String, Key As String, ByVal Mode As Integer) As String
  1627.  
  1628. ' file protect
  1629.  
  1630. Public Const CRYPTO_KEY_TOO_SMALL = -1
  1631. Public Const CRYPTO_CANT_INIT_KEY = -2
  1632. Public Const CRYPTO_CANT_INIT_BUFFER = -11
  1633. Public Const CRYPTO_CANT_OPEN_FILEIN = -21
  1634. Public Const CRYPTO_CANT_CREATE_FILEOUT = -22
  1635. Public Const CRYPTO_ERROR_READING_FILEIN = -31
  1636. Public Const CRYPTO_ERROR1_WRITING_FILEOUT = -41
  1637. Public Const CRYPTO_ERROR2_WRITING_FILEOUT = -42
  1638. Public Const CRYPTO_ERROR1_WRITING_LASTBYTE = -51
  1639. Public Const CRYPTO_ERROR2_WRITING_LASTBYTE = -52
  1640. Public Const CRYPTO_BAD_LASTBYTE = -61
  1641.  
  1642. Public Const DIAMOND_FULL_MODE1 = 1          ' more strongest (slowest)
  1643. Public Const DIAMOND_FULL_MODE2 = 3          ' more strong (slow)
  1644. Public Const DIAMOND_LITE_MODE1 = 2          ' strongest (fast)
  1645. Public Const DIAMOND_LITE_MODE2 = 4          ' strong (fastest)
  1646.  
  1647. Public Const RUBY_MODE_MINIMUM = 1           ' speed is of the essence, security secondary.
  1648. Public Const RUBY_MODE_DESK_LOCK = 2         ' reasonable compromise of speed vs security.
  1649. Public Const RUBY_MODE_DEAD_BOLT = 4         ' default = probably good enough for most things.
  1650. Public Const RUBY_MODE_PORTABLE_SAFE = 5     ' security is more important than speed.
  1651. Public Const RUBY_MODE_ANCHORED_SAFE = 8     ' speed isn't much of a concern.
  1652. Public Const RUBY_MODE_BANK_VAULT = 10       ' your pentium has nothing better to do, anyway.
  1653. Public Const RUBY_MODE_FORT_KNOX = 16        ' be cool.
  1654.  
  1655. Declare Function cDESdecryptFile Lib "t2win-32.dll" (ByVal FileIn As String, ByVal FileOut As String, Key As String) As Long
  1656. Declare Function cDESencryptFile Lib "t2win-32.dll" (ByVal FileIn As String, ByVal FileOut As String, Key As String) As Long
  1657. Declare Function cDIAMONDdecryptFile Lib "t2win-32.dll" (ByVal FileIn As String, ByVal FileOut As String, Key As String, ByVal Mode As Integer) As Long
  1658. Declare Function cDIAMONDencryptFile Lib "t2win-32.dll" (ByVal FileIn As String, ByVal FileOut As String, Key As String, ByVal Mode As Integer) As Long
  1659. Declare Function cIDEAdecryptFile Lib "t2win-32.dll" (ByVal FileIn As String, ByVal FileOut As String, Key As String) As Long
  1660. Declare Function cIDEAencryptFile Lib "t2win-32.dll" (ByVal FileIn As String, ByVal FileOut As String, Key As String) As Long
  1661. Declare Function cRUBYdecryptFile Lib "t2win-32.dll" (ByVal FileIn As String, ByVal FileOut As String, Key As String, ByVal Mode As Integer) As Long
  1662. Declare Function cRUBYencryptFile Lib "t2win-32.dll" (ByVal FileIn As String, ByVal FileOut As String, Key As String, ByVal Mode As Integer) As Long
  1663.  
  1664. ' media ID - volume
  1665.  
  1666. '  structure for get/set Media ID
  1667. Type tagMEDIAID
  1668.    VolumeName           As String
  1669.    VolumeSerialNumber   As Long
  1670.    SystemName           As String
  1671.    MaxNameLength        As Long
  1672.    FileSystemFlags      As Long
  1673. End Type
  1674.  
  1675. ' structure for get/set DOS Media ID
  1676. Type tagDOSMEDIAID
  1677.    InfoLevel            As String * 2     'use cCVI for integer conversion
  1678.    SerialNumber         As String * 4     'use cCVL for long conversion
  1679.    VolLabel             As String * 11
  1680.    FileSysType          As String * 8
  1681. End Type
  1682.  
  1683. Declare Function cGetMediaID Lib "t2win-32.dll" (ByVal nDrive As String, MEDIAID As tagMEDIAID) As Integer
  1684. Declare Function cGetVolumeLabel Lib "t2win-32.dll" (ByVal nDrive As String) As String
  1685. Declare Function cSetVolumeLabel Lib "t2win-32.dll" (ByVal nDrive As String, ByVal nVolumeLabel As String) As Integer
  1686. Declare Function cDOSGetMediaID Lib "t2win-32.dll" (ByVal nDrive As String, DOSMEDIAID As tagDOSMEDIAID) As Integer
  1687. Declare Function cDOSSetMediaID Lib "t2win-32.dll" (ByVal nDrive As String, DOSMEDIAID As tagDOSMEDIAID) As Integer
  1688.  
  1689. ' network
  1690.  
  1691. Public Const ADAPTER_NO_ERROR = -1
  1692. Public Const ADAPTER_CANT_LOAD_APIDLL = 1
  1693. Public Const ADAPTER_CANT_FIND_ENTRYPOINT = 2
  1694. Public Const ADAPTER_CANT_BE_ENUMERATED = 3
  1695. Public Const ADAPTER_BAD_NUMBER = 4
  1696. Public Const ADAPTER_CANT_BE_RESETED = 5
  1697. Public Const ADAPTER_CANT_BE_READ = 6
  1698.  
  1699. Declare Function cGetNetConnection Lib "t2win-32.dll" (ByVal lpDrive As String, iErrorCode As Integer) As String
  1700. Declare Function cGetNetUser Lib "t2win-32.dll" (iErrorCode As Integer) As String
  1701. Declare Function cGetNetNumberOfAdapter Lib "t2win-32.dll" (iErrorCode As Integer) As Integer
  1702. Declare Function cGetNetAdapterNumber Lib "t2win-32.dll" (ByVal iLanAdapter As Integer, iErrorCode As Integer) As Integer
  1703. Declare Function cGetNetAdapterMacAddress Lib "t2win-32.dll" (ByVal iLanAdapter As Integer, ByVal iFormat As Integer, iErrorCode As Integer) As String
  1704. 'Declare Function cNetPing Lib "t2win-32.dll" (ByVal sHostName As String, iErrorCode As Integer) As Long
  1705. 'Declare Function cNetEnumConnections Lib "t2win-32.dll" (iErrorCode As Integer) As String
  1706.  
  1707. ' multi-language message box - input box
  1708.  
  1709. '  definition for message position
  1710. Public Const MB_MESSAGE_LEFT = 0
  1711. Public Const MB_MESSAGE_CENTER = 8192
  1712. Public Const MB_MESSAGE_RIGHT = 16384
  1713.  
  1714. '  definition for timeout management
  1715. Public Const MB_TIMEOUT_2 = 32768
  1716. Public Const MB_TIMEOUT_4 = 2 * MB_TIMEOUT_2
  1717. Public Const MB_TIMEOUT_8 = 2 * MB_TIMEOUT_4
  1718. Public Const MB_TIMEOUT_16 = 2 * MB_TIMEOUT_8
  1719.  
  1720. Public Const MB_TIMEOUT_6 = MB_TIMEOUT_2 Or MB_TIMEOUT_4
  1721. Public Const MB_TIMEOUT_10 = MB_TIMEOUT_2 Or MB_TIMEOUT_8
  1722. Public Const MB_TIMEOUT_12 = MB_TIMEOUT_4 Or MB_TIMEOUT_8
  1723. Public Const MB_TIMEOUT_14 = MB_TIMEOUT_2 Or MB_TIMEOUT_4 Or MB_TIMEOUT_8
  1724. Public Const MB_TIMEOUT_18 = MB_TIMEOUT_2 Or MB_TIMEOUT_16
  1725. Public Const MB_TIMEOUT_20 = MB_TIMEOUT_4 Or MB_TIMEOUT_16
  1726. Public Const MB_TIMEOUT_22 = MB_TIMEOUT_2 Or MB_TIMEOUT_4 Or MB_TIMEOUT_16
  1727. Public Const MB_TIMEOUT_24 = MB_TIMEOUT_8 Or MB_TIMEOUT_16
  1728. Public Const MB_TIMEOUT_26 = MB_TIMEOUT_2 Or MB_TIMEOUT_8 Or MB_TIMEOUT_16
  1729. Public Const MB_TIMEOUT_28 = MB_TIMEOUT_4 Or MB_TIMEOUT_8 Or MB_TIMEOUT_16
  1730. Public Const MB_TIMEOUT_30 = MB_TIMEOUT_2 Or MB_TIMEOUT_4 Or MB_TIMEOUT_8 Or MB_TIMEOUT_16
  1731.  
  1732. Public Const MB_DISPLAY_TIMEOUT = 524288
  1733. Public Const MB_NO_BUTTONS = 1048576
  1734.  
  1735. Declare Function cLngMsgBox Lib "t2win-32.dll" (ByVal nLanguage As Integer, ByVal message As String, ByVal Button As Long, ByVal Title As String) As Integer
  1736. Declare Sub cLngBoxMsg Lib "t2win-32.dll" Alias "cLngMsgBox" (ByVal nLanguage As Integer, ByVal message As String, ByVal Button As Long, ByVal Title As String)
  1737. Declare Function cLngInpBox Lib "t2win-32.dll" (ByVal nLanguage As Integer, ByVal message As String, ByVal Title As String, ByVal Default As String) As String
  1738. Declare Sub cLngSysMenu Lib "t2win-32.dll" (ByVal nLanguage As Integer, ByVal hwnd As Long)
  1739.  
  1740. ' desktop
  1741.  
  1742. Declare Sub cLoadDesktopBackground Lib "t2win-32.dll" (ByVal FileName As String, ByVal Tile As Integer)
  1743.  
  1744. ' registry
  1745.  
  1746. Public Const RK_NO_ERROR = -1
  1747. Public Const RK_KEY_IS_EMPTY = 1
  1748. Public Const RK_UNABLE_TO_CREATE_KEY = 2
  1749. Public Const RK_UNABLE_TO_OPEN_KEY = 3
  1750. Public Const RK_UNKNOWN_DISPOSITION = 4
  1751. Public Const RK_CANNOT_SET_THE_VALUE = 5
  1752. Public Const RK_UNABLE_TO_QUERY_KEY = 6
  1753.  
  1754. Public Const RK_HKEY_CLASSES_ROOT = 1
  1755. Public Const RK_HKEY_CURRENT_USER = 2
  1756. Public Const RK_HKEY_LOCAL_MACHINE = 3
  1757. Public Const RK_HKEY_USERS = 4
  1758. Public Const RK_HKEY_PERFORMANCE_DATA = 5
  1759. Public Const RK_HKEY_CURRENT_CONFIG = 6
  1760. Public Const RK_HKEY_DYN_DATA = 7
  1761.  
  1762. ' error codes for GetAllSettings
  1763.  
  1764. Public Const GET_ALL_BAD_DIMENSION = 0
  1765. Public Const GET_ALL_CANT_OPEN_SECTION = -1
  1766. Public Const GET_ALL_NOT_ENOUGH_ELEMENT = -2
  1767.  
  1768. Type tagREGISTRYKEYINFO
  1769.    lSubKeys             As Long
  1770.    lMaxSubKeyLen        As Long
  1771.    lValues              As Long
  1772.    lMaxValueNameLen     As Long
  1773.    lMaxValueLen         As Long
  1774.    sInfoInStr           As String
  1775. End Type
  1776.  
  1777. Declare Function cPutRegistry Lib "t2win-32.dll" (ByVal lpSection As String, ByVal lpKey As String, ByVal lpValue As String) As Integer
  1778. Declare Function cGetRegistry Lib "t2win-32.dll" (ByVal lpSection As String, ByVal lpKey As String, ByVal lpDefault As String) As String
  1779. Declare Function cKillRegistry Lib "t2win-32.dll" (ByVal lpSection As String, ByVal lpKey As String) As Integer
  1780. Declare Function cPutRegistryExt Lib "t2win-32.dll" (ByVal KeyType As Integer, ByVal lpSection As String, ByVal lpKey As String, ByVal lpValue As String) As Integer
  1781. Declare Function cGetRegistryExt Lib "t2win-32.dll" (ByVal KeyType As Integer, ByVal lpSection As String, ByVal lpKey As String, ByVal lpDefault As String) As String
  1782. Declare Function cKillRegistryExt Lib "t2win-32.dll" (ByVal KeyType As Integer, ByVal lpSection As String, ByVal lpKey As String) As Integer
  1783.  
  1784. Declare Function cGetAllSettings Lib "t2win-32.dll" (Strarray() As String, ByVal lpSection As String) As Integer
  1785. Declare Function cRegistryKeyInfo Lib "t2win-32.dll" (ByVal lpSection As String, REGISTRYKEYINFO As tagREGISTRYKEYINFO) As Integer
  1786.  
  1787. ' bitmap
  1788.  
  1789. Public Const DIB_SAVE_WINDOW = True
  1790. Public Const DIB_SAVE_CLIENT = False
  1791.  
  1792. Type tagRECT
  1793.    Left                 As Long
  1794.    Top                  As Long
  1795.    Right                As Long
  1796.    Bottom               As Long
  1797. End Type
  1798.  
  1799. Declare Function cDIBSaveScreen Lib "t2win-32.dll" (ByVal lpFilename As String) As Integer
  1800. Declare Function cDIBSaveWindow Lib "t2win-32.dll" (ByVal hwnd As Long, ByVal SaveArea As Integer, ByVal lpFilename As String) As Integer
  1801. Declare Function cDisplaySplash Lib "t2win-32.dll" (ByVal lpFilename As String, ByVal MinimumTimeToStay As Integer, ByVal AutoDestruction As Integer) As Long
  1802. Declare Function cDestroySplash Lib "t2win-32.dll" (ByVal hwnd As Long) As Integer
  1803. Declare Function cShadeRect Lib "t2win-32.dll" (ByVal hDC As Long, lpRect As tagRECT) As Integer
  1804. Declare Function cTileBitmapOnWindow Lib "t2win-32.dll" (ByVal hwnd As Long, ByVal lpFilename As String) As Integer
  1805.  
  1806. ' hook keyboard and mouse
  1807.  
  1808. Public Const LOCK_MOUSE_LCLICK = 1
  1809. Public Const LOCK_MOUSE_MCLICK = 2
  1810. Public Const LOCK_MOUSE_RCLICK = 4
  1811. Public Const LOCK_MOUSE_ALL_CLICK = LOCK_MOUSE_LCLICK Or LOCK_MOUSE_MCLICK Or LOCK_MOUSE_RCLICK
  1812.  
  1813. Declare Function cInstallHookKeyboard Lib "t2win-32.dll" (ByVal InstallRemove As Integer) As Integer
  1814. Declare Function cLockKeyboard Lib "t2win-32.dll" (ByVal LockUnlock As Integer, ByVal SpecialUnlockKey As Integer) As Integer
  1815. Declare Function cLockMouse Lib "t2win-32.dll" (ByVal LockUnlock As Integer, ByVal ClickToBeHooked As Integer) As Integer
  1816.  
  1817. ' printer
  1818.  
  1819. Public Const EPJ_SUCCESS = -1
  1820. Public Const EPJ_PRINTER_NAME_EMPTY = 1
  1821. Public Const EPJ_CANT_OPEN_PRINTER = 2
  1822. Public Const EPJ_STRANGE_ERROR = 3
  1823. Public Const EPJ_CANT_ENUMERATE_MORE_JOBS = 4
  1824.  
  1825. ' error codes for cEnumPrinters1, cEnumPrinters2 and cEnumPrinters5
  1826. Public Const EP_SUCCESS = -1
  1827. Public Const EP_STRANGE_ERROR = 1
  1828. Public Const EP_CANT_ENUMERATE_MORE_PRINTERS = 2
  1829. Public Const EP_SERVER_NAME_IS_EMPTY = 3
  1830.  
  1831. Public Const JOB_STATUS_PAUSED = &H1
  1832. Public Const JOB_STATUS_ERROR = &H2
  1833. Public Const JOB_STATUS_DELETING = &H4
  1834. Public Const JOB_STATUS_SPOOLING = &H8
  1835. Public Const JOB_STATUS_PRINTING = &H10
  1836. Public Const JOB_STATUS_OFFLINE = &H20
  1837. Public Const JOB_STATUS_PAPEROUT = &H40
  1838. Public Const JOB_STATUS_PRINTED = &H80
  1839. Public Const JOB_STATUS_DELETED = &H100
  1840. Public Const JOB_STATUS_BLOCKED_DEVQ = &H200
  1841. Public Const JOB_STATUS_USER_INTERVENTION = &H400
  1842.  
  1843. Type tagJOBINFO
  1844.    sPrinterName         As String      'name of the printer for which the job is spooled
  1845.    sMachineName         As String      'name of the machine that created the print job
  1846.    sUserName            As String      'name of the user who owns the print job
  1847.    sDocument            As String      'name of the print job (for example, "MS-WORD: Review.doc")
  1848.    lJobId               As Long        'job identifier value
  1849.    lStatus              As Long        'job status (multiple OR of JOB_STATUS_x)
  1850.    lPriority            As Long        'job priority (1 : minimum; 99 : maximum)
  1851.    lPosition            As Long        'job's position in the print queue
  1852.    lStartTime           As Long        'earliest time that the job can be printed
  1853.    lUntilTime           As Long        'latest time that the job can be printed
  1854.    lTotalPages          As Long        'number of pages required for the job
  1855.    lSize                As Long        'size, in bytes, of the job
  1856.    lTime                As Long        'total time, in seconds, that has elapsed since the job began printing
  1857.    lPagesPrinted        As Long        'number of pages that have printed
  1858.    wYear                As Integer     'year of the job submitted
  1859.    wMonth               As Integer     'month of the job submitted
  1860.    wDay                 As Integer     'day of the job submitted
  1861.    wHour                As Integer     'hour of the job submitted
  1862.    wMinute              As Integer     'minute of the job submitted
  1863.    wSecond              As Integer     'second of the job submitted
  1864. End Type
  1865.  
  1866. Type tagPRINTER1
  1867.    sDescription         As String      'description of the printer
  1868.    sPrinterName         As String      'name of the printer
  1869.    sComment             As String      'brief description of the printer
  1870. End Type
  1871.  
  1872. Type tagPRINTER2
  1873.    sPrinterName         As String      'name of the printer
  1874.    sShareName           As String      'name of the sharepoint of the printer
  1875.    sComment             As String      'brief description of the printer
  1876. End Type
  1877.  
  1878. Type tagPRINTER5
  1879.    sPrinterName         As String      'name of the printer
  1880.    sPortName            As String      'port(s) used to transmit data to the printer
  1881. End Type
  1882.  
  1883. ' error codes for cGetPrinterX, cSetPrinterX
  1884. Public Const SP_SUCCESS = -1
  1885. Public Const SP_PRINTER_NAME_EMPTY = 1
  1886. Public Const SP_CANT_OPEN_PRINTER = 2
  1887. Public Const SP_CANT_GET_PRINTER_PASS1 = 3
  1888. Public Const SP_CANT_ALLOCATE_MEMORY = 4
  1889. Public Const SP_CANT_LOCK_MEMORY = 5
  1890. Public Const SP_CANT_GET_PRINTER_PASS2 = 6
  1891. Public Const SP_CANT_UPDATE_DRIVER = 7
  1892. Public Const SP_CANT_SET_PRINTER = 8
  1893. Public Const SP_COMMAND_NOT_SUPPORTED = 9
  1894.  
  1895. ' codes for SetPrinterDefaultSource
  1896. Public Const SP_SOURCE_FIRST = 1
  1897. Public Const SP_SOURCE_UPPER = 1
  1898. Public Const SP_SOURCE_ONLYONE = 1
  1899. Public Const SP_SOURCE_LOWER = 2
  1900. Public Const SP_SOURCE_MIDDLE = 3
  1901. Public Const SP_SOURCE_MANUAL = 4
  1902. Public Const SP_SOURCE_ENVELOPE = 5
  1903. Public Const SP_SOURCE_ENVMANUAL = 6
  1904. Public Const SP_SOURCE_AUTO = 7
  1905. Public Const SP_SOURCE_TRACTOR = 8
  1906. Public Const SP_SOURCE_SMALLFMT = 9
  1907. Public Const SP_SOURCE_LARGEFMT = 10
  1908. Public Const SP_SOURCE_LARGECAPACITY = 11
  1909. Public Const SP_SOURCE_CASSETTE = 14
  1910. Public Const SP_SOURCE_FORMSOURCE = 15
  1911. Public Const SP_SOURCE_LAST = SP_SOURCE_FORMSOURCE
  1912. Public Const SP_SOURCE_USER = 256                ' device specific bins start here
  1913.  
  1914. ' codes for SetPrinterDitherType
  1915. Public Const SP_DITHER_NONE = 1              ' No dithering
  1916. Public Const SP_DITHER_COARSE = 2            ' Dither with a coarse brush
  1917. Public Const SP_DITHER_FINE = 3              ' Dither with a fine brush
  1918. Public Const SP_DITHER_LINEART = 4           ' LineArt dithering
  1919. Public Const SP_DITHER_GRAYSCALE = 5         ' Device does grayscaling
  1920. Public Const SP_DITHER_USER = 256            ' Device-specific dithers start here
  1921.  
  1922. ' codes for SetPrinterOrientation
  1923. Public Const SP_ORIENTATION_PORTRAIT = 1     ' Portrait
  1924. Public Const SP_ORIENTATION_LANDSCAPE = 2    ' Landscape
  1925.  
  1926. ' codes for GetPrinterPaper
  1927. Public Const DM_SIZE_FIRST = 1
  1928. Public Const DM_SIZE_LETTER = 1                    ' Letter 8 1/2 x 11 in
  1929. Public Const DM_SIZE_LETTERSMALL = 2               ' Letter Small 8 1/2 x 11 in
  1930. Public Const DM_SIZE_TABLOID = 3                   ' Tabloid 11 x 17 in
  1931. Public Const DM_SIZE_LEDGER = 4                    ' Ledger 17 x 11 in
  1932. Public Const DM_SIZE_LEGAL = 5                     ' Legal 8 1/2 x 14 in
  1933. Public Const DM_SIZE_STATEMENT = 6                 ' Statement 5 1/2 x 8 1/2 in
  1934. Public Const DM_SIZE_EXECUTIVE = 7                 ' Executive 7 1/4 x 10 1/2 in
  1935. Public Const DM_SIZE_A3 = 8                        ' A3 297 x 420 mm
  1936. Public Const DM_SIZE_A4 = 9                        ' A4 210 x 297 mm
  1937. Public Const DM_SIZE_A4SMALL = 10                  ' A4 Small 210 x 297 mm
  1938. Public Const DM_SIZE_A5 = 11                       ' A5 148 x 210 mm
  1939. Public Const DM_SIZE_B4 = 12                       ' B4 (JIS) 250 x 354
  1940. Public Const DM_SIZE_B5 = 13                       ' B5 (JIS) 182 x 257 mm
  1941. Public Const DM_SIZE_FOLIO = 14                    ' Folio 8 1/2 x 13 in
  1942. Public Const DM_SIZE_QUARTO = 15                   ' Quarto 215 x 275 mm
  1943. Public Const DM_SIZE_10X14 = 16                    ' 10x14 in
  1944. Public Const DM_SIZE_11X17 = 17                    ' 11x17 in
  1945. Public Const DM_SIZE_NOTE = 18                     ' Note 8 1/2 x 11 in
  1946. Public Const DM_SIZE_ENV_9 = 19                    ' Envelope #9 3 7/8 x 8 7/8
  1947. Public Const DM_SIZE_ENV_10 = 20                   ' Envelope #10 4 1/8 x 9 1/2
  1948. Public Const DM_SIZE_ENV_11 = 21                   ' Envelope #11 4 1/2 x 10 3/8
  1949. Public Const DM_SIZE_ENV_12 = 22                   ' Envelope #12 4 \276 x 11
  1950. Public Const DM_SIZE_ENV_14 = 23                   ' Envelope #14 5 x 11 1/2
  1951. Public Const DM_SIZE_CSHEET = 24                   ' C size sheet
  1952. Public Const DM_SIZE_DSHEET = 25                   ' D size sheet
  1953. Public Const DM_SIZE_ESHEET = 26                   ' E size sheet
  1954. Public Const DM_SIZE_ENV_DL = 27                   ' Envelope DL 110 x 220mm
  1955. Public Const DM_SIZE_ENV_C5 = 28                   ' Envelope C5 162 x 229 mm
  1956. Public Const DM_SIZE_ENV_C3 = 29                   ' Envelope C3  324 x 458 mm
  1957. Public Const DM_SIZE_ENV_C4 = 30                   ' Envelope C4  229 x 324 mm
  1958. Public Const DM_SIZE_ENV_C6 = 31                   ' Envelope C6  114 x 162 mm
  1959. Public Const DM_SIZE_ENV_C65 = 32                  ' Envelope C65 114 x 229 mm
  1960. Public Const DM_SIZE_ENV_B4 = 33                   ' Envelope B4  250 x 353 mm
  1961. Public Const DM_SIZE_ENV_B5 = 34                   ' Envelope B5  176 x 250 mm
  1962. Public Const DM_SIZE_ENV_B6 = 35                   ' Envelope B6  176 x 125 mm
  1963. Public Const DM_SIZE_ENV_ITALY = 36                ' Envelope 110 x 230 mm
  1964. Public Const DM_SIZE_ENV_MONARCH = 37              ' Envelope Monarch 3.875 x 7.5 in
  1965. Public Const DM_SIZE_ENV_PERSONAL = 38             ' 6 3/4 Envelope 3 5/8 x 6 1/2 in
  1966. Public Const DM_SIZE_FANFOLD_US = 39               ' US Std Fanfold 14 7/8 x 11 in
  1967. Public Const DM_SIZE_FANFOLD_STD_GERMAN = 40       ' German Std Fanfold 8 1/2 x 12 in
  1968. Public Const DM_SIZE_FANFOLD_LGL_GERMAN = 41       ' German Legal Fanfold 8 1/2 x 13 in
  1969. Public Const DM_SIZE_ISO_B4 = 42                   ' B4 (ISO) 250 x 353 mm
  1970. Public Const DM_SIZE_JAPANESE_POSTCARD = 43        ' Japanese Postcard 100 x 148 mm
  1971. Public Const DM_SIZE_9X11 = 44                     ' 9 x 11 in
  1972. Public Const DM_SIZE_10X11 = 45                    ' 10 x 11 in
  1973. Public Const DM_SIZE_15X11 = 46                    ' 15 x 11 in
  1974. Public Const DM_SIZE_ENV_INVITE = 47               ' Envelope Invite 220 x 220 mm
  1975. Public Const DM_SIZE_RESERVED_48 = 48              ' RESERVED--DO NOT USE
  1976. Public Const DM_SIZE_RESERVED_49 = 49              ' RESERVED--DO NOT USE
  1977. Public Const DM_SIZE_LETTER_EXTRA = 50             ' Letter Extra 9 \275 x 12 in
  1978. Public Const DM_SIZE_LEGAL_EXTRA = 51              ' Legal Extra 9 \275 x 15 in
  1979. Public Const DM_SIZE_TABLOID_EXTRA = 52            ' Tabloid Extra 11.69 x 18 in
  1980. Public Const DM_SIZE_A4_EXTRA = 53                 ' A4 Extra 9.27 x 12.69 in
  1981. Public Const DM_SIZE_LETTER_TRANSVERSE = 54        ' Letter Transverse 8 \275 x 11 in
  1982. Public Const DM_SIZE_A4_TRANSVERSE = 55            ' A4 Transverse 210 x 297 mm
  1983. Public Const DM_SIZE_LETTER_EXTRA_TRANSVERSE = 56  ' Letter Extra Transverse 9\275 x 12 in
  1984. Public Const DM_SIZE_A_PLUS = 57                   ' SuperA/SuperA/A4 227 x 356 mm
  1985. Public Const DM_SIZE_B_PLUS = 58                   ' SuperB/SuperB/A3 305 x 487 mm
  1986. Public Const DM_SIZE_LETTER_PLUS = 59              ' Letter Plus 8.5 x 12.69 in
  1987. Public Const DM_SIZE_A4_PLUS = 60                  ' A4 Plus 210 x 330 mm
  1988. Public Const DM_SIZE_A5_TRANSVERSE = 61            ' A5 Transverse 148 x 210 mm
  1989. Public Const DM_SIZE_B5_TRANSVERSE = 62            ' B5 (JIS) Transverse 182 x 257 mm
  1990. Public Const DM_SIZE_A3_EXTRA = 63                 ' A3 Extra 322 x 445 mm
  1991. Public Const DM_SIZE_A5_EXTRA = 64                 ' A5 Extra 174 x 235 mm
  1992. Public Const DM_SIZE_B5_EXTRA = 65                 ' B5 (ISO) Extra 201 x 276 mm
  1993. Public Const DM_SIZE_A2 = 66                       ' A2 420 x 594 mm
  1994. Public Const DM_SIZE_A3_TRANSVERSE = 67            ' A3 Transverse 297 x 420 mm
  1995. Public Const DM_SIZE_A3_EXTRA_TRANSVERSE = 68      ' A3 Extra Transverse 322 x 445 mm
  1996. Public Const DM_SIZE_LAST = DM_SIZE_A3_EXTRA_TRANSVERSE
  1997. Public Const DM_SIZE_USER = 256
  1998.  
  1999. ' codes for SetPrinterQuality
  2000. Public Const SP_QUALITY_DRAFT = -1
  2001. Public Const SP_QUALITY_LOW = -2
  2002. Public Const SP_QUALITY_MEDIUM = -3
  2003. Public Const SP_QUALITY_HIGH = -4
  2004.  
  2005. Declare Function cEnumPrinterJobs Lib "t2win-32.dll" (ByVal sPrinterName As String, JOBINFO As tagJOBINFO, ByVal iFirstNext As Integer) As Integer
  2006. Declare Function cEnumPrinters1 Lib "t2win-32.dll" (PRINTER1 As tagPRINTER1, ByVal iFirstNext As Integer) As Integer
  2007. Declare Function cEnumPrinters2 Lib "t2win-32.dll" (ByVal sServerName As String, PRINTER2 As tagPRINTER2, ByVal iFirstNext As Integer) As Integer
  2008. Declare Function cEnumPrinters5 Lib "t2win-32.dll" (PRINTER5 As tagPRINTER5, ByVal iFirstNext As Integer) As Integer
  2009. Declare Function cGetPrinterCopies Lib "t2win-32.dll" (ByVal sPrinterName As String, iCopies As Integer) As Integer
  2010. Declare Function cGetPrinterDefaultSource Lib "t2win-32.dll" (ByVal sPrinterName As String, iDefaultSource As Integer) As Integer
  2011. Declare Function cGetPrinterDitherType Lib "t2win-32.dll" (ByVal sPrinterName As String, iDitherType As Integer) As Integer
  2012. Declare Function cGetPrinterOrientation Lib "t2win-32.dll" (ByVal sPrinterName As String, iOrientation As Integer) As Integer
  2013. Declare Function cGetPrinterQuality Lib "t2win-32.dll" (ByVal sPrinterName As String, iQuality As Integer) As Integer
  2014. Declare Function cGetPrinterPaper Lib "t2win-32.dll" (ByVal sPrinterName As String, iSize As Integer) As Integer
  2015. Declare Function cPrinterBins Lib "t2win-32.dll" (ByVal sPrinterName As String, ByVal sPrinterPort As String) As Integer
  2016. Declare Function cPrinterHeight Lib "t2win-32.dll" (ByVal hDC As Long) As Single
  2017. Declare Function cPrinterOffsetLeft Lib "t2win-32.dll" (ByVal hDC As Long) As Single
  2018. Declare Function cPrinterOffsetTop Lib "t2win-32.dll" (ByVal hDC As Long) As Single
  2019. Declare Function cPrinterWidth Lib "t2win-32.dll" (ByVal hDC As Long) As Single
  2020. Declare Function cSetPrinterCopies Lib "t2win-32.dll" (ByVal sPrinterName As String, ByVal iCopies As Integer) As Integer
  2021. Declare Function cSetPrinterDefault Lib "t2win-32.dll" (ByVal sPrinterName As String) As Integer
  2022. Declare Function cSetPrinterDefaultSource Lib "t2win-32.dll" (ByVal sPrinterName As String, ByVal iDefaultSource As Integer) As Integer
  2023. Declare Function cSetPrinterDitherType Lib "t2win-32.dll" (ByVal sPrinterName As String, ByVal iDitherType As Integer) As Integer
  2024. Declare Function cSetPrinterOrientation Lib "t2win-32.dll" (ByVal sPrinterName As String, ByVal iOrientation As Integer) As Integer
  2025. Declare Function cSetPrinterQuality Lib "t2win-32.dll" (ByVal sPrinterName As String, ByVal iQuality As Integer) As Integer
  2026.  
  2027. ' open files
  2028.  
  2029. Public Const ENUMERATE_ALL_OPEN_FILES = True
  2030. Public Const ENUMERATE_ONLY_OPEN_UNMOVABLE_FILES = False
  2031.  
  2032. Public Const NO_ERROR_OPEN_FILES = True
  2033. Public Const NO_MORE_OPEN_FILES = 0
  2034. Public Const ERROR_LOCK_LOGICAL_VOLUME = 1
  2035. Public Const ERROR_ENUMERATE_OPEN_FILES = 2
  2036. Public Const ERROR_UNLOCK_LOGICAL_VOLUME = 3
  2037. Public Const ERROR_CAN_CONVERT_TO_LONG_NAME = 4
  2038.  
  2039. Declare Function cEnumOpenFiles Lib "t2win-32.dll" (ByVal nDrive As String, ByVal EnumType As Integer, ByVal FirstNext As Integer, OpenFileName As String, OpenFileMode As Long, OpenFileType As Long) As Integer
  2040.  
  2041. ' Mail and News processing
  2042.  
  2043. Public Const BTOA_CANT_OPEN_SOURCE = -1
  2044. Public Const BTOA_CANT_OPEN_TARGET = -2
  2045.  
  2046. Declare Function cBtoA Lib "t2win-32.dll" (ByVal FileIn As String, ByVal FileOut As String) As Long
  2047. Declare Function cAtoB Lib "t2win-32.dll" (ByVal FileIn As String) As Long
  2048.  
  2049. ' constants for error processing
  2050.  
  2051. Public Const MNRET_OK = 0       'everything went fine
  2052. Public Const MNRET_IOERR = 1    'I/O Error - examine errno
  2053. Public Const MNRET_NOMEM = 2    'not enough memory
  2054. Public Const MNRET_ILLVAL = 3   'illegal value for operation
  2055. Public Const MNRET_NODATA = 4   'decoder didn't find any data
  2056. Public Const MNRET_NOEND = 5    'encoded data wasn't ended properly
  2057. Public Const MNRET_UNSUP = 6    'unsupported function (encoding)
  2058. Public Const MNRET_EXISTS = 7   'file exists (decoding)
  2059. Public Const MNRET_CONT = 8     'continue -- special from ScanPart
  2060. Public Const MNRET_CANCEL = 9   'operation canceled
  2061.  
  2062. ' constants for OptionNO in cMNGetOption and cMNSetOption
  2063.  
  2064. Public Const MNOPT_VERSION = 0         'version number MAJOR.MINORplPATCH (ro)
  2065. Public Const MNOPT_FAST = 1            'assumes only one part per file
  2066. Public Const MNOPT_DUMBNESS = 2        'switch off the program's intelligence
  2067. Public Const MNOPT_BRACKPOL = 3        'give numbers in [] higher precendence
  2068. Public Const MNOPT_VERBOSE = 4         'generate informative messages
  2069. Public Const MNOPT_DESPERATE = 5       'try to decode incomplete files
  2070. Public Const MNOPT_IGNREPLY = 6        'ignore RE:plies (off by default)
  2071. Public Const MNOPT_OVERWRITE = 7       'whether it's OK to overwrite ex. files
  2072. Public Const MNOPT_SAVEPATH = 8        'prefix to save-files on disk
  2073. Public Const MNOPT_IGNMODE = 9         'ignore the original file mode
  2074. Public Const MNOPT_DEBUG = 10          'print messages with FILE/LINE info
  2075. Public Const MNOPT_ERRNO = 14          'get last error code for MNRET_IOERR (ro)
  2076. Public Const MNOPT_PROGRESS = 15       'retrieve progress information
  2077. Public Const MNOPT_USETEXT = 16        'handle text messages
  2078. Public Const MNOPT_PREAMB = 17         'handle Mime preambles/epilogues
  2079. Public Const MNOPT_TINYB64 = 18        'detect short B64 outside of Mime
  2080. Public Const MNOPT_ENCEXT = 19         'extension for single-part encoded files
  2081.  
  2082. ' constants for TypeOfEncoding in cMNEncode and cMNWalkInList
  2083.  
  2084. Public Const MN_UU_ENCODED = 1         'UUencoded data
  2085. Public Const MN_B64ENCODED = 2         'Mime-Base64 data
  2086. Public Const MN_XX_ENCODED = 3         'XXencoded data
  2087. Public Const MN_BH_ENCODED = 4         'Binhex encoded
  2088. Public Const MN_PT_ENCODED = 5         'Plain-Text encoded (MIME)
  2089. Public Const MN_QP_ENCODED = 6         'Quoted-Printable (MIME)
  2090.  
  2091. ' constants for Mime Headers in cMNEncode
  2092. Public Const MNHDR_NONE = 0            'No MIME headers (use standard headers)
  2093. Public Const MNHDR_SIMPLE = 1          'Simple MIME (no addressing)
  2094. Public Const MNHDR_MAIL = 2            'MIME E-mail format
  2095. Public Const MNHDR_NEWS = 3            'MIME News format
  2096.  
  2097. ' constants for FileState (may be OR'ed) in cMNWalkInList
  2098.  
  2099. Public Const MNSTATE_READ = 0          'Read in, but not further processed
  2100. Public Const MNSTATE_MISPART = 1       'Missing Part(s) detected
  2101. Public Const MNSTATE_NOBEGIN = 2       'No 'begin' found
  2102. Public Const MNSTATE_NOEND = 4         'No 'end' found
  2103. Public Const MNSTATE_NODATA = 8        'File does not contain valid uudata
  2104. Public Const MNSTATE_OK = 16           'All Parts found, ready to decode
  2105. Public Const MNSTATE_ERROR = 32        'Error while decoding
  2106. Public Const MNSTATE_DECODED = 64      'Successfully decoded
  2107. Public Const MNSTATE_TMPFILE = 128     'Temporary decoded file exists
  2108.  
  2109. Declare Function cMNInitialize Lib "t2win-32.dll" () As Long
  2110. Declare Function cMNShutdown Lib "t2win-32.dll" () As Long
  2111. Declare Function cMNGetOption Lib "t2win-32.dll" (ByVal OptionNo As Long, LongVal As Long, StringVal As String) As Integer
  2112. Declare Function cMNSetOption Lib "t2win-32.dll" (ByVal OptionNo As Long, ByVal LongVal As Long, ByVal StringVal As String) As Integer
  2113. Declare Function cMNEncode Lib "t2win-32.dll" (ByVal FileIn As String, ByVal FileOut As String, ByVal NameInFile As String, ByVal TypeOfEncoding As Long, ByVal linesperfile As Long, ByVal MimeHeaders As Integer, ByVal Sender As String, ByVal Receiver As String, ByVal Subject As String) As Long
  2114. Declare Function cMNLoadInList Lib "t2win-32.dll" (ByVal FileName As String, ByVal DeleteAfterDecoding As Long) As Long
  2115. Declare Function cMNCountInList Lib "t2win-32.dll" () As Long
  2116. Declare Function cMNFirstInList Lib "t2win-32.dll" (Ptr As Long) As Integer
  2117. Declare Function cMNWalkInList Lib "t2win-32.dll" (ByVal Ptr As Long, FileName As String, TypeOfEncoding As Integer, FileState As Long, NextPtr As Long) As Integer
  2118. Declare Function cMNGetSubjectInList Lib "t2win-32.dll" (ByVal Ptr As Long) As String
  2119. Declare Function cMNGetMimeIDInList Lib "t2win-32.dll" (ByVal Ptr As Long) As String
  2120. Declare Function cMNGetMimeContentInList Lib "t2win-32.dll" (ByVal Ptr As Long) As String
  2121. Declare Function cMNRenameInList Lib "t2win-32.dll" (ByVal Ptr As Long, ByVal NewFileName As String) As Integer
  2122. Declare Function cMNDecodeFromList Lib "t2win-32.dll" (ByVal Ptr As Long, FileState As Long, ErrorCodeForDecodeOperation As Long, ErrorCodeForMoveOperation As Long) As Long
  2123.  
  2124. ' math
  2125.  
  2126. Type tagCOMPLEX
  2127.    a                    As Double
  2128.    b                    As Double
  2129. End Type
  2130.  
  2131. Declare Function cCpxAdd Lib "t2win-32.dll" (z1 As tagCOMPLEX, z2 As tagCOMPLEX) As tagCOMPLEX
  2132. Declare Function cCpxSub Lib "t2win-32.dll" (z1 As tagCOMPLEX, z2 As tagCOMPLEX) As tagCOMPLEX
  2133. Declare Function cCpxMul Lib "t2win-32.dll" (z1 As tagCOMPLEX, z2 As tagCOMPLEX) As tagCOMPLEX
  2134. Declare Function cCpxDiv Lib "t2win-32.dll" (z1 As tagCOMPLEX, z2 As tagCOMPLEX) As tagCOMPLEX
  2135. Declare Function cCpxConjugue Lib "t2win-32.dll" (z1 As tagCOMPLEX) As tagCOMPLEX
  2136. Declare Function cCpxModulus Lib "t2win-32.dll" (z1 As tagCOMPLEX) As Double
  2137. Declare Function cCpxArgument Lib "t2win-32.dll" (z1 As tagCOMPLEX) As Double
  2138. Declare Function cCpxPowerN Lib "t2win-32.dll" (z1 As tagCOMPLEX, ByVal n As Integer) As tagCOMPLEX
  2139. Declare Function cCpxSqrt Lib "t2win-32.dll" (z1 As tagCOMPLEX) As tagCOMPLEX
  2140.  
  2141. Declare Function cRootN Lib "t2win-32.dll" (ByVal x As Double, ByVal n As Integer, ByVal Precision As Integer, Iteration As Long) As Double
  2142. Declare Function cRound Lib "t2win-32.dll" (ByVal x As Double, ByVal Precision As Integer) As Double
  2143. Declare Function cRoundNearest Lib "t2win-32.dll" (ByVal x As Double, ByVal NearestValue As Long) As Double
  2144.  
  2145. Declare Function cGreatCommonDivisor Lib "t2win-32.dll" (ByVal Value1 As Long, ByVal Value2 As Long) As Long
  2146. Declare Function cRotate Lib "t2win-32.dll" (ByVal Value As Long, ByVal Rotation As Integer) As Long
  2147. Declare Function cSortDigits Lib "t2win-32.dll" (ByVal Value As Long) As Long
  2148. Declare Function cSumDigits Lib "t2win-32.dll" (ByVal Value As Long) As Long
  2149. Declare Function cSumDigitsAlt Lib "t2win-32.dll" (ByVal Value As Long) As Long
  2150. Declare Function cSumDivisors Lib "t2win-32.dll" (ByVal Value As Long) As Long
  2151.  
  2152. ' Remote Access Service
  2153.  
  2154. ' error codes for RasGetCountryInfo
  2155. Public Const RAS_SUCCESS = -1
  2156. Public Const RAS_CANT_ACCESS_COUNTRY = -2
  2157. Public Const RAS_NO_MORE_COUNTRY = -3
  2158.  
  2159. ' structure for RasGetCountryInfo
  2160. Type tagCOUNTRYINFO
  2161.    sCountryName         As String      'country name
  2162.    iCountryID           As Integer     'TAPI country identifier
  2163.    iCountryCode         As Integer     'country code
  2164. End Type
  2165.  
  2166. Declare Function cRasEnumDevices Lib "t2win-32.dll" (sDeviceName As String, sDeviceType As String, ByVal iFirstNext As Integer) As Integer
  2167. Declare Function cRasGetCountryInfo Lib "t2win-32.dll" (ByVal iCountry As Integer, COUNTRYINFO As tagCOUNTRYINFO, ByVal iFirstNext As Integer) As Integer
  2168.  
  2169.