English
Regulars table & Café

FormatMessage.

 


Description:

FormatMessage supply a Error Code (number) a Description the Fehlers (String) or format a such Meldungsdefinition new.




Deklaration:

DEF @FormatMessage(7) !KERNEL32,FormatMessageA




Parameter:

1.Parameter: ? Happen? for manner the Erzeugung the Rückgabestrings. ? Happen? can with | add go. =>
- $100 (FORMAT_MESSAGE_ALLOCATE_BUFFER) = The fifth Parameter gives The minimale Size the Buffers for Stringrückgabe on. the system accounts The erforderliche Size self and the memory must later with LocalFree released go.
- $200 (FORMAT_MESSAGE_IGNORE_INSERTS).= Placeholder inside the Rückgabestrings go unchanged for a later edit transfer. Parameter 7 becomes ignoring.
- $400 (FORMAT_MESSAGE_FROM_STRING) = Parameter 2 is the address of/ one nullterminierten Meldungsdefinition. this Flag can't with $800 and $1000 uses go.
- $800 (FORMAT_MESSAGE_FROM_HMODULE) = Parameter 2 is the lever one Moduls (DLL). can't with $400 combined go.
- $1000 (FORMAT_MESSAGE_FROM_SYSTEM) = search The Systemmeldungstabellen to the Rückgabestring. can't with $400 combined go.
- $2000 (FORMAT_MESSAGE_ARGUMENT_ARRAY) = Parameter 7 is the address one Arrays with Argumenten for Formatierung.
- $FF = Zeilenumbrüche in the Rückgabestring go in the rule ignoring.
- $1 To $FE = Maximale amount of letters until Zeilenumruch.
- $0 = Zeilenumbrüche in the Rückgabestring go übernommen.
2.Parameter: gives on, where the Rückgabestring sought go should. =>
- If in Parameter 1 $800 indicated watts, standing here the lever one Moduls (DLL), the whom Rückgabestring supply.
- If in Parameter 1 $400 indicated watts, standing here The address one unformatierten Rückgabestrings this function (Meldungsdefinition). it can then with this function moreover format go.
- In all others Make becomes this Parameter ignoring.
3.Parameter: LongIntvariable with the Identifierer of/ one Message, How it z.B. GetLastError supply. If in Parameter 1 $400 indicated watts, becomes this Parameter ignoring.
4.Parameter: Identifier of/ one Language for Rückgabestring. 0 for actually Language. this Parameter becomes ignoring, if in Parameter 1 $400 indicated watts.
5.Parameter: If in Parameter 1 $2000 indicated watts, standing here a LongIntvariable or 4 byte large Memory-Variable, The The Adesse the Rückgabestrings aufnimmt. otherwise a enough dimensionierte Memory-Variable, The whom Rückgabestring aufnimmt.
6.Parameter: If in Parameter 1 $2000 indicated watts, standing here The minimale Size the Bereichs from Parameter 5 as LongInt. otherwise standing here The Size of Parameter 5 in Bytes (ANSI) or letters (Unicode).
7.Parameter: Parameter for Formatierung. If Parameter 1 $2000 contains, standing here a Memory-Variable with the for possible available Placeholder einzusetzenden Strings. otherwise is this Parameter The address of/ one va_list structure.



Return Value:

0 with Error, otherwise The Number of Bytes (ANSI) or characters (Unicode), The Zurückgeliefert get.


Examples:

CompileMarkSeparation
DEF @FormatMessage(7) !"KERNEL32","FormatMessageA"
Declare Rückgabe&,GETERROR_Buffer#,GETERROR_Buffer$
DIM GETERROR_Buffer#,32000
Let Rückgabe&=1314 Rückgabe von GetLastError oder direkt von einer API
@FormatMessage($1000,0,Rückgabe&,0,GETERROR_Buffer#,32000,0) Wandelt Fehlercode in Landesspezifische Message um.
Let GETERROR_Buffer$=@STRING$(GETERROR_Buffer#,0)
Dispose GETERROR_Buffer#
@messagebox(GETERROR_Buffer$,"Fehlermeldung",64)
>

[keywords:189b50e260]
Formatierung Message Return String Message GetLastError Error Code transfiguring
[/keywords:189b50e260]
 
07/01/05  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

1.555 Views

Untitledvor 0 min.
rquindt03/04/18
Torben Nissen02/02/13
Uwe Lang03/15/11

Themeninformationen

this Topic has 1 subscriber:

unbekannt (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie