Menu

#99 fxutils.cpp won't compile with latest SDK from Microsoft

swbug
open
nobody
5
2008-03-14
2008-03-14
No

fxutils.cpp uses the identifier
"IMAGE_SIZEOF_NT_OPTIONAL_HEADER" in the function fxisconsole() for WIN32 builds. The latest Platform SDK (now called "Windows SDK" by Microsoft and available under the name "Windows SDK for Windows Server 2008 and .NET Framework 3.5") does not have that identifier defined in the file WinNT.h. (I did locate it in the Platform SDK for Windows Server 2003 R2, however.)

A simple fix would be to do something like this:

#if defined(WIN32)
#if !defined(IMAGE_SIZEOF_NT_OPTIONAL_HEADER)
#define IMAGE_SIZEOF_NT_OPTIONAL_HEADER (sizeof(IMAGE_OPTIONAL_HEADER))
#endif // !defined(IMAGE_SIZEOF_NT_OPTIONAL_HEADER)
#endif // defined(WIN32)

In the latest Windows SDK, IMAGE_OPTIONAL_HEADER is a typedef for IMAGE_OPTIONAL_HEADER64 when _WIN64 is defined and IMAGE_OPTIONAL_HEADER32 otherwise.

The IMAGE_SIZEOF_NT_OPTIONAL_HEADER identifier is used in both Fox version 1.6.31 (stable) and the 1.7.16 snapshot.

Discussion


Log in to post a comment.