DosPortAccess
Bindings: C, MASM
This call requests or releases access to ports for I/O privilege.
DosPortAccess (Reserved, TypeOfAccess, FirstPort, LastPort)
Reserved (USHORT) - input
Must be set to zero.
TypeOfAccess (USHORT) - input
A request for or release of access to a port.
Value Definition
0 Request access
1 Release access.
FirstPort (USHORT) - input
Starting (low) number in a contiguous range or a single port.
LastPort (USHORT) - input
Ending (high) number in a contiguous range or a single port. If only
one port is being used, FirstPort and LastPort should both be set to
this port.
rc (USHORT) - return
Return code descriptions are:
0 NO_ERROR
5 ERROR_ACCESS_DENIED
Remarks
Note that CLI/STI privilege is also granted automatically. There is no
need to make an additional call to DosCLIAccess.
Applications that perform I/O to port(s) in IOPL segments must request
port access from the operating system.
An application with no IOPL segments that accesses a device through a
device driver or by an interface package such as VIO, does not need to
issue this call. The device driver or interface package is responsible
for obtaining the necessary I/O access.
Created using Inf-PHP v.2 (c) 2003 Yuri Prokushev
Created using Inf-HTML v.0.9b (c) 1995 Peter Childs