src/native/addrbook/msoutlook/com/MsOutlookAddrBookServer.cxx
/**
 * Creates an empty contact.
 *
 * @param id The identifier of the created contact.
 *
 * @return S_OK if the contact was correctly created. E_FAIL otherwise.
 */
Creates an empty contact.
@param id The identifier of the created contact.

@return S_OK if the contact was correctly created.
Creates an empty contact . @param id The identifier of the created contact . @return S_OK if the contact was correctly created .
HRESULT STDMETHODCALLTYPE MsOutlookAddrBookServer::createContact( 
        BSTR *id)
{
    LPSTR nativeId = MsOutlookAddrBookContactQuery_createContact();
    if(nativeId != NULL)
    {
        LPWSTR nativeWId = StringUtils::MultiByteToWideChar(nativeId);
        *id = SysAllocString(nativeWId);
        free(nativeWId);
        free(nativeId);
        return S_OK;
    }
    return E_FAIL;
}
HRESULT STDMETHODCALLTYPE MsOutlookAddrBookServer :: createContact ( BSTR * id ) { LPSTR nativeId = MsOutlookAddrBookContactQuery_createContact ( ) ; if ( nativeId != NULL ) { LPWSTR nativeWId = StringUtils :: MultiByteToWideChar ( nativeId ) ; * id = SysAllocString ( nativeWId ) ; free ( nativeWId ) ; free ( nativeId ) ; return S_OK ; } return E_FAIL ; }
Creates an empty contact.
Creates an empty contact .