ISmsMessage::SetAttachmentFromBuffer 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::SetAttachmentFromBuffer method, in Configuration Manager, sets an attachment from a byte buffer.

[IDL]
HRESULT SetAttachmentFromBuffer(
      LPCWSTR  szName,
      const BYTE*  pData,
     ULONG  ulDataLen 
);

Parameters

  • szName
    Data type: LPCWSTR

    Qualifiers: [in]

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

  • pData
    Data type: BYTE

    Qualifiers: [in]

    Pointer to a buffer containing attachment contents.

  • ulDataLen
    Data type: ULONG

    Qualifiers: [in]

    The length, in bytes, of the pData buffer.

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