atl: Allow version-based differences in struct layouts.
This commit is contained in:
parent
785bdb6412
commit
f1e41255e3
|
@ -1,6 +1,7 @@
|
|||
MODULE = atl.dll
|
||||
IMPORTLIB = atl
|
||||
IMPORTS = uuid atl100 oleaut32 ole32 user32
|
||||
EXTRADEFS = -D_ATL_VER=_ATL_VER_30
|
||||
|
||||
C_SRCS = \
|
||||
atl_main.c \
|
||||
|
|
|
@ -478,5 +478,5 @@ void* WINAPI AtlModuleExtractCreateWndData(_ATL_MODULEW *pM)
|
|||
*/
|
||||
DWORD WINAPI AtlGetVersion(void *pReserved)
|
||||
{
|
||||
return 0x0300;
|
||||
return _ATL_VER;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
TESTDLL = atl.dll
|
||||
IMPORTS = uuid atl oleaut32 ole32 rpcrt4 user32 gdi32 advapi32
|
||||
EXTRADEFS = -D_ATL_VER=_ATL_VER_30
|
||||
|
||||
C_SRCS = \
|
||||
atl_ax.c \
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
MODULE = atl100.dll
|
||||
MODULE = atl100.dll
|
||||
IMPORTLIB = atl100
|
||||
IMPORTS = uuid ole32 oleaut32 user32 gdi32 advapi32
|
||||
IMPORTS = uuid ole32 oleaut32 user32 gdi32 advapi32
|
||||
EXTRADEFS = -D_ATL_VER=_ATL_VER_100
|
||||
|
||||
C_SRCS = \
|
||||
atl.c \
|
||||
|
|
|
@ -231,5 +231,5 @@ HRESULT WINAPI AtlIPersistStreamInit_Save(LPSTREAM pStm, BOOL fClearDirty,
|
|||
*/
|
||||
DWORD WINAPI AtlGetVersion(void *pReserved)
|
||||
{
|
||||
return 0x0a00;
|
||||
return _ATL_VER;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
MODULE = atl80.dll
|
||||
MODULE = atl80.dll
|
||||
EXTRADEFS = -D_ATL_VER=_ATL_VER_80
|
||||
|
||||
|
||||
C_SRCS = atl80.c
|
||||
|
||||
|
|
|
@ -19,11 +19,12 @@
|
|||
#include <stdarg.h>
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "atlbase.h"
|
||||
|
||||
/***********************************************************************
|
||||
* AtlGetVersion [atl80.@]
|
||||
*/
|
||||
DWORD WINAPI AtlGetVersion(void *pReserved)
|
||||
{
|
||||
return 0x0800;
|
||||
return _ATL_VER;
|
||||
}
|
||||
|
|
|
@ -154,7 +154,7 @@ static int format_exception_msg( const EXCEPTION_POINTERS *ptr, char *buffer, in
|
|||
len = snprintf( buffer, size, "Unhandled PIC return in vm86 mode");
|
||||
break;
|
||||
default:
|
||||
len = snprintf( buffer, size, "Unhandled exception 0x%08x", rec->ExceptionCode);
|
||||
len = snprintf( buffer, size, "Unhandled exception 0x%08x in thread %x", rec->ExceptionCode, GetCurrentThreadId());
|
||||
break;
|
||||
}
|
||||
if ((len<0) || (len>=size))
|
||||
|
|
|
@ -23,6 +23,16 @@
|
|||
|
||||
#include <atliface.h>
|
||||
|
||||
/* Wine extention: we (ab)use _ATL_VER to handle truct layout differences between ATL versions. */
|
||||
#define _ATL_VER_30 0x0300
|
||||
#define _ATL_VER_70 0x0700
|
||||
#define _ATL_VER_80 0x0800
|
||||
#define _ATL_VER_100 0x0a00
|
||||
|
||||
#ifndef _ATL_VER
|
||||
#define _ATL_VER _ATL_VER_100
|
||||
#endif
|
||||
|
||||
typedef HRESULT (WINAPI _ATL_CREATORFUNC)(void* pv, REFIID riid, LPVOID* ppv);
|
||||
typedef HRESULT (WINAPI _ATL_CREATORARGFUNC)(void* pv, REFIID riid, LPVOID* ppv, DWORD dw);
|
||||
typedef HRESULT (WINAPI _ATL_MODULEFUNC)(DWORD dw);
|
||||
|
@ -31,6 +41,8 @@ typedef LPCWSTR (WINAPI _ATL_DESCRIPTIONFUNCW)(void);
|
|||
typedef const struct _ATL_CATMAP_ENTRY* (_ATL_CATMAPFUNC)(void);
|
||||
typedef void (WINAPI _ATL_TERMFUNC)(DWORD dw);
|
||||
|
||||
typedef CRITICAL_SECTION CComCriticalSection;
|
||||
|
||||
typedef struct _ATL_OBJMAP_ENTRYA_V1_TAG
|
||||
{
|
||||
const CLSID* pclsid;
|
||||
|
@ -148,6 +160,20 @@ typedef struct _ATL_MODULEW_TAG
|
|||
_ATL_TERMFUNC_ELEM* m_pTermFuncs;
|
||||
} _ATL_MODULEW;
|
||||
|
||||
typedef struct _ATL_MODULE70
|
||||
{
|
||||
UINT cbSize;
|
||||
LONG m_nLockCnt;
|
||||
_ATL_TERMFUNC_ELEM *m_pTermFuncs;
|
||||
CComCriticalSection m_csStaticDataInitAndTypeInfo;
|
||||
} _ATL_MODULE70;
|
||||
|
||||
#if _ATL_VER >= _ATL_VER_70
|
||||
typedef _ATL_MODULE70 _ATL_MODULE;
|
||||
#else
|
||||
typedef _ATL_MODULEW _ATL_MODULE;
|
||||
#endif
|
||||
|
||||
typedef struct _ATL_INTMAP_ENTRY_TAG
|
||||
{
|
||||
const IID* piid;
|
||||
|
|
Loading…
Reference in New Issue