ReactOS 0.4.17-dev-806-gffa4164
atl_ax.c File Reference
#include <stdarg.h>
#include <stdio.h>
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "winuser.h"
#include "wine/debug.h"
#include "objbase.h"
#include "objidl.h"
#include "ole2.h"
#include "exdisp.h"
#include "atlbase.h"
#include "atliface.h"
#include "atlwin.h"
#include "shlwapi.h"
Include dependency graph for atl_ax.c:

Go to the source code of this file.

Classes

struct  IOCS
 

Macros

#define COBJMACROS
 
#define ATL_NAME_SUFFIX
 
#define GET_WORD(x)   (*(const WORD *)(x))
 
#define GET_DWORD(x)   (*(const DWORD *)(x))
 
#define PUT_BLOCK(x, y)   do {if (!advance_array(&output, &allocated, &filled, (x), (y))) return NULL;} while (0)
 
#define PUT_WORD(x)   do {WORD w = (x);PUT_BLOCK(&w, 1);} while(0)
 

Typedefs

typedef struct IOCS IOCS
 

Enumerations

enum  content {
  IsEmpty = 0 , IsGUID = 1 , IsHTML = 2 , IsURL = 3 ,
  IsUnknown = 4
}
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (atl)
 
static LRESULT CALLBACK AtlAxWin_wndproc (HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam)
 
BOOL WINAPI AtlAxWinInit (void)
 
static IOCSimpl_from_IOleClientSite (IOleClientSite *iface)
 
static HRESULT IOCS_Detach (IOCS *This)
 
static HRESULT WINAPI OleClientSite_QueryInterface (IOleClientSite *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI OleClientSite_AddRef (IOleClientSite *iface)
 
static ULONG WINAPI OleClientSite_Release (IOleClientSite *iface)
 
static HRESULT WINAPI OleClientSite_SaveObject (IOleClientSite *iface)
 
static HRESULT WINAPI OleClientSite_GetMoniker (IOleClientSite *iface, DWORD dwAssign, DWORD dwWhichMoniker, IMoniker **ppmk)
 
static HRESULT WINAPI OleClientSite_GetContainer (IOleClientSite *iface, IOleContainer **container)
 
static HRESULT WINAPI OleClientSite_ShowObject (IOleClientSite *iface)
 
static HRESULT WINAPI OleClientSite_OnShowWindow (IOleClientSite *iface, BOOL fShow)
 
static HRESULT WINAPI OleClientSite_RequestNewObjectLayout (IOleClientSite *iface)
 
static IOCSimpl_from_IOleContainer (IOleContainer *iface)
 
static HRESULT WINAPI OleContainer_QueryInterface (IOleContainer *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI OleContainer_AddRef (IOleContainer *iface)
 
static ULONG WINAPI OleContainer_Release (IOleContainer *iface)
 
static HRESULT WINAPI OleContainer_ParseDisplayName (IOleContainer *iface, IBindCtx *pbc, LPOLESTR pszDisplayName, ULONG *pchEaten, IMoniker **ppmkOut)
 
static HRESULT WINAPI OleContainer_EnumObjects (IOleContainer *iface, DWORD grfFlags, IEnumUnknown **ppenum)
 
static HRESULT WINAPI OleContainer_LockContainer (IOleContainer *iface, BOOL fLock)
 
static IOCSimpl_from_IOleInPlaceSiteWindowless (IOleInPlaceSiteWindowless *iface)
 
static HRESULT WINAPI OleInPlaceSiteWindowless_QueryInterface (IOleInPlaceSiteWindowless *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI OleInPlaceSiteWindowless_AddRef (IOleInPlaceSiteWindowless *iface)
 
static ULONG WINAPI OleInPlaceSiteWindowless_Release (IOleInPlaceSiteWindowless *iface)
 
static HRESULT WINAPI OleInPlaceSiteWindowless_GetWindow (IOleInPlaceSiteWindowless *iface, HWND *phwnd)
 
static HRESULT WINAPI OleInPlaceSiteWindowless_ContextSensitiveHelp (IOleInPlaceSiteWindowless *iface, BOOL fEnterMode)
 
static HRESULT WINAPI OleInPlaceSiteWindowless_CanInPlaceActivate (IOleInPlaceSiteWindowless *iface)
 
static HRESULT WINAPI OleInPlaceSiteWindowless_OnInPlaceActivate (IOleInPlaceSiteWindowless *iface)
 
static HRESULT WINAPI OleInPlaceSiteWindowless_OnUIActivate (IOleInPlaceSiteWindowless *iface)
 
static HRESULT WINAPI OleInPlaceSiteWindowless_GetWindowContext (IOleInPlaceSiteWindowless *iface, IOleInPlaceFrame **frame, IOleInPlaceUIWindow **ppDoc, LPRECT lprcPosRect, LPRECT lprcClipRect, LPOLEINPLACEFRAMEINFO lpFrameInfo)
 
static HRESULT WINAPI OleInPlaceSiteWindowless_Scroll (IOleInPlaceSiteWindowless *iface, SIZE scrollExtent)
 
static HRESULT WINAPI OleInPlaceSiteWindowless_OnUIDeactivate (IOleInPlaceSiteWindowless *iface, BOOL fUndoable)
 
static HRESULT WINAPI OleInPlaceSiteWindowless_OnInPlaceDeactivate (IOleInPlaceSiteWindowless *iface)
 
static HRESULT WINAPI OleInPlaceSiteWindowless_DiscardUndoState (IOleInPlaceSiteWindowless *iface)
 
static HRESULT WINAPI OleInPlaceSiteWindowless_DeactivateAndUndo (IOleInPlaceSiteWindowless *iface)
 
static HRESULT WINAPI OleInPlaceSiteWindowless_OnPosRectChange (IOleInPlaceSiteWindowless *iface, LPCRECT lprcPosRect)
 
static HRESULT WINAPI OleInPlaceSiteWindowless_OnInPlaceActivateEx (IOleInPlaceSiteWindowless *iface, BOOL *pfNoRedraw, DWORD dwFlags)
 
static HRESULT WINAPI OleInPlaceSiteWindowless_OnInPlaceDeactivateEx (IOleInPlaceSiteWindowless *iface, BOOL fNoRedraw)
 
static HRESULT WINAPI OleInPlaceSiteWindowless_RequestUIActivate (IOleInPlaceSiteWindowless *iface)
 
static HRESULT WINAPI OleInPlaceSiteWindowless_CanWindowlessActivate (IOleInPlaceSiteWindowless *iface)
 
static HRESULT WINAPI OleInPlaceSiteWindowless_GetCapture (IOleInPlaceSiteWindowless *iface)
 
static HRESULT WINAPI OleInPlaceSiteWindowless_SetCapture (IOleInPlaceSiteWindowless *iface, BOOL fCapture)
 
static HRESULT WINAPI OleInPlaceSiteWindowless_GetFocus (IOleInPlaceSiteWindowless *iface)
 
static HRESULT WINAPI OleInPlaceSiteWindowless_SetFocus (IOleInPlaceSiteWindowless *iface, BOOL fFocus)
 
static HRESULT WINAPI OleInPlaceSiteWindowless_GetDC (IOleInPlaceSiteWindowless *iface, LPCRECT pRect, DWORD grfFlags, HDC *phDC)
 
static HRESULT WINAPI OleInPlaceSiteWindowless_ReleaseDC (IOleInPlaceSiteWindowless *iface, HDC hDC)
 
static HRESULT WINAPI OleInPlaceSiteWindowless_InvalidateRect (IOleInPlaceSiteWindowless *iface, LPCRECT pRect, BOOL fErase)
 
static HRESULT WINAPI OleInPlaceSiteWindowless_InvalidateRgn (IOleInPlaceSiteWindowless *iface, HRGN hRGN, BOOL fErase)
 
static HRESULT WINAPI OleInPlaceSiteWindowless_ScrollRect (IOleInPlaceSiteWindowless *iface, INT dx, INT dy, LPCRECT pRectScroll, LPCRECT pRectClip)
 
static HRESULT WINAPI OleInPlaceSiteWindowless_AdjustRect (IOleInPlaceSiteWindowless *iface, LPRECT prc)
 
static HRESULT WINAPI OleInPlaceSiteWindowless_OnDefWindowMessage (IOleInPlaceSiteWindowless *iface, UINT msg, WPARAM wParam, LPARAM lParam, LRESULT *plResult)
 
static IOCSimpl_from_IOleInPlaceFrame (IOleInPlaceFrame *iface)
 
static HRESULT WINAPI OleInPlaceFrame_QueryInterface (IOleInPlaceFrame *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI OleInPlaceFrame_AddRef (IOleInPlaceFrame *iface)
 
static ULONG WINAPI OleInPlaceFrame_Release (IOleInPlaceFrame *iface)
 
static HRESULT WINAPI OleInPlaceFrame_GetWindow (IOleInPlaceFrame *iface, HWND *phWnd)
 
static HRESULT WINAPI OleInPlaceFrame_ContextSensitiveHelp (IOleInPlaceFrame *iface, BOOL fEnterMode)
 
static HRESULT WINAPI OleInPlaceFrame_GetBorder (IOleInPlaceFrame *iface, LPRECT lprectBorder)
 
static HRESULT WINAPI OleInPlaceFrame_RequestBorderSpace (IOleInPlaceFrame *iface, LPCBORDERWIDTHS pborderwidths)
 
static HRESULT WINAPI OleInPlaceFrame_SetBorderSpace (IOleInPlaceFrame *iface, LPCBORDERWIDTHS pborderwidths)
 
static HRESULT WINAPI OleInPlaceFrame_SetActiveObject (IOleInPlaceFrame *iface, IOleInPlaceActiveObject *pActiveObject, LPCOLESTR pszObjName)
 
static HRESULT WINAPI OleInPlaceFrame_InsertMenus (IOleInPlaceFrame *iface, HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths)
 
static HRESULT WINAPI OleInPlaceFrame_SetMenu (IOleInPlaceFrame *iface, HMENU hmenuShared, HOLEMENU holemenu, HWND hwndActiveObject)
 
static HRESULT WINAPI OleInPlaceFrame_RemoveMenus (IOleInPlaceFrame *iface, HMENU hmenuShared)
 
static HRESULT WINAPI OleInPlaceFrame_SetStatusText (IOleInPlaceFrame *iface, LPCOLESTR pszStatusText)
 
static HRESULT WINAPI OleInPlaceFrame_EnableModeless (IOleInPlaceFrame *iface, BOOL fEnable)
 
static HRESULT WINAPI OleInPlaceFrame_TranslateAccelerator (IOleInPlaceFrame *iface, LPMSG lpmsg, WORD wID)
 
static IOCSimpl_from_IOleControlSite (IOleControlSite *iface)
 
static HRESULT WINAPI OleControlSite_QueryInterface (IOleControlSite *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI OleControlSite_AddRef (IOleControlSite *iface)
 
static ULONG WINAPI OleControlSite_Release (IOleControlSite *iface)
 
static HRESULT WINAPI OleControlSite_OnControlInfoChanged (IOleControlSite *This)
 
static HRESULT WINAPI OleControlSite_LockInPlaceActive (IOleControlSite *This, BOOL fLock)
 
static HRESULT WINAPI OleControlSite_GetExtendedControl (IOleControlSite *This, IDispatch **ppDisp)
 
static HRESULT WINAPI OleControlSite_TransformCoords (IOleControlSite *This, POINTL *pPtlHimetric, POINTF *pPtfContainer, DWORD dwFlags)
 
static HRESULT WINAPI OleControlSite_TranslateAccelerator (IOleControlSite *This, MSG *pMsg, DWORD grfModifiers)
 
static HRESULT WINAPI OleControlSite_OnFocus (IOleControlSite *This, BOOL fGotFocus)
 
static HRESULT WINAPI OleControlSite_ShowPropertyFrame (IOleControlSite *This)
 
static void IOCS_OnSize (IOCS *This, LPCRECT rect)
 
static void IOCS_OnShow (IOCS *This, BOOL fShow)
 
static void IOCS_OnDraw (IOCS *This)
 
static LRESULT IOCS_OnWndProc (IOCS *This, HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static LRESULT CALLBACK AtlHost_wndproc (HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam)
 
static HRESULT IOCS_Attach (IOCS *This, HWND hWnd, IUnknown *pUnkControl)
 
static HRESULT IOCS_Init (IOCS *This)
 
static HRESULT IOCS_Create (HWND hWnd, IUnknown *pUnkControl, IUnknown **container)
 
HRESULT WINAPI AtlAxCreateControl (LPCOLESTR lpszName, HWND hWnd, IStream *pStream, IUnknown **ppUnkContainer)
 
static enum content get_content_type (LPCOLESTR name, CLSID *control_id)
 
HRESULT WINAPI AtlAxCreateControlLicEx (LPCOLESTR lpszName, HWND hWnd, IStream *pStream, IUnknown **ppUnkContainer, IUnknown **ppUnkControl, REFIID iidSink, IUnknown *punkSink, BSTR lic)
 
HRESULT WINAPI AtlAxAttachControl (IUnknown *control, HWND hWnd, IUnknown **container)
 
static BOOL advance_array (WORD **pptr, DWORD *palloc, DWORD *pfilled, const WORD *data, DWORD size)
 
static LPDLGTEMPLATEW AX_ConvertDialogTemplate (LPCDLGTEMPLATEW src_tmpl)
 
HWND WINAPI AtlAxCreateDialogA (HINSTANCE hInst, LPCSTR name, HWND owner, DLGPROC dlgProc, LPARAM param)
 
HWND WINAPI AtlAxCreateDialogW (HINSTANCE hInst, LPCWSTR name, HWND owner, DLGPROC dlgProc, LPARAM param)
 
HRESULT WINAPI AtlAxGetHost (HWND hWnd, IUnknown **host)
 
HRESULT WINAPI AtlAxGetControl (HWND hWnd, IUnknown **pUnk)
 
INT_PTR WINAPI AtlAxDialogBoxW (HINSTANCE instance, const WCHAR *name, HWND owner, DLGPROC proc, LPARAM param)
 
INT_PTR WINAPI AtlAxDialogBoxA (HINSTANCE instance, const char *name, HWND owner, DLGPROC proc, LPARAM param)
 
HRESULT WINAPI AtlAxCreateControlLic (const WCHAR *lpTricsData, HWND hwnd, IStream *stream, IUnknown **container, BSTR lic)
 
HRESULT WINAPI AtlAxCreateControlEx (const WCHAR *lpTricsData, HWND hwnd, IStream *stream, IUnknown **container, IUnknown **control, REFIID iidSink, IUnknown *punkSink)
 

Variables

static const IOleClientSiteVtbl OleClientSite_vtbl
 
static const IOleContainerVtbl OleContainer_vtbl
 
static const IOleInPlaceSiteWindowlessVtbl OleInPlaceSiteWindowless_vtbl
 
static const IOleInPlaceFrameVtbl OleInPlaceFrame_vtbl
 
static const IOleControlSiteVtbl OleControlSite_vtbl
 

Macro Definition Documentation

◆ ATL_NAME_SUFFIX

#define ATL_NAME_SUFFIX

◆ COBJMACROS

#define COBJMACROS

Definition at line 24 of file atl_ax.c.

◆ GET_DWORD

#define GET_DWORD (   x)    (*(const DWORD *)(x))

◆ GET_WORD

#define GET_WORD (   x)    (*(const WORD *)(x))

◆ PUT_BLOCK

#define PUT_BLOCK (   x,
  y 
)    do {if (!advance_array(&output, &allocated, &filled, (x), (y))) return NULL;} while (0)

◆ PUT_WORD

#define PUT_WORD (   x)    do {WORD w = (x);PUT_BLOCK(&w, 1);} while(0)

Typedef Documentation

◆ IOCS

typedef struct IOCS IOCS

Enumeration Type Documentation

◆ content

Enumerator
IsEmpty 
IsGUID 
IsHTML 
IsURL 
IsUnknown 

Definition at line 989 of file atl_ax.c.

990{
991 IsEmpty = 0,
992 IsGUID = 1,
993 IsHTML = 2,
994 IsURL = 3,
995 IsUnknown = 4
996};
@ IsURL
Definition: atl_ax.c:994
@ IsUnknown
Definition: atl_ax.c:995
@ IsEmpty
Definition: atl_ax.c:991
@ IsGUID
Definition: atl_ax.c:992
@ IsHTML
Definition: atl_ax.c:993

Function Documentation

◆ advance_array()

static BOOL advance_array ( WORD **  pptr,
DWORD palloc,
DWORD pfilled,
const WORD data,
DWORD  size 
)
inlinestatic

Definition at line 1158 of file atl_ax.c.

1159{
1160 if ( (*pfilled + size) > *palloc )
1161 {
1162 *palloc = ((*pfilled+size) + 0xFF) & ~0xFF;
1163 *pptr = realloc( *pptr, *palloc * sizeof(WORD) );
1164 if (!*pptr)
1165 return FALSE;
1166 }
1167 RtlMoveMemory( *pptr+*pfilled, data, size * sizeof(WORD) );
1168 *pfilled += size;
1169 return TRUE;
1170}
#define realloc
Definition: debug_ros.c:6
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
unsigned short WORD
Definition: ntddk_ex.h:93
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLsizeiptr size
Definition: glext.h:5919
#define RtlMoveMemory(Destination, Source, Length)
Definition: typedefs.h:264

◆ AtlAxAttachControl()

HRESULT WINAPI AtlAxAttachControl ( IUnknown control,
HWND  hWnd,
IUnknown **  container 
)

Definition at line 1142 of file atl_ax.c.

1143{
1144 HRESULT hr;
1145
1146 TRACE("(%p %p %p)\n", control, hWnd, container);
1147
1148 if (!control)
1149 return E_INVALIDARG;
1150
1152 return hWnd ? hr : S_FALSE;
1153}
HWND hWnd
Definition: settings.c:17
#define E_INVALIDARG
Definition: ddrawi.h:101
HRESULT hr
Definition: delayimp.cpp:582
static HRESULT IOCS_Create(HWND hWnd, IUnknown *pUnkControl, IUnknown **container)
Definition: atl_ax.c:939
#define TRACE(s)
Definition: solgame.cpp:4
Definition: dialog.c:52
#define S_FALSE
Definition: winerror.h:3451

Referenced by AtlAxCreateControlLicEx(), and test_AtlAxAttachControl().

◆ AtlAxCreateControl()

HRESULT WINAPI AtlAxCreateControl ( LPCOLESTR  lpszName,
HWND  hWnd,
IStream pStream,
IUnknown **  ppUnkContainer 
)

Definition at line 982 of file atl_ax.c.

984{
985 return AtlAxCreateControlEx( lpszName, hWnd, pStream, ppUnkContainer,
986 NULL, NULL, NULL );
987}
#define NULL
Definition: types.h:112
HRESULT WINAPI AtlAxCreateControlEx(const WCHAR *lpTricsData, HWND hwnd, IStream *stream, IUnknown **container, IUnknown **control, REFIID iidSink, IUnknown *punkSink)
Definition: atl_ax.c:1468

◆ AtlAxCreateControlEx()

HRESULT WINAPI AtlAxCreateControlEx ( const WCHAR lpTricsData,
HWND  hwnd,
IStream stream,
IUnknown **  container,
IUnknown **  control,
REFIID  iidSink,
IUnknown punkSink 
)

Definition at line 1468 of file atl_ax.c.

1470{
1471 return AtlAxCreateControlLicEx(lpTricsData, hwnd, stream, container, control, iidSink, punkSink, NULL);
1472}
HRESULT WINAPI AtlAxCreateControlLicEx(LPCOLESTR lpszName, HWND hWnd, IStream *pStream, IUnknown **ppUnkContainer, IUnknown **ppUnkControl, REFIID iidSink, IUnknown *punkSink, BSTR lic)
Definition: atl_ax.c:1037
Definition: parse.h:23
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023

Referenced by AtlAxCreateControl(), AtlAxWin_wndproc(), and test_AtlAxCreateControl().

◆ AtlAxCreateControlLic()

HRESULT WINAPI AtlAxCreateControlLic ( const WCHAR lpTricsData,
HWND  hwnd,
IStream stream,
IUnknown **  container,
BSTR  lic 
)

Definition at line 1459 of file atl_ax.c.

1460{
1461 return AtlAxCreateControlLicEx(lpTricsData, hwnd, stream, container, NULL, NULL, NULL, lic);
1462}

◆ AtlAxCreateControlLicEx()

HRESULT WINAPI AtlAxCreateControlLicEx ( LPCOLESTR  lpszName,
HWND  hWnd,
IStream pStream,
IUnknown **  ppUnkContainer,
IUnknown **  ppUnkControl,
REFIID  iidSink,
IUnknown punkSink,
BSTR  lic 
)

Definition at line 1037 of file atl_ax.c.

1040{
1041 CLSID controlId;
1042 HRESULT hRes;
1043 IOleObject *pControl;
1044 IUnknown *pUnkControl = NULL;
1045 IPersistStreamInit *pPSInit;
1046 IUnknown *pContainer = NULL;
1047 enum content content;
1048
1049 TRACE("(%s %p %p %p %p %p %p %s)\n", debugstr_w(lpszName), hWnd, pStream,
1050 ppUnkContainer, ppUnkControl, iidSink, punkSink, debugstr_w(lic));
1051
1052 if (lic)
1053 FIXME("semi stub\n");
1054
1055 if (ppUnkContainer) *ppUnkContainer = NULL;
1056 if (ppUnkControl) *ppUnkControl = NULL;
1057
1058 content = get_content_type(lpszName, &controlId);
1059
1060 if (content == IsEmpty)
1061 return S_OK;
1062
1063 if (content == IsUnknown)
1064 return CO_E_CLASSSTRING;
1065
1066 hRes = CoCreateInstance( &controlId, 0, CLSCTX_ALL, &IID_IOleObject,
1067 (void**) &pControl );
1068 if ( FAILED( hRes ) )
1069 {
1070 WARN( "cannot create ActiveX control %s instance - error 0x%08lx\n",
1071 debugstr_guid( &controlId ), hRes );
1072 return hRes;
1073 }
1074
1075 hRes = IOleObject_QueryInterface( pControl, &IID_IPersistStreamInit, (void**) &pPSInit );
1076 if ( SUCCEEDED( hRes ) )
1077 {
1078 if (!pStream)
1079 IPersistStreamInit_InitNew( pPSInit );
1080 else
1081 IPersistStreamInit_Load( pPSInit, pStream );
1082 IPersistStreamInit_Release( pPSInit );
1083 } else
1084 WARN("cannot get IID_IPersistStreamInit out of control\n");
1085
1086 IOleObject_QueryInterface( pControl, &IID_IUnknown, (void**) &pUnkControl );
1087 IOleObject_Release( pControl );
1088
1089
1090 hRes = AtlAxAttachControl( pUnkControl, hWnd, &pContainer );
1091 if ( FAILED( hRes ) )
1092 WARN("cannot attach control to window\n");
1093
1094 if ( content == IsURL )
1095 {
1096 IWebBrowser2 *browser;
1097
1098 hRes = IOleObject_QueryInterface( pControl, &IID_IWebBrowser2, (void**) &browser );
1099 if ( !browser )
1100 WARN( "Cannot query IWebBrowser2 interface: %08lx\n", hRes );
1101 else {
1102 VARIANT url;
1103
1104 IWebBrowser2_put_Visible( browser, VARIANT_TRUE ); /* it seems that native does this on URL (but do not on MSHTML:! why? */
1105
1106 V_VT(&url) = VT_BSTR;
1107 V_BSTR(&url) = SysAllocString( lpszName );
1108
1109 hRes = IWebBrowser2_Navigate2( browser, &url, NULL, NULL, NULL, NULL );
1110 if ( FAILED( hRes ) )
1111 WARN( "IWebBrowser2::Navigate2 failed: %08lx\n", hRes );
1113
1114 IWebBrowser2_Release( browser );
1115 }
1116 }
1117
1118 if (ppUnkContainer)
1119 {
1120 *ppUnkContainer = pContainer;
1121 if ( pContainer )
1122 IUnknown_AddRef( pContainer );
1123 }
1124 if (ppUnkControl)
1125 {
1126 *ppUnkControl = pUnkControl;
1127 if ( pUnkControl )
1128 IUnknown_AddRef( pUnkControl );
1129 }
1130
1131 if ( pUnkControl )
1132 IUnknown_Release( pUnkControl );
1133 if ( pContainer )
1134 IUnknown_Release( pContainer );
1135
1136 return S_OK;
1137}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
const GUID IID_IUnknown
HRESULT WINAPI AtlAxAttachControl(IUnknown *control, HWND hWnd, IUnknown **container)
Definition: atl_ax.c:1142
content
Definition: atl_ax.c:990
static enum content get_content_type(LPCOLESTR name, CLSID *control_id)
Definition: atl_ax.c:998
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, IUnknown *outer, DWORD cls_context, REFIID riid, void **obj)
Definition: combase.c:1685
@ VT_BSTR
Definition: compat.h:2303
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
#define debugstr_guid
Definition: kernel32.h:35
#define debugstr_w
Definition: kernel32.h:32
static const WCHAR url[]
Definition: encode.c:1384
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:240
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:273
#define V_VT(A)
Definition: oleauto.h:211
#define V_BSTR(A)
Definition: oleauto.h:226
const GUID IID_IOleObject
const GUID IID_IPersistStreamInit
#define CO_E_CLASSSTRING
Definition: winerror.h:3919

Referenced by AtlAxCreateControlEx(), and AtlAxCreateControlLic().

◆ AtlAxCreateDialogA()

HWND WINAPI AtlAxCreateDialogA ( HINSTANCE  hInst,
LPCSTR  name,
HWND  owner,
DLGPROC  dlgProc,
LPARAM  param 
)

Definition at line 1300 of file atl_ax.c.

1301{
1302 HWND res = NULL;
1303 int length;
1304 WCHAR *nameW;
1305
1306 if (IS_INTRESOURCE(name))
1307 return AtlAxCreateDialogW( hInst, (LPCWSTR) name, owner, dlgProc, param );
1308
1309 length = MultiByteToWideChar( CP_ACP, 0, name, -1, NULL, 0 );
1310 nameW = malloc( length * sizeof(WCHAR) );
1311 if (nameW)
1312 {
1314 res = AtlAxCreateDialogW( hInst, nameW, owner, dlgProc, param );
1315 free( nameW );
1316 }
1317 return res;
1318}
static const WCHAR nameW[]
Definition: main.c:49
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
HWND WINAPI AtlAxCreateDialogW(HINSTANCE hInst, LPCWSTR name, HWND owner, DLGPROC dlgProc, LPARAM param)
Definition: atl_ax.c:1326
#define CP_ACP
Definition: compat.h:109
#define MultiByteToWideChar
Definition: compat.h:110
#define IS_INTRESOURCE(x)
Definition: loader.c:613
HINSTANCE hInst
Definition: dxdiag.c:13
GLuint res
Definition: glext.h:9613
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
GLfloat param
Definition: glext.h:5796
short WCHAR
Definition: pedump.c:58
Definition: name.c:39
const uint16_t * LPCWSTR
Definition: typedefs.h:57

◆ AtlAxCreateDialogW()

HWND WINAPI AtlAxCreateDialogW ( HINSTANCE  hInst,
LPCWSTR  name,
HWND  owner,
DLGPROC  dlgProc,
LPARAM  param 
)

Definition at line 1326 of file atl_ax.c.

1327{
1328 HRSRC hrsrc;
1329 HGLOBAL hgl;
1331 LPDLGTEMPLATEW newptr;
1332 HWND res;
1333
1334 TRACE("(%p %s %p %p %Ix)\n", hInst, debugstr_w(name), owner, dlgProc, param);
1335
1336 hrsrc = FindResourceW( hInst, name, (LPWSTR)RT_DIALOG );
1337 if ( !hrsrc )
1338 return NULL;
1339 hgl = LoadResource (hInst, hrsrc);
1340 if ( !hgl )
1341 return NULL;
1342 ptr = LockResource ( hgl );
1343 if (!ptr)
1344 {
1345 FreeResource( hgl );
1346 return NULL;
1347 }
1348 newptr = AX_ConvertDialogTemplate( ptr );
1349 if ( newptr )
1350 {
1351 res = CreateDialogIndirectParamW( hInst, newptr, owner, dlgProc, param );
1352 free( newptr );
1353 } else
1354 res = NULL;
1355 FreeResource ( hrsrc );
1356 return res;
1357}
static LPDLGTEMPLATEW AX_ConvertDialogTemplate(LPCDLGTEMPLATEW src_tmpl)
Definition: atl_ax.c:1175
BOOL WINAPI FreeResource(HGLOBAL handle)
Definition: res.c:559
HRSRC WINAPI FindResourceW(HINSTANCE hModule, LPCWSTR name, LPCWSTR type)
Definition: res.c:176
LPVOID WINAPI LockResource(HGLOBAL handle)
Definition: res.c:550
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
Definition: res.c:532
static PVOID ptr
Definition: dispmode.c:27
#define RT_DIALOG
Definition: pedump.c:367
uint16_t * LPWSTR
Definition: typedefs.h:56
HWND WINAPI CreateDialogIndirectParamW(_In_opt_ HINSTANCE, _In_ LPCDLGTEMPLATE, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)

Referenced by AtlAxCreateDialogA().

◆ AtlAxDialogBoxA()

INT_PTR WINAPI AtlAxDialogBoxA ( HINSTANCE  instance,
const char name,
HWND  owner,
DLGPROC  proc,
LPARAM  param 
)

Definition at line 1436 of file atl_ax.c.

1438{
1439 WCHAR *nameW;
1440 int len;
1441 INT_PTR ret;
1442
1443 if (IS_INTRESOURCE(name))
1444 return AtlAxDialogBoxW(instance, (const WCHAR *)name, owner, proc, param);
1445
1446 len = MultiByteToWideChar(CP_ACP, 0, name, -1, NULL, 0);
1447 if (!(nameW = malloc(len * sizeof(WCHAR))))
1448 return 0;
1451 free(nameW);
1452 return ret;
1453}
static HINSTANCE instance
Definition: main.c:40
INT_PTR WINAPI AtlAxDialogBoxW(HINSTANCE instance, const WCHAR *name, HWND owner, DLGPROC proc, LPARAM param)
Definition: atl_ax.c:1407
return ret
Definition: mutex.c:147
GLenum GLsizei len
Definition: glext.h:6722
static HANDLE proc()
Definition: pdb.c:32
int32_t INT_PTR
Definition: typedefs.h:64

◆ AtlAxDialogBoxW()

INT_PTR WINAPI AtlAxDialogBoxW ( HINSTANCE  instance,
const WCHAR name,
HWND  owner,
DLGPROC  proc,
LPARAM  param 
)

Definition at line 1407 of file atl_ax.c.

1409{
1410 HRSRC resource;
1412 DLGTEMPLATE *template;
1413 INT_PTR ret;
1414
1415 TRACE("instance %p, name %s, owner %p, proc %p, param %#Ix\n",
1416 instance, debugstr_w(name), owner, proc, param);
1417
1418 if (!(resource = FindResourceW(instance, name, (const WCHAR *)RT_DIALOG)))
1419 return 0;
1420
1422 return 0;
1423
1424 if (!(template = AX_ConvertDialogTemplate(LockResource(global))))
1425 return 0;
1426
1427 ret = DialogBoxIndirectParamW(instance, template, owner, proc, param);
1428 free(template);
1429 return ret;
1430}
int global
Definition: ehframes.cpp:22
#define resource
Definition: kernel32.h:9
INT_PTR WINAPI DialogBoxIndirectParamW(_In_opt_ HINSTANCE, _In_ LPCDLGTEMPLATE, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)

Referenced by AtlAxDialogBoxA().

◆ AtlAxGetControl()

HRESULT WINAPI AtlAxGetControl ( HWND  hWnd,
IUnknown **  pUnk 
)

Definition at line 1385 of file atl_ax.c.

1386{
1387 IOCS *This;
1388
1389 TRACE( "(%p, %p)\n", hWnd, pUnk );
1390
1391 *pUnk = NULL;
1392
1393 This = (IOCS*) GetPropW( hWnd, L"__WINE_ATL_IOCS" );
1394 if ( !This || !This->control )
1395 {
1396 WARN("No control attached to %p\n", hWnd );
1397 return E_FAIL;
1398 }
1399
1400 return IOleObject_QueryInterface( This->control, &IID_IUnknown, (void**) pUnk );
1401}
#define E_FAIL
Definition: ddrawi.h:102
static void *static void *static LPDIRECTPLAY IUnknown * pUnk
Definition: dplayx.c:30
#define L(x)
Definition: resources.c:13
Definition: atl_ax.c:43
HANDLE WINAPI GetPropW(_In_ HWND, _In_ LPCWSTR)

Referenced by test_ax_win().

◆ AtlAxGetHost()

HRESULT WINAPI AtlAxGetHost ( HWND  hWnd,
IUnknown **  host 
)

Definition at line 1363 of file atl_ax.c.

1364{
1365 IOCS *This;
1366
1367 TRACE("(%p, %p)\n", hWnd, host);
1368
1369 *host = NULL;
1370
1371 This = (IOCS*) GetPropW( hWnd, L"__WINE_ATL_IOCS" );
1372 if ( !This )
1373 {
1374 WARN("No container attached to %p\n", hWnd );
1375 return E_FAIL;
1376 }
1377
1378 return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, &IID_IUnknown, (void**)host);
1379}
Definition: txthost.c:37

◆ AtlAxWin_wndproc()

static LRESULT CALLBACK AtlAxWin_wndproc ( HWND  hWnd,
UINT  wMsg,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 61 of file atl_ax.c.

62{
63 if ( wMsg == WM_CREATE )
64 {
66 WCHAR *ptr = malloc( len*sizeof(WCHAR) );
67 if (!ptr)
68 return 1;
71 free( ptr );
72 return 0;
73 }
74 return DefWindowProcW( hWnd, wMsg, wParam, lParam );
75}
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
unsigned long DWORD
Definition: ntddk_ex.h:95
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
Definition: window.c:1382
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_CREATE
Definition: winuser.h:1636
int WINAPI GetWindowTextLengthW(_In_ HWND)

Referenced by AtlAxWinInit().

◆ AtlAxWinInit()

BOOL WINAPI AtlAxWinInit ( void  )

Definition at line 86 of file atl_ax.c.

87{
88 WNDCLASSEXW wcex;
89
90#if _ATL_VER <= _ATL_VER_30
91#define ATL_NAME_SUFFIX
92#elif _ATL_VER == _ATL_VER_80
93#define ATL_NAME_SUFFIX L"80"
94#elif _ATL_VER == _ATL_VER_90
95#define ATL_NAME_SUFFIX L"90"
96#elif _ATL_VER == _ATL_VER_100
97#define ATL_NAME_SUFFIX L"100"
98#elif _ATL_VER == _ATL_VER_110
99#define ATL_NAME_SUFFIX L"110"
100#else
101#error Unsupported version
102#endif
103
104 static const WCHAR AtlAxWinW[] = L"AtlAxWin" ATL_NAME_SUFFIX;
105
106 FIXME("version %04x semi-stub\n", _ATL_VER);
107
108 if ( FAILED( OleInitialize(NULL) ) )
109 return FALSE;
110
111 wcex.cbSize = sizeof(wcex);
113 wcex.cbClsExtra = 0;
114 wcex.cbWndExtra = 0;
116 wcex.hIcon = NULL;
117 wcex.hCursor = NULL;
118 wcex.hbrBackground = NULL;
119 wcex.lpszMenuName = NULL;
120 wcex.hIconSm = 0;
121
123 wcex.lpszClassName = AtlAxWinW;
124 if ( !RegisterClassExW( &wcex ) )
125 return FALSE;
126
127 if(_ATL_VER > _ATL_VER_30) {
128 static const WCHAR AtlAxWinLicW[] = L"AtlAxWinLic" ATL_NAME_SUFFIX;
129
130 wcex.lpszClassName = AtlAxWinLicW;
131 if ( !RegisterClassExW( &wcex ) )
132 return FALSE;
133 }
134
135 return TRUE;
136}
#define ATL_NAME_SUFFIX
static LRESULT CALLBACK AtlAxWin_wndproc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam)
Definition: atl_ax.c:61
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:838
HRESULT WINAPI DECLSPEC_HOTPATCH OleInitialize(LPVOID reserved)
Definition: ole2.c:162
#define _ATL_VER_30
Definition: atlbase.h:28
#define _ATL_VER
Definition: atlbase.h:36
LPCWSTR lpszClassName
Definition: winuser.h:3334
LPCWSTR lpszMenuName
Definition: winuser.h:3333
HBRUSH hbrBackground
Definition: winuser.h:3332
WNDPROC lpfnWndProc
Definition: winuser.h:3326
UINT cbSize
Definition: winuser.h:3324
int cbWndExtra
Definition: winuser.h:3328
HCURSOR hCursor
Definition: winuser.h:3331
HICON hIconSm
Definition: winuser.h:3335
HINSTANCE hInstance
Definition: winuser.h:3329
UINT style
Definition: winuser.h:3325
int cbClsExtra
Definition: winuser.h:3327
HICON hIcon
Definition: winuser.h:3330
#define CS_DBLCLKS
Definition: winuser.h:659
ATOM WINAPI RegisterClassExW(_In_ CONST WNDCLASSEXW *)
#define CS_GLOBALCLASS
Definition: winuser.h:660

Referenced by test_ax_win().

◆ AtlHost_wndproc()

static LRESULT CALLBACK AtlHost_wndproc ( HWND  hWnd,
UINT  wMsg,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 905 of file atl_ax.c.

906{
907 IOCS *This = (IOCS*) GetPropW( hWnd, L"__WINE_ATL_IOCS" );
908 return IOCS_OnWndProc( This, hWnd, wMsg, wParam, lParam );
909}
static LRESULT IOCS_OnWndProc(IOCS *This, HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: atl_ax.c:878

Referenced by IOCS_Attach().

◆ AX_ConvertDialogTemplate()

static LPDLGTEMPLATEW AX_ConvertDialogTemplate ( LPCDLGTEMPLATEW  src_tmpl)
static

Definition at line 1175 of file atl_ax.c.

1176{
1177#define GET_WORD(x) (*(const WORD *)(x))
1178#define GET_DWORD(x) (*(const DWORD *)(x))
1179#define PUT_BLOCK(x,y) do {if (!advance_array(&output, &allocated, &filled, (x), (y))) return NULL;} while (0)
1180#define PUT_WORD(x) do {WORD w = (x);PUT_BLOCK(&w, 1);} while(0)
1181 const WORD *tmp, *src = (const WORD *)src_tmpl;
1182 WORD *output;
1183 DWORD allocated, filled; /* in WORDs */
1184 BOOL ext;
1185 WORD signature, dlgver, rescount;
1186 DWORD style;
1187
1188 filled = 0; allocated = 256;
1189 output = malloc( allocated * sizeof(WORD) );
1190 if (!output)
1191 return NULL;
1192
1193 /* header */
1194 tmp = src;
1196 dlgver = GET_WORD(src + 1);
1197 if (signature == 1 && dlgver == 0xFFFF)
1198 {
1199 ext = TRUE;
1200 src += 6;
1201 style = GET_DWORD(src);
1202 src += 2;
1203 rescount = GET_WORD(src++);
1204 src += 4;
1205 if ( GET_WORD(src) == 0xFFFF ) /* menu */
1206 src += 2;
1207 else
1208 src += lstrlenW(src) + 1;
1209 if ( GET_WORD(src) == 0xFFFF ) /* class */
1210 src += 2;
1211 else
1212 src += lstrlenW(src) + 1;
1213 src += lstrlenW(src) + 1; /* title */
1214 if ( style & (DS_SETFONT | DS_SHELLFONT) )
1215 {
1216 src += 3;
1217 src += lstrlenW(src) + 1;
1218 }
1219 } else {
1220 ext = FALSE;
1221 style = GET_DWORD(src);
1222 src += 4;
1223 rescount = GET_WORD(src++);
1224 src += 4;
1225 if ( GET_WORD(src) == 0xFFFF ) /* menu */
1226 src += 2;
1227 else
1228 src += lstrlenW(src) + 1;
1229 if ( GET_WORD(src) == 0xFFFF ) /* class */
1230 src += 2;
1231 else
1232 src += lstrlenW(src) + 1;
1233 src += lstrlenW(src) + 1; /* title */
1234 if ( style & DS_SETFONT )
1235 {
1236 src++;
1237 src += lstrlenW(src) + 1;
1238 }
1239 }
1240 PUT_BLOCK(tmp, src-tmp);
1241
1242 while(rescount--)
1243 {
1244 src = (const WORD *)( ( ((ULONG_PTR)src) + 3) & ~3); /* align on DWORD boundary */
1245 filled = (filled + 1) & ~1; /* depends on DWORD-aligned allocation unit */
1246
1247 tmp = src;
1248 if (ext)
1249 src += 12;
1250 else
1251 src += 9;
1252 PUT_BLOCK(tmp, src-tmp);
1253
1254 tmp = src;
1255 if ( GET_WORD(src) == 0xFFFF ) /* class */
1256 {
1257 src += 2;
1258 } else
1259 {
1260 src += lstrlenW(src) + 1;
1261 }
1262 src += lstrlenW(src) + 1; /* title */
1263 if ( GET_WORD(tmp) == '{' ) /* all this mess created because of this line */
1264 {
1265 PUT_BLOCK(L"AtlAxWin", ARRAY_SIZE(L"AtlAxWin"));
1266 PUT_BLOCK(tmp, lstrlenW(tmp)+1);
1267 } else
1268 PUT_BLOCK(tmp, src-tmp);
1269
1270 if ( GET_WORD(src) )
1271 {
1272 WORD size = (GET_WORD(src)+sizeof(WORD)-1) / sizeof(WORD); /* quite ugly :( Maybe use BYTE* instead of WORD* everywhere ? */
1273 PUT_BLOCK(src, size);
1274 src+=size;
1275 }
1276 else
1277 {
1278 PUT_WORD(0);
1279 src++;
1280 }
1281 }
1282 return (LPDLGTEMPLATEW) output;
1283}
Arabic default style
Definition: afstyles.h:94
#define ARRAY_SIZE(A)
Definition: main.h:20
#define PUT_WORD(x)
#define GET_WORD(x)
#define GET_DWORD(x)
#define PUT_BLOCK(x, y)
#define lstrlenW
Definition: compat.h:750
static const WCHAR *const ext[]
Definition: module.c:53
unsigned int BOOL
Definition: ntddk_ex.h:94
GLenum src
Definition: glext.h:6340
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define DS_SHELLFONT
Definition: winuser.h:381
#define DS_SETFONT
Definition: winuser.h:378

Referenced by AtlAxCreateDialogW(), and AtlAxDialogBoxW().

◆ get_content_type()

static enum content get_content_type ( LPCOLESTR  name,
CLSID control_id 
)
static

Definition at line 998 of file atl_ax.c.

999{
1000 WCHAR new_urlW[MAX_PATH];
1002
1003 if (!name || !name[0])
1004 {
1005 WARN("name %s\n", wine_dbgstr_w(name));
1006 return IsEmpty;
1007 }
1008
1009 if (CLSIDFromString(name, control_id) == S_OK ||
1010 CLSIDFromProgID(name, control_id) == S_OK)
1011 return IsGUID;
1012
1013 if (PathIsURLW (name) ||
1015 {
1016 *control_id = CLSID_WebBrowser;
1017 return IsURL;
1018 }
1019
1020 if (!wcsnicmp(name, L"mshtml:", 7))
1021 {
1022 FIXME("mshtml prefix not implemented\n");
1023 *control_id = CLSID_WebBrowser;
1024 return IsHTML;
1025 }
1026
1027 return IsUnknown;
1028}
HRESULT WINAPI DECLSPEC_HOTPATCH CLSIDFromProgID(LPCOLESTR progid, CLSID *clsid)
Definition: combase.c:1437
HRESULT WINAPI CLSIDFromString(LPCOLESTR str, LPCLSID clsid)
Definition: combase.c:1470
#define wcsnicmp
Definition: compat.h:14
#define MAX_PATH
Definition: compat.h:34
HRESULT WINAPI UrlApplySchemeW(const WCHAR *url, WCHAR *out, DWORD *length, DWORD flags)
Definition: path.c:4360
BOOL WINAPI PathIsURLW(const WCHAR *path)
Definition: path.c:3214
#define wine_dbgstr_w
Definition: kernel32.h:34
#define URL_APPLY_GUESSSCHEME
Definition: shlwapi.h:518
#define URL_APPLY_GUESSFILE
Definition: shlwapi.h:519

Referenced by AtlAxCreateControlLicEx().

◆ impl_from_IOleClientSite()

static IOCS * impl_from_IOleClientSite ( IOleClientSite iface)
inlinestatic

◆ impl_from_IOleContainer()

static IOCS * impl_from_IOleContainer ( IOleContainer iface)
inlinestatic

◆ impl_from_IOleControlSite()

static IOCS * impl_from_IOleControlSite ( IOleControlSite iface)
inlinestatic

Definition at line 680 of file atl_ax.c.

681{
682 return CONTAINING_RECORD(iface, IOCS, IOleControlSite_iface);
683}

Referenced by OleControlSite_AddRef(), OleControlSite_QueryInterface(), and OleControlSite_Release().

◆ impl_from_IOleInPlaceFrame()

◆ impl_from_IOleInPlaceSiteWindowless()

◆ IOCS_Attach()

static HRESULT IOCS_Attach ( IOCS This,
HWND  hWnd,
IUnknown pUnkControl 
)
static

Definition at line 911 of file atl_ax.c.

912{
913 This->hWnd = hWnd;
914 IUnknown_QueryInterface( pUnkControl, &IID_IOleObject, (void**)&This->control );
915 IOleObject_SetClientSite( This->control, &This->IOleClientSite_iface );
916 SetPropW( hWnd, L"__WINE_ATL_IOCS", This );
918
919 return S_OK;
920}
static LRESULT CALLBACK AtlHost_wndproc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam)
Definition: atl_ax.c:905
#define GWLP_WNDPROC
Definition: treelist.c:66
BOOL WINAPI SetPropW(_In_ HWND, _In_ LPCWSTR, _In_opt_ HANDLE)
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:3014
#define SetWindowLongPtrW
Definition: winuser.h:5512

Referenced by IOCS_Create().

◆ IOCS_Create()

static HRESULT IOCS_Create ( HWND  hWnd,
IUnknown pUnkControl,
IUnknown **  container 
)
static

Definition at line 939 of file atl_ax.c.

940{
941 HRESULT hr;
942 IOCS *This;
943
944 if (!container)
945 return S_OK;
946
947 *container = NULL;
948 This = malloc(sizeof(*This));
949
950 if (!This)
951 return E_OUTOFMEMORY;
952
953 This->IOleClientSite_iface.lpVtbl = &OleClientSite_vtbl;
954 This->IOleContainer_iface.lpVtbl = &OleContainer_vtbl;
955 This->IOleInPlaceSiteWindowless_iface.lpVtbl = &OleInPlaceSiteWindowless_vtbl;
956 This->IOleInPlaceFrame_iface.lpVtbl = &OleInPlaceFrame_vtbl;
957 This->IOleControlSite_iface.lpVtbl = &OleControlSite_vtbl;
958 This->ref = 1;
959
960 This->OrigWndProc = NULL;
961 This->hWnd = NULL;
962 This->fWindowless = This->fActive = This->fInPlace = FALSE;
963
964 hr = IOCS_Attach( This, hWnd, pUnkControl );
965 if ( SUCCEEDED( hr ) )
966 hr = IOCS_Init( This );
967 if ( SUCCEEDED( hr ) )
968 *container = (IUnknown*)&This->IOleClientSite_iface;
969 else
970 {
971 IOCS_Detach( This );
972 free(This);
973 }
974
975 return hr;
976}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static HRESULT IOCS_Detach(IOCS *This)
Definition: atl_ax.c:148
static HRESULT IOCS_Attach(IOCS *This, HWND hWnd, IUnknown *pUnkControl)
Definition: atl_ax.c:911
static const IOleControlSiteVtbl OleControlSite_vtbl
Definition: atl_ax.c:809
static const IOleInPlaceSiteWindowlessVtbl OleInPlaceSiteWindowless_vtbl
Definition: atl_ax.c:759
static const IOleClientSiteVtbl OleClientSite_vtbl
Definition: atl_ax.c:740
static HRESULT IOCS_Init(IOCS *This)
Definition: atl_ax.c:922
static const IOleContainerVtbl OleContainer_vtbl
Definition: atl_ax.c:751
static const IOleInPlaceFrameVtbl OleInPlaceFrame_vtbl
Definition: atl_ax.c:791

Referenced by AtlAxAttachControl().

◆ IOCS_Detach()

static HRESULT IOCS_Detach ( IOCS This)
static

Definition at line 148 of file atl_ax.c.

149{
150 if ( This->hWnd )
151 {
152 SetWindowLongPtrW( This->hWnd, GWLP_WNDPROC, (ULONG_PTR) This->OrigWndProc );
153 RemovePropW( This->hWnd, L"__WINE_ATL_IOCS" );
154 This->hWnd = NULL;
155 }
156 if ( This->control )
157 {
158 IOleObject *control = This->control;
159
160 This->control = NULL;
161 IOleObject_Close( control, OLECLOSE_NOSAVE );
162 IOleObject_SetClientSite( control, NULL );
163 IOleObject_Release( control );
164 }
165 return S_OK;
166}
HANDLE WINAPI RemovePropW(_In_ HWND, _In_ LPCWSTR)

Referenced by IOCS_Create(), IOCS_OnWndProc(), and OleClientSite_Release().

◆ IOCS_Init()

static HRESULT IOCS_Init ( IOCS This)
static

Definition at line 922 of file atl_ax.c.

923{
924 RECT rect;
925
926 IOleObject_SetHostNames( This->control, L"AXWIN", L"AXWIN" );
927
928 GetClientRect( This->hWnd, &rect );
929 IOCS_OnSize( This, &rect );
930 IOleObject_DoVerb( This->control, OLEIVERB_INPLACEACTIVATE, NULL, &This->IOleClientSite_iface,
931 0, This->hWnd, &rect );
932
933 return S_OK;
934}
RECT rect
Definition: combotst.c:67
static void IOCS_OnSize(IOCS *This, LPCRECT rect)
Definition: atl_ax.c:823
#define OLEIVERB_INPLACEACTIVATE
Definition: ole2.h:43
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)

Referenced by IOCS_Create().

◆ IOCS_OnDraw()

static void IOCS_OnDraw ( IOCS This)
static

Definition at line 857 of file atl_ax.c.

858{
860
861 if ( !This->control || !This->fWindowless )
862 return;
863
864 if ( SUCCEEDED( IOleObject_QueryInterface( This->control, &IID_IViewObject, (void**)&view ) ) )
865 {
866 HDC dc = GetDC( This->hWnd );
867 RECTL rect;
868
869 rect.left = This->size.left; rect.top = This->size.top;
870 rect.bottom = This->size.bottom; rect.right = This->size.right;
871
872 IViewObject_Draw( view, DVASPECT_CONTENT, ~0, NULL, NULL, 0, dc, &rect, &rect, NULL, 0 );
873 IViewObject_Release( view );
874 ReleaseDC( This->hWnd, dc );
875 }
876}
HDC dc
Definition: cylfrac.c:34
static HDC
Definition: imagelist.c:88
const GUID IID_IViewObject
LONG right
Definition: windef.h:108
LONG bottom
Definition: windef.h:109
LONG top
Definition: windef.h:107
LONG left
Definition: windef.h:106
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HDC WINAPI GetDC(_In_opt_ HWND)

Referenced by IOCS_OnWndProc().

◆ IOCS_OnShow()

static void IOCS_OnShow ( IOCS This,
BOOL  fShow 
)
static

Definition at line 849 of file atl_ax.c.

850{
851 if (!This->control || This->fActive || !fShow )
852 return;
853
854 This->fActive = TRUE;
855}

Referenced by IOCS_OnWndProc().

◆ IOCS_OnSize()

static void IOCS_OnSize ( IOCS This,
LPCRECT  rect 
)
static

Definition at line 823 of file atl_ax.c.

824{
825 SIZEL inPix, inHi;
826
827 This->size = *rect;
828
829 if ( !This->control )
830 return;
831
832 inPix.cx = rect->right - rect->left;
833 inPix.cy = rect->bottom - rect->top;
834 AtlPixelToHiMetric( &inPix, &inHi );
835 IOleObject_SetExtent( This->control, DVASPECT_CONTENT, &inHi );
836
837 if ( This->fInPlace )
838 {
840
841 if ( SUCCEEDED( IOleObject_QueryInterface( This->control, &IID_IOleInPlaceObject, (void**)&wl ) ) )
842 {
843 IOleInPlaceObject_SetObjectRects( wl, rect, rect );
844 IOleInPlaceObject_Release( wl );
845 }
846 }
847}
void WINAPI AtlPixelToHiMetric(const SIZEL *lpPix, SIZEL *lpHiMetric)
Definition: atl.c:161
const GUID IID_IOleInPlaceObject
LONG cx
Definition: kdterminal.h:27
LONG cy
Definition: kdterminal.h:28

Referenced by IOCS_Init(), and IOCS_OnWndProc().

◆ IOCS_OnWndProc()

static LRESULT IOCS_OnWndProc ( IOCS This,
HWND  hWnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 878 of file atl_ax.c.

879{
880 WNDPROC OrigWndProc = This->OrigWndProc;
881
882 switch( uMsg )
883 {
884 case WM_DESTROY:
885 IOCS_Detach( This );
886 break;
887 case WM_SIZE:
888 {
889 RECT r;
890 SetRect(&r, 0, 0, LOWORD(lParam), HIWORD(lParam));
891 IOCS_OnSize( This, &r );
892 }
893 break;
894 case WM_SHOWWINDOW:
896 break;
897 case WM_PAINT:
898 IOCS_OnDraw( This );
899 break;
900 }
901
902 return CallWindowProcW( OrigWndProc, hWnd, uMsg, wParam, lParam );
903}
static void IOCS_OnDraw(IOCS *This)
Definition: atl_ax.c:857
static void IOCS_OnShow(IOCS *This, BOOL fShow)
Definition: atl_ax.c:849
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
#define LOWORD(l)
Definition: pedump.c:82
#define HIWORD(l)
Definition: typedefs.h:247
#define WM_PAINT
Definition: winuser.h:1648
#define WM_SIZE
Definition: winuser.h:1639
#define WM_SHOWWINDOW
Definition: winuser.h:1656
#define WM_DESTROY
Definition: winuser.h:1637
LRESULT WINAPI CallWindowProcW(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)

Referenced by AtlHost_wndproc().

◆ OleClientSite_AddRef()

static ULONG WINAPI OleClientSite_AddRef ( IOleClientSite iface)
static

Definition at line 210 of file atl_ax.c.

211{
214 TRACE("(%p)->(%ld)\n", This, ref);
215 return ref;
216}
#define InterlockedIncrement
Definition: armddk.h:53
static IOCS * impl_from_IOleClientSite(IOleClientSite *iface)
Definition: atl_ax.c:143
Definition: send.c:48
uint32_t ULONG
Definition: typedefs.h:59

◆ OleClientSite_GetContainer()

static HRESULT WINAPI OleClientSite_GetContainer ( IOleClientSite iface,
IOleContainer **  container 
)
static

Definition at line 249 of file atl_ax.c.

250{
252 TRACE("(%p, %p)\n", This, container);
253 return IOleClientSite_QueryInterface(iface, &IID_IOleContainer, (void**)container);
254}
const GUID IID_IOleContainer

◆ OleClientSite_GetMoniker()

static HRESULT WINAPI OleClientSite_GetMoniker ( IOleClientSite iface,
DWORD  dwAssign,
DWORD  dwWhichMoniker,
IMoniker **  ppmk 
)
static

Definition at line 241 of file atl_ax.c.

242{
244
245 FIXME( "(%p, 0x%lx, 0x%lx, %p)\n", This, dwAssign, dwWhichMoniker, ppmk );
246 return E_NOTIMPL;
247}
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ OleClientSite_OnShowWindow()

static HRESULT WINAPI OleClientSite_OnShowWindow ( IOleClientSite iface,
BOOL  fShow 
)
static

Definition at line 263 of file atl_ax.c.

264{
266 FIXME( "(%p, %s) - stub\n", This, fShow ? "TRUE" : "FALSE" );
267 return E_NOTIMPL;
268}

◆ OleClientSite_QueryInterface()

static HRESULT WINAPI OleClientSite_QueryInterface ( IOleClientSite iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 168 of file atl_ax.c.

169{
171
172 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
173
174 *ppv = NULL;
175
178 {
179 *ppv = iface;
180 }
182 {
183 *ppv = &This->IOleContainer_iface;
184 }
185 else if (IsEqualIID(&IID_IOleInPlaceSite, riid) ||
186 IsEqualIID(&IID_IOleInPlaceSiteEx, riid) ||
187 IsEqualIID(&IID_IOleInPlaceSiteWindowless, riid))
188 {
189 *ppv = &This->IOleInPlaceSiteWindowless_iface;
190 }
192 {
193 *ppv = &This->IOleInPlaceFrame_iface;
194 }
196 {
197 *ppv = &This->IOleControlSite_iface;
198 }
199
200 if (*ppv)
201 {
202 IOleClientSite_AddRef(iface);
203 return S_OK;
204 }
205
206 WARN("unsupported interface %s\n", debugstr_guid(riid));
207 return E_NOINTERFACE;
208}
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
const GUID IID_IOleInPlaceSite
const GUID IID_IOleInPlaceFrame
const GUID IID_IOleControlSite
const GUID IID_IOleClientSite
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define E_NOINTERFACE
Definition: winerror.h:3479

◆ OleClientSite_Release()

static ULONG WINAPI OleClientSite_Release ( IOleClientSite iface)
static

Definition at line 218 of file atl_ax.c.

219{
222
223 TRACE("(%p)->(%ld)\n", This, ref);
224
225 if (!ref)
226 {
227 IOCS_Detach( This );
228 free( This );
229 }
230
231 return ref;
232}
#define InterlockedDecrement
Definition: armddk.h:52

◆ OleClientSite_RequestNewObjectLayout()

static HRESULT WINAPI OleClientSite_RequestNewObjectLayout ( IOleClientSite iface)
static

Definition at line 270 of file atl_ax.c.

271{
273 FIXME( "(%p) - stub\n", This );
274 return E_NOTIMPL;
275}

◆ OleClientSite_SaveObject()

static HRESULT WINAPI OleClientSite_SaveObject ( IOleClientSite iface)
static

Definition at line 234 of file atl_ax.c.

235{
237 FIXME( "(%p) - stub\n", This );
238 return E_NOTIMPL;
239}

◆ OleClientSite_ShowObject()

static HRESULT WINAPI OleClientSite_ShowObject ( IOleClientSite iface)
static

Definition at line 256 of file atl_ax.c.

257{
259 FIXME( "(%p) - stub\n", This );
260 return S_OK;
261}

◆ OleContainer_AddRef()

static ULONG WINAPI OleContainer_AddRef ( IOleContainer iface)
static

Definition at line 290 of file atl_ax.c.

291{
293 return IOleClientSite_AddRef(&This->IOleClientSite_iface);
294}
static IOCS * impl_from_IOleContainer(IOleContainer *iface)
Definition: atl_ax.c:279

◆ OleContainer_EnumObjects()

static HRESULT WINAPI OleContainer_EnumObjects ( IOleContainer iface,
DWORD  grfFlags,
IEnumUnknown **  ppenum 
)
static

Definition at line 310 of file atl_ax.c.

311{
313 FIXME( "(%p, %lu, %p) - stub\n", This, grfFlags, ppenum );
314 return E_NOTIMPL;
315}

◆ OleContainer_LockContainer()

static HRESULT WINAPI OleContainer_LockContainer ( IOleContainer iface,
BOOL  fLock 
)
static

Definition at line 317 of file atl_ax.c.

318{
320 FIXME( "(%p, %s) - stub\n", This, fLock?"TRUE":"FALSE" );
321 return E_NOTIMPL;
322}

◆ OleContainer_ParseDisplayName()

static HRESULT WINAPI OleContainer_ParseDisplayName ( IOleContainer iface,
IBindCtx pbc,
LPOLESTR  pszDisplayName,
ULONG pchEaten,
IMoniker **  ppmkOut 
)
static

Definition at line 302 of file atl_ax.c.

304{
306 FIXME( "(%p,%p,%s,%p,%p) - stub\n", This, pbc, debugstr_w(pszDisplayName), pchEaten, ppmkOut );
307 return E_NOTIMPL;
308}

◆ OleContainer_QueryInterface()

static HRESULT WINAPI OleContainer_QueryInterface ( IOleContainer iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 284 of file atl_ax.c.

285{
287 return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppv);
288}

◆ OleContainer_Release()

static ULONG WINAPI OleContainer_Release ( IOleContainer iface)
static

Definition at line 296 of file atl_ax.c.

297{
299 return IOleClientSite_Release(&This->IOleClientSite_iface);
300}

◆ OleControlSite_AddRef()

static ULONG WINAPI OleControlSite_AddRef ( IOleControlSite iface)
static

Definition at line 691 of file atl_ax.c.

692{
694 return IOleClientSite_AddRef(&This->IOleClientSite_iface);
695}
static IOCS * impl_from_IOleControlSite(IOleControlSite *iface)
Definition: atl_ax.c:680

◆ OleControlSite_GetExtendedControl()

static HRESULT WINAPI OleControlSite_GetExtendedControl ( IOleControlSite This,
IDispatch **  ppDisp 
)
static

Definition at line 713 of file atl_ax.c.

714{
715 FIXME( "\n" );
716 return E_NOTIMPL;
717}

◆ OleControlSite_LockInPlaceActive()

static HRESULT WINAPI OleControlSite_LockInPlaceActive ( IOleControlSite This,
BOOL  fLock 
)
static

Definition at line 708 of file atl_ax.c.

709{
710 FIXME( "\n" );
711 return E_NOTIMPL;
712}

◆ OleControlSite_OnControlInfoChanged()

static HRESULT WINAPI OleControlSite_OnControlInfoChanged ( IOleControlSite This)
static

Definition at line 703 of file atl_ax.c.

704{
705 FIXME( "\n" );
706 return E_NOTIMPL;
707}

◆ OleControlSite_OnFocus()

static HRESULT WINAPI OleControlSite_OnFocus ( IOleControlSite This,
BOOL  fGotFocus 
)
static

Definition at line 728 of file atl_ax.c.

729{
730 FIXME( "\n" );
731 return E_NOTIMPL;
732}

◆ OleControlSite_QueryInterface()

static HRESULT WINAPI OleControlSite_QueryInterface ( IOleControlSite iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 685 of file atl_ax.c.

686{
688 return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppv);
689}

◆ OleControlSite_Release()

static ULONG WINAPI OleControlSite_Release ( IOleControlSite iface)
static

Definition at line 697 of file atl_ax.c.

698{
700 return IOleClientSite_Release(&This->IOleClientSite_iface);
701}

◆ OleControlSite_ShowPropertyFrame()

static HRESULT WINAPI OleControlSite_ShowPropertyFrame ( IOleControlSite This)
static

Definition at line 733 of file atl_ax.c.

734{
735 FIXME( "\n" );
736 return E_NOTIMPL;
737}

◆ OleControlSite_TransformCoords()

static HRESULT WINAPI OleControlSite_TransformCoords ( IOleControlSite This,
POINTL pPtlHimetric,
POINTF *  pPtfContainer,
DWORD  dwFlags 
)
static

Definition at line 718 of file atl_ax.c.

719{
720 FIXME( "\n" );
721 return E_NOTIMPL;
722}

◆ OleControlSite_TranslateAccelerator()

static HRESULT WINAPI OleControlSite_TranslateAccelerator ( IOleControlSite This,
MSG pMsg,
DWORD  grfModifiers 
)
static

Definition at line 723 of file atl_ax.c.

724{
725 FIXME( "\n" );
726 return E_NOTIMPL;
727}

◆ OleInPlaceFrame_AddRef()

static ULONG WINAPI OleInPlaceFrame_AddRef ( IOleInPlaceFrame iface)
static

Definition at line 568 of file atl_ax.c.

569{
571 return IOleClientSite_AddRef(&This->IOleClientSite_iface);
572}
static IOCS * impl_from_IOleInPlaceFrame(IOleInPlaceFrame *iface)
Definition: atl_ax.c:557

◆ OleInPlaceFrame_ContextSensitiveHelp()

static HRESULT WINAPI OleInPlaceFrame_ContextSensitiveHelp ( IOleInPlaceFrame iface,
BOOL  fEnterMode 
)
static

Definition at line 590 of file atl_ax.c.

591{
593
594 FIXME( "(%p,%d) - stub\n", This, fEnterMode );
595 return E_NOTIMPL;
596}

◆ OleInPlaceFrame_EnableModeless()

static HRESULT WINAPI OleInPlaceFrame_EnableModeless ( IOleInPlaceFrame iface,
BOOL  fEnable 
)
static

Definition at line 662 of file atl_ax.c.

663{
665
666 FIXME( "(%p, %d) - stub\n", This, fEnable );
667 return E_NOTIMPL;
668}

◆ OleInPlaceFrame_GetBorder()

static HRESULT WINAPI OleInPlaceFrame_GetBorder ( IOleInPlaceFrame iface,
LPRECT  lprectBorder 
)
static

Definition at line 598 of file atl_ax.c.

599{
601
602 FIXME( "(%p,%p) - stub\n", This, lprectBorder );
603 return E_NOTIMPL;
604}

◆ OleInPlaceFrame_GetWindow()

static HRESULT WINAPI OleInPlaceFrame_GetWindow ( IOleInPlaceFrame iface,
HWND phWnd 
)
static

Definition at line 580 of file atl_ax.c.

581{
583
584 TRACE( "(%p,%p)\n", This, phWnd );
585
586 *phWnd = This->hWnd;
587 return S_OK;
588}

◆ OleInPlaceFrame_InsertMenus()

static HRESULT WINAPI OleInPlaceFrame_InsertMenus ( IOleInPlaceFrame iface,
HMENU  hmenuShared,
LPOLEMENUGROUPWIDTHS  lpMenuWidths 
)
static

Definition at line 630 of file atl_ax.c.

631{
633
634 FIXME( "(%p,%p,%p) - stub\n", This, hmenuShared, lpMenuWidths );
635 return E_NOTIMPL;
636}

◆ OleInPlaceFrame_QueryInterface()

static HRESULT WINAPI OleInPlaceFrame_QueryInterface ( IOleInPlaceFrame iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 562 of file atl_ax.c.

563{
565 return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppv);
566}

◆ OleInPlaceFrame_Release()

static ULONG WINAPI OleInPlaceFrame_Release ( IOleInPlaceFrame iface)
static

Definition at line 574 of file atl_ax.c.

575{
577 return IOleClientSite_Release(&This->IOleClientSite_iface);
578}

◆ OleInPlaceFrame_RemoveMenus()

static HRESULT WINAPI OleInPlaceFrame_RemoveMenus ( IOleInPlaceFrame iface,
HMENU  hmenuShared 
)
static

Definition at line 646 of file atl_ax.c.

647{
649
650 FIXME( "(%p, %p) - stub\n", This, hmenuShared );
651 return E_NOTIMPL;
652}

◆ OleInPlaceFrame_RequestBorderSpace()

static HRESULT WINAPI OleInPlaceFrame_RequestBorderSpace ( IOleInPlaceFrame iface,
LPCBORDERWIDTHS  pborderwidths 
)
static

Definition at line 606 of file atl_ax.c.

607{
609
610 FIXME( "(%p,%p) - stub\n", This, pborderwidths );
611 return E_NOTIMPL;
612}

◆ OleInPlaceFrame_SetActiveObject()

static HRESULT WINAPI OleInPlaceFrame_SetActiveObject ( IOleInPlaceFrame iface,
IOleInPlaceActiveObject pActiveObject,
LPCOLESTR  pszObjName 
)
static

Definition at line 622 of file atl_ax.c.

623{
625
626 FIXME( "(%p,%p,%s) - stub\n", This, pActiveObject, debugstr_w(pszObjName) );
627 return S_OK;
628}

◆ OleInPlaceFrame_SetBorderSpace()

static HRESULT WINAPI OleInPlaceFrame_SetBorderSpace ( IOleInPlaceFrame iface,
LPCBORDERWIDTHS  pborderwidths 
)
static

Definition at line 614 of file atl_ax.c.

615{
617
618 FIXME( "(%p,%p) - stub\n", This, pborderwidths );
619 return E_NOTIMPL;
620}

◆ OleInPlaceFrame_SetMenu()

static HRESULT WINAPI OleInPlaceFrame_SetMenu ( IOleInPlaceFrame iface,
HMENU  hmenuShared,
HOLEMENU  holemenu,
HWND  hwndActiveObject 
)
static

Definition at line 638 of file atl_ax.c.

639{
641
642 FIXME( "(%p,%p,%p,%p) - stub\n", This, hmenuShared, holemenu, hwndActiveObject );
643 return E_NOTIMPL;
644}

◆ OleInPlaceFrame_SetStatusText()

static HRESULT WINAPI OleInPlaceFrame_SetStatusText ( IOleInPlaceFrame iface,
LPCOLESTR  pszStatusText 
)
static

Definition at line 654 of file atl_ax.c.

655{
657
658 FIXME( "(%p, %s) - stub\n", This, debugstr_w( pszStatusText ) );
659 return E_NOTIMPL;
660}

◆ OleInPlaceFrame_TranslateAccelerator()

static HRESULT WINAPI OleInPlaceFrame_TranslateAccelerator ( IOleInPlaceFrame iface,
LPMSG  lpmsg,
WORD  wID 
)
static

Definition at line 670 of file atl_ax.c.

671{
673
674 FIXME( "(%p, %p, %x) - stub\n", This, lpmsg, wID );
675 return E_NOTIMPL;
676}

◆ OleInPlaceSiteWindowless_AddRef()

static ULONG WINAPI OleInPlaceSiteWindowless_AddRef ( IOleInPlaceSiteWindowless iface)
static

Definition at line 337 of file atl_ax.c.

338{
340 return IOleClientSite_AddRef(&This->IOleClientSite_iface);
341}
static IOCS * impl_from_IOleInPlaceSiteWindowless(IOleInPlaceSiteWindowless *iface)
Definition: atl_ax.c:326

◆ OleInPlaceSiteWindowless_AdjustRect()

static HRESULT WINAPI OleInPlaceSiteWindowless_AdjustRect ( IOleInPlaceSiteWindowless iface,
LPRECT  prc 
)
static

Definition at line 544 of file atl_ax.c.

545{
546 FIXME("\n");
547 return E_NOTIMPL;
548}

◆ OleInPlaceSiteWindowless_CanInPlaceActivate()

static HRESULT WINAPI OleInPlaceSiteWindowless_CanInPlaceActivate ( IOleInPlaceSiteWindowless iface)
static

Definition at line 365 of file atl_ax.c.

366{
368 TRACE("(%p)\n", This);
369 return S_OK;
370}

◆ OleInPlaceSiteWindowless_CanWindowlessActivate()

static HRESULT WINAPI OleInPlaceSiteWindowless_CanWindowlessActivate ( IOleInPlaceSiteWindowless iface)
static

Definition at line 494 of file atl_ax.c.

495{
496 FIXME("\n");
497 return S_OK;
498}

◆ OleInPlaceSiteWindowless_ContextSensitiveHelp()

static HRESULT WINAPI OleInPlaceSiteWindowless_ContextSensitiveHelp ( IOleInPlaceSiteWindowless iface,
BOOL  fEnterMode 
)
static

Definition at line 358 of file atl_ax.c.

359{
361 FIXME("(%p,%d) - stub\n", This, fEnterMode);
362 return E_NOTIMPL;
363}

◆ OleInPlaceSiteWindowless_DeactivateAndUndo()

static HRESULT WINAPI OleInPlaceSiteWindowless_DeactivateAndUndo ( IOleInPlaceSiteWindowless iface)
static

Definition at line 454 of file atl_ax.c.

455{
457 FIXME("(%p) - stub\n", This);
458 return E_NOTIMPL;
459}

◆ OleInPlaceSiteWindowless_DiscardUndoState()

static HRESULT WINAPI OleInPlaceSiteWindowless_DiscardUndoState ( IOleInPlaceSiteWindowless iface)
static

Definition at line 447 of file atl_ax.c.

448{
450 FIXME("(%p) - stub\n", This);
451 return E_NOTIMPL;
452}

◆ OleInPlaceSiteWindowless_GetCapture()

static HRESULT WINAPI OleInPlaceSiteWindowless_GetCapture ( IOleInPlaceSiteWindowless iface)
static

Definition at line 499 of file atl_ax.c.

500{
501 FIXME("\n");
502 return E_NOTIMPL;
503}

◆ OleInPlaceSiteWindowless_GetDC()

static HRESULT WINAPI OleInPlaceSiteWindowless_GetDC ( IOleInPlaceSiteWindowless iface,
LPCRECT  pRect,
DWORD  grfFlags,
HDC phDC 
)
static

Definition at line 519 of file atl_ax.c.

520{
521 FIXME("\n");
522 return E_NOTIMPL;
523}

◆ OleInPlaceSiteWindowless_GetFocus()

static HRESULT WINAPI OleInPlaceSiteWindowless_GetFocus ( IOleInPlaceSiteWindowless iface)
static

Definition at line 509 of file atl_ax.c.

510{
511 FIXME("\n");
512 return E_NOTIMPL;
513}

◆ OleInPlaceSiteWindowless_GetWindow()

static HRESULT WINAPI OleInPlaceSiteWindowless_GetWindow ( IOleInPlaceSiteWindowless iface,
HWND phwnd 
)
static

Definition at line 349 of file atl_ax.c.

350{
352
353 TRACE("(%p,%p)\n", This, phwnd);
354 *phwnd = This->hWnd;
355 return S_OK;
356}

◆ OleInPlaceSiteWindowless_GetWindowContext()

static HRESULT WINAPI OleInPlaceSiteWindowless_GetWindowContext ( IOleInPlaceSiteWindowless iface,
IOleInPlaceFrame **  frame,
IOleInPlaceUIWindow **  ppDoc,
LPRECT  lprcPosRect,
LPRECT  lprcClipRect,
LPOLEINPLACEFRAMEINFO  lpFrameInfo 
)
static

Definition at line 390 of file atl_ax.c.

393{
395
396 TRACE("(%p,%p,%p,%p,%p,%p)\n", This, frame, ppDoc, lprcPosRect, lprcClipRect, lpFrameInfo);
397
398 if ( lprcClipRect )
399 *lprcClipRect = This->size;
400 if ( lprcPosRect )
401 *lprcPosRect = This->size;
402
403 if ( frame )
404 {
405 *frame = &This->IOleInPlaceFrame_iface;
406 IOleInPlaceFrame_AddRef(*frame);
407 }
408
409 if ( ppDoc )
410 *ppDoc = NULL;
411
412 if ( lpFrameInfo )
413 {
414 lpFrameInfo->fMDIApp = FALSE;
415 lpFrameInfo->hwndFrame = This->hWnd;
416 lpFrameInfo->haccel = NULL;
417 lpFrameInfo->cAccelEntries = 0;
418 }
419
420 return S_OK;
421}

◆ OleInPlaceSiteWindowless_InvalidateRect()

static HRESULT WINAPI OleInPlaceSiteWindowless_InvalidateRect ( IOleInPlaceSiteWindowless iface,
LPCRECT  pRect,
BOOL  fErase 
)
static

Definition at line 529 of file atl_ax.c.

530{
531 FIXME("\n");
532 return E_NOTIMPL;
533}

◆ OleInPlaceSiteWindowless_InvalidateRgn()

static HRESULT WINAPI OleInPlaceSiteWindowless_InvalidateRgn ( IOleInPlaceSiteWindowless iface,
HRGN  hRGN,
BOOL  fErase 
)
static

Definition at line 534 of file atl_ax.c.

535{
536 FIXME("\n");
537 return E_NOTIMPL;
538}

◆ OleInPlaceSiteWindowless_OnDefWindowMessage()

static HRESULT WINAPI OleInPlaceSiteWindowless_OnDefWindowMessage ( IOleInPlaceSiteWindowless iface,
UINT  msg,
WPARAM  wParam,
LPARAM  lParam,
LRESULT plResult 
)
static

Definition at line 549 of file atl_ax.c.

550{
551 FIXME("\n");
552 return E_NOTIMPL;
553}

◆ OleInPlaceSiteWindowless_OnInPlaceActivate()

static HRESULT WINAPI OleInPlaceSiteWindowless_OnInPlaceActivate ( IOleInPlaceSiteWindowless iface)
static

Definition at line 372 of file atl_ax.c.

373{
375
376 TRACE("(%p)\n", This);
377
378 This->fInPlace = TRUE;
379 return S_OK;
380}

◆ OleInPlaceSiteWindowless_OnInPlaceActivateEx()

static HRESULT WINAPI OleInPlaceSiteWindowless_OnInPlaceActivateEx ( IOleInPlaceSiteWindowless iface,
BOOL pfNoRedraw,
DWORD  dwFlags 
)
static

Definition at line 468 of file atl_ax.c.

469{
471
472 TRACE("\n");
473
474 This->fActive = This->fInPlace = TRUE;
475 if ( dwFlags & ACTIVATE_WINDOWLESS )
476 This->fWindowless = TRUE;
477 return S_OK;
478}
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD dwFlags
Definition: netsh.h:141

◆ OleInPlaceSiteWindowless_OnInPlaceDeactivate()

static HRESULT WINAPI OleInPlaceSiteWindowless_OnInPlaceDeactivate ( IOleInPlaceSiteWindowless iface)
static

Definition at line 437 of file atl_ax.c.

438{
440
441 TRACE("(%p)\n", This);
442
443 This->fInPlace = This->fWindowless = FALSE;
444 return S_OK;
445}

◆ OleInPlaceSiteWindowless_OnInPlaceDeactivateEx()

static HRESULT WINAPI OleInPlaceSiteWindowless_OnInPlaceDeactivateEx ( IOleInPlaceSiteWindowless iface,
BOOL  fNoRedraw 
)
static

Definition at line 480 of file atl_ax.c.

481{
483
484 TRACE("\n");
485
486 This->fActive = This->fInPlace = This->fWindowless = FALSE;
487 return S_OK;
488}

◆ OleInPlaceSiteWindowless_OnPosRectChange()

static HRESULT WINAPI OleInPlaceSiteWindowless_OnPosRectChange ( IOleInPlaceSiteWindowless iface,
LPCRECT  lprcPosRect 
)
static

Definition at line 461 of file atl_ax.c.

462{
464 FIXME("(%p,%p) - stub\n", This, lprcPosRect);
465 return E_NOTIMPL;
466}

◆ OleInPlaceSiteWindowless_OnUIActivate()

static HRESULT WINAPI OleInPlaceSiteWindowless_OnUIActivate ( IOleInPlaceSiteWindowless iface)
static

Definition at line 382 of file atl_ax.c.

383{
385
386 TRACE("(%p)\n", This);
387
388 return S_OK;
389}

◆ OleInPlaceSiteWindowless_OnUIDeactivate()

static HRESULT WINAPI OleInPlaceSiteWindowless_OnUIDeactivate ( IOleInPlaceSiteWindowless iface,
BOOL  fUndoable 
)
static

Definition at line 430 of file atl_ax.c.

431{
433 FIXME("(%p,%d) - stub\n", This, fUndoable);
434 return E_NOTIMPL;
435}

◆ OleInPlaceSiteWindowless_QueryInterface()

static HRESULT WINAPI OleInPlaceSiteWindowless_QueryInterface ( IOleInPlaceSiteWindowless iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 331 of file atl_ax.c.

332{
334 return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppv);
335}

◆ OleInPlaceSiteWindowless_Release()

static ULONG WINAPI OleInPlaceSiteWindowless_Release ( IOleInPlaceSiteWindowless iface)
static

Definition at line 343 of file atl_ax.c.

344{
346 return IOleClientSite_Release(&This->IOleClientSite_iface);
347}

◆ OleInPlaceSiteWindowless_ReleaseDC()

static HRESULT WINAPI OleInPlaceSiteWindowless_ReleaseDC ( IOleInPlaceSiteWindowless iface,
HDC  hDC 
)
static

Definition at line 524 of file atl_ax.c.

525{
526 FIXME("\n");
527 return E_NOTIMPL;
528}

◆ OleInPlaceSiteWindowless_RequestUIActivate()

static HRESULT WINAPI OleInPlaceSiteWindowless_RequestUIActivate ( IOleInPlaceSiteWindowless iface)
static

Definition at line 489 of file atl_ax.c.

490{
491 FIXME("\n");
492 return E_NOTIMPL;
493}

◆ OleInPlaceSiteWindowless_Scroll()

static HRESULT WINAPI OleInPlaceSiteWindowless_Scroll ( IOleInPlaceSiteWindowless iface,
SIZE  scrollExtent 
)
static

Definition at line 423 of file atl_ax.c.

424{
426 FIXME("(%p) - stub\n", This);
427 return E_NOTIMPL;
428}

◆ OleInPlaceSiteWindowless_ScrollRect()

static HRESULT WINAPI OleInPlaceSiteWindowless_ScrollRect ( IOleInPlaceSiteWindowless iface,
INT  dx,
INT  dy,
LPCRECT  pRectScroll,
LPCRECT  pRectClip 
)
static

Definition at line 539 of file atl_ax.c.

540{
541 FIXME("\n");
542 return E_NOTIMPL;
543}

◆ OleInPlaceSiteWindowless_SetCapture()

static HRESULT WINAPI OleInPlaceSiteWindowless_SetCapture ( IOleInPlaceSiteWindowless iface,
BOOL  fCapture 
)
static

Definition at line 504 of file atl_ax.c.

505{
506 FIXME("\n");
507 return E_NOTIMPL;
508}

◆ OleInPlaceSiteWindowless_SetFocus()

static HRESULT WINAPI OleInPlaceSiteWindowless_SetFocus ( IOleInPlaceSiteWindowless iface,
BOOL  fFocus 
)
static

Definition at line 514 of file atl_ax.c.

515{
516 FIXME("\n");
517 return E_NOTIMPL;
518}

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( atl  )

Variable Documentation

◆ OleClientSite_vtbl

const IOleClientSiteVtbl OleClientSite_vtbl
static
Initial value:
= {
}
static HRESULT WINAPI OleClientSite_QueryInterface(IOleClientSite *iface, REFIID riid, void **ppv)
Definition: atl_ax.c:168
static ULONG WINAPI OleClientSite_Release(IOleClientSite *iface)
Definition: atl_ax.c:218
static ULONG WINAPI OleClientSite_AddRef(IOleClientSite *iface)
Definition: atl_ax.c:210
static HRESULT WINAPI OleClientSite_ShowObject(IOleClientSite *iface)
Definition: atl_ax.c:256
static HRESULT WINAPI OleClientSite_OnShowWindow(IOleClientSite *iface, BOOL fShow)
Definition: atl_ax.c:263
static HRESULT WINAPI OleClientSite_GetMoniker(IOleClientSite *iface, DWORD dwAssign, DWORD dwWhichMoniker, IMoniker **ppmk)
Definition: atl_ax.c:241
static HRESULT WINAPI OleClientSite_SaveObject(IOleClientSite *iface)
Definition: atl_ax.c:234
static HRESULT WINAPI OleClientSite_RequestNewObjectLayout(IOleClientSite *iface)
Definition: atl_ax.c:270
static HRESULT WINAPI OleClientSite_GetContainer(IOleClientSite *iface, IOleContainer **container)
Definition: atl_ax.c:249

Definition at line 740 of file atl_ax.c.

Referenced by IOCS_Create().

◆ OleContainer_vtbl

const IOleContainerVtbl OleContainer_vtbl
static
Initial value:
= {
}
static ULONG WINAPI OleContainer_Release(IOleContainer *iface)
Definition: atl_ax.c:296
static HRESULT WINAPI OleContainer_EnumObjects(IOleContainer *iface, DWORD grfFlags, IEnumUnknown **ppenum)
Definition: atl_ax.c:310
static HRESULT WINAPI OleContainer_ParseDisplayName(IOleContainer *iface, IBindCtx *pbc, LPOLESTR pszDisplayName, ULONG *pchEaten, IMoniker **ppmkOut)
Definition: atl_ax.c:302
static HRESULT WINAPI OleContainer_LockContainer(IOleContainer *iface, BOOL fLock)
Definition: atl_ax.c:317
static HRESULT WINAPI OleContainer_QueryInterface(IOleContainer *iface, REFIID riid, void **ppv)
Definition: atl_ax.c:284
static ULONG WINAPI OleContainer_AddRef(IOleContainer *iface)
Definition: atl_ax.c:290

Definition at line 751 of file atl_ax.c.

Referenced by IOCS_Create().

◆ OleControlSite_vtbl

const IOleControlSiteVtbl OleControlSite_vtbl
static
Initial value:
=
{
}
static HRESULT WINAPI OleControlSite_OnControlInfoChanged(IOleControlSite *This)
Definition: atl_ax.c:703
static HRESULT WINAPI OleControlSite_GetExtendedControl(IOleControlSite *This, IDispatch **ppDisp)
Definition: atl_ax.c:713
static HRESULT WINAPI OleControlSite_TransformCoords(IOleControlSite *This, POINTL *pPtlHimetric, POINTF *pPtfContainer, DWORD dwFlags)
Definition: atl_ax.c:718
static HRESULT WINAPI OleControlSite_LockInPlaceActive(IOleControlSite *This, BOOL fLock)
Definition: atl_ax.c:708
static HRESULT WINAPI OleControlSite_QueryInterface(IOleControlSite *iface, REFIID riid, void **ppv)
Definition: atl_ax.c:685
static HRESULT WINAPI OleControlSite_ShowPropertyFrame(IOleControlSite *This)
Definition: atl_ax.c:733
static HRESULT WINAPI OleControlSite_TranslateAccelerator(IOleControlSite *This, MSG *pMsg, DWORD grfModifiers)
Definition: atl_ax.c:723
static ULONG WINAPI OleControlSite_AddRef(IOleControlSite *iface)
Definition: atl_ax.c:691
static ULONG WINAPI OleControlSite_Release(IOleControlSite *iface)
Definition: atl_ax.c:697
static HRESULT WINAPI OleControlSite_OnFocus(IOleControlSite *This, BOOL fGotFocus)
Definition: atl_ax.c:728

Definition at line 809 of file atl_ax.c.

Referenced by IOCS_Create().

◆ OleInPlaceFrame_vtbl

const IOleInPlaceFrameVtbl OleInPlaceFrame_vtbl
static
Initial value:
=
{
}
static ULONG WINAPI OleInPlaceFrame_AddRef(IOleInPlaceFrame *iface)
Definition: atl_ax.c:568
static HRESULT WINAPI OleInPlaceFrame_InsertMenus(IOleInPlaceFrame *iface, HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths)
Definition: atl_ax.c:630
static HRESULT WINAPI OleInPlaceFrame_GetWindow(IOleInPlaceFrame *iface, HWND *phWnd)
Definition: atl_ax.c:580
static ULONG WINAPI OleInPlaceFrame_Release(IOleInPlaceFrame *iface)
Definition: atl_ax.c:574
static HRESULT WINAPI OleInPlaceFrame_GetBorder(IOleInPlaceFrame *iface, LPRECT lprectBorder)
Definition: atl_ax.c:598
static HRESULT WINAPI OleInPlaceFrame_SetMenu(IOleInPlaceFrame *iface, HMENU hmenuShared, HOLEMENU holemenu, HWND hwndActiveObject)
Definition: atl_ax.c:638
static HRESULT WINAPI OleInPlaceFrame_TranslateAccelerator(IOleInPlaceFrame *iface, LPMSG lpmsg, WORD wID)
Definition: atl_ax.c:670
static HRESULT WINAPI OleInPlaceFrame_SetStatusText(IOleInPlaceFrame *iface, LPCOLESTR pszStatusText)
Definition: atl_ax.c:654
static HRESULT WINAPI OleInPlaceFrame_RemoveMenus(IOleInPlaceFrame *iface, HMENU hmenuShared)
Definition: atl_ax.c:646
static HRESULT WINAPI OleInPlaceFrame_RequestBorderSpace(IOleInPlaceFrame *iface, LPCBORDERWIDTHS pborderwidths)
Definition: atl_ax.c:606
static HRESULT WINAPI OleInPlaceFrame_SetActiveObject(IOleInPlaceFrame *iface, IOleInPlaceActiveObject *pActiveObject, LPCOLESTR pszObjName)
Definition: atl_ax.c:622
static HRESULT WINAPI OleInPlaceFrame_EnableModeless(IOleInPlaceFrame *iface, BOOL fEnable)
Definition: atl_ax.c:662
static HRESULT WINAPI OleInPlaceFrame_QueryInterface(IOleInPlaceFrame *iface, REFIID riid, void **ppv)
Definition: atl_ax.c:562
static HRESULT WINAPI OleInPlaceFrame_SetBorderSpace(IOleInPlaceFrame *iface, LPCBORDERWIDTHS pborderwidths)
Definition: atl_ax.c:614
static HRESULT WINAPI OleInPlaceFrame_ContextSensitiveHelp(IOleInPlaceFrame *iface, BOOL fEnterMode)
Definition: atl_ax.c:590

Definition at line 791 of file atl_ax.c.

Referenced by IOCS_Create().

◆ OleInPlaceSiteWindowless_vtbl

const IOleInPlaceSiteWindowlessVtbl OleInPlaceSiteWindowless_vtbl
static

Definition at line 759 of file atl_ax.c.

Referenced by IOCS_Create().