LOCALIZED_SPRINTF

LOCALIZED_SPRINTF pOutBuf, MsgIdentifier, Param1, Param2, ..., ParamX

Acts the same way as PUSH_SPRINTF except that the generated string is placed in the buffer specified by pOutBuf instead of being pushed onto the stack. Uses EAX.

This does not have a return value.

pOutBuf
Location of output buffer.
MsgIdentifier
Message identifier of the message to process.
Parm1, Parm2, through ParmX
Parameter values.

Currently, there is no way to determine the necessary output buffer size; you just have to hope that the generated message fits. This may be remedied in a future version of Windows.