IContact::GetPath method (icontact.h)

Retrieves the file system path used to load this contact.

Syntax

HRESULT GetPath(
  [in, out] LPWSTR pszPath,
  [in]      DWORD  cchPath,
  [in, out] DWORD  *pdwcchPathRequired
);

Parameters

[in, out] pszPath

Type: LPWSTR

User-allocated buffer to store the contact ID.

[in] cchPath

Type: DWORD

Specifies the allocated buffer size in characters.

[in, out] pdwcchPathRequired

Type: DWORD*

Upon failure due to insufficient buffer, contains the required size for pszPath.

Return value

Type: HRESULT

Returns one of the following values:

Return code Description
S_OK
Success. pszPath contains the path.
E_UNEXPECTED
Contact ID was not loaded from a file path.
ERROR_INSUFFICIENT_BUFFER
Macro HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER) returned when pszPath was not large enough to store the value. The required buffer size is stored in pdwcchPathRequired.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header icontact.h (include Contact.h)
DLL Wab32.dll (Version 6.0 or later)