Пример #1
0
HRESULT
IDeskDisplayAdapter_Constructor(REFIID riid,
                                LPVOID *ppv)
{
    PDESKDISPLAYADAPTER This;
    HRESULT hRet = E_OUTOFMEMORY;

    DPRINT1("IDeskDisplayAdapter::Constructor(%p,%p)\n", riid, ppv);

    This = HeapAlloc(GetProcessHeap(),
                     0,
                     sizeof(*This));
    if (This != NULL)
    {
        ZeroMemory(This,
                   sizeof(*This));

        IDeskDisplayAdapter_InitIface(This);

        hRet = IDeskDisplayAdapter_QueryInterface(This,
                                                  riid,
                                                  ppv);
        if (!SUCCEEDED(hRet))
            IDeskDisplayAdapter_Release(This);
    }

    return hRet;
}
Пример #2
0
static ULONG STDMETHODCALLTYPE
IDeskDisplayAdapter_IShellExtInit_Release(IShellExtInit* iface)
{
    PDESKDISPLAYADAPTER This = interface_to_impl(iface, IShellExtInit);
    return IDeskDisplayAdapter_Release(This);
}
Пример #3
0
static ULONG STDMETHODCALLTYPE
IDeskDisplayAdapter_IClassFactory_Release(IClassFactory* iface)
{
    PDESKDISPLAYADAPTER This = interface_to_impl(iface, IClassFactory);
    return IDeskDisplayAdapter_Release(This);
}