IContact::GetContactID method

Retrieves the local computer unique contact ID.

Syntax

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

Parameters

pszContactID

Type: LPWSTR

User allocated buffer to store the contact ID.

cchContactID

Type: DWORD

Specifies allocated buffer size.

pdwcchContactIDRequired

Type: DWORD*

Upon failure due to insufficient buffer, contains the required size for pszContactID. May be NULL.

Return Value

Type: HRESULT

Returns one of the following values:

Return code Description
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.

Requirements

   
Windows version Windows Vista [desktop apps only] Windows Server 2003 [desktop apps only]
Target Platform Windows
Header icontact.h (include Contact.h)
DLL Wab32.dll (Version 6.0 or later)

See Also

IContact

Load