Microsoft DirectX 8.1 (Visual Basic)

DirectXFileData.AddBinaryObject

Creates a binary object and adds it as a child object.

object.AddBinaryObject( _
    Name As String, _
    GuidObject As String, _
    MimeType As String, _
    Data As Any, _
    Size As Long)

Parts

object
Object expression that resolves to a DirectXFileData object.
Name
String value containing the object's name. Specify an empty string if the object does not need a name.
GuidObject
String value containing the globally unique identifier (GUID) that represents the object. Specify an empty string if the object does not need a GUID.
MimeType
String value containing the object's MIME type.
Data
Buffer containing the object's data.
Size
Long value containing the size of the Data buffer, in bytes.

Error Codes

If the method fails, an error is raised and Err.Number can be set to one of the following values.

DXFILEERR_BADALLOC
DXFILEERR_BADVALUE

For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.

See Also

DirectXFileBinary.GetMimeType