Look for "inpout32.dll" on http://www.logix4u.net/
(it comes with the sources, and a discussion abuot how it works on ALL
versions of Windows, and a smart autoinstallation of the VxD if needed).
But warning: this DLL implements NO security. You can crash Windows if you
set the wrong I/O, and this DLL does not restrict any access right; if you
need security, you may create a custom DLL from this complete source, that
just implements a single port whose number will be setup and erad in the
Windows registry (the administrator will have access to it and will setup
the correct value).
It's worth reading this source if you have never looked in the Windows DDK
before and how it performs protected I/O or how it can perform I/O
virtualization for concurrent processes...
Note that this source provides NO smart mapping of I/O ports, and does not
implement the PCI autodetection of capabilities, negociation of
configuration and configuration. So this will work for hardware ports that
can be configured by hardware. It also does not perform any Plug'nPlay
autodetection (by vendor id/model id retreived through PCI or USB or I2C bus
enumeration services or custom enumerators for specific bus extenders).
Or you'll have to let the BIOS or Windows do that for you, and get the I/O
port number to use from the old BIOS setup block or from the Windows
registry in the embedded Vxd code or in the interface DLL. his works well
for the two first serial ports (COM1, COM2) and first parallel port (LPT1),
for all other ports, there's no standard way to determine the port
addresses, as it is hardware dependant (that's why we have specific device
drivers for each of them).
If you intend to support DMA operations or device-to-device operations (for
example between PCI boards), there's no support here to program the chipset
routings and the IRQs, and no support for translating virtual memory
addresses used in user applications into physical addresses (hint: you'll
need VirtualAlloc to map virtual memory to physical memory usable in your
VxD; on modern architectures, device I/O ports can also be mapped either as
memory or I/O ports by software; this is interesting for fast Ethernet or
disk drivers because mappings to memory space is faster than mappings to I/O
ports, due to the way the CPU instructions are encoded).
Post by deloHi
Is there any chance to use a I/O port using a TP6 compiler
on a WIN XP box?.
With a dallas-maxim device MAX7301 I saw the usage of
" DriverLINX is a registered trademark of Scientific Software Tools, Inc."
(I saw the files and indicates VB and C examples)
Does anyone use it with TP6-7?
bye
delo