⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tviclib.bas

📁 支持PC机的各种端口的读写,包括,并口,串口,USB,等等
💻 BAS
📖 第 1 页 / 共 2 页
字号:
Attribute VB_Name = "TVicLib"
'  ========================================================================
'  =================    TVicHW32  DLL interface        ====================
'  ==========            Shareware Version 4.0                  ===========
'  ==========  Copyright (c) 1997,1998,199 Victor I.Ishikeev    ===========
'  ========================================================================
'  ==========         mail to tools@entechtaiwan.com            ===========
'  ==========                 ivi@ufanet.ru                     ===========
'  ==========         http://www.entechtaiwan.com/tools.htm     ===========
'  ========================================================================

Public Type TDmaBufferRequest
       LengthOfBuffer As Long ' Length in Bytes
       AlignMask      As Long ' 0-4K, 1-8K, 3-16K, 7-32K, $0F-64K, $1F-128K
       PhysDmaAddress As Long ' returned physical address of DMA buffer
       LinDmaAddress  As Long ' returned linear address
       DmaMemHandle   As Long ' returned memory handle (do not use and keep it!)
       KernelDmaAddress As Long ' do not use and keep it!
End Type

'- Ide Hdd hardware manufacturer info structure ---

Public Type TypeHddInfo   ' Create user-defined type.
     
       DoubleTransfer  As Long
       ControllerType  As Long
       BufferSize      As Long
       ECCMode         As Long
       SectorsPerInterrupt As Long
       Cylinders           As Long
       Heads               As Long
       SectorsPerTrack     As Long
       Model  As String * 41
       SerialNumber   As String * 21
       Revision As String * 9
End Type

'- PCI non-bridge configuration record
Public Const LPT_NOT_ACQUIRED = 0
Public Const LPT_ACQUIRE_SUCCESS = 1
Public Const LPT_ACQUIRE_REFUSED = 2
Public Const LPT_ACQUIRE_BAD_PORT = 3
Public Const LPT_ACQUIRE_NOT_OPENED = 4

Public Type PciNonBridge

       vendorID        As Integer 'common part
       deviceID        As Integer
       command_reg     As Integer
       status_reg      As Integer
       revisionID      As Byte
       progIF          As Byte
       subclass        As Byte
       classcode       As Byte
       cacheline_size  As Byte
       latency         As Byte
       header_type     As Byte
       BIST            As Byte
       
       base_address0        As Long     'header specific part
       base_address1        As Long
       base_address2        As Long
       base_address3        As Long
       base_address4        As Long
       base_address5        As Long
       CardBus_CIS          As Long
       subsystem_vendorID   As Integer
       subsystem_deviceID   As Integer
       expansion_ROM        As Long
       cap_ptr              As Byte
       reserved1(3)         As Byte
       reserved2            As Long
       interrupt_line       As Byte
       interrupt_pin        As Byte
       min_grant            As Byte
       max_latency          As Byte
       device_specific(48)  As Long
End Type

'- PCI bridge configuration record

Public Type PciBridge

       vendorID        As Integer 'common part
       deviceID        As Integer
       command_reg     As Integer
       status_reg      As Integer
       revisionID      As Byte
       progIF          As Byte
       subclass        As Byte
       classcode       As Byte
       cacheline_size  As Byte
       latency         As Byte
       header_type     As Byte
       BIST            As Byte
       
       base_address0        As Long 'header specific part
       base_address1        As Long
       primary_bus          As Byte
       secondary_bus        As Byte
       subordinate_bus      As Byte
       secondary_latency    As Byte
       IO_base_low          As Byte
       IO_limit_low         As Byte
       secondary_status     As Integer
       memory_base_low      As Integer
       memory_limit_low     As Integer
       prefetch_base_low    As Integer
       prefetch_limit_low   As Integer
       prefetch_base_high   As Long
       prefetch_limit_high  As Long
       IO_base_high         As Integer
       IO_limit_high        As Integer
       reserved2            As Long
       expansion_ROM        As Long
       interrupt_line       As Byte
       interrupt_pin        As Byte
       bridge_control       As Integer
       device_specific(48)  As Long
       
End Type

'- PCI CardBus configuration record

Public Type PciCardBus

       vendorID        As Integer 'common part
       deviceID        As Integer
       command_reg     As Integer
       status_reg      As Integer
       revisionID      As Byte
       progIF          As Byte
       subclass        As Byte
       classcode       As Byte
       cacheline_size  As Byte
       latency         As Byte
       header_type     As Byte
       BIST            As Byte
       
       ExCa_base           As Long 'header specific part
       cap_ptr             As Byte
       reserved05          As Byte
       secondary_status    As Integer
       PCI_bus             As Byte
       CardBus_bus         As Byte
       subordinate_bus     As Byte
       latency_timer       As Byte
       memory_base0        As Long
       memory_limit0       As Long
       memory_base1        As Long
       memory_limit1       As Long
       IObase_0low         As Integer
       IObase_0high        As Integer
       IOlimit_0low        As Integer
       IOlimit_0high       As Integer
       IObase_1low         As Integer
       IObase_1high        As Integer
       IOlimit_1low        As Integer
       IOlimit_1high       As Integer
       interrupt_line      As Byte
       interrupt_pin       As Byte
       bridge_control      As Integer
       subsystem_vendorID  As Integer
       subsystem_deviceID  As Integer
       legacy_baseaddr     As Long
       cardbus_reserved(14) As Long
       vendor_specific(32)  As Long
       
End Type

'-------------------------------------
'---  Win32 API functions ------------
'-------------------------------------

Public Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" _
                   (Destination As Any, Source As Any, ByVal Length As Long)

'-------------------------------------
'----------- Common Group ------------
'-------------------------------------

Public Declare Function OpenTVicHW32 Lib "TVicHW32.DLL" _
                                     (ByVal HW32 As Long, _
                                      ByVal ServiceName As String, _
                                      ByVal EntryPoint As String) As Long

Public Declare Function CloseTVicHW32 Lib "TVicHW32.DLL" (ByVal HW32 As Long) As Long

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -