IAttachmentExecute::SetFileName method (shobjidl_core.h)
Specifies and stores the proposed name of the file.
Syntax
HRESULT SetFileName(
[in] LPCWSTR pszFileName
);
Parameters
[in] pszFileName
Type: LPCWSTR
A pointer to a string that contains the file name.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code, including the following.
Return code | Description |
---|---|
|
The pszFileName value is is set to NULL, points to an empty string, or points to a file name longer than MAX_PATH. |
|
The file name cannot be stored. |
Remarks
No path information should be included at pszFileName, just the file's name.
IAttachmentExecute::SetFileName can be used by the calling application to check the validity of the file name before copying the file locally. The file name is checked for name collisions against other files stored at the local path location.
IAttachmentExecute::SetFileName is optional.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP with SP2 [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | shobjidl_core.h (include Shobjidl.h) |
DLL | Shdocvw.dll (version 6.0 or later) |