[ATL][ATL80][ATL100]

* Sync with Wine 1.7.17.
CORE-8080

svn path=/trunk/; revision=63007
This commit is contained in:
Amine Khaldi 2014-04-26 18:49:54 +00:00
parent 530239d488
commit c152cc4698
18 changed files with 282 additions and 307 deletions

View file

@ -11,13 +11,18 @@ include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
spec2def(atl.dll atl.spec ADD_IMPORTLIB)
list(APPEND SOURCE
atl_main.c
atl.c
atl30.c
atl_ax.c
registrar.c
precomp.h
${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 atl80 oleaut32 ole32 user32 msvcrt kernel32 ntdll)
add_importlibs(atl oleaut32 ole32 user32 gdi32 advapi32 msvcrt kernel32 ntdll)
add_dependencies(atl atl_atliface_header)
add_pch(atl precomp.h SOURCE)
add_cd_file(TARGET atl DESTINATION reactos/system32 FOR all)

View file

@ -17,11 +17,13 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "precomp.h"
#include <precomp.h>
#include <wingdi.h>
WINE_DEFAULT_DEBUG_CHANNEL(atl100);
#define ATLVer1Size FIELD_OFFSET(_ATL_MODULEW, dwAtlBuildVer)
HINSTANCE atl_instance;
typedef unsigned char cpp_bool;
@ -296,18 +298,22 @@ HRESULT WINAPI AtlModuleAddTermFunc(_ATL_MODULE *pM, _ATL_TERMFUNC *pFunc, DWORD
{
_ATL_TERMFUNC_ELEM *termfunc_elem;
TRACE("(%p %p %ld)\n", pM, pFunc, dw);
TRACE("version %04x (%p %p %ld)\n", _ATL_VER, 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;
if (_ATL_VER > _ATL_VER_30 || 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;
pM->m_pTermFuncs = termfunc_elem;
}
return S_OK;
}
#if _ATL_VER > _ATL_VER_30
/***********************************************************************
* AtlCallTermFunc [atl100.@]
*/
@ -327,6 +333,8 @@ void WINAPI AtlCallTermFunc(_ATL_MODULE *pM)
pM->m_pTermFuncs = NULL;
}
#endif
/***********************************************************************
* AtlLoadTypeLib [atl100.56]
*/
@ -383,12 +391,39 @@ HRESULT WINAPI AtlLoadTypeLib(HINSTANCE inst, LPCOLESTR lpszIndex,
return S_OK;
}
#if _ATL_VER <= _ATL_VER_80
/***********************************************************************
* AtlRegisterTypeLib [atl80.19]
*/
HRESULT WINAPI AtlRegisterTypeLib(HINSTANCE inst, const WCHAR *index)
{
ITypeLib *typelib;
BSTR path;
HRESULT hres;
TRACE("(%p %s)\n", inst, debugstr_w(index));
hres = AtlLoadTypeLib(inst, index, &path, &typelib);
if(FAILED(hres))
return hres;
hres = RegisterTypeLib(typelib, path, NULL); /* FIXME: pass help directory */
ITypeLib_Release(typelib);
SysFreeString(path);
return hres;
}
#endif
#if _ATL_VER > _ATL_VER_30
/***********************************************************************
* AtlWinModuleInit [atl100.65]
*/
HRESULT WINAPI AtlWinModuleInit(_ATL_WIN_MODULE *winmod)
{
TRACE("(%p\n", winmod);
TRACE("(%p)\n", winmod);
if(winmod->cbSize != sizeof(*winmod))
return E_INVALIDARG;
@ -499,7 +534,28 @@ HRESULT WINAPI AtlComModuleRegisterClassObjects(_ATL_COM_MODULE *module, DWORD c
}
return S_OK;
}
/***********************************************************************
* AtlComModuleRevokeClassObjects [atl100.20]
*/
HRESULT WINAPI AtlComModuleRevokeClassObjects(_ATL_COM_MODULE *module)
{
_ATL_OBJMAP_ENTRY **iter;
HRESULT hres;
TRACE("(%p)\n", module);
if(!module)
return E_INVALIDARG;
for(iter = module->m_ppAutoObjMapFirst; iter < module->m_ppAutoObjMapLast; iter++) {
hres = CoRevokeClassObject((*iter)->dwRegister);
if(FAILED(hres))
return hres;
}
return S_OK;
}
/***********************************************************************
@ -554,6 +610,8 @@ HRESULT WINAPI AtlComModuleUnregisterServer(_ATL_COM_MODULE *mod, BOOL bRegTypeL
return S_OK;
}
#endif
/***********************************************************************
* AtlRegisterClassCategoriesHelper [atl100.49]
*/
@ -757,6 +815,8 @@ HRESULT WINAPI AtlGetObjectSourceInterface(IUnknown *unk, GUID *libid, IID *iid,
return hres;
}
#if _ATL_VER >= _ATL_VER90
/***********************************************************************
* AtlSetPerUserRegistration [atl100.67]
*/
@ -776,12 +836,15 @@ HRESULT WINAPI AtlGetPerUserRegistration(cpp_bool *pbEnabled)
return S_OK;
}
#endif
/***********************************************************************
* AtlGetVersion [atl100.@]
*/
DWORD WINAPI AtlGetVersion(void *pReserved)
{
return _ATL_VER;
TRACE("version %04x (%p)\n", _ATL_VER, pReserved);
return _ATL_VER;
}
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
@ -790,6 +853,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
switch(fdwReason) {
case DLL_PROCESS_ATTACH:
atl_instance = hinstDLL;
DisableThreadLibraryCalls(hinstDLL);
break;
case DLL_PROCESS_DETACH:

View file

@ -2,11 +2,11 @@
@ stdcall -private DllGetClassObject(ptr ptr ptr)
@ stdcall -private DllRegisterServer()
@ stdcall -private DllUnregisterServer()
10 stdcall AtlAdvise(ptr ptr ptr ptr) atl100.AtlAdvise
11 stdcall AtlUnadvise(ptr ptr long) atl100.AtlUnadvise
12 stdcall AtlFreeMarshalStream(ptr) atl100.AtlFreeMarshalStream
13 stdcall AtlMarshalPtrInProc(ptr ptr ptr) atl100.AtlMarshalPtrInProc
14 stdcall AtlUnmarshalPtr(ptr ptr ptr) atl100.AtlUnmarshalPtr
10 stdcall AtlAdvise(ptr ptr ptr ptr)
11 stdcall AtlUnadvise(ptr ptr long)
12 stdcall AtlFreeMarshalStream(ptr)
13 stdcall AtlMarshalPtrInProc(ptr ptr ptr)
14 stdcall AtlUnmarshalPtr(ptr ptr ptr)
15 stdcall AtlModuleGetClassObject(ptr ptr ptr ptr)
16 stdcall AtlModuleInit(ptr long long)
17 stdcall AtlModuleRegisterClassObjects(ptr long long)
@ -16,36 +16,36 @@
21 stdcall AtlModuleTerm(ptr)
22 stdcall AtlModuleUnregisterServer(ptr ptr)
23 stdcall AtlModuleUpdateRegistryFromResourceD(ptr wstr long ptr ptr)
24 stdcall AtlWaitWithMessageLoop(long) atl100.AtlWaitWithMessageLoop
24 stdcall AtlWaitWithMessageLoop(long)
25 stub AtlSetErrorInfo
26 stdcall AtlCreateTargetDC(long ptr) atl100.AtlCreateTargetDC
27 stdcall AtlHiMetricToPixel(ptr ptr) atl100.AtlHiMetricToPixel
28 stdcall AtlPixelToHiMetric(ptr ptr) atl100.AtlPixelToHiMetric
26 stdcall AtlCreateTargetDC(long ptr)
27 stdcall AtlHiMetricToPixel(ptr ptr)
28 stdcall AtlPixelToHiMetric(ptr ptr)
29 stub AtlDevModeW2A
30 stdcall AtlComPtrAssign(ptr ptr) atl100.AtlComPtrAssign
31 stdcall AtlComQIPtrAssign(ptr ptr ptr) atl100.AtlComQIPtrAssign
32 stdcall AtlInternalQueryInterface(ptr ptr ptr ptr) atl100.AtlInternalQueryInterface
30 stdcall AtlComPtrAssign(ptr ptr)
31 stdcall AtlComQIPtrAssign(ptr ptr ptr)
32 stdcall AtlInternalQueryInterface(ptr ptr ptr ptr)
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 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 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 stdcall AtlIPersistPropertyBag_Load(ptr ptr ptr ptr ptr) atl100.AtlIPersistPropertyBag_Load
47 stdcall AtlAxGetControl(long ptr)
48 stdcall AtlAxGetHost(long ptr)
49 stdcall AtlRegisterClassCategoriesHelper(ptr ptr long)
50 stdcall AtlIPersistStreamInit_Load(ptr ptr ptr ptr)
51 stdcall AtlIPersistStreamInit_Save(ptr long ptr ptr ptr)
52 stdcall AtlIPersistPropertyBag_Load(ptr ptr ptr ptr ptr)
53 stub AtlIPersistPropertyBag_Save
54 stdcall AtlGetObjectSourceInterface(ptr ptr ptr ptr ptr) atl100.AtlGetObjectSourceInterface
54 stdcall AtlGetObjectSourceInterface(ptr ptr ptr ptr ptr)
55 stub AtlModuleUnRegisterTypeLib
56 stdcall AtlModuleLoadTypeLib(ptr wstr ptr ptr)
57 stdcall AtlModuleUnregisterServerEx(ptr long ptr)

View file

@ -19,40 +19,12 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include <precomp.h>
#include <stdio.h>
#include <rpcproxy.h>
#define COBJMACROS
#include <windef.h>
#include <winbase.h>
#include <ole2.h>
#include <oleauto.h>
//#include "objidl.h"
#include <atlbase.h>
#include <atlwin.h>
#include <wine/debug.h>
#include <wine/unicode.h>
WINE_DEFAULT_DEBUG_CHANNEL(atl);
static HINSTANCE hInst;
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
TRACE("(0x%p, %d, %p)\n",hinstDLL,fdwReason,lpvReserved);
if (fdwReason == DLL_PROCESS_ATTACH) {
DisableThreadLibraryCalls(hinstDLL);
hInst = hinstDLL;
}
return TRUE;
}
extern HINSTANCE atl_instance;
#define ATLVer1Size FIELD_OFFSET(_ATL_MODULEW, dwAtlBuildVer)
@ -150,25 +122,6 @@ HRESULT WINAPI AtlModuleTerm(_ATL_MODULE *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);
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;
}
HRESULT WINAPI AtlModuleRegisterClassObjects(_ATL_MODULEW *pM, DWORD dwClsContext,
DWORD dwFlags)
{
@ -602,6 +555,7 @@ static HRESULT do_register_server(BOOL do_register)
return do_register_dll_server(NULL, atl_dllW, MAKEINTRESOURCEW(101), do_register, reg_map);
}
/**************************************************************
* DllGetClassObject (ATL.2)
*/
@ -640,59 +594,3 @@ HRESULT WINAPI DllCanUnloadNow(void)
{
return S_FALSE;
}
/***********************************************************************
* AtlGetVersion [ATL.@]
*/
DWORD WINAPI AtlGetVersion(void *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 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;
}

View file

@ -18,13 +18,11 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "precomp.h"
#include <precomp.h>
#include <ole2.h>
#include <exdisp.h>
#include <atlwin.h>
WINE_DEFAULT_DEBUG_CHANNEL(atl);
#include <wine/atlwin.h>
typedef struct IOCS {
IOleClientSite IOleClientSite_iface;
@ -72,16 +70,30 @@ static LRESULT CALLBACK AtlAxWin_wndproc( HWND hWnd, UINT wMsg, WPARAM wParam, L
BOOL WINAPI AtlAxWinInit(void)
{
WNDCLASSEXW wcex;
const WCHAR AtlAxWin100[] = {'A','t','l','A','x','W','i','n','1','0','0',0};
const WCHAR AtlAxWinLic100[] = {'A','t','l','A','x','W','i','n','L','i','c','1','0','0',0};
FIXME("semi-stub\n");
#if _ATL_VER <= _ATL_VER_30
#define ATL_NAME_SUFFIX 0
#elif _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
#elif _ATL_VER == _ATL_VER_110
#define ATL_NAME_SUFFIX '1','1','0',0
#else
#error Unsupported version
#endif
const WCHAR AtlAxWinW[] = {'A','t','l','A','x','W','i','n',ATL_NAME_SUFFIX};
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.style = CS_GLOBALCLASS | (_ATL_VER > _ATL_VER_30 ? CS_DBLCLKS : 0);
wcex.cbClsExtra = 0;
wcex.cbWndExtra = 0;
wcex.hInstance = GetModuleHandleW( NULL );
@ -92,13 +104,17 @@ BOOL WINAPI AtlAxWinInit(void)
wcex.hIconSm = 0;
wcex.lpfnWndProc = AtlAxWin_wndproc;
wcex.lpszClassName = AtlAxWin100;
wcex.lpszClassName = AtlAxWinW;
if ( !RegisterClassExW( &wcex ) )
return FALSE;
wcex.lpszClassName = AtlAxWinLic100;
if ( !RegisterClassExW( &wcex ) )
return FALSE;
if(_ATL_VER > _ATL_VER_30) {
const WCHAR AtlAxWinLicW[] = {'A','t','l','A','x','W','i','n','L','i','c',ATL_NAME_SUFFIX};
wcex.lpszClassName = AtlAxWinLicW;
if ( !RegisterClassExW( &wcex ) )
return FALSE;
}
return TRUE;
}

View file

@ -18,6 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#pragma makedep register
[
helpstring("Registrar Class"),
progid("ATL.Registrar"),

View file

@ -0,0 +1,25 @@
#ifndef _ATL_PCH_
#define _ATL_PCH_
#include <stdarg.h>
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#define COBJMACROS
#include <windef.h>
#include <winbase.h>
#include <winreg.h>
#include <objbase.h>
#include <oleauto.h>
#include <wine/atlbase.h>
#include <wine/atlwin.h>
#include <wine/debug.h>
#include <wine/unicode.h>
WINE_DEFAULT_DEBUG_CHANNEL(atl);
#endif /* _ATL_PCH_ */

View file

@ -16,9 +16,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "precomp.h"
WINE_DEFAULT_DEBUG_CHANNEL(atl);
#include <precomp.h>
/**************************************************************
* ATLRegistrar implementation
@ -490,15 +488,13 @@ static HRESULT file_register(Registrar *This, LPCOLESTR fileName, BOOL do_regist
DWORD filelen, len;
LPWSTR regstrw;
LPSTR regstra;
LRESULT lres;
HRESULT hres;
file = CreateFileW(fileName, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_READONLY, NULL);
file = CreateFileW(fileName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
if(file != INVALID_HANDLE_VALUE) {
filelen = GetFileSize(file, NULL);
regstra = HeapAlloc(GetProcessHeap(), 0, filelen);
lres = ReadFile(file, regstra, filelen, NULL, NULL);
if(lres == ERROR_SUCCESS) {
if(ReadFile(file, regstra, filelen, NULL, NULL)) {
len = MultiByteToWideChar(CP_ACP, 0, regstra, filelen, NULL, 0)+1;
regstrw = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len*sizeof(WCHAR));
MultiByteToWideChar(CP_ACP, 0, regstra, filelen, regstrw, len);
@ -508,13 +504,13 @@ static HRESULT file_register(Registrar *This, LPCOLESTR fileName, BOOL do_regist
HeapFree(GetProcessHeap(), 0, regstrw);
}else {
WARN("Failed to read faile\n");
hres = HRESULT_FROM_WIN32(lres);
WARN("Failed to read file %s\n", debugstr_w(fileName));
hres = HRESULT_FROM_WIN32(GetLastError());
}
HeapFree(GetProcessHeap(), 0, regstra);
CloseHandle(file);
}else {
WARN("Could not open file\n");
WARN("Could not open file %s\n", debugstr_w(fileName));
hres = HRESULT_FROM_WIN32(GetLastError());
}

View file

@ -11,9 +11,9 @@ include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
spec2def(atl100.dll atl100.spec ADD_IMPORTLIB)
list(APPEND SOURCE
atl.c
atl_ax.c
registrar.c
${REACTOS_SOURCE_DIR}/dll/win32/atl/atl.c
${REACTOS_SOURCE_DIR}/dll/win32/atl/atl_ax.c
${REACTOS_SOURCE_DIR}/dll/win32/atl/registrar.c
precomp.h
${CMAKE_CURRENT_BINARY_DIR}/atl100_stubs.c)

View file

@ -5,7 +5,7 @@
14 stdcall AtlUnmarshalPtr(ptr ptr ptr)
15 stdcall AtlComModuleGetClassObject(ptr ptr ptr ptr)
17 stdcall AtlComModuleRegisterClassObjects(ptr long long)
20 stub AtlComModuleRevokeClassObjects
20 stdcall AtlComModuleRevokeClassObjects(ptr)
22 stdcall AtlComModuleUnregisterServer(ptr long ptr)
23 stdcall AtlUpdateRegistryFromResourceD(long wstr long ptr ptr)
24 stdcall AtlWaitWithMessageLoop(long)

View file

@ -19,4 +19,6 @@
#include <wine/debug.h>
#include <wine/unicode.h>
WINE_DEFAULT_DEBUG_CHANNEL(atl);
#endif /* _ATL100_PCH_ */

View file

@ -3,15 +3,23 @@ add_definitions(
-D__WINESRC__
-D_ATL_VER=_ATL_VER_80)
remove_definitions(-D_WIN32_WINNT=0x502)
add_definitions(-D_WIN32_WINNT=0x600)
spec2def(atl80.dll atl80.spec ADD_IMPORTLIB)
list(APPEND SOURCE
${REACTOS_SOURCE_DIR}/dll/win32/atl/atl.c
atl80.c
${REACTOS_SOURCE_DIR}/dll/win32/atl/atl_ax.c
${REACTOS_SOURCE_DIR}/dll/win32/atl/registrar.c
precomp.h
${CMAKE_CURRENT_BINARY_DIR}/atl80_stubs.c
${CMAKE_CURRENT_BINARY_DIR}/atl80.def)
add_library(atl80 SHARED ${SOURCE})
set_module_type(atl80 win32dll)
target_link_libraries(atl80 wine)
add_importlibs(atl80 atl100 oleaut32 user32 ole32 msvcrt kernel32 ntdll)
target_link_libraries(atl80 uuid wine)
add_importlibs(atl80 oleaut32 user32 ole32 gdi32 advapi32 msvcrt kernel32 ntdll)
add_pch(atl80 precomp.h SOURCE)
add_cd_file(TARGET atl80 DESTINATION reactos/system32 FOR all)

View file

@ -16,21 +16,11 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include <precomp.h>
#include <stdio.h>
#define COBJMACROS
#include <windef.h>
#include <winbase.h>
#include <winerror.h>
#include <winuser.h>
#include <wine/atlbase.h>
#include <wine/debug.h>
#include <wine/unicode.h>
WINE_DEFAULT_DEBUG_CHANNEL(atl);
/***********************************************************************
* AtlRegisterTypeLib [atl80.18]
@ -68,85 +58,3 @@ HRESULT WINAPI AtlComModuleRegisterServer(_ATL_COM_MODULE *mod, BOOL bRegTypeLib
return S_OK;
}
/***********************************************************************
* AtlRegisterTypeLib [atl80.19]
*/
HRESULT WINAPI AtlRegisterTypeLib(HINSTANCE inst, const WCHAR *index)
{
ITypeLib *typelib;
BSTR path;
HRESULT hres;
TRACE("(%p %s)\n", inst, debugstr_w(index));
hres = AtlLoadTypeLib(inst, index, &path, &typelib);
if(FAILED(hres))
return hres;
hres = RegisterTypeLib(typelib, path, NULL); /* FIXME: pass help directory */
ITypeLib_Release(typelib);
SysFreeString(path);
return hres;
}
/***********************************************************************
* AtlGetVersion [atl80.@]
*/
DWORD WINAPI AtlGetVersion(void *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("semi-stub\n");
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;
}

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity type="win32" name="Microsoft.VC80.ATL" version="8.0.50727.4053" processorArchitecture="" publicKeyToken="1fc8b3b9a1e18e3b"/>
<file name="atl80.dll"/>
</assembly>

View file

@ -0,0 +1,22 @@
/*
* Resource file for atl80
*
* Copyright 2011 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/* @makedep: atl80.manifest */
WINE_MANIFEST 24 atl80.manifest

View file

@ -1,53 +1,53 @@
10 stdcall AtlAdvise(ptr ptr ptr ptr) atl100.AtlAdvise
11 stdcall AtlUnadvise(ptr ptr long) atl100.AtlUnadvise
12 stdcall AtlFreeMarshalStream(ptr) atl100.AtlFreeMarshalStream
13 stdcall AtlMarshalPtrInProc(ptr ptr ptr) atl100.AtlMarshalPtrInProc
14 stdcall AtlUnmarshalPtr(ptr ptr ptr) atl100.AtlUnmarshalPtr
15 stdcall AtlComModuleGetClassObject(ptr ptr ptr ptr) atl100.AtlComModuleGetClassObject
17 stdcall AtlComModuleRegisterClassObjects(ptr long long) atl100.AtlComModuleRegisterClassObjects
10 stdcall AtlAdvise(ptr ptr ptr ptr)
11 stdcall AtlUnadvise(ptr ptr long)
12 stdcall AtlFreeMarshalStream(ptr)
13 stdcall AtlMarshalPtrInProc(ptr ptr ptr)
14 stdcall AtlUnmarshalPtr(ptr ptr ptr)
15 stdcall AtlComModuleGetClassObject(ptr ptr ptr ptr)
17 stdcall AtlComModuleRegisterClassObjects(ptr long long)
18 stdcall AtlComModuleRegisterServer(ptr long ptr)
19 stdcall AtlRegisterTypeLib(ptr wstr)
20 stub AtlComModuleRevokeClassObjects
22 stdcall AtlComModuleUnregisterServer(ptr long ptr) atl100.AtlComModuleUnregisterServer
23 stdcall AtlUpdateRegistryFromResourceD(long wstr long ptr ptr) atl100.AtlUpdateRegistryFromResourceD
24 stdcall AtlWaitWithMessageLoop(long) atl100.AtlWaitWithMessageLoop
20 stdcall AtlComModuleRevokeClassObjects(ptr)
22 stdcall AtlComModuleUnregisterServer(ptr long ptr)
23 stdcall AtlUpdateRegistryFromResourceD(long wstr long ptr ptr)
24 stdcall AtlWaitWithMessageLoop(long)
25 stub AtlSetErrorInfo
26 stdcall AtlCreateTargetDC(long ptr) atl100.AtlCreateTargetDC
27 stdcall AtlHiMetricToPixel(ptr ptr) atl100.AtlHiMetricToPixel
28 stdcall AtlPixelToHiMetric(ptr ptr) atl100.AtlPixelToHiMetric
26 stdcall AtlCreateTargetDC(long ptr)
27 stdcall AtlHiMetricToPixel(ptr ptr)
28 stdcall AtlPixelToHiMetric(ptr ptr)
29 stub AtlDevModeW2A
30 stdcall AtlComPtrAssign(ptr ptr) atl100.AtlComPtrAssign
31 stdcall AtlComQIPtrAssign(ptr ptr ptr) atl100.AtlComQIPtrAssign
32 stdcall AtlInternalQueryInterface(ptr ptr ptr ptr) atl100.AtlInternalQueryInterface
30 stdcall AtlComPtrAssign(ptr ptr)
31 stdcall AtlComQIPtrAssign(ptr ptr ptr)
32 stdcall AtlInternalQueryInterface(ptr ptr ptr ptr)
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
43 stdcall AtlWinModuleAddCreateWndData(ptr ptr ptr)
44 stdcall AtlWinModuleExtractCreateWndData(ptr)
45 stub AtlWinModuleRegisterWndClassInfoW
46 stub AtlWinModuleRegisterWndClassInfoA
47 stdcall AtlAxGetControl(long ptr) atl100.AtlAxGetControl
48 stdcall AtlAxGetHost(long ptr) atl100.AtlAxGetHost
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 stdcall AtlIPersistPropertyBag_Load(ptr ptr ptr ptr ptr) atl100.AtlIPersistPropertyBag_Load
47 stdcall AtlAxGetControl(long ptr)
48 stdcall AtlAxGetHost(long ptr)
49 stdcall AtlRegisterClassCategoriesHelper(ptr ptr long)
50 stdcall AtlIPersistStreamInit_Load(ptr ptr ptr ptr)
51 stdcall AtlIPersistStreamInit_Save(ptr long ptr ptr ptr)
52 stdcall AtlIPersistPropertyBag_Load(ptr ptr ptr ptr ptr)
53 stub AtlIPersistPropertyBag_Save
54 stdcall AtlGetObjectSourceInterface(ptr ptr ptr ptr ptr) atl100.AtlGetObjectSourceInterface
54 stdcall AtlGetObjectSourceInterface(ptr ptr ptr ptr ptr)
55 stub AtlUnRegisterTypeLib
56 stdcall AtlLoadTypeLib(long wstr ptr ptr) atl100.AtlLoadTypeLib
58 stdcall AtlModuleAddTermFunc(ptr ptr long) atl100.AtlModuleAddTermFunc
56 stdcall AtlLoadTypeLib(long wstr ptr ptr)
58 stdcall AtlModuleAddTermFunc(ptr ptr long)
59 stub AtlAxCreateControlLic
60 stub AtlAxCreateControlLicEx
61 stdcall AtlCreateRegistrar(ptr) atl100.AtlCreateRegistrar
61 stdcall AtlCreateRegistrar(ptr)
62 stub AtlWinModuleRegisterClassExW
63 stub AtlWinModuleRegisterClassExA
64 stdcall AtlCallTermFunc(ptr) atl100.AtlCallTermFunc
65 stdcall AtlWinModuleInit(ptr) atl100.AtlWinModuleInit
64 stdcall AtlCallTermFunc(ptr)
65 stdcall AtlWinModuleInit(ptr)
66 stub AtlWinModuleTerm

View file

@ -0,0 +1,24 @@
#ifndef _ATL80_PCH_
#define _ATL80_PCH_
#include <stdarg.h>
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#define COBJMACROS
#include <windef.h>
#include <winbase.h>
#include <winreg.h>
#include <objbase.h>
#include <oleauto.h>
#include <wine/atlbase.h>
#include <wine/debug.h>
#include <wine/unicode.h>
WINE_DEFAULT_DEBUG_CHANNEL(atl);
#endif /* _ATL80_PCH_ */

View file

@ -51,9 +51,9 @@ reactos/dll/directx/wine/wined3d # Synced to Wine-1.7.17
reactos/dll/win32/activeds # Synced to Wine-1.7.1
reactos/dll/win32/actxprxy # Synced to Wine-1.7.17
reactos/dll/win32/advpack # Synced to Wine-1.7.1
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/atl # Synced to Wine-1.7.17
reactos/dll/win32/atl100 # Synced to Wine-1.7.17
reactos/dll/win32/atl80 # Synced to Wine-1.7.17
reactos/dll/win32/avifil32 # Synced to Wine-1.7.17
reactos/dll/win32/bcrypt # Synced to Wine-1.7.17
reactos/dll/win32/browseui # Out of sync