Example #1
0
/**********************************************************************
 * Create new instance of Atl host component and attach it to window  *
 */
static HRESULT IOCS_Create( HWND hWnd, IUnknown *pUnkControl, IOCS **ppSite )
{
    HRESULT hr;
    IOCS *This;

    *ppSite = NULL;
    This = HeapAlloc(GetProcessHeap(), 0, sizeof(IOCS));

    if (!This)
        return E_OUTOFMEMORY;

    This->IOleClientSite_iface.lpVtbl = &OleClientSite_vtbl;
    This->IOleContainer_iface.lpVtbl = &OleContainer_vtbl;
    This->IOleInPlaceSiteWindowless_iface.lpVtbl = &OleInPlaceSiteWindowless_vtbl;
    This->IOleInPlaceFrame_iface.lpVtbl = &OleInPlaceFrame_vtbl;
    This->IOleControlSite_iface.lpVtbl = &OleControlSite_vtbl;
    This->ref = 1;

    This->OrigWndProc = NULL;
    This->hWnd = NULL;
    This->fWindowless = This->fActive = This->fInPlace = FALSE;

    hr = IOCS_Attach( This, hWnd, pUnkControl );
    if ( SUCCEEDED( hr ) )
        hr = IOCS_Init( This );
    if ( SUCCEEDED( hr ) )
        *ppSite = This;
    else
        IOCS_Release( This );

    return hr;
}
Example #2
0
static ULONG WINAPI OleControlSite_Release(IOleControlSite *iface)
{
    IOCS *This = impl_from_IOleControlSite(iface);
    return IOCS_Release(This);
}
Example #3
0
static ULONG WINAPI OleInPlaceSiteWindowless_Release(IOleInPlaceSiteWindowless *iface)
{
    IOCS *This = impl_from_IOleInPlaceSiteWindowless(iface);
    return IOCS_Release(This);
}
Example #4
0
static ULONG WINAPI OleInPlaceFrame_Release(IOleInPlaceFrame *iface)
{
    IOCS *This = impl_from_IOleInPlaceFrame(iface);
    return IOCS_Release(This);
}
Example #5
0
static ULONG WINAPI OleContainer_Release(IOleContainer* iface)
{
    IOCS *This = impl_from_IOleContainer(iface);
    return IOCS_Release(This);
}
Example #6
0
File: atl_ax.c Project: devyn/wine
static ULONG WINAPI OleControlSite_Release(IOleControlSite *iface)
{
    IOCS *This = IFACE2THIS(iface);
    return IOCS_Release(This);
}
Example #7
0
File: atl_ax.c Project: devyn/wine
static ULONG WINAPI OleInPlaceFrame_Release(IOleInPlaceFrame *iface)
{
    IOCS *This = IFACE2THIS(iface);
    return IOCS_Release(This);
}
Example #8
0
File: atl_ax.c Project: devyn/wine
static ULONG WINAPI OleInPlaceSiteWindowless_Release(IOleInPlaceSiteWindowless *iface)
{
    IOCS *This = IFACE2THIS(iface);
    return IOCS_Release(This);
}
Example #9
0
File: atl_ax.c Project: devyn/wine
static ULONG WINAPI OleContainer_Release(IOleContainer* iface)
{
    IOCS *This = IFACE2THIS(iface);
    return IOCS_Release(This);
}