BOOL VDDInstallIOHook(hVDD, cPortRange, pPortRange, 10handler)
IN HANDLE hVDD;
IN WORD cPortRange;
IN PVDD_IO_PORTRANGE pPortRange;
IN PVDD_IO_HANDLERS 10handler;
VDDInstallIOHook hooks the I/O Ports for the responsible VDD.
Parameters
hVdd
Identifies the VDD.
cPortRange
Specifies the number of VDD_IO_PORTRANGE structures.
pPortRange
Points to the VDD_IO_PORTRANGE array.
10handler
Points to the handler array pointer.
Return Value
VDDInstallIOHook returns TRUE if successful. Otherwise, this function returns FALSE and logs one of the following errors:
Value | Meaning |
ERROR_ACCESS_EXISTS | The VDD already has active I/O port handlers. |
ERROR_OUTOFMEMORY | There are insufficient resources for additional VDD port handler sets. |
ERROR_INVALID_ADDRESS | One of the I/O port handlers has an invalid address. |
Comments
The last VDD to hook a port will always get control of the port. There is no concept of chaining hooks.
plOFn must provide the byte read and write handlers. Others can be NULL.
If word or string handlers are not provided, their effect will be emulated using byte handlers.
VDDs must not hook DMA ports. The Win32 VDM component manages this for all the clients and services provided to perform DMA operations. This includes any attempt to access and modify DMA data.
VDDs should not hook video ports. A video port can be successfully hooked but there is no guarantee that the I/O handler will get called.
Each VDD is allowed to install only one set of I/O hooks at a time.
See Also
VDDDeInstalllOHook