home *** CD-ROM | disk | FTP | other *** search
/ Hot Shareware 32 / hot34.iso / ficheros / LVB / T2W32523.ZIP / T2WIN-32.BAS < prev    next >
BASIC Source File  |  1998-04-07  |  129KB  |  1,927 lines

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