mirror of
https://github.com/reactos/wine.git
synced 2024-11-24 20:30:01 +00:00
atl100: Moved more function implementations to atl100.
This commit is contained in:
parent
fe3684cadd
commit
84587b689e
@ -1,9 +1,8 @@
|
||||
MODULE = atl.dll
|
||||
IMPORTLIB = atl
|
||||
IMPORTS = uuid atl100 ole32 oleaut32 user32 gdi32
|
||||
IMPORTS = uuid atl100 oleaut32 ole32 user32
|
||||
|
||||
C_SRCS = \
|
||||
atl_ax.c \
|
||||
atl_main.c \
|
||||
registrar.c
|
||||
|
||||
|
@ -2,11 +2,11 @@
|
||||
2 stdcall -private DllGetClassObject(ptr ptr ptr)
|
||||
3 stdcall -private DllRegisterServer()
|
||||
4 stdcall -private DllUnregisterServer()
|
||||
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)
|
||||
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 AtlModuleGetClassObject(ptr ptr ptr ptr)
|
||||
16 stdcall AtlModuleInit(ptr long long)
|
||||
17 stdcall AtlModuleRegisterClassObjects(ptr long long)
|
||||
@ -18,31 +18,31 @@
|
||||
23 stdcall AtlModuleUpdateRegistryFromResourceD(ptr wstr long ptr ptr)
|
||||
24 stub AtlWaitWithMessageLoop
|
||||
25 stub AtlSetErrorInfo
|
||||
26 stdcall AtlCreateTargetDC(long ptr)
|
||||
27 stdcall AtlHiMetricToPixel(ptr ptr)
|
||||
28 stdcall AtlPixelToHiMetric(ptr ptr)
|
||||
26 stdcall AtlCreateTargetDC(long ptr) atl100.AtlCreateTargetDC
|
||||
27 stdcall AtlHiMetricToPixel(ptr ptr) atl100.AtlHiMetricToPixel
|
||||
28 stdcall AtlPixelToHiMetric(ptr ptr) atl100.AtlPixelToHiMetric
|
||||
29 stub AtlDevModeW2A
|
||||
30 stdcall AtlComPtrAssign(ptr ptr)
|
||||
31 stdcall AtlComQIPtrAssign(ptr ptr ptr)
|
||||
32 stdcall AtlInternalQueryInterface(ptr ptr ptr ptr)
|
||||
30 stdcall AtlComPtrAssign(ptr ptr) atl100.AtlComPtrAssign
|
||||
31 stdcall AtlComQIPtrAssign(ptr ptr ptr) atl100.AtlComQIPtrAssign
|
||||
32 stdcall AtlInternalQueryInterface(ptr ptr ptr ptr) atl100.AtlInternalQueryInterface
|
||||
34 stub AtlGetVersion
|
||||
35 stub AtlAxDialogBoxW
|
||||
36 stub AtlAxDialogBoxA
|
||||
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)
|
||||
48 stdcall AtlAxGetHost(long ptr)
|
||||
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
|
||||
43 stdcall AtlModuleAddCreateWndData(ptr ptr ptr) atl100.AtlModuleAddCreateWndData
|
||||
44 stdcall AtlModuleExtractCreateWndData(ptr) atl100.AtlModuleExtractCreateWndData
|
||||
45 stdcall AtlModuleRegisterWndClassInfoW(ptr ptr ptr) atl100.AtlModuleRegisterWndClassInfoW
|
||||
46 stdcall AtlModuleRegisterWndClassInfoA(ptr ptr ptr) atl100.AtlModuleRegisterWndClassInfoA
|
||||
47 stdcall AtlAxGetControl(long ptr) atl100.AtlAxGetControl
|
||||
48 stdcall AtlAxGetHost(long ptr) atl100.AtlAxGetHost
|
||||
49 stub AtlRegisterClassCategoriesHelper
|
||||
50 stdcall AtlIPersistStreamInit_Load(ptr ptr ptr ptr)
|
||||
51 stdcall AtlIPersistStreamInit_Save(ptr long ptr ptr ptr)
|
||||
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
|
||||
53 stub AtlIPersistPropertyBag_Save
|
||||
54 stub AtlGetObjectSourceInterface
|
||||
|
@ -18,24 +18,15 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define COBJMACROS
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winerror.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "wine/debug.h"
|
||||
#include "objbase.h"
|
||||
#include "objidl.h"
|
||||
#include "ole2.h"
|
||||
#include "atlbase.h"
|
||||
#include "atliface.h"
|
||||
#include "atlwin.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(atl);
|
||||
@ -219,73 +210,6 @@ HRESULT WINAPI AtlModuleUnregisterServerEx(_ATL_MODULEW* pM, BOOL bUnRegTypeLib,
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
IUnknown* WINAPI AtlComPtrAssign(IUnknown** pp, IUnknown *p)
|
||||
{
|
||||
TRACE("(%p %p)\n", pp, p);
|
||||
|
||||
if (p) IUnknown_AddRef(p);
|
||||
if (*pp) IUnknown_Release(*pp);
|
||||
*pp = p;
|
||||
return p;
|
||||
}
|
||||
|
||||
IUnknown* WINAPI AtlComQIPtrAssign(IUnknown** pp, IUnknown *p, REFIID riid)
|
||||
{
|
||||
IUnknown *new_p = NULL;
|
||||
|
||||
TRACE("(%p %p %s)\n", pp, p, debugstr_guid(riid));
|
||||
|
||||
if (p) IUnknown_QueryInterface(p, riid, (void **)&new_p);
|
||||
if (*pp) IUnknown_Release(*pp);
|
||||
*pp = new_p;
|
||||
return new_p;
|
||||
}
|
||||
|
||||
|
||||
HRESULT WINAPI AtlInternalQueryInterface(void* this, const _ATL_INTMAP_ENTRY* pEntries, REFIID iid, void** ppvObject)
|
||||
{
|
||||
int i = 0;
|
||||
HRESULT rc = E_NOINTERFACE;
|
||||
TRACE("(%p, %p, %s, %p)\n",this, pEntries, debugstr_guid(iid), ppvObject);
|
||||
|
||||
if (IsEqualGUID(iid,&IID_IUnknown))
|
||||
{
|
||||
TRACE("Returning IUnknown\n");
|
||||
*ppvObject = ((LPSTR)this+pEntries[0].dw);
|
||||
IUnknown_AddRef((IUnknown*)*ppvObject);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
while (pEntries[i].pFunc != 0)
|
||||
{
|
||||
TRACE("Trying entry %i (%s %i %p)\n",i,debugstr_guid(pEntries[i].piid),
|
||||
pEntries[i].dw, pEntries[i].pFunc);
|
||||
|
||||
if (!pEntries[i].piid || IsEqualGUID(iid,pEntries[i].piid))
|
||||
{
|
||||
TRACE("MATCH\n");
|
||||
if (pEntries[i].pFunc == (_ATL_CREATORARGFUNC*)1)
|
||||
{
|
||||
TRACE("Offset\n");
|
||||
*ppvObject = ((LPSTR)this+pEntries[i].dw);
|
||||
IUnknown_AddRef((IUnknown*)*ppvObject);
|
||||
return S_OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
TRACE("Function\n");
|
||||
rc = pEntries[i].pFunc(this, iid, ppvObject, pEntries[i].dw);
|
||||
if(rc==S_OK || pEntries[i].piid)
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
TRACE("Done returning (0x%x)\n",rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* AtlModuleRegisterServer [ATL.@]
|
||||
*
|
||||
@ -322,51 +246,6 @@ HRESULT WINAPI AtlModuleRegisterServer(_ATL_MODULEW* pM, BOOL bRegTypeLib, const
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* AtlAdvise [ATL.@]
|
||||
*/
|
||||
HRESULT WINAPI AtlAdvise(IUnknown *pUnkCP, IUnknown *pUnk, const IID *iid, LPDWORD pdw)
|
||||
{
|
||||
FIXME("%p %p %p %p\n", pUnkCP, pUnk, iid, pdw);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* AtlUnadvise [ATL.@]
|
||||
*/
|
||||
HRESULT WINAPI AtlUnadvise(IUnknown *pUnkCP, const IID *iid, DWORD dw)
|
||||
{
|
||||
FIXME("%p %p %d\n", pUnkCP, iid, dw);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* AtlFreeMarshalStream [ATL.@]
|
||||
*/
|
||||
HRESULT WINAPI AtlFreeMarshalStream(IStream *stm)
|
||||
{
|
||||
FIXME("%p\n", stm);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* AtlMarshalPtrInProc [ATL.@]
|
||||
*/
|
||||
HRESULT WINAPI AtlMarshalPtrInProc(IUnknown *pUnk, const IID *iid, IStream **pstm)
|
||||
{
|
||||
FIXME("%p %p %p\n", pUnk, iid, pstm);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* AtlUnmarshalPtr [ATL.@]
|
||||
*/
|
||||
HRESULT WINAPI AtlUnmarshalPtr(IStream *stm, const IID *iid, IUnknown **ppUnk)
|
||||
{
|
||||
FIXME("%p %p %p\n", stm, iid, ppUnk);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* AtlModuleGetClassObject [ATL.@]
|
||||
*/
|
||||
@ -555,48 +434,6 @@ ATOM WINAPI AtlModuleRegisterWndClassInfoW(_ATL_MODULEW *pm, _ATL_WNDCLASSINFOW
|
||||
return atom;
|
||||
}
|
||||
|
||||
void WINAPI AtlHiMetricToPixel(const SIZEL* lpHiMetric, SIZEL* lpPix)
|
||||
{
|
||||
HDC dc = GetDC(NULL);
|
||||
lpPix->cx = lpHiMetric->cx * GetDeviceCaps( dc, LOGPIXELSX ) / 100;
|
||||
lpPix->cy = lpHiMetric->cy * GetDeviceCaps( dc, LOGPIXELSY ) / 100;
|
||||
ReleaseDC( NULL, dc );
|
||||
}
|
||||
|
||||
void WINAPI AtlPixelToHiMetric(const SIZEL* lpPix, SIZEL* lpHiMetric)
|
||||
{
|
||||
HDC dc = GetDC(NULL);
|
||||
lpHiMetric->cx = 100 * lpPix->cx / GetDeviceCaps( dc, LOGPIXELSX );
|
||||
lpHiMetric->cy = 100 * lpPix->cy / GetDeviceCaps( dc, LOGPIXELSY );
|
||||
ReleaseDC( NULL, dc );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* AtlCreateTargetDC [ATL.@]
|
||||
*/
|
||||
HDC WINAPI AtlCreateTargetDC( HDC hdc, DVTARGETDEVICE *dv )
|
||||
{
|
||||
static const WCHAR displayW[] = {'d','i','s','p','l','a','y',0};
|
||||
const WCHAR *driver = NULL, *device = NULL, *port = NULL;
|
||||
DEVMODEW *devmode = NULL;
|
||||
|
||||
TRACE( "(%p, %p)\n", hdc, dv );
|
||||
|
||||
if (dv)
|
||||
{
|
||||
if (dv->tdDriverNameOffset) driver = (WCHAR *)((char *)dv + dv->tdDriverNameOffset);
|
||||
if (dv->tdDeviceNameOffset) device = (WCHAR *)((char *)dv + dv->tdDeviceNameOffset);
|
||||
if (dv->tdPortNameOffset) port = (WCHAR *)((char *)dv + dv->tdPortNameOffset);
|
||||
if (dv->tdExtDevmodeOffset) devmode = (DEVMODEW *)((char *)dv + dv->tdExtDevmodeOffset);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (hdc) return hdc;
|
||||
driver = displayW;
|
||||
}
|
||||
return CreateDCW( driver, device, port, devmode );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* AtlModuleAddCreateWndData [ATL.@]
|
||||
*/
|
||||
@ -635,35 +472,3 @@ void* WINAPI AtlModuleExtractCreateWndData(_ATL_MODULEW *pM)
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* FIXME: should be in a header file */
|
||||
typedef struct ATL_PROPMAP_ENTRY
|
||||
{
|
||||
LPCOLESTR szDesc;
|
||||
DISPID dispid;
|
||||
const CLSID* pclsidPropPage;
|
||||
const IID* piidDispatch;
|
||||
DWORD dwOffsetData;
|
||||
DWORD dwSizeData;
|
||||
VARTYPE vt;
|
||||
} ATL_PROPMAP_ENTRY;
|
||||
|
||||
/***********************************************************************
|
||||
* AtlIPersistStreamInit_Load [ATL.@]
|
||||
*/
|
||||
HRESULT WINAPI AtlIPersistStreamInit_Load( LPSTREAM pStm, ATL_PROPMAP_ENTRY *pMap,
|
||||
void *pThis, IUnknown *pUnk)
|
||||
{
|
||||
FIXME("(%p, %p, %p, %p)\n", pStm, pMap, pThis, pUnk);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI AtlIPersistStreamInit_Save(LPSTREAM pStm, BOOL fClearDirty,
|
||||
ATL_PROPMAP_ENTRY *pMap, void *pThis,
|
||||
IUnknown *pUnk)
|
||||
{
|
||||
FIXME("(%p, %d, %p, %p, %p)\n", pStm, fClearDirty, pMap, pThis, pUnk);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -1,9 +1,10 @@
|
||||
MODULE = atl100.dll
|
||||
IMPORTLIB = atl100
|
||||
IMPORTS = uuid advapi32
|
||||
IMPORTS = uuid ole32 oleaut32 user32 gdi32 advapi32
|
||||
|
||||
C_SRCS = \
|
||||
atl.c \
|
||||
atl_ax.c \
|
||||
registrar.c
|
||||
|
||||
@MAKE_DLL_RULES@
|
||||
|
@ -16,14 +16,216 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#define COBJMACROS
|
||||
|
||||
#include "atlbase.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(atl);
|
||||
|
||||
/***********************************************************************
|
||||
* AtlAdvise [atl100.@]
|
||||
*/
|
||||
HRESULT WINAPI AtlAdvise(IUnknown *pUnkCP, IUnknown *pUnk, const IID *iid, LPDWORD pdw)
|
||||
{
|
||||
FIXME("%p %p %p %p\n", pUnkCP, pUnk, iid, pdw);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* AtlUnadvise [atl100.@]
|
||||
*/
|
||||
HRESULT WINAPI AtlUnadvise(IUnknown *pUnkCP, const IID *iid, DWORD dw)
|
||||
{
|
||||
FIXME("%p %p %d\n", pUnkCP, iid, dw);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* AtlFreeMarshalStream [atl100.@]
|
||||
*/
|
||||
HRESULT WINAPI AtlFreeMarshalStream(IStream *stm)
|
||||
{
|
||||
FIXME("%p\n", stm);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* AtlMarshalPtrInProc [atl100.@]
|
||||
*/
|
||||
HRESULT WINAPI AtlMarshalPtrInProc(IUnknown *pUnk, const IID *iid, IStream **pstm)
|
||||
{
|
||||
FIXME("%p %p %p\n", pUnk, iid, pstm);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* AtlUnmarshalPtr [atl100.@]
|
||||
*/
|
||||
HRESULT WINAPI AtlUnmarshalPtr(IStream *stm, const IID *iid, IUnknown **ppUnk)
|
||||
{
|
||||
FIXME("%p %p %p\n", stm, iid, ppUnk);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* AtlCreateTargetDC [atl100.@]
|
||||
*/
|
||||
HDC WINAPI AtlCreateTargetDC( HDC hdc, DVTARGETDEVICE *dv )
|
||||
{
|
||||
static const WCHAR displayW[] = {'d','i','s','p','l','a','y',0};
|
||||
const WCHAR *driver = NULL, *device = NULL, *port = NULL;
|
||||
DEVMODEW *devmode = NULL;
|
||||
|
||||
TRACE( "(%p, %p)\n", hdc, dv );
|
||||
|
||||
if (dv)
|
||||
{
|
||||
if (dv->tdDriverNameOffset) driver = (WCHAR *)((char *)dv + dv->tdDriverNameOffset);
|
||||
if (dv->tdDeviceNameOffset) device = (WCHAR *)((char *)dv + dv->tdDeviceNameOffset);
|
||||
if (dv->tdPortNameOffset) port = (WCHAR *)((char *)dv + dv->tdPortNameOffset);
|
||||
if (dv->tdExtDevmodeOffset) devmode = (DEVMODEW *)((char *)dv + dv->tdExtDevmodeOffset);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (hdc) return hdc;
|
||||
driver = displayW;
|
||||
}
|
||||
return CreateDCW( driver, device, port, devmode );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* AtlHiMetricToPixel [atl100.@]
|
||||
*/
|
||||
void WINAPI AtlHiMetricToPixel(const SIZEL* lpHiMetric, SIZEL* lpPix)
|
||||
{
|
||||
HDC dc = GetDC(NULL);
|
||||
lpPix->cx = lpHiMetric->cx * GetDeviceCaps( dc, LOGPIXELSX ) / 100;
|
||||
lpPix->cy = lpHiMetric->cy * GetDeviceCaps( dc, LOGPIXELSY ) / 100;
|
||||
ReleaseDC( NULL, dc );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* AtlPixelToHiMetric [atl100.@]
|
||||
*/
|
||||
void WINAPI AtlPixelToHiMetric(const SIZEL* lpPix, SIZEL* lpHiMetric)
|
||||
{
|
||||
HDC dc = GetDC(NULL);
|
||||
lpHiMetric->cx = 100 * lpPix->cx / GetDeviceCaps( dc, LOGPIXELSX );
|
||||
lpHiMetric->cy = 100 * lpPix->cy / GetDeviceCaps( dc, LOGPIXELSY );
|
||||
ReleaseDC( NULL, dc );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* AtlComPtrAssign [atl100.@]
|
||||
*/
|
||||
IUnknown* WINAPI AtlComPtrAssign(IUnknown** pp, IUnknown *p)
|
||||
{
|
||||
TRACE("(%p %p)\n", pp, p);
|
||||
|
||||
if (p) IUnknown_AddRef(p);
|
||||
if (*pp) IUnknown_Release(*pp);
|
||||
*pp = p;
|
||||
return p;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* AtlComQIPtrAssign [atl100.@]
|
||||
*/
|
||||
IUnknown* WINAPI AtlComQIPtrAssign(IUnknown** pp, IUnknown *p, REFIID riid)
|
||||
{
|
||||
IUnknown *new_p = NULL;
|
||||
|
||||
TRACE("(%p %p %s)\n", pp, p, debugstr_guid(riid));
|
||||
|
||||
if (p) IUnknown_QueryInterface(p, riid, (void **)&new_p);
|
||||
if (*pp) IUnknown_Release(*pp);
|
||||
*pp = new_p;
|
||||
return new_p;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* AtlInternalQueryInterface [atl100.@]
|
||||
*/
|
||||
HRESULT WINAPI AtlInternalQueryInterface(void* this, const _ATL_INTMAP_ENTRY* pEntries, REFIID iid, void** ppvObject)
|
||||
{
|
||||
int i = 0;
|
||||
HRESULT rc = E_NOINTERFACE;
|
||||
TRACE("(%p, %p, %s, %p)\n",this, pEntries, debugstr_guid(iid), ppvObject);
|
||||
|
||||
if (IsEqualGUID(iid,&IID_IUnknown))
|
||||
{
|
||||
TRACE("Returning IUnknown\n");
|
||||
*ppvObject = ((LPSTR)this+pEntries[0].dw);
|
||||
IUnknown_AddRef((IUnknown*)*ppvObject);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
while (pEntries[i].pFunc != 0)
|
||||
{
|
||||
TRACE("Trying entry %i (%s %i %p)\n",i,debugstr_guid(pEntries[i].piid),
|
||||
pEntries[i].dw, pEntries[i].pFunc);
|
||||
|
||||
if (!pEntries[i].piid || IsEqualGUID(iid,pEntries[i].piid))
|
||||
{
|
||||
TRACE("MATCH\n");
|
||||
if (pEntries[i].pFunc == (_ATL_CREATORARGFUNC*)1)
|
||||
{
|
||||
TRACE("Offset\n");
|
||||
*ppvObject = ((LPSTR)this+pEntries[i].dw);
|
||||
IUnknown_AddRef((IUnknown*)*ppvObject);
|
||||
return S_OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
TRACE("Function\n");
|
||||
rc = pEntries[i].pFunc(this, iid, ppvObject, pEntries[i].dw);
|
||||
if(rc==S_OK || pEntries[i].piid)
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
TRACE("Done returning (0x%x)\n",rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* FIXME: should be in a header file */
|
||||
typedef struct ATL_PROPMAP_ENTRY
|
||||
{
|
||||
LPCOLESTR szDesc;
|
||||
DISPID dispid;
|
||||
const CLSID* pclsidPropPage;
|
||||
const IID* piidDispatch;
|
||||
DWORD dwOffsetData;
|
||||
DWORD dwSizeData;
|
||||
VARTYPE vt;
|
||||
} ATL_PROPMAP_ENTRY;
|
||||
|
||||
/***********************************************************************
|
||||
* AtlIPersistStreamInit_Load [atl100.@]
|
||||
*/
|
||||
HRESULT WINAPI AtlIPersistStreamInit_Load( LPSTREAM pStm, ATL_PROPMAP_ENTRY *pMap,
|
||||
void *pThis, IUnknown *pUnk)
|
||||
{
|
||||
FIXME("(%p, %p, %p, %p)\n", pStm, pMap, pThis, pUnk);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* AtlIPersistStreamInit_Save [atl100.@]
|
||||
*/
|
||||
HRESULT WINAPI AtlIPersistStreamInit_Save(LPSTREAM pStm, BOOL fClearDirty,
|
||||
ATL_PROPMAP_ENTRY *pMap, void *pThis,
|
||||
IUnknown *pUnk)
|
||||
{
|
||||
FIXME("(%p, %d, %p, %p, %p)\n", pStm, fClearDirty, pMap, pThis, pUnk);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* AtlGetVersion [atl100.@]
|
||||
*/
|
||||
|
@ -1,8 +1,8 @@
|
||||
10 stub AtlAdvise
|
||||
11 stub AtlUnadvise
|
||||
12 stub AtlFreeMarshalStream
|
||||
13 stub AtlMarshalPtrInProc
|
||||
14 stub 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 stub AtlComModuleGetClassObject
|
||||
17 stub AtlComModuleRegisterClassObjects
|
||||
20 stub AtlComModuleRevokeClassObjects
|
||||
@ -10,31 +10,31 @@
|
||||
23 stub AtlUpdateRegistryFromResourceD
|
||||
24 stub AtlWaitWithMessageLoop
|
||||
25 stub AtlSetErrorInfo
|
||||
26 stub AtlCreateTargetDC
|
||||
27 stub AtlHiMetricToPixel
|
||||
28 stub AtlPixelToHiMetric
|
||||
26 stdcall AtlCreateTargetDC(long ptr)
|
||||
27 stdcall AtlHiMetricToPixel(ptr ptr)
|
||||
28 stdcall AtlPixelToHiMetric(ptr ptr)
|
||||
29 stub AtlDevModeW2A
|
||||
30 stub AtlComPtrAssign
|
||||
31 stub AtlComQIPtrAssign
|
||||
32 stub AtlInternalQueryInterface
|
||||
30 stdcall AtlComPtrAssign(ptr ptr)
|
||||
31 stdcall AtlComQIPtrAssign(ptr ptr ptr)
|
||||
32 stdcall AtlInternalQueryInterface(ptr ptr ptr ptr)
|
||||
34 stdcall AtlGetVersion(ptr)
|
||||
35 stub AtlAxDialogBoxW
|
||||
36 stub AtlAxDialogBoxA
|
||||
37 stub AtlAxCreateDialogW
|
||||
38 stub AtlAxCreateDialogA
|
||||
39 stub AtlAxCreateControl
|
||||
40 stub AtlAxCreateControlEx
|
||||
41 stub AtlAxAttachControl
|
||||
42 stub AtlAxWinInit
|
||||
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 stub AtlWinModuleAddCreateWndData
|
||||
44 stub AtlWinModuleExtractCreateWndData
|
||||
45 stub AtlWinModuleRegisterWndClassInfoW
|
||||
46 stub AtlWinModuleRegisterWndClassInfoA
|
||||
47 stub AtlAxGetControl
|
||||
48 stub AtlAxGetHost
|
||||
47 stdcall AtlAxGetControl(long ptr)
|
||||
48 stdcall AtlAxGetHost(long ptr)
|
||||
49 stub AtlRegisterClassCategoriesHelper
|
||||
50 stub AtlIPersistStreamInit_Load
|
||||
51 stub AtlIPersistStreamInit_Save
|
||||
50 stdcall AtlIPersistStreamInit_Load(ptr ptr ptr ptr)
|
||||
51 stdcall AtlIPersistStreamInit_Save(ptr long ptr ptr ptr)
|
||||
52 stub AtlIPersistPropertyBag_Load
|
||||
53 stub AtlIPersistPropertyBag_Save
|
||||
54 stub AtlGetObjectSourceInterface
|
||||
|
@ -75,7 +75,7 @@ static LRESULT CALLBACK AtlAxWin_wndproc( HWND hWnd, UINT wMsg, WPARAM wParam, L
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* AtlAxWinInit [ATL.@]
|
||||
* AtlAxWinInit [atl100.@]
|
||||
* Initializes the control-hosting code: registering the AtlAxWin,
|
||||
* AtlAxWin7 and AtlAxWinLic7 window classes and some messages.
|
||||
*
|
||||
@ -961,7 +961,7 @@ static HRESULT IOCS_Create( HWND hWnd, IUnknown *pUnkControl, IOCS **ppSite )
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* AtlAxCreateControl [ATL.@]
|
||||
* AtlAxCreateControl [atl100.@]
|
||||
*/
|
||||
HRESULT WINAPI AtlAxCreateControl(LPCOLESTR lpszName, HWND hWnd,
|
||||
IStream *pStream, IUnknown **ppUnkContainer)
|
||||
@ -971,7 +971,7 @@ HRESULT WINAPI AtlAxCreateControl(LPCOLESTR lpszName, HWND hWnd,
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* AtlAxCreateControlEx [ATL.@]
|
||||
* AtlAxCreateControlEx [atl100.@]
|
||||
*
|
||||
* REMARKS
|
||||
* See http://www.codeproject.com/com/cwebpage.asp for some background
|
||||
@ -989,7 +989,7 @@ HRESULT WINAPI AtlAxCreateControlEx(LPCOLESTR lpszName, HWND hWnd,
|
||||
IUnknown *pContainer;
|
||||
enum {IsGUID=0,IsHTML=1,IsURL=2} content;
|
||||
|
||||
TRACE("(%s %p %p %p %p %p %p)\n", debugstr_w(lpszName), hWnd, pStream,
|
||||
TRACE("(%s %p %p %p %p %p %p)\n", debugstr_w(lpszName), hWnd, pStream,
|
||||
ppUnkContainer, ppUnkControl, iidSink, punkSink);
|
||||
|
||||
hRes = CLSIDFromString( lpszName, &controlId );
|
||||
@ -1003,7 +1003,7 @@ HRESULT WINAPI AtlAxCreateControlEx(LPCOLESTR lpszName, HWND hWnd,
|
||||
controlId = CLSID_WebBrowser;
|
||||
}
|
||||
|
||||
hRes = CoCreateInstance( &controlId, 0, CLSCTX_ALL, &IID_IOleObject,
|
||||
hRes = CoCreateInstance( &controlId, 0, CLSCTX_ALL, &IID_IOleObject,
|
||||
(void**) &pControl );
|
||||
if ( FAILED( hRes ) )
|
||||
{
|
||||
@ -1025,7 +1025,7 @@ HRESULT WINAPI AtlAxCreateControlEx(LPCOLESTR lpszName, HWND hWnd,
|
||||
|
||||
IOleObject_QueryInterface( pControl, &IID_IUnknown, (void**) &pUnkControl );
|
||||
IOleObject_Release( pControl );
|
||||
|
||||
|
||||
|
||||
hRes = AtlAxAttachControl( pUnkControl, hWnd, &pContainer );
|
||||
if ( FAILED( hRes ) )
|
||||
@ -1040,7 +1040,7 @@ HRESULT WINAPI AtlAxCreateControlEx(LPCOLESTR lpszName, HWND hWnd,
|
||||
WARN( "Cannot query IWebBrowser2 interface: %08x\n", hRes );
|
||||
else {
|
||||
VARIANT url;
|
||||
|
||||
|
||||
IWebBrowser2_put_Visible( browser, VARIANT_TRUE ); /* it seems that native does this on URL (but do not on MSHTML:! why? */
|
||||
|
||||
V_VT(&url) = VT_BSTR;
|
||||
@ -1077,7 +1077,7 @@ HRESULT WINAPI AtlAxCreateControlEx(LPCOLESTR lpszName, HWND hWnd,
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* AtlAxAttachControl [ATL.@]
|
||||
* AtlAxAttachControl [atl100.@]
|
||||
*/
|
||||
HRESULT WINAPI AtlAxAttachControl(IUnknown* pControl, HWND hWnd, IUnknown** ppUnkContainer)
|
||||
{
|
||||
@ -1129,7 +1129,7 @@ static LPDLGTEMPLATEW AX_ConvertDialogTemplate(LPCDLGTEMPLATEW src_tmpl)
|
||||
#define PUT_WORD(x) do {WORD w = (x);PUT_BLOCK(&w, 1);} while(0)
|
||||
#define PUT_DWORD(x) do {DWORD w = (x);PUT_BLOCK(&w, 2);} while(0)
|
||||
const WORD *tmp, *src = (const WORD *)src_tmpl;
|
||||
WORD *output;
|
||||
WORD *output;
|
||||
DWORD allocated, filled; /* in WORDs */
|
||||
BOOL ext;
|
||||
WORD signature, dlgver, rescount;
|
||||
@ -1139,7 +1139,7 @@ static LPDLGTEMPLATEW AX_ConvertDialogTemplate(LPCDLGTEMPLATEW src_tmpl)
|
||||
output = HeapAlloc( GetProcessHeap(), 0, allocated * sizeof(WORD) );
|
||||
if (!output)
|
||||
return NULL;
|
||||
|
||||
|
||||
/* header */
|
||||
tmp = src;
|
||||
signature = GET_WORD(src);
|
||||
@ -1234,7 +1234,7 @@ static LPDLGTEMPLATEW AX_ConvertDialogTemplate(LPCDLGTEMPLATEW src_tmpl)
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* AtlAxCreateDialogA [ATL.@]
|
||||
* AtlAxCreateDialogA [atl100.@]
|
||||
*
|
||||
* Creates a dialog window
|
||||
*
|
||||
@ -1243,7 +1243,7 @@ static LPDLGTEMPLATEW AX_ConvertDialogTemplate(LPCDLGTEMPLATEW src_tmpl)
|
||||
* name [I] Dialog box template name
|
||||
* owner [I] Dialog box parent HWND
|
||||
* dlgProc [I] Dialog box procedure
|
||||
* param [I] This value will be passed to dlgProc as WM_INITDIALOG's message lParam
|
||||
* param [I] This value will be passed to dlgProc as WM_INITDIALOG's message lParam
|
||||
*
|
||||
* RETURNS
|
||||
* Window handle of dialog window.
|
||||
@ -1269,7 +1269,7 @@ HWND WINAPI AtlAxCreateDialogA(HINSTANCE hInst, LPCSTR name, HWND owner, DLGPROC
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* AtlAxCreateDialogW [ATL.@]
|
||||
* AtlAxCreateDialogW [atl100.@]
|
||||
*
|
||||
* See AtlAxCreateDialogA
|
||||
*
|
||||
@ -1308,7 +1308,7 @@ HWND WINAPI AtlAxCreateDialogW(HINSTANCE hInst, LPCWSTR name, HWND owner, DLGPRO
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* AtlAxGetHost [ATL.@]
|
||||
* AtlAxGetHost [atl100.@]
|
||||
*
|
||||
*/
|
||||
HRESULT WINAPI AtlAxGetHost(HWND hWnd, IUnknown **pUnk)
|
||||
@ -1330,7 +1330,7 @@ HRESULT WINAPI AtlAxGetHost(HWND hWnd, IUnknown **pUnk)
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* AtlAxGetControl [ATL.@]
|
||||
* AtlAxGetControl [atl100.@]
|
||||
*
|
||||
*/
|
||||
HRESULT WINAPI AtlAxGetControl(HWND hWnd, IUnknown **pUnk)
|
Loading…
Reference in New Issue
Block a user