Jump to content

DevHelp Save Message: Difference between revisions

From EDM2
Created page with "This service displays a message from a base physical device driver on the system console. ==Syntax== ===C=== USHORT APIENTRY DevHelp_Save_Message( NPBYTE MsgTable ); ===As..."
 
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
This service displays a message from a base physical device driver on the system console.  
{{DISPLAYTITLE:DevHelp_Save_Message}}
This service displays a message from a base physical device driver on the system console.


==Syntax==
==Syntax==
Line 15: Line 16:
</PRE>
</PRE>
The structure of the message table is:
The structure of the message table is:
<PRE>
<PRE>
   WORD    Message ID
   WORD    Message ID
Line 26: Line 26:
   DWORD    Pointer to last fill-in item of ASCIIZ string
   DWORD    Pointer to last fill-in item of ASCIIZ string
</PRE>
</PRE>
==Parameters==
==Parameters==
===C===
===C===
; MsgTable (NPBYTE) : pointer to the message table
;MsgTable (NPBYTE): pointer to the message table
 
  typedef struct _MSGTABLE {  
  typedef struct _MSGTABLE {
   USHORT  MsgId;                      /* Message Id #                  */
   USHORT  MsgId;                      /* Message Id #                  */
   USHORT  cMsgStrings;                /* # of (%) substitution strings */
   USHORT  cMsgStrings;                /* # of (%) substitution strings */
   PSZ      MsgStrings[1];              /* Substitution string pointers  */
   PSZ      MsgStrings[1];              /* Substitution string pointers  */
  } MSGTABLE;
  } MSGTABLE;
  typedef MSGTABLE *NPMSGTABLE;
  typedef MSGTABLE *NPMSGTABLE;
===Assembler===
<PRE>
</PRE>


==Return Code==
==Return Code==
===C===
===C===
Success Indicator: 0
Success Indicator: 0


Possible errors: Too many messages
Possible errors: Too many messages
===Assembler===
===Assembler===
None.
None.
Line 54: 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==
Line 61: Line 58:


USHORT APIENTRY DevHelp_Save_Message( NPBYTE MsgTable );
USHORT APIENTRY DevHelp_Save_Message( NPBYTE MsgTable );


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


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

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;