Maanu Maanu - 1 year ago 171
C++ Question

FormatMessage Fails with error code 317

When I executed the following code piece it fails with error code 317. How can solve the issue? We are using Unicode Character Set for the project

char* pszMessgeBuffer = NULL;
0, // Default language
(LPTSTR) &pszMessgeBuffer,

Answer Source

Using the error code lookup tool from Visual Studio, 317 is described as

The system cannot find message text for message number 0x%1 in the message file for %2.

This means that a message description does not exist in the system for the previous error code. The MSDN documentation for FormatMessage with flag FORMAT_MESSAGE_FROM_SYSTEM states that:

Not all Windows Embedded CEā€“based devices will contain the system message-table resources. This is a selectable part of the Windows Embedded CE operating system and is often removed to conserve space.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download