HRESULT Initialize([in] VARIANT body, [in] TypeNameFormat typeNameFormat, [in] BSTR TypeName);
Initializes the attachment to a known state & values
- VARIANT, [in]: The attachment body, this can either by a fileName for a disk based attachment, or an array of bytes for an in memory attachment.
- TypeNameFormat, [in]: The format that the typeName parameter is specified in, this is typically tnfMediaType (for MIME media types) or tnfAbsoluteURI for URI based type identifiers in DIME (DIME also supports MIME media types)
- BSTR, [in]: The actual typeName of the attachment, the format of which is dependent upon the typeNameFormat parameters, e.g. for a media type it could be "text/plain" or "image/gif". For an absoluteURI typeName, it should be the full absolute URI e.g. "http://schemas.xmlsoap.org/soap/envelope/"
set a = CreateObject("Attachments.Attachment")
a.Initialize "c:\myPicture.gif", tnfMediaType, "image/gif"
' note that the Create method on the attachments collection, calls initialize, so you can also do
dim mgr, a
set mgr = CreateObject("PocketSOAP.Attachments")
set a = mgr.Request.Create ( "c:\myPicture.gif", tnfMediaType, "image/gif" )
The ISoapAttachment Interface |
Copyright © Simon Fell, 2000-2004. All rights reserved.