DevHelp FreeGDTSelector: Difference between revisions
Appearance
Created page with "This service frees a selector allocated with the DevHlp_AllocGDTSelector. ==Syntax== ===C=== <PRE> USHORT APIENTRY DevHelp_FreeGDTSelector (SEL Selector) </PRE> ===Assem..." |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
This service frees a selector allocated with the [[ | {{DISPLAYTITLE:DevHelp_FreeGDTSelector}} | ||
This service frees a selector allocated with the [[DevHelp AllocGDTSelector]]. | |||
==Syntax== | ==Syntax== | ||
===C=== | ===C=== |
Latest revision as of 05:37, 11 May 2025
This service frees a selector allocated with the DevHelp AllocGDTSelector.
Syntax
C
USHORT APIENTRY DevHelp_FreeGDTSelector (SEL Selector)
Assembler
MOV AX,Selector ; GDT selector to free ; (allocated using AllocateGDTSelector). MOV DL,DevHlp_FreeGDTSelector CALL [Device_Help]
Parameters
C
- Selector (SEL) - input
- The GDT selector to free (must have been allocated using AllocateGDTSelector).
Assembler
MOV AX,Selector ; GDT selector to free ; (allocated using AllocateGDTSelector). MOV DL,DevHlp_FreeGDTSelector
Return Code
C
- Success Indicator
- 0
- Possible errors
-
- ERROR_ACCESS_DENIED (5)
- ERROR_INVALID_PARAMETER (87)
Assembler
'C' Clear if successful. 'C' Set if error. EAX = Error code. Possible errors: ERROR_ACCESS_DENIED (5) ERROR_INVALID_PARAMETER (87)
Remarks
FreeGDTSelector can block, so it is not available at interrupt time. This function uses AX and DL. The selector passed to this function must have been allocated using AllocGDTSelector. This will be verified and an error returned if the selector was not properly allocated. The selectors (DS, ES, FS, and GS) will be changed to NULL if they are equal to the selector being freed.
Example Code
C
#include "dhcalls.h" USHORT APIENTRY DevHelp_FreeGDTSelector (SEL Selector)