Module: wine
Branch: refs/heads/master
Commit: c39a5f0dbae4964f6a796fab467bed20ba4bbc85
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=c39a5f0dbae4964f6a796fa…
Author: Alexandre Julliard <julliard(a)winehq.org>
Date: Tue Mar 21 16:18:24 2006 +0100
Added DLL_WINE_PREATTACH handling in a number of stub-only dlls.
---
dlls/activeds/activeds_main.c | 10 +++++++++-
dlls/cfgmgr32/main.c | 16 ++++++++++++++++
dlls/cryptdll/cryptdll.c | 2 ++
dlls/d3dim/d3dim_main.c | 38 +++++++++++++++++++++++++++++++++++++-
dlls/d3drm/d3drm_main.c | 22 +++++++++++++++++++---
dlls/msnet32/msnet_main.c | 21 +++++++++++++++++++++
dlls/snmpapi/main.c | 2 ++
dlls/url/url_main.c | 38 +++++++++++++++++++++++++++++++++++++-
dlls/vdmdbg/vdmdbg.c | 38 +++++++++++++++++++++++++++++++++++++-
dlls/winnls32/winnls.c | 16 ++++++++++++++++
dlls/wintrust/wintrust_main.c | 17 +++++++++++++++++
11 files changed, 213 insertions(+), 7 deletions(-)
diff --git a/dlls/activeds/activeds_main.c b/dlls/activeds/activeds_main.c
index d010a76..b296742 100644
--- a/dlls/activeds/activeds_main.c
+++ b/dlls/activeds/activeds_main.c
@@ -48,7 +48,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(activeds);
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
TRACE("(%p, %ld, %p)\n",hinstDLL, fdwReason, lpvReserved);
- /* For the moment, do nothing here. */
+
+ switch(fdwReason)
+ {
+ case DLL_WINE_PREATTACH:
+ return FALSE; /* prefer native version */
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls( hinstDLL );
+ break;
+ }
return TRUE;
}
diff --git a/dlls/cfgmgr32/main.c b/dlls/cfgmgr32/main.c
index 10757d6..0312900 100644
--- a/dlls/cfgmgr32/main.c
+++ b/dlls/cfgmgr32/main.c
@@ -29,6 +29,22 @@
WINE_DEFAULT_DEBUG_CHANNEL(cfgmgr32);
+/***********************************************************************
+ * DllMain (CFGMGR32.@)
+ */
+BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
+{
+ switch(reason)
+ {
+ case DLL_WINE_PREATTACH:
+ return FALSE; /* prefer native version */
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls( inst );
+ break;
+ }
+ return TRUE;
+}
+
CONFIGRET WINAPI CM_Get_Device_ID_ListA(
PCSTR pszFilter, PCHAR Buffer, ULONG BufferLen, ULONG ulFlags )
{
diff --git a/dlls/cryptdll/cryptdll.c b/dlls/cryptdll/cryptdll.c
index fcb8589..9c9b6d7 100644
--- a/dlls/cryptdll/cryptdll.c
+++ b/dlls/cryptdll/cryptdll.c
@@ -32,6 +32,8 @@ BOOL WINAPI DllMain (HINSTANCE hinstDLL,
TRACE("%p,%lx,%p\n", hinstDLL, fdwReason, lpvReserved);
switch (fdwReason) {
+ case DLL_WINE_PREATTACH:
+ return FALSE; /* prefer native version */
case DLL_PROCESS_ATTACH:
{
DisableThreadLibraryCalls(hinstDLL);
diff --git a/dlls/d3dim/d3dim_main.c b/dlls/d3dim/d3dim_main.c
index 67a01ed..0c0f022 100644
--- a/dlls/d3dim/d3dim_main.c
+++ b/dlls/d3dim/d3dim_main.c
@@ -1 +1,37 @@
-/* nothing here yet */
+/*
+ * Copyright 2006 Alexandre Julliard
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <stdarg.h>
+#include "windef.h"
+#include "winbase.h"
+
+/***********************************************************************
+ * DllMain (D3DIM.@)
+ */
+BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
+{
+ switch(reason)
+ {
+ case DLL_WINE_PREATTACH:
+ return FALSE; /* prefer native version */
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls( inst );
+ break;
+ }
+ return TRUE;
+}
diff --git a/dlls/d3drm/d3drm_main.c b/dlls/d3drm/d3drm_main.c
index ecb7191..caa0f90 100644
--- a/dlls/d3drm/d3drm_main.c
+++ b/dlls/d3drm/d3drm_main.c
@@ -16,6 +16,22 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "wine/debug.h"
-
-WINE_DEFAULT_DEBUG_CHANNEL(d3drm);
+#include <stdarg.h>
+#include "windef.h"
+#include "winbase.h"
+
+/***********************************************************************
+ * DllMain (D3DRM.@)
+ */
+BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
+{
+ switch(reason)
+ {
+ case DLL_WINE_PREATTACH:
+ return FALSE; /* prefer native version */
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls( inst );
+ break;
+ }
+ return TRUE;
+}
diff --git a/dlls/msnet32/msnet_main.c b/dlls/msnet32/msnet_main.c
index 40e9dc4..bc92f45 100644
--- a/dlls/msnet32/msnet_main.c
+++ b/dlls/msnet32/msnet_main.c
@@ -16,10 +16,31 @@
#include "config.h"
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(msnet);
+
+/***********************************************************************
+ * DllMain (MSNET32.@)
+ */
+BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
+{
+ switch(reason)
+ {
+ case DLL_WINE_PREATTACH:
+ return FALSE; /* prefer native version */
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls( inst );
+ break;
+ }
+ return TRUE;
+}
+
/***********************************************************************
* @ (MSNET32.57)
*/
diff --git a/dlls/snmpapi/main.c b/dlls/snmpapi/main.c
index 326e6bc..fda8f35 100644
--- a/dlls/snmpapi/main.c
+++ b/dlls/snmpapi/main.c
@@ -39,6 +39,8 @@ BOOL WINAPI DllMain(
TRACE("(%p,%ld,%p)\n", hInstDLL, fdwReason, lpvReserved);
switch(fdwReason) {
+ case DLL_WINE_PREATTACH:
+ return FALSE; /* prefer native version */
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hInstDLL);
break;
diff --git a/dlls/url/url_main.c b/dlls/url/url_main.c
index 67a01ed..b85e204 100644
--- a/dlls/url/url_main.c
+++ b/dlls/url/url_main.c
@@ -1 +1,37 @@
-/* nothing here yet */
+/*
+ * Copyright 2006 Alexandre Julliard
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <stdarg.h>
+#include "windef.h"
+#include "winbase.h"
+
+/***********************************************************************
+ * DllMain (URL.@)
+ */
+BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
+{
+ switch(reason)
+ {
+ case DLL_WINE_PREATTACH:
+ return FALSE; /* prefer native version */
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls( inst );
+ break;
+ }
+ return TRUE;
+}
diff --git a/dlls/vdmdbg/vdmdbg.c b/dlls/vdmdbg/vdmdbg.c
index 67a01ed..3d272c0 100644
--- a/dlls/vdmdbg/vdmdbg.c
+++ b/dlls/vdmdbg/vdmdbg.c
@@ -1 +1,37 @@
-/* nothing here yet */
+/*
+ * Copyright 2006 Alexandre Julliard
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <stdarg.h>
+#include "windef.h"
+#include "winbase.h"
+
+/***********************************************************************
+ * DllMain (VDMDBG.@)
+ */
+BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
+{
+ switch(reason)
+ {
+ case DLL_WINE_PREATTACH:
+ return FALSE; /* prefer native version */
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls( inst );
+ break;
+ }
+ return TRUE;
+}
diff --git a/dlls/winnls32/winnls.c b/dlls/winnls32/winnls.c
index 4172fc2..892ec1c 100644
--- a/dlls/winnls32/winnls.c
+++ b/dlls/winnls32/winnls.c
@@ -23,6 +23,22 @@
#include "wine/winuser16.h"
/***********************************************************************
+ * DllMain (WINNLS.@)
+ */
+BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
+{
+ switch(reason)
+ {
+ case DLL_WINE_PREATTACH:
+ return FALSE; /* prefer native version */
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls( inst );
+ break;
+ }
+ return TRUE;
+}
+
+/***********************************************************************
* WINNLSEnableIME (WINNLS.16)
*/
BOOL WINAPI WINNLSEnableIME16(HWND16 hWnd, BOOL fEnable)
diff --git a/dlls/wintrust/wintrust_main.c b/dlls/wintrust/wintrust_main.c
index 3d7ac5c..09ddfed 100644
--- a/dlls/wintrust/wintrust_main.c
+++ b/dlls/wintrust/wintrust_main.c
@@ -32,6 +32,23 @@
WINE_DEFAULT_DEBUG_CHANNEL(wintrust);
+
+/***********************************************************************
+ * DllMain (WINTRUST.@)
+ */
+BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
+{
+ switch(reason)
+ {
+ case DLL_WINE_PREATTACH:
+ return FALSE; /* prefer native version */
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls( inst );
+ break;
+ }
+ return TRUE;
+}
+
/***********************************************************************
* CryptCATAdminAcquireContext (WINTRUST.@)
*/