C# Predefined Preprocessor Symbols

  • Thread starter Thread starter Nicholas J. Fiorello Jr.
  • Start date Start date
N

Nicholas J. Fiorello Jr.

Are any preprocessor symbols defined for the platform to tell if a module is
being compiled for the compact framework vs the std framework?

Ideally something to replace the first 'true' in the following snippet

#if true
[DllImport("coredll.dll", SetLastError=true)]
#else
[DllImport("shell32.dll", SetLastError=true)]
#endif
private static extern bool SHGetSpecialFolderPath(
int hwndOwner,
StringBuilder lpszPath,
CSIDL eFolder,
bool fCreate);
 
But it's easy. Take a look at
http://msdn.microsoft.com/library/en-us/dnnetcomp/html/PPCSignatureApp.asp,
it might help you.

Christoph
Thanks for the quick, if somewhat disappointing response :-)

N

No, you'll have to add them yourself.

-Chris

Are any preprocessor symbols defined for the platform to tell if a
module
is

being compiled for the compact framework vs the std framework?

Ideally something to replace the first 'true' in the following snippet

#if true
[DllImport("coredll.dll", SetLastError=true)]
#else
[DllImport("shell32.dll", SetLastError=true)]
#endif
private static extern bool SHGetSpecialFolderPath(
int hwndOwner,
StringBuilder lpszPath,
CSIDL eFolder,
bool fCreate);
 
Back
Top