Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
en:docs:fapi:dosportaccess [2021/08/20 03:37] – created prokushev | en:docs:fapi:dosportaccess [2021/09/17 04:50] (current) – prokushev | ||
---|---|---|---|
Line 1: | Line 1: | ||
{{page> | {{page> | ||
+ | |||
+ | ====== DosPortAccess ====== | ||
This call requests or releases access to ports for I/O privilege. | This call requests or releases access to ports for I/O privilege. | ||
- | ==Syntax== | + | ===== Syntax ===== |
- | | + | |
- | ==Parameters== | + | <code c> |
- | ;Reserved | + | DosPortAccess (Reserved, TypeOfAccess, FirstPort, LastPort) |
- | ;TypeOfAccess | + | </ |
- | ::0 - Request access | + | |
- | ::1 - Release access. | + | |
- | ; FirstPort | + | |
- | ; 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. | + | |
- | ==Return Code== | + | ===== Parameters ===== |
- | ;rc (USHORT) - return: | + | |
- | *0 NO_ERROR | + | * Reserved ([[USHORT]]) - input : Must be set to zero. |
- | *5 ERROR_ACCESS_DENIED | + | * TypeOfAccess ([[USHORT]]) - input : A request for or release of access to a port. |
+ | *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. | ||
+ | |||
+ | ===== Return Code ===== | ||
+ | |||
+ | rc ([[USHORT]]) - return: | ||
+ | |||
+ | | ||
+ | *5 ERROR_ACCESS_DENIED | ||
+ | |||
+ | ===== Remarks ===== | ||
- | ==Remarks== | ||
Note that CLI/STI privilege is also granted automatically. There is no need to make an additional call to [[DosCLIAccess]]. | Note that CLI/STI privilege is also granted automatically. There is no need to make an additional call to [[DosCLIAccess]]. | ||
Line 26: | Line 35: | ||
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. | 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. | ||
- | ==Bindings== | + | ===== Bindings ===== |
- | ===C=== | + | |
- | <PRE> | + | ==== C ==== |
+ | |||
+ | <code c> | ||
#define INCL_DOSDEVICES | #define INCL_DOSDEVICES | ||
Line 39: | Line 50: | ||
USHORT | USHORT | ||
- | </PRE> | + | </code> |
+ | |||
+ | ==== MASM ==== | ||
- | ===MASM=== | + | <code asm> |
- | <PRE> | + | |
EXTRN DosPortAccess: | EXTRN DosPortAccess: | ||
INCL_DOSDEVICES | INCL_DOSDEVICES | ||
Line 53: | Line 66: | ||
Returns WORD | Returns WORD | ||
- | </PRE> | + | </code> |
{{page> | {{page> |