                           TVicPort version 3.0
                           ====================

                 Copyright (C) 1997,1998,1999 Victor Ishikeev
                     e-mail: ivi@ufanet.ru, tools@entechtaiwan.com
                     http://www.entechatiwan.com/tools.htm

                                 AS_OCX.TXT
                                 ==========


CONTENTS
========

1. GENERAL TVicPort ActiveX COMPONENT PROPERTIES AND METHODS
2. DIRECT PORT I/O WITH TVicPort
3. SPECIFIC WORK WITH THE LPT PORT
4. HDD SERIAL NUMBER
5. CONTACT INFORMATION


1. GENERAL TVicPort ActiveX COMPONENT PROPERTIES AND METHODS
============================================================

After successfully adding the TVicPort component to your component 
palette, and after copying the kernel-mode driver(s) to the appropriate 
Windows directories, you can test the functionality of the component, 
and examine the sample code provided, by opening the included project1
demonstration program.

    Note: For the installation read inst_vb.txt file
    ------------------------------------------------
 
TVicPort has the following general component properties and methods:

    Sub OpenDriver
    ---------------------
    Loads the vicprt00.vxd (under Windows 95) or vicprt00.sys (under 
    Windows NT) kernel-mode driver, providing direct access to the 
    hardware. If the kernel-mode driver was successfully opened, the
    boolean ActiveHW property (see below) will be set to True; if the 
    procedure fails, the ActiveHW property will be False.

    Sub CloseDriver
    ----------------------
    Closes the kernel-mode driver and releases memory allocated to it.
    If a hardware interrupt was "unmasked", the "mask" is restored. If the
    driver was successfully closed, the ActiveHW property (see below) will
    be set to False.

    property ActiveHW As Bool (published, read only )
    ----------------------------------------------
    The read-only and run-time ActiveHW property specifies whether the
    kernel-mode driver is open. ActiveHW returns True if the driver is
    open, or False if it is not.

2. DIRECT PORT I/O WITH TVicPort
==================================

For access to the 80x86 CPU data ports, TVicPort provides an implementation of
the properties named Port, PortW and PortL  and a "Hard/Soft" boolean switch.

When a value is assigned to an property of type Port, PortW, or PortL, the value 
is output to the selected port. When an property of type Port, PortW or PortL is 
referenced in an expression, its value is input from the selected port. Use of 
the Port, PortW and PortL properties are restricted to assignment and reference 
in expressions only.

The following properties permit direct I/O port access:

    property Port(PortAddr As Integer) As Integer (read, write)
    -----------------------------------------------------------
    Value of the Port property really is of type Byte.

    property PortW(PortAddr As Integer) As Integer (read, write)
    -----------------------------------------------------------
    Value of the PortW property really is of type Integer(Word).

    property PortL(PortAddr As Integer) As Long (read, write)
    -----------------------------------------------------------
    Value of the Port property is of type Long (DWORD).



    procedure ReadPortFIFO(PortAddr As Integer, NumPorts As Integer, Buffer As Integer);
    -----------------------------------------------------------------------------------
   
    This method allows read array of bytes from single port.

    procedure WritePortFIFO(PortAddr As Integer, NumPorts As Integer, Buffer As Integer);
    -------------------------------------------------------------------------------------
   
    This method allows write array of bytes to single port.

    procedure ReadPortWFIFO(PortAddr As Integer, NumPorts As Integer, Buffer As Integer);
    -----------------------------------------------------------------------------------
   
    This method allows read array of words (16 bit) from single port.

    procedure WritePortWFIFO(PortAddr As Integer, NumPorts As Integer, Buffer As Integer);
    -------------------------------------------------------------------------------------
   
    This method allows write array of words (16 bit) to single port.


For more info about port I/O look at test exaple provided with
this archive.



3. SPECIFIC WORK WITH THE LPT PORT
==================================

Now TVicPort provides extended properties and methods for work with the
printer (LPT) port.   

==== BASE ====

    property LPTNumPorts As Integer (read only)
    -------------------------------------------
    Shows how many LPT ports are installed on your PC.

    property LPTNumber As Integer (read, write, default 1);
    -----------------------------------------------------------
    Allows select a current LPT port.

    property LPTBasePort As Integer (read only );
    --------------------------------------------
    Returns a base address of the current LPT port.

==== PINS ====

    property Pin(nPin As Integer) As Boolean; (read, write)
    -------------------------------------------------------
    Allows : 1) Read an electrical level from the select pin of
             current LPT port. Returns TRUE if current level is HIGH
             2) Write an electrical level to the selected pin.
                TRUE - HIGH level.
    Note: Not all pins are accessible for this operation. Run test example
          for more info.

==== STATUS ====

    property LPTAckwl As Boolean (read only)
    ------------------------------------------
    Returns ACKWL state from the printer

    property LPTBusy As Boolean ( read only )
    ------------------------------------------
    Returns BUSY state from the printer

    property LPTPaperEnd As Boolean ( read only )
    --------------------------------------------
    Returns PAPER END state from the printer
    
    property LPTSlct As Boolean ( read only )
    ------------------------------------------
    Returns SLCT state from the printer

    property LPTError As Boolean ( read only )
    ------------------------------------------
    Returns ERROR state from the printer

=== COMMANDS ===

    Sub LPTStrobe
    -------------
    Sends STROBE signal to the printer

    Sub LPTAutofd(Flag As Boolean)
    ------------------------------
    Sets current AUTOFD  state on printer

    Sub LPTInit
    -----------
    Resets printer by sending INIT signal

    Sub LPTSlctIn
    -------------
    Sends SLCTIN signal to the printer

4. HDD SERIAL NUMBER
====================

    GetHDDMasterTrack(IdeNumber As Integer, Master As Integer, MasterTrack As Integer)
    ----------------------------------------------------------------------------------
    This method allows read a "hardware" serial IDE HDD number and
    some other information (see a test example for more info). 
    Note that it does not works  for the SCSI HDD  controller.

    
5. CONTACT INFORMATION
======================

Comments, questions and suggestions regarding TVicPort can be directed
by e-mail to tools@entechtaiwan.com.

With best wishes,

Victor Ishikeev
March 1998
