Page 5-5
Manual 00650-521-1
Four functions are provided by ACCES32.DLL:
unsigned int InPortB (unsigned int BaseAddress);
unsigned int InPort (unsigned int BaseAddress);
void OutPortB (unsigned int BaseAddress, unsigned int value);
void OutPort (unsigned int BaseAddress, unsigned int value);
The commands access the ports either 2-bytes or 1-byte wide. The “B” variants of the four
commands use the lower-byte of the value argument only. Further, the method of accessing the
functions is language specific. ACCES32 comes with three sample applications for Win32: in
VisualBASIC 4.0, Delphi 2.0, and Borland C/C++ 4.0.
Under Windows95/98/NT, ACCES32.DLL allows
any
windows language to access I/O (port)
memory resources. It is a 32-bit DLL designed for 32-bit applications. (For 16-bit applications
under VisualBASIC, use our Windows 3.x driver, VBACCES.DLL.)
32 Bit VB4.0 Example Code
Private Declare Function InPortB Lib “ACCES95.DLL” (ByVal baddr As Integer) As Integer
Private Declare Sub OutPortB Lib “ACCES32.DLL” (ByVal baddr As Integer, ByVal value As
Integer)
Private Sub InputByte_Click()
DisplayInput = He(InPortB(“H” + Edit_Address))
InputVal = DisplayInput
End Sub
Private Sub OutputByte_Click()
OutPortB Val (“&H” + Edit_Address), Val(“H” + Edit_Value)
End Sub