|
From: Jesse J. <jes...@mi...> - 2003-08-24 06:46:46
|
At 8:04 PM -0400 8/23/03, Miro Jurisic wrote: >>A lot of those macros are either documented or obvious. If you >>list the ones you aren't sure about I can probably describe what >>they are for. > >The ones I am not sure about are the Windows ones (since I don't >know enough about Windows) and the ones Labeled with "Huh?" :-) > >// Windows specific > 1 NOIME > 1 NOMCX > 1 WIN32_LEAN_AND_MEAN The original Windows SDK had a lot of stupidities. One of these was that MS dumped *everything* into <Windows.h>. Over time including this header, which every Windows app had to, became a bottleneck. So, MS defined some macros that you can define to minimize the amount of extra crap included via <Windows.h>. That's what the above macros do: they #ifdef out some infrequently used declarations. > 1 NOMINMAX Yet another sin of Microsoft's headers is that they #define a *ton* of lower case macros. This includes macros for min and max which conflict with STL. This macro disables those defines. > 1 NOSERVICE I think this is the same as the NOIME and NOMCX macros > 1 REPLACEFILE_IGNORE_MERGE_ERRORS > 1 REPLACEFILE_WRITE_THROUGH These two are defined in newer versions of Microsoft's headers. XDocument.cpp defines them under older versions of the headers because ReplaceFile can still work if the OS is newer than the headers. > 10 _WIN32_DCOM > 17 _WIN32_WINNT These two are defined in Microsoft's headers. I don't remember the details, but _WIN32_WINNT is a version number for the headers. I think _WIN32_DCOM is defined if you're building a distributed COM app. > 2 UNICODE This is defined by Microsoft's headers if you are building a Unicode version of your app. If this is the case all of the Window's API routines that take char*'s will want to take Unicode char*'s instead. > 1 STRICT The original Windows headers used void*'s for the many different HANDLE objects in the API (HWND, HMENU, etc). This was obviously brain-dead and lead to a lot of type errors so Microsoft added the STRICT macro which you can set to make stuff like HMENU and HWND distinct types. >// Misc > 2 INFINITY // Huh? > 2 NAN // Huh? I think these are now standard, but they weren't defined in MSVC. So Whisper defines them on Windows. > 1 MSIPL_MEMBER_TEMPLATE // Huh? > 1 MSIPL_TEMPL_NEWSPEC // Huh? > 3 MSIPL_DEBUG_MODE // Huh? > 2 MSIPL_DEF_EXPLICIT // Huh? These were used with the Metrowerks std library. Most of them are obsolete now I think. > 3 QUESA_SUPPORT_QUICKTIME // huh? This is mostly for Windows where you might want to build a Quesa app without requiring that QuickTime be installed. -- Jesse |