IContact::GetContactID Method

Retrieves the local computer unique contact ID.

Syntax

HRESULT GetContactID(      
    LPWSTR pszContactID,
    DWORD cchContactID,
    DWORD *pdwcchContactIDRequired
);

Parameters

  • pszContactID
    [in, out] User allocated buffer to store the contact ID.
  • cchContactID
    [in] Specifies allocated buffer size.
  • pdwcchContactIDRequired
    [in, out] Upon failure due to insufficient buffer, contains the required size for pszContactID. May be NULL.

Return Value

Returns one of the following values:

S_OK Success. pszContactID contains a null-terminated ContactID.
ERROR_INSUFFICIENT_BUFFER Macro HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER) returned when pszContactID was not large enough to store the value. The required buffer size is stored in pdwcchContactIDRequired.

See Also

IContactManager::Load