BOOL WINAPI MimeExtractFile( |
|
HMESSAGE hMessage, |
|
|
LPCTSTR lpszFileName |
|
); |
The MimeExtractFile function extracts a file attachment from
the current message part and stores it on the local system.
Parameters
- hMessage
- Handle to the message.
- lpszFileName
- A null-terminated string which specifies the name
of a file on the local system.
Return Value
If the function succeeds, the return value is non-zero. If the
function fails, the return value is zero. To get extended error
information, call MimeGetLastError.
Remarks
This function will store the contents of a file attachment in the
current message part to the specified file on the local system. If a
path is specified as part of the file name, it must exist and the
current user must have the appropriate permissions to create the file.
If a file with the same name already exists, it will be overwritten
with the contents of the attachment. If the file attachment was
encoded using base64 or uuencode, this function will automatically
decode the contents of the attachment.
To determine if the current message part contains a file
attachment, use the MimeGetAttachedFileName function.
Requirements
Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools11.h
Import Library: csmsgv11.lib
Unicode: Implemented as Unicode and ANSI versions
See Also
MimeAttachFile,
MimeExportMessage,
MimeExtractFileEx,
MimeGetAttachedFileName,
MimeImportMessage
|