473,387 Members | 1,435 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

C# Predefined Preprocessor Symbols

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);
Nov 15 '05 #1
1 6514
But it's easy. Take a look at
http://msdn.microsoft.com/library/en...gnatureApp.asp,
it might help you.

Christoph

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

N

"Chris Tacke, eMVP" <ct****@NOinnovativedssSPAM.com> wrote in message
news:eN**************@TK2MSFTNGP12.phx.gbl...
No, you'll have to add them yourself.

-Chris

"Nicholas J. Fiorello Jr." <ps*******@cfl.rr.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl.. .
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);




Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: cody | last post by:
where can i find a list of all predefined preprocessor macros in c#? i searched in the msdn but i can't find it. i now there is at lest one: DEBUG. but what else? -- cody ...
5
by: sathya_me | last post by:
friends, Please go through the following code which I have downloaded from Bob Stout (Snippets): #include <stdio.h>
13
by: Chris Croughton | last post by:
Is the following code standard-compliant, and if so what should it do? And where in the standard defines the behaviour? #include <stdio.h> #define DEF defined XXX int main(void) { int...
5
by: Water Cooler v2 | last post by:
Sorry if this is a foolish question, but here it is. I see things like #ifndef STDC ...blah #endif #ifdef WIN32
4
by: David W | last post by:
In VS .NET 2003 (SP1) I wanted to add a preprocessor symbol to all configurations of all projects in a solution. I selected all the projects and then went to Properties, where I went to the...
2
by: merkury1 | last post by:
Does C# have any predefined preprocessor constants like the C/C++ compiler does? In C++ you had such predefined constants as: __cplusplus, _DEBUG, _WIN32, MSC_VER. Are there any such things for...
2
by: =?Utf-8?B?bWFyaw==?= | last post by:
I am contemplating converting a huge collection of functions from C++ to VB.NET. I am concerned with a style used in the original code where a variable is set to a constant value with the # define...
2
by: Bob | last post by:
Hi, Is it possible to change the references in a project based upon changing preprocesor symbols? Thanks, Bob
9
by: Bob | last post by:
Hi, Is it possible to change the references in a project by using preprocessor directives? Thanks, Bob
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.