Jump to content

DevHelp GetDeviceBlock

From EDM2
Revision as of 17:00, 4 December 2017 by Martini (talk | contribs) (Created page with "This service returns an ABIOS device block pointer. This function returns a protect-mode pointer only. Real-mode pointers are not returned; instead, the data is initialized to...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This service returns an ABIOS device block pointer. This function returns a protect-mode pointer only. Real-mode pointers are not returned; instead, the data is initialized to 0.

Syntax

C

 DevHelp_GetDeviceBlock (USHORT Lid, PPVOID DeviceBlockPtr)

Assembler

MOV   AX,LogicalID
MOV   DS,Data_Segment         ; Data segment of the requesting device driver
MOV   DL,DevHlp_GetDeviceBlock

CALL  [Device_Help]

Parameters

C

Lid (USHORT) - input
Logical ID
DeviceBlockPtr (PPVOID) - input
Address to ABIOS device block pointer.

Assembler

MOV   AX,LogicalID
MOV   DS,Data_Segment         ; Data segment of the requesting device driver

Return Code

C

Success indicator
0
Possible errors
              ERROR_LID_DOES_NOT_EXIST    (0X02)
              ERROR_ABIOS_NOT_PRESENT     (0x03)
              ERROR_NOT_YOUR_LID          (0X04)

Assembler

   'C' Clear if successful.
       CX:DX = Protect mode device block pointer.
       AX:BX = 00:00
       (was real mode device block pointer; returned as 00:00 for compatibility).

   '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

None.

Example Code

C

#include  "dhcalls.h"

USHORT APIENTRY DevHelp_GetDeviceBlock (USHORT Lid, PPVOID DeviceBlockPtr)

Related Functions