ISoapAttachments::Create Method

HRESULT Create([in] Variant src, [in] TypeNameFormat tnf, [in] BSTR TypeName, [out, retval] ISoapAttachment ** attachment);

This creates a new attachment object, initializes it with the specified info, and appends it to the end of the collection.



Variant, [in]: The attachment source or body, this can be either a fileName or an array of bytes.
TypeNameFormat, [in]: The typeNameFormat of the typeName (typically tnfMediaType or tnfAbsoluteURI)
BSTR, [in]: The typeName of the attachment, e.g. text/plain , image/gif
ISoapAttachment **, [out, retval]: The newly created attachment object.


Return Values

returns the newly created attachment object.


Sample Code

' create the attachment, and create a reference between the attachment and the parameter
set newAtt = a.Request.Create ("c:\picture.gif", tnfMediaType, "image/gif")


See Also

The ISoapAttachments Interface | 




Copyright © Simon Fell, 2000-2004. All rights reserved.