I have a solution that consists of a WinForms app and a Pocket PC app. Each
of these two projects shares a 3rd project that is a compiled library file
(DLL).
The items in the library are pretty much common to both apps but there are a
few differences. For example, there's no "Beep" function for Pocket PCs.
So, to get around these few exceptions I put some conditional compilation
statements in where required Thus, for example, Beep took on this form:
#if (POCKETPC)
Debug.Writeline("");
#else
[DllImport("kernel32.dll")]
public static extern bool Beep (int freq, int duration);
#endif
Where "POCKETPC" is a tag I define at the very start of my Pocket PC app's
main form.
Everything *appears* to compile properly but I'm wondering two things:
1. Is this a correct & safe way to do things?
2. Are the resultant DLLs that go onto the two respective computers actually
compiled differently?
--
Robert W.
Vancouver, BC
www.mwtech.com