home *** CD-ROM | disk | FTP | other *** search
/ BUG 11 / BUGCD1998_02.ISO / util / time2win / t2w32500.exe / T2WIN-32.BAS < prev    next >
BASIC Source File  |  1997-12-25  |  121KB  |  1,823 lines

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