Jump to content

DevHelp GetDeviceBlock: Difference between revisions

From EDM2
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..."
 
Ak120 (talk | contribs)
mNo edit summary
Line 1: Line 1:
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.


==Syntax==
==Syntax==
===C===
===C===
<PRE>
  DevHelp_GetDeviceBlock (USHORT Lid, PPVOID DeviceBlockPtr)
  DevHelp_GetDeviceBlock (USHORT Lid, PPVOID DeviceBlockPtr)
</PRE>


===Assembler===
===Assembler===
Line 28: Line 26:
==Return Code==
==Return Code==
===C===
===C===
; Success indicator: 0
;Success indicator: 0
;Possible errors:
  ERROR_LID_DOES_NOT_EXIST    (0X02)
  ERROR_ABIOS_NOT_PRESENT    (0x03)
  ERROR_NOT_YOUR_LID          (0X04)


; Possible errors:
              ERROR_LID_DOES_NOT_EXIST    (0X02)
              ERROR_ABIOS_NOT_PRESENT    (0x03)
              ERROR_NOT_YOUR_LID          (0X04)
===Assembler===
===Assembler===
<PRE>
<PRE>
Line 43: Line 41:
   'C' Set if error.
   'C' Set if error.
       AX = Error code.
       AX = Error code.
            Possible errors:
              ERROR_LID_DOES_NOT_EXIST    (0X02)
              ERROR_ABIOS_NOT_PRESENT    (0x03)
              ERROR_NOT_YOUR_LID          (0X04)
</PRE>
</PRE>


Line 59: Line 53:
USHORT APIENTRY DevHelp_GetDeviceBlock (USHORT Lid, PPVOID DeviceBlockPtr)
USHORT APIENTRY DevHelp_GetDeviceBlock (USHORT Lid, PPVOID DeviceBlockPtr)
</PRE>
</PRE>
==Related Functions==


[[Category:DevHlps]]
[[Category:DevHlps]]

Revision as of 17:11, 5 April 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)