Jacek Caban : atl80: Share atl_ax.c with atl100.

Alexandre Julliard julliard at winehq.org
Tue Jan 28 13:33:25 CST 2014


Module: wine
Branch: master
Commit: 3f9b3718e92bf2c48b83d958f5d1e1525ff6a45f
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=3f9b3718e92bf2c48b83d958f5d1e1525ff6a45f

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Tue Jan 28 12:48:24 2014 +0100

atl80: Share atl_ax.c with atl100.

---

 dlls/atl100/atl_ax.c   |    4 +++-
 dlls/atl80/Makefile.in |    8 +++++---
 dlls/atl80/atl80.c     |   53 ------------------------------------------------
 dlls/atl80/atl80.spec  |   18 ++++++++--------
 4 files changed, 17 insertions(+), 66 deletions(-)

diff --git a/dlls/atl100/atl_ax.c b/dlls/atl100/atl_ax.c
index 0f0f3c6..be0b836 100644
--- a/dlls/atl100/atl_ax.c
+++ b/dlls/atl100/atl_ax.c
@@ -87,7 +87,9 @@ BOOL WINAPI AtlAxWinInit(void)
 {
     WNDCLASSEXW wcex;
 
-#if _ATL_VER == _ATL_VER_90
+#if _ATL_VER == _ATL_VER_80
+#define ATL_NAME_SUFFIX '8','0',0
+#elif _ATL_VER == _ATL_VER_90
 #define ATL_NAME_SUFFIX '9','0',0
 #elif _ATL_VER == _ATL_VER_100
 #define ATL_NAME_SUFFIX '1','0','0',0
diff --git a/dlls/atl80/Makefile.in b/dlls/atl80/Makefile.in
index 43cc2d3..65f8055 100644
--- a/dlls/atl80/Makefile.in
+++ b/dlls/atl80/Makefile.in
@@ -1,9 +1,11 @@
 MODULE    = atl80.dll
 IMPORTLIB = atl80
-IMPORTS   = atl100 oleaut32 user32 ole32
+IMPORTS   = atl100 oleaut32 user32 ole32 uuid
 EXTRADEFS = -D_ATL_VER=_ATL_VER_80
+PARENTSRC = ../atl100
 
-
-C_SRCS = atl80.c
+C_SRCS = \
+	atl80.c \
+	atl_ax.c
 
 RC_SRCS = atl80.rc
diff --git a/dlls/atl80/atl80.c b/dlls/atl80/atl80.c
index 487ee49..d39819a 100644
--- a/dlls/atl80/atl80.c
+++ b/dlls/atl80/atl80.c
@@ -98,56 +98,3 @@ DWORD WINAPI AtlGetVersion(void *pReserved)
     TRACE("version %04x (%p)\n", _ATL_VER, pReserved);
     return _ATL_VER;
 }
-
-/**********************************************************************
- * AtlAxWin class window procedure
- */
-static LRESULT CALLBACK AtlAxWin_wndproc( HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam )
-{
-    if ( wMsg == WM_CREATE )
-    {
-            DWORD len = GetWindowTextLengthW( hWnd ) + 1;
-            WCHAR *ptr = HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) );
-            if (!ptr)
-                return 1;
-            GetWindowTextW( hWnd, ptr, len );
-            AtlAxCreateControlEx( ptr, hWnd, NULL, NULL, NULL, NULL, NULL );
-            HeapFree( GetProcessHeap(), 0, ptr );
-            return 0;
-    }
-    return DefWindowProcW( hWnd, wMsg, wParam, lParam );
-}
-
-BOOL WINAPI AtlAxWinInit(void)
-{
-    WNDCLASSEXW wcex;
-    const WCHAR AtlAxWin80[] = {'A','t','l','A','x','W','i','n','8','0',0};
-    const WCHAR AtlAxWinLic80[] = {'A','t','l','A','x','W','i','n','L','i','c','8','0',0};
-
-    FIXME("version %04x semi-stub\n", _ATL_VER);
-
-    if ( FAILED( OleInitialize(NULL) ) )
-        return FALSE;
-
-    wcex.cbSize        = sizeof(wcex);
-    wcex.style         = CS_GLOBALCLASS | CS_DBLCLKS;
-    wcex.cbClsExtra    = 0;
-    wcex.cbWndExtra    = 0;
-    wcex.hInstance     = GetModuleHandleW( NULL );
-    wcex.hIcon         = NULL;
-    wcex.hCursor       = NULL;
-    wcex.hbrBackground = NULL;
-    wcex.lpszMenuName  = NULL;
-    wcex.hIconSm       = 0;
-
-    wcex.lpfnWndProc   = AtlAxWin_wndproc;
-    wcex.lpszClassName = AtlAxWin80;
-    if ( !RegisterClassExW( &wcex ) )
-        return FALSE;
-
-    wcex.lpszClassName = AtlAxWinLic80;
-    if ( !RegisterClassExW( &wcex ) )
-        return FALSE;
-
-    return TRUE;
-}
diff --git a/dlls/atl80/atl80.spec b/dlls/atl80/atl80.spec
index 3d53d06..a595681 100644
--- a/dlls/atl80/atl80.spec
+++ b/dlls/atl80/atl80.spec
@@ -20,20 +20,20 @@
 31 stdcall AtlComQIPtrAssign(ptr ptr ptr) atl100.AtlComQIPtrAssign
 32 stdcall AtlInternalQueryInterface(ptr ptr ptr ptr) atl100.AtlInternalQueryInterface
 34 stdcall AtlGetVersion(ptr)
-35 stdcall AtlAxDialogBoxW(long wstr long ptr long) atl100.AtlAxDialogBoxW
-36 stdcall AtlAxDialogBoxA(long str long ptr long) atl100.AtlAxDialogBoxA
-37 stdcall AtlAxCreateDialogW(long wstr long ptr long) atl100.AtlAxCreateDialogW
-38 stdcall AtlAxCreateDialogA(long str long ptr long) atl100.AtlAxCreateDialogA
-39 stdcall AtlAxCreateControl(ptr ptr ptr ptr) atl100.AtlAxCreateControl
-40 stdcall AtlAxCreateControlEx(ptr ptr ptr ptr ptr ptr ptr) atl100.AtlAxCreateControlEx
-41 stdcall AtlAxAttachControl(ptr ptr ptr) atl100.AtlAxAttachControl
+35 stdcall AtlAxDialogBoxW(long wstr long ptr long)
+36 stdcall AtlAxDialogBoxA(long str long ptr long)
+37 stdcall AtlAxCreateDialogW(long wstr long ptr long)
+38 stdcall AtlAxCreateDialogA(long str long ptr long)
+39 stdcall AtlAxCreateControl(ptr ptr ptr ptr)
+40 stdcall AtlAxCreateControlEx(ptr ptr ptr ptr ptr ptr ptr)
+41 stdcall AtlAxAttachControl(ptr ptr ptr)
 42 stdcall AtlAxWinInit()
 43 stdcall AtlWinModuleAddCreateWndData(ptr ptr ptr) atl100.AtlWinModuleAddCreateWndData
 44 stdcall AtlWinModuleExtractCreateWndData(ptr) atl100.AtlWinModuleExtractCreateWndData
 45 stub AtlWinModuleRegisterWndClassInfoW
 46 stub AtlWinModuleRegisterWndClassInfoA
-47 stdcall AtlAxGetControl(long ptr) atl100.AtlAxGetControl
-48 stdcall AtlAxGetHost(long ptr) atl100.AtlAxGetHost
+47 stdcall AtlAxGetControl(long ptr)
+48 stdcall AtlAxGetHost(long ptr)
 49 stdcall AtlRegisterClassCategoriesHelper(ptr ptr long) atl100.AtlRegisterClassCategoriesHelper
 50 stdcall AtlIPersistStreamInit_Load(ptr ptr ptr ptr) atl100.AtlIPersistStreamInit_Load
 51 stdcall AtlIPersistStreamInit_Save(ptr long ptr ptr ptr) atl100.AtlIPersistStreamInit_Save




More information about the wine-cvs mailing list