LoadFromMemory Method
Previous  Top  Next


LoadFromMemory
method loads attachment data from memory instead of file.

Syntax

[C++]


HRESULT LoadFromMemory(BYTE* data, LONG size);

Example:

BYTE data[100];
// fill data array
spMailAttachment->LoadFromMemory(data, 100);
spMailAttachment->PutName("document.pdf");


Parameters

data [in]
BYTE array with attachment data.

size [in]
Size of attachment data.

Return value

None.

Remarks

Use LoadFromMemory method to create in-memory attachment. File property is not used in this case. Application should set Name property to specify name of the attachment displayed in the e-mail.