Compartir a través de


ISmsMessage::SetAttachmentFromFile Method

Applies To: System Center Configuration Manager 2007, System Center Configuration Manager 2007 R2, System Center Configuration Manager 2007 R3, System Center Configuration Manager 2007 SP1, System Center Configuration Manager 2007 SP2

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

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

Parameters

  • szName
    Data type: LPCWSTR

    Qualifiers: [in]

    Null-terminated string specifying the name to associate with the attachment, represented by an ISmsMessageAttachment Interface object.

  • szPath
    Data type: LPCWSTR

    Qualifiers: [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

Concepts

ISmsMessage Interface
ISmsMessageAttachment Interface