PDRREF:Exported Driver Function Reference: Difference between revisions
mNo edit summary |
mNo edit summary |
||
Line 2: | Line 2: | ||
{{IBM-Reprint}} | {{IBM-Reprint}} | ||
This chapter describes the entry points that are exported by the dynamic link library of a presentation driver: | This chapter describes the entry points that are exported by the dynamic link library of a presentation driver: | ||
EXPORTS | EXPORTS | ||
OS2_PM_DRV_RING_LEVELS /* All drivers - Optional */ | OS2_PM_DRV_RING_LEVELS /* All drivers - Optional */ | ||
Line 47: | Line 47: | ||
==Enable Levels== | ==Enable Levels== | ||
This entry point is the address of a table of ring levels required when calling each of the Enable subfunctions. The table is an array of bytes corresponding to the subfunction numbers, terminating with a byte of 0 (that is, an ASCIIZ string). The most significant six bits of each byte are reserved and must be 0. The remaining two bits of each byte represent the ring level to be used when dispatching the corresponding function in the dispatch table. | This entry point is the address of a table of ring levels required when calling each of the Enable subfunctions. The table is an array of bytes corresponding to the subfunction numbers, terminating with a byte of 0 (that is, an ASCIIZ string). The most significant six bits of each byte are reserved and must be 0. The remaining two bits of each byte represent the ring level to be used when dispatching the corresponding function in the dispatch table. | ||
00 = End of Table 10 = Ring 2 | 00 = End of Table 10 = Ring 2 | ||
01 = Ring-2-Conforming 11 = Ring 3 | 01 = Ring-2-Conforming 11 = Ring 3 | ||
Any subfunction that does not have a corresponding byte in the table will be dispatched as Ring-2-conforming. This is the most desirable case from the standpoint of system performance. | |||
{|class="wikitable" | |||
!Subfunction||Type | |||
Any subfunction that does not have a corresponding byte in the table will be dispatched as Ring-2-conforming. This is the most desirable case from the standpoint of system performance. | |- | ||
|Unused||0x01 | |||
|- | |||
|FillLogicalDeviceBlock||0x01 | |||
|- | |||
|FillPhysicalDeviceBlock||0x03 | |||
|- | |||
|Unused||0x01 | |||
|- | |||
|DisablePhysicalDeviceBlock||0x02 | |||
|- | |||
|All others||0x00 | |||
|} | |||
The following example of six bytes would declare FillPhysicalDeviceBlock as Ring 3, DisablePhysicalDeviceBlock as Ring 2, and all other subfunctions as Ring-2-conforming: | |||
The following example of six bytes would declare FillPhysicalDeviceBlock as Ring 3, DisablePhysicalDeviceBlock as Ring 2, and all other subfunctions as Ring-2-conforming: | |||
0x01 0x01 0x03 0x01 0x02 0x00 | 0x01 0x01 0x03 0x01 0x02 0x00 | ||
If the address of this table is not exported, all subfunctions will be called as Ring-2-conforming as if the table had contained the single byte 0x00. | |||
If the address of this table is not exported, all subfunctions will be called as Ring-2-conforming as if the table had contained the single byte 0x00. | |||
==Ring Levels== | ==Ring Levels== | ||
This entry point is the address of a table of ring levels required when dispatching each of the functions hooked in the dispatch table by FillLogicalDeviceBlock. The table is an array of bytes corresponding to the functions in the dispatch table, terminating with a byte of 0 (that is, an ASCIIZ string). The most significant six bits of each byte are reserved and must be 0. The remaining two bits of each byte represent the ring level to be used when dispatching the corresponding function in the dispatch table. | This entry point is the address of a table of ring levels required when dispatching each of the functions hooked in the dispatch table by FillLogicalDeviceBlock. The table is an array of bytes corresponding to the functions in the dispatch table, terminating with a byte of 0 (that is, an ASCIIZ string). The most significant six bits of each byte are reserved and must be 0. The remaining two bits of each byte represent the ring level to be used when dispatching the corresponding function in the dispatch table. | ||
00 = End of Table 10 = Ring 2 | 00 = End of Table 10 = Ring 2 | ||
01 = Ring-2-Conforming 11 = Ring 3 | 01 = Ring-2-Conforming 11 = Ring 3 | ||
Any function that does not have a corresponding byte in the table will be dispatched as Ring-2-conforming. This is the most desirable case from the standpoint of system performance. | |||
{|class="wikitable" | |||
!Function||Type | |||
Any function that does not have a corresponding byte in the table will be dispatched as Ring-2-conforming. This is the most desirable case from the standpoint of system performance. | |- | ||
|GreGetArcParameters||0x01 | |||
|- | |||
|GreSetArcParameters||0x01 | |||
|- | |||
|GreArc||0x03 | |||
|- | |||
|GrePartialArc||0x02 | |||
|- | |||
|All others||0x00 | |||
|} | |||
The following example of five bytes would declare GreArc as Ring 3, GrePartialArc as Ring 2, and all other functions as Ring-2-conforming: | |||
The following example of five bytes would declare GreArc as Ring 3, GrePartialArc as Ring 2, and all other functions as Ring-2-conforming: | |||
0x01 0x01 0x03 0x02 0x00 | 0x01 0x01 0x03 0x02 0x00 | ||
If the address of this table is not exported, all functions will be dispatched as Ring-2-conforming as if the table had contained the single byte 0x00. | |||
If the address of this table is not exported, all functions will be dispatched as Ring-2-conforming as if the table had contained the single byte 0x00. | |||
==QueryScreenResolutions== | ==QueryScreenResolutions== | ||
* OS2_PM_DRV_QUERYSCREENRESOLUTIONS | * OS2_PM_DRV_QUERYSCREENRESOLUTIONS |
Revision as of 01:18, 20 November 2019
Reprint Courtesy of International Business Machines Corporation, © International Business Machines Corporation
This chapter describes the entry points that are exported by the dynamic link library of a presentation driver:
EXPORTS OS2_PM_DRV_RING_LEVELS /* All drivers - Optional */ OS2_PM_DRV_ENABLE_LEVELS /* All drivers - Optional */ OS2_PM_DRV_ENABLE /* All drivers - Mandatory */
The functions in this chapter are listed in the following index table. A detailed description of each function follows the table.
Function | Type |
---|---|
DrvInstall | GRE hardcopy |
DrvRemove | GRE hardcopy |
OS2_PM_DRV_DEVICENAMES | GRE hardcopy |
OS2_PM_DRV_DEVMODE | GRE hardcopy |
FillLogicalDeviceBlock | exported entry point |
FillPhysicalDeviceBlock | exported entry point |
DisablePhysicalDeviceBlock | exported entry point |
EnableDeviceContext | exported entry point |
DisableDeviceContext | exported entry point |
SaveDCState | exported entry point |
RestoreDCState | exported entry point |
ResetDCState | exported entry point |
CompleteOpenDC | exported entry point |
BeginCloseDC | exported entry point |
InstallPMEngineDisplayHooks | exported entry point |
QueryDeviceSurface | exported entry point |
OS2_PM_DRV_QUERYSCREENRESOLUTIONS | display driver |
Enable Levels
This entry point is the address of a table of ring levels required when calling each of the Enable subfunctions. The table is an array of bytes corresponding to the subfunction numbers, terminating with a byte of 0 (that is, an ASCIIZ string). The most significant six bits of each byte are reserved and must be 0. The remaining two bits of each byte represent the ring level to be used when dispatching the corresponding function in the dispatch table.
00 = End of Table 10 = Ring 2 01 = Ring-2-Conforming 11 = Ring 3
Any subfunction that does not have a corresponding byte in the table will be dispatched as Ring-2-conforming. This is the most desirable case from the standpoint of system performance.
Subfunction | Type |
---|---|
Unused | 0x01 |
FillLogicalDeviceBlock | 0x01 |
FillPhysicalDeviceBlock | 0x03 |
Unused | 0x01 |
DisablePhysicalDeviceBlock | 0x02 |
All others | 0x00 |
The following example of six bytes would declare FillPhysicalDeviceBlock as Ring 3, DisablePhysicalDeviceBlock as Ring 2, and all other subfunctions as Ring-2-conforming:
0x01 0x01 0x03 0x01 0x02 0x00
If the address of this table is not exported, all subfunctions will be called as Ring-2-conforming as if the table had contained the single byte 0x00.
Ring Levels
This entry point is the address of a table of ring levels required when dispatching each of the functions hooked in the dispatch table by FillLogicalDeviceBlock. The table is an array of bytes corresponding to the functions in the dispatch table, terminating with a byte of 0 (that is, an ASCIIZ string). The most significant six bits of each byte are reserved and must be 0. The remaining two bits of each byte represent the ring level to be used when dispatching the corresponding function in the dispatch table.
00 = End of Table 10 = Ring 2 01 = Ring-2-Conforming 11 = Ring 3
Any function that does not have a corresponding byte in the table will be dispatched as Ring-2-conforming. This is the most desirable case from the standpoint of system performance.
Function | Type |
---|---|
GreGetArcParameters | 0x01 |
GreSetArcParameters | 0x01 |
GreArc | 0x03 |
GrePartialArc | 0x02 |
All others | 0x00 |
The following example of five bytes would declare GreArc as Ring 3, GrePartialArc as Ring 2, and all other functions as Ring-2-conforming:
0x01 0x01 0x03 0x02 0x00
If the address of this table is not exported, all functions will be dispatched as Ring-2-conforming as if the table had contained the single byte 0x00.
QueryScreenResolutions
- OS2_PM_DRV_QUERYSCREENRESOLUTIONS