Author: akhaldi
Date: Sat Sep 14 18:22:37 2013
New Revision: 60110
URL:
http://svn.reactos.org/svn/reactos?rev=60110&view=rev
Log:
[ATL]
* Sync with Wine 1.7.1.
Removed:
trunk/reactos/dll/win32/atl/registrar.c
Modified:
trunk/reactos/dll/win32/atl/CMakeLists.txt
trunk/reactos/dll/win32/atl/atl.spec
trunk/reactos/dll/win32/atl/atl_main.c
trunk/reactos/dll/win32/atl/atl_ros.diff
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/atl/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/atl/CMakeLists.t…
==============================================================================
--- trunk/reactos/dll/win32/atl/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/atl/CMakeLists.txt [iso-8859-1] Sat Sep 14 18:22:37 2013
@@ -12,13 +12,12 @@
list(APPEND SOURCE
atl_main.c
- registrar.c
${CMAKE_CURRENT_BINARY_DIR}/atl_stubs.c
${CMAKE_CURRENT_BINARY_DIR}/atl.def)
add_library(atl SHARED ${SOURCE} rsrc.rc)
set_module_type(atl win32dll)
target_link_libraries(atl uuid wine)
-add_importlibs(atl atl100 oleaut32 ole32 user32 msvcrt kernel32 ntdll)
+add_importlibs(atl atl100 atl80 oleaut32 ole32 user32 msvcrt kernel32 ntdll)
add_dependencies(atl atl_atliface_header)
add_cd_file(TARGET atl DESTINATION reactos/system32 FOR all)
Modified: trunk/reactos/dll/win32/atl/atl.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/atl/atl.spec?rev…
==============================================================================
--- trunk/reactos/dll/win32/atl/atl.spec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/atl/atl.spec [iso-8859-1] Sat Sep 14 18:22:37 2013
@@ -16,7 +16,7 @@
21 stdcall AtlModuleTerm(ptr)
22 stdcall AtlModuleUnregisterServer(ptr ptr)
23 stdcall AtlModuleUpdateRegistryFromResourceD(ptr wstr long ptr ptr)
-24 stub AtlWaitWithMessageLoop
+24 stdcall AtlWaitWithMessageLoop(long) atl100.AtlWaitWithMessageLoop
25 stub AtlSetErrorInfo
26 stdcall AtlCreateTargetDC(long ptr) atl100.AtlCreateTargetDC
27 stdcall AtlHiMetricToPixel(ptr ptr) atl100.AtlHiMetricToPixel
@@ -26,26 +26,26 @@
31 stdcall AtlComQIPtrAssign(ptr ptr ptr) atl100.AtlComQIPtrAssign
32 stdcall AtlInternalQueryInterface(ptr ptr ptr ptr) atl100.AtlInternalQueryInterface
34 stdcall AtlGetVersion(ptr)
-35 stub AtlAxDialogBoxW
-36 stub AtlAxDialogBoxA
+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
-42 stdcall AtlAxWinInit() atl100.AtlAxWinInit
+42 stdcall AtlAxWinInit()
43 stdcall AtlModuleAddCreateWndData(ptr ptr ptr)
44 stdcall AtlModuleExtractCreateWndData(ptr)
45 stdcall AtlModuleRegisterWndClassInfoW(ptr ptr ptr)
46 stdcall AtlModuleRegisterWndClassInfoA(ptr ptr ptr)
47 stdcall AtlAxGetControl(long ptr) atl100.AtlAxGetControl
48 stdcall AtlAxGetHost(long ptr) atl100.AtlAxGetHost
-49 stub AtlRegisterClassCategoriesHelper
+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
-52 stub AtlIPersistPropertyBag_Load
+52 stdcall AtlIPersistPropertyBag_Load(ptr ptr ptr ptr ptr)
atl100.AtlIPersistPropertyBag_Load
53 stub AtlIPersistPropertyBag_Save
-54 stub AtlGetObjectSourceInterface
+54 stdcall AtlGetObjectSourceInterface(ptr ptr ptr ptr ptr)
atl100.AtlGetObjectSourceInterface
55 stub AtlModuleUnRegisterTypeLib
56 stdcall AtlModuleLoadTypeLib(ptr wstr ptr ptr)
57 stdcall AtlModuleUnregisterServerEx(ptr long ptr)
Modified: trunk/reactos/dll/win32/atl/atl_main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/atl/atl_main.c?r…
==============================================================================
--- trunk/reactos/dll/win32/atl/atl_main.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/atl/atl_main.c [iso-8859-1] Sat Sep 14 18:22:37 2013
@@ -2,6 +2,7 @@
* Implementation of Active Template Library (atl.dll)
*
* Copyright 2004 Aric Stewart for CodeWeavers
+ * Copyright 2005 Jacek Caban
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -28,7 +29,7 @@
#include <windef.h>
#include <winbase.h>
-#include <objbase.h>
+#include <ole2.h>
#include <oleauto.h>
//#include "objidl.h"
@@ -40,7 +41,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(atl);
-DECLSPEC_HIDDEN HINSTANCE hInst;
+static HINSTANCE hInst;
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
@@ -60,7 +61,7 @@
INT i;
UINT size;
- //FIXME("SEMI-STUB (%p %p %p)\n",pM,p,h);
+ TRACE("(%p %p %p)\n", pM, p, h);
size = pM->cbSize;
switch (size)
@@ -120,57 +121,50 @@
HRESULT WINAPI AtlModuleLoadTypeLib(_ATL_MODULEW *pM, LPCOLESTR lpszIndex,
BSTR *pbstrPath, ITypeLib **ppTypeLib)
{
- HRESULT hRes;
- OLECHAR path[MAX_PATH+8]; /* leave some space for index */
-
TRACE("(%p, %s, %p, %p)\n", pM, debugstr_w(lpszIndex), pbstrPath,
ppTypeLib);
if (!pM)
return E_INVALIDARG;
- GetModuleFileNameW(pM->m_hInstTypeLib, path, MAX_PATH);
- if (lpszIndex)
- lstrcatW(path, lpszIndex);
-
- hRes = LoadTypeLib(path, ppTypeLib);
- if (FAILED(hRes))
- return hRes;
-
- *pbstrPath = SysAllocString(path);
+ return AtlLoadTypeLib(pM->m_hInstTypeLib, lpszIndex, pbstrPath, ppTypeLib);
+}
+
+HRESULT WINAPI AtlModuleTerm(_ATL_MODULE *pM)
+{
+ _ATL_TERMFUNC_ELEM *iter, *tmp;
+
+ TRACE("(%p)\n", pM);
+
+ if (pM->cbSize > ATLVer1Size)
+ {
+ iter = pM->m_pTermFuncs;
+
+ while(iter) {
+ iter->pFunc(iter->dw);
+ tmp = iter;
+ iter = iter->pNext;
+ HeapFree(GetProcessHeap(), 0, tmp);
+ }
+ }
return S_OK;
}
-HRESULT WINAPI AtlModuleTerm(_ATL_MODULEW* pM)
-{
- _ATL_TERMFUNC_ELEM *iter = pM->m_pTermFuncs, *tmp;
-
- TRACE("(%p)\n", pM);
-
- while(iter) {
- iter->pFunc(iter->dw);
- tmp = iter;
- iter = iter->pNext;
- HeapFree(GetProcessHeap(), 0, tmp);
- }
-
- HeapFree(GetProcessHeap(), 0, pM);
-
- return S_OK;
-}
-
HRESULT WINAPI AtlModuleAddTermFunc(_ATL_MODULEW *pM, _ATL_TERMFUNC *pFunc, DWORD_PTR
dw)
{
_ATL_TERMFUNC_ELEM *termfunc_elem;
TRACE("(%p %p %ld)\n", pM, pFunc, dw);
- termfunc_elem = HeapAlloc(GetProcessHeap(), 0, sizeof(_ATL_TERMFUNC_ELEM));
- termfunc_elem->pFunc = pFunc;
- termfunc_elem->dw = dw;
- termfunc_elem->pNext = pM->m_pTermFuncs;
-
- pM->m_pTermFuncs = termfunc_elem;
+ if (pM->cbSize > ATLVer1Size)
+ {
+ termfunc_elem = HeapAlloc(GetProcessHeap(), 0, sizeof(_ATL_TERMFUNC_ELEM));
+ termfunc_elem->pFunc = pFunc;
+ termfunc_elem->dw = dw;
+ termfunc_elem->pNext = pM->m_pTermFuncs;
+
+ pM->m_pTermFuncs = termfunc_elem;
+ }
return S_OK;
}
@@ -242,12 +236,23 @@
hRes = obj->pfnUpdateRegistry(TRUE); /* register */
if (FAILED(hRes))
return hRes;
+
+ if(pM->cbSize > ATLVer1Size) {
+ const struct _ATL_CATMAP_ENTRY *catmap;
+
+ catmap = ((const _ATL_OBJMAP_ENTRYW*)obj)->pfnGetCategoryMap();
+ if(catmap) {
+ hRes = AtlRegisterClassCategoriesHelper(obj->pclsid, catmap,
TRUE);
+ if(FAILED(hRes))
+ return hRes;
+ }
+ }
}
}
if (bRegTypeLib)
{
- hRes = AtlModuleRegisterTypeLib(pM, NULL);
+ hRes = AtlRegisterTypeLib(pM->m_hInstTypeLib, NULL);
if (FAILED(hRes))
return hRes;
}
@@ -298,25 +303,12 @@
*/
HRESULT WINAPI AtlModuleRegisterTypeLib(_ATL_MODULEW *pm, LPCOLESTR lpszIndex)
{
- HRESULT hRes;
- BSTR path;
- ITypeLib *typelib;
-
TRACE("%p %s\n", pm, debugstr_w(lpszIndex));
if (!pm)
return E_INVALIDARG;
- hRes = AtlModuleLoadTypeLib(pm, lpszIndex, &path, &typelib);
-
- if (SUCCEEDED(hRes))
- {
- hRes = RegisterTypeLib(typelib, path, NULL); /* FIXME: pass help directory */
- ITypeLib_Release(typelib);
- SysFreeString(path);
- }
-
- return hRes;
+ return AtlRegisterTypeLib(pm->m_hInstTypeLib, lpszIndex);
}
/***********************************************************************
@@ -452,23 +444,28 @@
pData->m_pThis = pvObject;
pData->m_dwThreadID = GetCurrentThreadId();
+
+ EnterCriticalSection(&pM->m_csWindowCreate);
pData->m_pNext = pM->m_pCreateWndList;
pM->m_pCreateWndList = pData;
+ LeaveCriticalSection(&pM->m_csWindowCreate);
}
/***********************************************************************
* AtlModuleExtractCreateWndData [ATL.@]
*
- * NOTE: I failed to find any good description of this function.
- * Tests show that this function extracts one of _AtlCreateWndData
+ * NOTE: Tests show that this function extracts one of _AtlCreateWndData
* records from the current thread from a list
*
*/
void* WINAPI AtlModuleExtractCreateWndData(_ATL_MODULEW *pM)
{
_AtlCreateWndData **ppData;
+ void *ret = NULL;
TRACE("(%p)\n", pM);
+
+ EnterCriticalSection(&pM->m_csWindowCreate);
for(ppData = &pM->m_pCreateWndList; *ppData!=NULL; ppData =
&(*ppData)->m_pNext)
{
@@ -476,10 +473,172 @@
{
_AtlCreateWndData *pData = *ppData;
*ppData = pData->m_pNext;
- return pData->m_pThis;
- }
- }
- return NULL;
+ ret = pData->m_pThis;
+ break;
+ }
+ }
+
+ LeaveCriticalSection(&pM->m_csWindowCreate);
+ return ret;
+}
+
+/***********************************************************************
+ * AtlModuleUpdateRegistryFromResourceD [ATL.@]
+ *
+ */
+HRESULT WINAPI AtlModuleUpdateRegistryFromResourceD(_ATL_MODULEW* pM, LPCOLESTR lpszRes,
+ BOOL bRegister, struct _ATL_REGMAP_ENTRY* pMapEntries, IRegistrar* pReg)
+{
+ TRACE("(%p %s %d %p %p)\n", pM, debugstr_w(lpszRes), bRegister,
pMapEntries, pReg);
+
+ return AtlUpdateRegistryFromResourceD(pM->m_hInst, lpszRes, bRegister,
pMapEntries, pReg);
+}
+
+static HRESULT WINAPI RegistrarCF_QueryInterface(IClassFactory *iface, REFIID riid, void
**ppvObject)
+{
+ TRACE("(%p)->(%s %p)\n", iface, debugstr_guid(riid), ppvObject);
+
+ if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IClassFactory, riid))
{
+ *ppvObject = iface;
+ IClassFactory_AddRef( iface );
+ return S_OK;
+ }
+
+ return E_NOINTERFACE;
+}
+
+static ULONG WINAPI RegistrarCF_AddRef(IClassFactory *iface)
+{
+ return 2;
+}
+
+static ULONG WINAPI RegistrarCF_Release(IClassFactory *iface)
+{
+ return 1;
+}
+
+static HRESULT WINAPI RegistrarCF_CreateInstance(IClassFactory *iface, LPUNKNOWN
pUnkOuter,
+ REFIID riid, void **ppv)
+{
+ IRegistrar *registrar;
+ HRESULT hres;
+
+ TRACE("(%p)->(%s %p)\n", iface, debugstr_guid(riid), ppv);
+
+ if(pUnkOuter) {
+ *ppv = NULL;
+ return CLASS_E_NOAGGREGATION;
+ }
+
+ hres = AtlCreateRegistrar(®istrar);
+ if(FAILED(hres))
+ return hres;
+
+ hres = IRegistrar_QueryInterface(registrar, riid, ppv);
+ IRegistrar_Release(registrar);
+ return hres;
+}
+
+static HRESULT WINAPI RegistrarCF_LockServer(IClassFactory *iface, BOOL lock)
+{
+ TRACE("(%p)->(%x)\n", iface, lock);
+ return S_OK;
+}
+
+static const IClassFactoryVtbl IRegistrarCFVtbl = {
+ RegistrarCF_QueryInterface,
+ RegistrarCF_AddRef,
+ RegistrarCF_Release,
+ RegistrarCF_CreateInstance,
+ RegistrarCF_LockServer
+};
+
+static IClassFactory RegistrarCF = { &IRegistrarCFVtbl };
+
+static HRESULT do_register_dll_server(IRegistrar *pRegistrar, LPCOLESTR wszDll,
+ LPCOLESTR wszId, BOOL do_register,
+ const struct _ATL_REGMAP_ENTRY* pMapEntries)
+{
+ IRegistrar *registrar;
+ HRESULT hres;
+ const struct _ATL_REGMAP_ENTRY *pMapEntry;
+
+ static const WCHAR wszModule[] =
{'M','O','D','U','L','E',0};
+ static const WCHAR wszRegistry[] =
{'R','E','G','I','S','T','R','Y',0};
+
+ if(pRegistrar) {
+ registrar = pRegistrar;
+ }else {
+ hres = AtlCreateRegistrar(®istrar);
+ if(FAILED(hres))
+ return hres;
+ }
+
+ IRegistrar_AddReplacement(registrar, wszModule, wszDll);
+
+ for (pMapEntry = pMapEntries; pMapEntry && pMapEntry->szKey; pMapEntry++)
+ IRegistrar_AddReplacement(registrar, pMapEntry->szKey, pMapEntry->szData);
+
+ if(do_register)
+ hres = IRegistrar_ResourceRegisterSz(registrar, wszDll, wszId, wszRegistry);
+ else
+ hres = IRegistrar_ResourceUnregisterSz(registrar, wszDll, wszId, wszRegistry);
+
+ if(registrar != pRegistrar)
+ IRegistrar_Release(registrar);
+ return hres;
+}
+
+static HRESULT do_register_server(BOOL do_register)
+{
+ static const WCHAR CLSID_RegistrarW[] =
+
{'C','L','S','I','D','_','R','e','g','i','s','t','r','a','r',0};
+ static const WCHAR atl_dllW[] =
{'a','t','l','.','d','l','l',0};
+
+ WCHAR clsid_str[40];
+ const struct _ATL_REGMAP_ENTRY reg_map[] = {{CLSID_RegistrarW, clsid_str},
{NULL,NULL}};
+
+ StringFromGUID2(&CLSID_Registrar, clsid_str, sizeof(clsid_str)/sizeof(WCHAR));
+ return do_register_dll_server(NULL, atl_dllW, MAKEINTRESOURCEW(101), do_register,
reg_map);
+}
+
+/**************************************************************
+ * DllGetClassObject (ATL.2)
+ */
+HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID riid, LPVOID *ppvObject)
+{
+ TRACE("(%s %s %p)\n", debugstr_guid(clsid), debugstr_guid(riid),
ppvObject);
+
+ if(IsEqualGUID(&CLSID_Registrar, clsid))
+ return IClassFactory_QueryInterface( &RegistrarCF, riid, ppvObject );
+
+ FIXME("Not supported class %s\n", debugstr_guid(clsid));
+ return CLASS_E_CLASSNOTAVAILABLE;
+}
+
+/***********************************************************************
+ * DllRegisterServer (ATL.@)
+ */
+HRESULT WINAPI DllRegisterServer(void)
+{
+ /* Note: we can't use __wine_register_server here because it uses CLSID_Registrar
which isn't registred yet */
+ return do_register_server(TRUE);
+}
+
+/***********************************************************************
+ * DllUnRegisterServer (ATL.@)
+ */
+HRESULT WINAPI DllUnregisterServer(void)
+{
+ return do_register_server(FALSE);
+}
+
+/***********************************************************************
+ * DllCanUnloadNow (ATL.@)
+ */
+HRESULT WINAPI DllCanUnloadNow(void)
+{
+ return S_FALSE;
}
/***********************************************************************
@@ -487,5 +646,53 @@
*/
DWORD WINAPI AtlGetVersion(void *pReserved)
{
- return 0x0300;
-}
+ 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 AtlAxWin[] =
{'A','t','l','A','x','W','i','n',0};
+
+ FIXME("semi-stub\n");
+
+ if ( FAILED( OleInitialize(NULL) ) )
+ return FALSE;
+
+ wcex.cbSize = sizeof(wcex);
+ wcex.style = CS_GLOBALCLASS;
+ 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 = AtlAxWin;
+ if ( !RegisterClassExW( &wcex ) )
+ return FALSE;
+
+ return TRUE;
+}
Modified: trunk/reactos/dll/win32/atl/atl_ros.diff
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/atl/atl_ros.diff…
==============================================================================
--- trunk/reactos/dll/win32/atl/atl_ros.diff [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/atl/atl_ros.diff [iso-8859-1] Sat Sep 14 18:22:37 2013
@@ -1,24 +1,44 @@
-Index: atl_main.c
-===================================================================
---- atl_main.c (revision 48273)
-+++ atl_main.c (working copy)
-@@ -60,7 +60,7 @@
- INT i;
- UINT size;
+diff -prudN e:\Wine\dlls\atl/atl_main.c e:\reactos\dll\win32\atl/atl_main.c
+--- e:\Wine\dlls\atl/atl_main.c 2013-09-03 23:09:36.308717300 +0100
++++ e:\reactos\dll\win32\atl/atl_main.c 2013-09-12 12:15:17.112785700 +0100
+@@ -547,6 +555,53 @@ static const IClassFactoryVtbl IRegistra
-- FIXME("SEMI-STUB (%p %p %p)\n",pM,p,h);
-+ //FIXME("SEMI-STUB (%p %p %p)\n",pM,p,h);
+ static IClassFactory RegistrarCF = { &IRegistrarCFVtbl };
- size = pM->cbSize;
- switch (size)
-Index: registrar.c
-===================================================================
---- registrar.c (revision 48273)
-+++ registrar.c (revision 48273)
-@@ -819,6 +819,19 @@
- return hres;
- }
-
++static HRESULT do_register_dll_server(IRegistrar *pRegistrar, LPCOLESTR wszDll,
++ LPCOLESTR wszId, BOOL do_register,
++ const struct _ATL_REGMAP_ENTRY* pMapEntries)
++{
++ IRegistrar *registrar;
++ HRESULT hres;
++ const struct _ATL_REGMAP_ENTRY *pMapEntry;
++
++ static const WCHAR wszModule[] =
{'M','O','D','U','L','E',0};
++ static const WCHAR wszRegistry[] =
{'R','E','G','I','S','T','R','Y',0};
++
++ if(pRegistrar) {
++ registrar = pRegistrar;
++ }else {
++ hres = AtlCreateRegistrar(®istrar);
++ if(FAILED(hres))
++ return hres;
++ }
++
++ IRegistrar_AddReplacement(registrar, wszModule, wszDll);
++
++ for (pMapEntry = pMapEntries; pMapEntry && pMapEntry->szKey;
pMapEntry++)
++ IRegistrar_AddReplacement(registrar, pMapEntry->szKey,
pMapEntry->szData);
++
++ if(do_register)
++ hres = IRegistrar_ResourceRegisterSz(registrar, wszDll, wszId, wszRegistry);
++ else
++ hres = IRegistrar_ResourceUnregisterSz(registrar, wszDll, wszId, wszRegistry);
++
++ if(registrar != pRegistrar)
++ IRegistrar_Release(registrar);
++ return hres;
++}
++
+static HRESULT do_register_server(BOOL do_register)
+{
+ static const WCHAR CLSID_RegistrarW[] =
@@ -32,10 +52,10 @@
+ return do_register_dll_server(NULL, atl_dllW, MAKEINTRESOURCEW(101), do_register,
reg_map);
+}
+
- /***********************************************************************
- * AtlModuleUpdateRegistryFromResourceD [ATL.@]
- *
-@@ -849,7 +862,8 @@
+ /**************************************************************
+ * DllGetClassObject (ATL.2)
+ */
+@@ -566,7 +621,8 @@ HRESULT WINAPI DllGetClassObject(REFCLSI
*/
HRESULT WINAPI DllRegisterServer(void)
{
@@ -45,7 +65,7 @@
}
/***********************************************************************
-@@ -857,7 +871,7 @@
+@@ -574,7 +630,7 @@ HRESULT WINAPI DllRegisterServer(void)
*/
HRESULT WINAPI DllUnregisterServer(void)
{
Removed: trunk/reactos/dll/win32/atl/registrar.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/atl/registrar.c?…
==============================================================================
--- trunk/reactos/dll/win32/atl/registrar.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/atl/registrar.c (removed)
@@ -1,215 +0,0 @@
-/*
- * Copyright 2005 Jacek Caban
- *
- * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define COBJMACROS
-
-#include <stdarg.h>
-#include <windef.h>
-#include <winbase.h>
-#include <objbase.h>
-
-//#include "oaidl.h"
-//#include "rpcproxy.h"
-#include <atlbase.h>
-
-#include <wine/debug.h>
-//#include "wine/unicode.h"
-
-WINE_DEFAULT_DEBUG_CHANNEL(atl);
-
-/**************************************************************
- * ClassFactory implementation
- */
-
-static HRESULT WINAPI RegistrarCF_QueryInterface(IClassFactory *iface, REFIID riid, void
**ppvObject)
-{
- TRACE("(%p)->(%s %p)\n", iface, debugstr_guid(riid), ppvObject);
-
- if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IClassFactory, riid))
{
- *ppvObject = iface;
- IClassFactory_AddRef( iface );
- return S_OK;
- }
-
- return E_NOINTERFACE;
-}
-
-static ULONG WINAPI RegistrarCF_AddRef(IClassFactory *iface)
-{
- return 2;
-}
-
-static ULONG WINAPI RegistrarCF_Release(IClassFactory *iface)
-{
- return 1;
-}
-
-static HRESULT WINAPI RegistrarCF_CreateInstance(IClassFactory *iface, LPUNKNOWN
pUnkOuter,
- REFIID riid, void **ppv)
-{
- IRegistrar *registrar;
- HRESULT hres;
-
- TRACE("(%p)->(%s %p)\n", iface, debugstr_guid(riid), ppv);
-
- if(pUnkOuter) {
- *ppv = NULL;
- return CLASS_E_NOAGGREGATION;
- }
-
- hres = AtlCreateRegistrar(®istrar);
- if(FAILED(hres))
- return hres;
-
- hres = IRegistrar_QueryInterface(registrar, riid, ppv);
- IRegistrar_Release(registrar);
- return hres;
-}
-
-static HRESULT WINAPI RegistrarCF_LockServer(IClassFactory *iface, BOOL lock)
-{
- TRACE("(%p)->(%x)\n", iface, lock);
- return S_OK;
-}
-
-static const IClassFactoryVtbl IRegistrarCFVtbl = {
- RegistrarCF_QueryInterface,
- RegistrarCF_AddRef,
- RegistrarCF_Release,
- RegistrarCF_CreateInstance,
- RegistrarCF_LockServer
-};
-
-static IClassFactory RegistrarCF = { &IRegistrarCFVtbl };
-
-/**************************************************************
- * DllGetClassObject (ATL.2)
- */
-HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID riid, LPVOID *ppvObject)
-{
- TRACE("(%s %s %p)\n", debugstr_guid(clsid), debugstr_guid(riid),
ppvObject);
-
- if(IsEqualGUID(&CLSID_Registrar, clsid))
- return IClassFactory_QueryInterface( &RegistrarCF, riid, ppvObject );
-
- FIXME("Not supported class %s\n", debugstr_guid(clsid));
- return CLASS_E_CLASSNOTAVAILABLE;
-}
-
-extern HINSTANCE hInst;
-
-static HRESULT do_register_dll_server(IRegistrar *pRegistrar, LPCOLESTR wszDll,
- LPCOLESTR wszId, BOOL do_register,
- const struct _ATL_REGMAP_ENTRY* pMapEntries)
-{
- IRegistrar *registrar;
- HRESULT hres;
- const struct _ATL_REGMAP_ENTRY *pMapEntry;
-
- static const WCHAR wszModule[] =
{'M','O','D','U','L','E',0};
- static const WCHAR wszRegistry[] =
{'R','E','G','I','S','T','R','Y',0};
-
- if(pRegistrar) {
- registrar = pRegistrar;
- }else {
- hres = AtlCreateRegistrar(®istrar);
- if(FAILED(hres))
- return hres;
- }
-
- IRegistrar_AddReplacement(registrar, wszModule, wszDll);
-
- for (pMapEntry = pMapEntries; pMapEntry && pMapEntry->szKey; pMapEntry++)
- IRegistrar_AddReplacement(registrar, pMapEntry->szKey, pMapEntry->szData);
-
- if(do_register)
- hres = IRegistrar_ResourceRegisterSz(registrar, wszDll, wszId, wszRegistry);
- else
- hres = IRegistrar_ResourceUnregisterSz(registrar, wszDll, wszId, wszRegistry);
-
- if(registrar != pRegistrar)
- IRegistrar_Release(registrar);
- return hres;
-}
-
-static HRESULT do_register_server(BOOL do_register)
-{
- static const WCHAR CLSID_RegistrarW[] =
-
{'C','L','S','I','D','_','R','e','g','i','s','t','r','a','r',0};
- static const WCHAR atl_dllW[] =
{'a','t','l','.','d','l','l',0};
-
- WCHAR clsid_str[40];
- const struct _ATL_REGMAP_ENTRY reg_map[] = {{CLSID_RegistrarW, clsid_str},
{NULL,NULL}};
-
- StringFromGUID2(&CLSID_Registrar, clsid_str, sizeof(clsid_str)/sizeof(WCHAR));
- return do_register_dll_server(NULL, atl_dllW, MAKEINTRESOURCEW(101), do_register,
reg_map);
-}
-
-/***********************************************************************
- * AtlModuleUpdateRegistryFromResourceD [ATL.@]
- *
- */
-HRESULT WINAPI AtlModuleUpdateRegistryFromResourceD(_ATL_MODULEW* pM, LPCOLESTR lpszRes,
- BOOL bRegister, struct _ATL_REGMAP_ENTRY* pMapEntries, IRegistrar* pReg)
-{
- HINSTANCE lhInst = pM->m_hInst;
- /* everything inside this function below this point
- * should go into atl71.AtlUpdateRegistryFromResourceD
- */
- WCHAR module_name[MAX_PATH];
-
- if(!GetModuleFileNameW(lhInst, module_name, MAX_PATH)) {
- FIXME("hinst %p: did not get module name\n",
- lhInst);
- return E_FAIL;
- }
-
- TRACE("%p (%s), %s, %d, %p, %p\n", hInst, debugstr_w(module_name),
- debugstr_w(lpszRes), bRegister, pMapEntries, pReg);
-
- return do_register_dll_server(pReg, module_name, lpszRes, bRegister, pMapEntries);
-}
-
-/***********************************************************************
- * DllRegisterServer (ATL.@)
- */
-HRESULT WINAPI DllRegisterServer(void)
-{
- /* Note: we can't use __wine_register_server here because it uses CLSID_Registrar
which isn't registred yet */
- return do_register_server(TRUE);
-}
-
-/***********************************************************************
- * DllUnRegisterServer (ATL.@)
- */
-HRESULT WINAPI DllUnregisterServer(void)
-{
- return do_register_server(FALSE);
-}
-
-/***********************************************************************
- * DllCanUnloadNow (ATL.@)
- */
-HRESULT WINAPI DllCanUnloadNow(void)
-{
- return S_FALSE;
-}
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sat Sep 14 18:22:37 2013
@@ -50,7 +50,7 @@
reactos/dll/win32/activeds # Synced to Wine-1.1.43?
reactos/dll/win32/actxprxy # Synced to Wine-1.5.26
reactos/dll/win32/advpack # Synced to Wine-1.7.1
-reactos/dll/win32/atl # Synced to Wine-1.5.19
+reactos/dll/win32/atl # Synced to Wine-1.7.1
reactos/dll/win32/atl100 # Synced to Wine-1.7.1
reactos/dll/win32/atl80 # Synced to Wine-1.7.1
reactos/dll/win32/avifil32 # Synced to Wine-1.5.26