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

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