Jump to content

DevHelp GetDeviceBlock: Difference between revisions

From EDM2
Ak120 (talk | contribs)
mNo edit summary
No edit summary
 
Line 1: Line 1:
{{DISPLAYTITLE:DevHelp_GetDeviceBlock}}
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.
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.



Latest revision as of 05:32, 11 May 2025

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.

Remarks

None.

Example Code

C

#include  "dhcalls.h"

USHORT APIENTRY DevHelp_GetDeviceBlock (USHORT Lid, PPVOID DeviceBlockPtr)