Herman Lee
July 29th, 1999, 03:55 PM
Hi all,
I need to use FormatMessage function in my program and i call it like this:
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|
FORMAT_MESSAGE_FROM_HMODULE,
Model, // Handle of the dll file
EventID,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR) lpMessage, // array of char[2048]
2048,
(char**) strInsert);
However, there is runtime error when executing this function (program halt) and I think there may be problem for the last parameter. It is the array of string char[30][512]. I don't know if the mapping works or not. Anyone can tell me how to add insertion string to the message when using FormatMessage?
Thank a lot
Herman Lee
I need to use FormatMessage function in my program and i call it like this:
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|
FORMAT_MESSAGE_FROM_HMODULE,
Model, // Handle of the dll file
EventID,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR) lpMessage, // array of char[2048]
2048,
(char**) strInsert);
However, there is runtime error when executing this function (program halt) and I think there may be problem for the last parameter. It is the array of string char[30][512]. I don't know if the mapping works or not. Anyone can tell me how to add insertion string to the message when using FormatMessage?
Thank a lot
Herman Lee