DevHelp FreeLIDEntry: Difference between revisions
Appearance
Created page with "This service releases physical memory allocated by the DevHlp_AllocPhys. ==Syntax== ===C=== <PRE> USHORT APIENTRY DevHelp_FreePhys(PULONG PhysAddr) </PRE> ===Assembler=== <P..." |
No edit summary |
||
Line 1: | Line 1: | ||
This service releases | This service releases a Logical ID (LID). This must be done at uninstall or termination time. | ||
==Syntax== | ==Syntax== | ||
===C=== | ===C=== | ||
<PRE> | <PRE> | ||
USHORT APIENTRY | USHORT APIENTRY DevHelp_FreeLIDEntry (USHORT LIDNumber) | ||
</PRE> | </PRE> | ||
===Assembler=== | ===Assembler=== | ||
<PRE> | <PRE> | ||
MOV AX,LID ; Logical ID from GetLIDEntry | |||
MOV AX, | MOV DL,DevHlp_FreeLIDEntry | ||
MOV DL, | |||
CALL [Device_Help] | CALL [Device_Help] | ||
Line 16: | Line 15: | ||
==Parameters== | ==Parameters== | ||
===C=== | ===C=== | ||
; | ; LIDNumber (USHORT) - input : Logical ID from GetLIDEntry | ||
===Assembler=== | ===Assembler=== | ||
<PRE> | <PRE> | ||
MOV AX,LID ; Logical ID from GetLIDEntry | |||
MOV AX, | |||
</PRE> | </PRE> | ||
==Return Code== | ==Return Code== | ||
===C=== | ===C=== | ||
; Success | ; Success indicator: | ||
; Possible errors: | ; Possible errors: | ||
:: | :: ERROR_LID_DOES_NOT_EXIST (0x02) | ||
:: ERROR_ABIOS_NOT_PRESENT (0x03) | |||
:: ERROR_NOT_YOUR_LID (0x04) | |||
===Assembler=== | ===Assembler=== | ||
<PRE> | <PRE> | ||
'C' Clear if | 'C' Clear if successful. | ||
'C' Set if error. | |||
AX = Error code. | |||
Possible errors: | |||
ERROR_LID_DOES_NOT_EXIST (0x02) | |||
ERROR_ABIOS_NOT_PRESENT (0x03) | |||
ERROR_NOT_YOUR_LID (0x04) | |||
</PRE> | </PRE> | ||
==Remarks== | ==Remarks== | ||
The attempt to free a Logical ID can fail if the physical device driver does not own the LID or if the LID does not exist. | |||
DS must point to the data segment of the physical device driver. If DS was previously used in a call to PhysToVirt, it must be reset to the data segment of the physical device driver. | |||
==Example Code== | ==Example Code== | ||
Line 45: | Line 55: | ||
#include "dhcalls.h" | #include "dhcalls.h" | ||
USHORT APIENTRY | USHORT APIENTRY DevHelp_FreeLIDEntry (USHORT LIDNumber) | ||
</PRE> | </PRE> | ||
Revision as of 16:43, 4 December 2017
This service releases a Logical ID (LID). This must be done at uninstall or termination time.
Syntax
C
USHORT APIENTRY DevHelp_FreeLIDEntry (USHORT LIDNumber)
Assembler
MOV AX,LID ; Logical ID from GetLIDEntry MOV DL,DevHlp_FreeLIDEntry CALL [Device_Help]
Parameters
C
- LIDNumber (USHORT) - input
- Logical ID from GetLIDEntry
Assembler
MOV AX,LID ; Logical ID from GetLIDEntry
Return Code
C
- Success indicator
- Possible errors
-
- ERROR_LID_DOES_NOT_EXIST (0x02)
- ERROR_ABIOS_NOT_PRESENT (0x03)
- ERROR_NOT_YOUR_LID (0x04)
Assembler
'C' Clear if successful. 'C' Set if error. AX = Error code. Possible errors: ERROR_LID_DOES_NOT_EXIST (0x02) ERROR_ABIOS_NOT_PRESENT (0x03) ERROR_NOT_YOUR_LID (0x04)
Remarks
The attempt to free a Logical ID can fail if the physical device driver does not own the LID or if the LID does not exist.
DS must point to the data segment of the physical device driver. If DS was previously used in a call to PhysToVirt, it must be reset to the data segment of the physical device driver.
Example Code
C
#include "dhcalls.h" USHORT APIENTRY DevHelp_FreeLIDEntry (USHORT LIDNumber)