Bug 464166 - wince should use custom dll entry point (like windows desktop) r=bsmedberg
authorBrad Lassey <blassey@mozilla.com>
Wed, 03 Dec 2008 08:41:12 -0500
changeset 22242 c047d4fb2c00ab8219573bcb282a9511b15544b6
parent 22241 647bcc51b2446ba3bae3ac81571b08c7994459f2
child 22243 eae733a929f547ba0e96056898813412649328ba
push idunknown
push userunknown
push dateunknown
reviewersbsmedberg
bugs464166
milestone1.9.2a1pre
Bug 464166 - wince should use custom dll entry point (like windows desktop) r=bsmedberg
toolkit/library/libxul-config.mk
toolkit/library/nsDllMain.cpp
--- a/toolkit/library/libxul-config.mk
+++ b/toolkit/library/libxul-config.mk
@@ -36,17 +36,17 @@
 # the terms of any one of the MPL, the GPL or the LGPL.
 #
 # ***** END LICENSE BLOCK *****
 
 CPPSRCS += \
 	nsStaticXULComponents.cpp \
 	$(NULL)
 
-ifeq ($(OS_ARCH),WINNT)
+ifeq (,$(filter-out WINCE WINNT,$(OS_ARCH)))
 REQUIRES += libreg widget gfx
 CPPSRCS += \
 	nsDllMain.cpp \
 	$(NULL)
 endif
 
 ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_)
 CPPSRCS += \
--- a/toolkit/library/nsDllMain.cpp
+++ b/toolkit/library/nsDllMain.cpp
@@ -40,23 +40,28 @@
 #include <windows.h>
 #include "nsToolkit.h"
 
 #if defined(__GNUC__)
 // If DllMain gets name mangled, it won't be seen.
 extern "C" {
 #endif
 
-BOOL APIENTRY DllMain(  HINSTANCE hModule, 
-                        DWORD reason, 
-                        LPVOID lpReserved )
+BOOL APIENTRY DllMain(  
+#ifdef WINCE
+                      HANDLE hModule, 
+#else 
+                      HINSTANCE hModule, 
+#endif
+                      DWORD reason, 
+                      LPVOID lpReserved )
 {
     switch( reason ) {
         case DLL_PROCESS_ATTACH:
-            nsToolkit::Startup(hModule);
+            nsToolkit::Startup((HINSTANCE)hModule);
             break;
 
         case DLL_THREAD_ATTACH:
             break;
     
         case DLL_THREAD_DETACH:
             break;