The ISmsMessage::GetAttachmentByName method, in Configuration Manager, gets a message attachment by name.
[IDL] HRESULT GetAttachmentByName( LPCWSTR szName, ISmsMessageAttachment** ppAttach );
- Data type: LPCWSTRQualifiers: [in]Null-terminated string specifying the name of the attachment.
- Data type: ISmsMessageAttachmentQualifiers: [out]Pointer to an ISmsMessageAttachment Interface object representing the attachment.
An HRESULT code. Possible values include, but are not limited to, the following:
- The method succeeded.
Your application uses this method to get an attachment if its name is known in advance. It first calls ISmsMessage::GetAttachmentCount Method and ISmsMessage::GetAttachmentByIndex Method to enumerate all attachments.
Send comments about this topic to Microsoft.