Jump to content

DevHelp Save Message: Difference between revisions

From EDM2
Ak120 (talk | contribs)
mNo edit summary
No edit summary
 
Line 48: Line 48:
==Remarks==
==Remarks==
The message is not displayed immediately, but is queued until system initialization retrieves it from the system message file.
The message is not displayed immediately, but is queued until system initialization retrieves it from the system message file.
==Alternative Names==
DevHelp_Save_Message, DevHlp_Save_Message, DevHlp_SaveMessage.


==Example Code==
==Example Code==

Latest revision as of 16:44, 23 May 2025

This service displays a message from a base physical device driver on the system console.

Syntax

C

USHORT APIENTRY DevHelp_Save_Message( NPBYTE MsgTable );

Assembler

MOV   DS,SEG  Msg_Table     ; DS = Segment of message table
MOV   SI,OFFSET  Msg_Table  ; SI = Offset of message table
XOR   BX,BX                 ; BX = Reserved (must be 0)
MOV   DL,DevHlp_SAVE_MESSAGE

CALL  [Device_Help]

The structure of the message table is:

  WORD     Message ID
  WORD     Number of fill-in items
  DWORD    Pointer to first fill-in item of ASCIIZ string
  DWORD    Pointer to second fill-in item of ASCIIZ string
   .
   .
   .
  DWORD    Pointer to last fill-in item of ASCIIZ string

Parameters

C

MsgTable (NPBYTE)
pointer to the message table
typedef struct _MSGTABLE { 
  USHORT   MsgId;                       /* Message Id #                  */
  USHORT   cMsgStrings;                 /* # of (%) substitution strings */
  PSZ      MsgStrings[1];               /* Substitution string pointers  */
} MSGTABLE;
typedef MSGTABLE *NPMSGTABLE;

Return Code

C

Success Indicator: 0

Possible errors: Too many messages

Assembler

None.

Remarks

The message is not displayed immediately, but is queued until system initialization retrieves it from the system message file.

Alternative Names

DevHelp_Save_Message, DevHlp_Save_Message, DevHlp_SaveMessage.

Example Code

C

#include  "dhcalls.h"

USHORT APIENTRY DevHelp_Save_Message( NPBYTE MsgTable );

typedef struct _MSGTABLE {
  USHORT   MsgId;             /* Message Id #                  */
  USHORT   cMsgStrings;       /* # of (%) substitution strings */
  PSZ      MsgString[1];      /* Substitution string pointers  */
} MSGTABLE;
typedef MSGTABLE *NPMSGTABLE;