S
Scott
There are tons of examples of how to call FormatMessage from C# on the
internet, but none of these pass insertions strings to the FormatMessage.
Is there an example of how this should work?
My DllImport currently looks like this. This doesn't seem correct to me
since the 7th parameter is a va_list *. It would be nice to be able to pass
in the insertion strings this way however, right now I will take anything
that works.
[DllImport( "kernel32.dll", CharSet=CharSet.Auto )]
private static extern int FormatMessageW(
uint dwFormatFlags, IntPtr lpSource, int dwMessageId,
int dwLanguageId, out IntPtr MsgBuffer, int nSize, String []
parameters );
The C# routine is String FmtMsg( uint nMsgID, params String [] params ).
I am able to get the message text back if I set
FORMAT_MESSAGE_IGNORE_INSERTS in the attributes, but I need to get the
message with the inserts.
internet, but none of these pass insertions strings to the FormatMessage.
Is there an example of how this should work?
My DllImport currently looks like this. This doesn't seem correct to me
since the 7th parameter is a va_list *. It would be nice to be able to pass
in the insertion strings this way however, right now I will take anything
that works.
[DllImport( "kernel32.dll", CharSet=CharSet.Auto )]
private static extern int FormatMessageW(
uint dwFormatFlags, IntPtr lpSource, int dwMessageId,
int dwLanguageId, out IntPtr MsgBuffer, int nSize, String []
parameters );
The C# routine is String FmtMsg( uint nMsgID, params String [] params ).
I am able to get the message text back if I set
FORMAT_MESSAGE_IGNORE_INSERTS in the attributes, but I need to get the
message with the inserts.