Skip to content

Latest commit

 

History

History
168 lines (121 loc) · 6.16 KB

ns-mapi-mapifiledescw.md

File metadata and controls

168 lines (121 loc) · 6.16 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NS:mapi.MapiFileDescW
MapiFileDescW (mapi.h)
A MapiFileDescW structure contains information about a file containing a message attachment stored as a temporary file. That file can contain a static OLE object, an embedded OLE object, an embedded message, and other types of files.
*lpMapiFileDescW
MAPI_OLE
MAPI_OLE_STATIC
MapiFileDescW
MapiFileDescW structure
lpMapiFileDescW
lpMapiFileDescW structure pointer
mapi.mapifiledescw
mapi/MapiFileDescW
mapi/lpMapiFileDescW
mapi\mapifiledescw.htm
mapi
CF7C41DF-D361-457F-B038-5C1144E70AA6
12/05/2018
*lpMapiFileDescW, MAPI_OLE, MAPI_OLE_STATIC, MapiFileDescW, MapiFileDescW structure, lpMapiFileDescW, lpMapiFileDescW structure pointer, mapi.mapifiledescw, mapi/MapiFileDescW, mapi/lpMapiFileDescW
mapi.h
Windows
Windows 8 [desktop apps only]
Windows Server 2012 [desktop apps only]
Windows
MapiFileDescW, *lpMapiFileDescW
19H1
lpMapiFileDescW
mapi/lpMapiFileDescW
MapiFileDescW
mapi/MapiFileDescW
c++
APIRef
kbSyntax
HeaderDef
Mapi.h
MapiFileDescW

MapiFileDescW structure

-description

A MapiFileDescW structure contains information about a file containing a message attachment stored as a temporary file. That file can contain a static OLE object, an embedded OLE object, an embedded message, and other types of files.

-struct-fields

-field ulReserved

Type: ULONG

Reserved; must be 0.

-field flFlags

Type: ULONG

Bitmask of attachment flags. The following flags can be set.

Value Meaning
MAPI_OLE
0x00000001
The attachment is an OLE object. If MAPI_OLE_STATIC is also set, the attachment is a static OLE object. If MAPI_OLE_STATIC is not set, the attachment is an embedded OLE object.
MAPI_OLE_STATIC
0x00000002
The attachment is a static OLE object.
 

If neither flag is set, the attachment is treated as a data file.

-field nPosition

Type: ULONG

An integer used to indicate where the attachment is rendered in the message text. The message text is stored in the NoteText member of the MapiMessageW structure, and the integer is used as an index to identify a specific character in the message string, NoteText[nPosition], that is replaced by the attachment.

A value of -1 (0xFFFFFFFF) means the attachment position is not indicated and the client application must provide a way for the user to access the attachment.

-field lpszPathName

Type: PWSTR

Pointer to the fully qualified path of the attached file. This path should include the disk drive letter and directory name.

-field lpszFileName

Type: PWSTR

Pointer to the filename of the attachment as seen by the recipient. The filename that is seen by the recipient may differ from the filename in the lpszPathName member if temporary files are being used.

If the lpszFileName member is empty or NULL, the filename from lpszPathName is used.

-field lpFileType

Type: PVOID

Pointer to the attachment file type, which can be represented with a MapiFileTagExt structure.

A value of NULL indicates an unknown file type or a file type determined by the operating system.

-remarks

Simple MAPI works with three kinds of embedded attachments:

  • Data file attachments
  • Editable OLE object file attachments
  • Static OLE object file attachments
Data file attachments are simply data files. OLE object file attachments are OLE objects that are displayed in the message text. If the OLE attachment is editable, the recipient can double-click it and its source application will be started to handle the edit session. If the OLE attachment is static, the object cannot be edited. The flag set in the flFlags member of the MapiFileDescW structure determines the kind of a particular attachment. Embedded messages can be identified by a .MSG extension in the lpszFileName member.

OLE object files are file representations of OLE object streams. The client application can re-create an OLE object from the file by calling the OLE function OleLoadFromStream with an OLESTREAM object that reads the file contents. If an OLE file attachment is included in an outbound message, the OLE object stream should be written directly to the file used as the attachment.

When using the MapiFileDescW member nPosition, the client application should not place two attachments in the same location. Client applications might not display file attachments at positions beyond the end of the message text.

-see-also

MAPISendMailW

MapiFileDesc

MapiMessageW