src/native/addrbook/msoutlook/com/MsOutlookAddrBookServer.cxx
/**
 * Returns an instance of the interface requested, if available.
 *
 * @param iid The identifier of the interface requested.
 * @param obj A pointer use to return an object instance implementing the
 * interface requested.
 *
 * @return S_OK if the corresponding interface has been found. E_POINTER, or
 * E_NOINTERFACE otherwise.
 */
Returns an instance of the interface requested, if available.
@param iid The identifier of the interface requested.
@param obj A pointer use to return an object instance implementing the
interface requested.

@return S_OK if the corresponding interface has been found.
Returns an instance of the interface requested if available . @param iid The identifier of the interface requested . @param obj A pointer use to return an object instance implementing the interface requested . @return S_OK if the corresponding interface has been found .
STDMETHODIMP MsOutlookAddrBookServer::QueryInterface(REFIID iid, PVOID *obj)
{
    HRESULT hr;
    if (!obj)
    {
        hr = E_POINTER;
    }
    else if (IID_IUnknown == iid)
    {
        AddRef();
        *obj = static_cast<IUnknown *>(
                static_cast<IMsOutlookAddrBookServer *>(this));
        hr = S_OK;
    }
    else if (IID_IMsOutlookAddrBookServer == iid)
    {
        AddRef();
        *obj = static_cast<IMsOutlookAddrBookServer *>(this);
        hr = S_OK;
    }
    else
    {
        hr = E_NOINTERFACE;
    }
    return hr;
}
STDMETHODIMP MsOutlookAddrBookServer :: QueryInterface ( REFIID iid , PVOID * obj ) { HRESULT hr ; if ( ! obj ) { hr = E_POINTER ; } else if ( IID_IUnknown == iid ) { AddRef ( ) ; * obj = static_cast < IUnknown * > ( static_cast < IMsOutlookAddrBookServer * > ( this ) ) ; hr = S_OK ; } else if ( IID_IMsOutlookAddrBookServer == iid ) { AddRef ( ) ; * obj = static_cast < IMsOutlookAddrBookServer * > ( this ) ; hr = S_OK ; } else { hr = E_NOINTERFACE ; } return hr ; }
Returns an instance of the interface requested, if available.
Returns an instance of the interface requested if available .