Compile error with GetMessageA

Question:

When I write such code:

catch(pdftron::Common::Exception& ex) { std::cout << ex.GetMessage() << std::endl; }

I get compilation error:

`

error C2039: ‘GetMessageA’: is not a member of ‘pdftron::Common::Exception’
`

Answer:

GetMessage is a windows macro, either
`

#define GetMessage GetMessageA
`

or

#define GetMessage GetMessageW

depending on unicode setting.

Before including the PDFNet headers, add the following

#undef GetMessage

If you need to also use the windows version, be explicit, for example

::GetMessageA