Click here to Skip to main content
15,790,242 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
How do i read and write to a pci-e parallel portcard with adres EC00 in windows using vb or c++?

PCI-E card Bus 3 device 00 function 00
In the program it is possible to
Write/read the port.

What I have tried:

Tried inpout32 changing adres using VB. No results

Option Strict Off
Option Explicit On
Module InpOut32_Declarations
'Inp and Out declarations for port I/O using inpout32.dll.
Public Declare Function Inp Lib "inpout32.dll" Alias "Inp32" (ByVal PortAddress As Short) As Short
Public Declare Sub Out Lib "inpout32.dll" Alias "Out32" _
(PortAddress As Short, Value As Short)
End Module

Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Out(&HEC00S, &HFS) 'Print '1' to D7-D0 or 255 in Decimal
Dim Value1 As String 'String named Value1
Value1 = Inp(&HEC00S) 'Now Value1 has the values in 'data port'
MessageBox.Show(Value1) 'A popup will indicate the current value written

End Sub
End Class
Updated 17-Sep-21 11:51am
CHill60 16-Sep-21 3:55am    
This is not a tutorial site. Please share the code you tried
CHill60 16-Sep-21 8:57am    
You have tagged this question as C++ but that code looks to be VBA! Couldn't get further from C++ if you tried. Carlo's response still applies though - you can't use inpout32.dll in modern versions of Windows
Member 9689200 16-Sep-21 9:08am    

1 solution

You cannot use inpout32.dll, since it doesn't work on modern versions of Windows. See this Code project article for some insight: 17 Channel Logic Analyzer[^].
Share this answer
Patrice T 16-Sep-21 11:12am    
CPallini 17-Sep-21 2:07am    
Thank you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900