The ISmsMessage::SetAttachmentFromFile method, in Configuration Manager, sets an attachment from a file.

[IDL]
HRESULT SetAttachmentFromFile(
	LPCWSTR szName,
	LPCWSTR szPath
);

Parameters

szName


Data type: LPCWSTRQualifiers: [in]Null-terminated string specifying the name to associate with the attachment, represented by an ISmsMessageAttachment Interface object.
szPath


Data type: LPCWSTRQualifiers: [in]Null-terminated string specifying the path of the file containing the attachment contents.

Return Values

An HRESULT code. Possible values include, but are not limited to, the following:

S_OK


The method succeeded.

Remarks

Attachment names must be unique within a message. Setting an attachment with a name that already exists causes the old attachment to be overridden. Because this might be inefficient, clients should be designed to never set multiple attachments with the same name.

See Also


Send comments about this topic to Microsoft.