#ifdef __VISUALC__
-#if defined(WCE_PLATFORM_STANDARDSDK)
+#if _WIN32_WCE >= 400
+ #pragma comment(lib,"commdlg.lib")
+#endif
+
+#if defined(__WINCE_STANDARDSDK__)
// DoDragDrop:
#pragma comment(lib,"olece400.lib")
-#elif defined(WIN32_PLATFORM_PSPC)
+#elif defined(__POCKETPC__)
+ // PocketPC build:
// DoDragDrop:
#pragma comment(lib,"ceshell.lib")
+
+ #pragma comment(lib,"aygshell.lib")
+#elif defined(__HANDHELDPC__)
+ // Handheld PC builds. Maybe WindowsCE.NET 4.X needs another symbol.
+ #pragma comment(lib,"ceshell.lib")
+#elif defined(__SMARTPHONE__)
+ // Smartphone build:
+ #pragma comment(lib,"ceshell.lib")
+ #pragma comment(lib,"aygshell.lib")
#else
#error "Unknown SDK, please fill-in missing pieces"
#endif