Jump to content

DevHelp FreeLIDEntry: Difference between revisions

From EDM2
No edit summary
Line 44: Line 44:


==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.
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.
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==

Revision as of 16:44, 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)

Related Functions