The GetAttachment method returns the attachment for the given index
HRESULT GetAttachment(
[in] LONG p_nIndex,
[out, string] LPCWSTR* p_wsFilePath,
[out] LONG* p_nLocationType,
[out, string] LPCWSTR* p_wsUser,
[out, string] LPCWSTR* p_wsPassword,
[out] BOOL* p_bEnabled
);
Parameters:
p_nIndex
[in] custom attachment index
p_wsFilePath
[out] full path to the attachment file
p_nLocationType
[out] location type (where the attachment file is located): 1 - local folders, 2 - server folders
p_wsUser
[out] User and password to connect to the file path, if set
p_wsPassword
[out] User and password to connect to the file path, if set
p_bEnabled
[out] if attachment is enabled
Return values:
S_OK
on success or COM error codeNV_NOT_INITIALIZED
- Initialize was not calledNV_UNKNOWN_PROFILE
- no profile loadedNV_INVALID_ATTACHMENT
- invalid attachment indexRemarks:
This method returns information about the attachment at position given by p_nIndex