Function Name: Create Object

Definition

Used to create a new object. The DRM class of the object must be specified. The object's fields are initialized to the default values for that class.

The object is not actually stored in the transmittal until SE_AddToTransmittal() is called. Until then, it remains in an unsaved state, and becomes resolved when added to the transmittal.

Returns

SE_SUCCESS - if valid parameters were passed in and all operations succeeded.

SE_NULL_REQUIRED_PARAMETER - and *new_object_out_ptr is unaffected, if new_object_out_ptr is NULL.

SE_OUT_OF_MEMORY - and *new_object_out_ptr is set to NULL, if memory can't be allocated for the new object.

SE_FAILURE - and *new_object_out_ptr is set to NULL, if

  1. new_object_tag does not correspond to a valid, concrete (i.e., not abstract) DRM class, or
  2. the API implementation specified does not provide this function in its shared library, and dynamic binding is specified at compile time.

Prototype


extern SE_STATUS_CODE_ENUM
SE_CreateObject
(
constchar implementation_identifier[], (notes)
SE_TOKEN_ENUM new_object_tag, (notes)
SE_OBJECT *new_object_out_ptr (notes)
);

Parameters Notes

implementation_identifier

 identifies the API implementation
    to use when creating this object.  If the specified API can't create
    the object, then the API will return a status code indicating why it
    could not be created.  If implementation_identifier is NULL, then the
    API implementation to be used must be statically bound at compile time.

    See also SE_GetImplementationIdentifier().

new_object_tag

 the DRM class of the object being created.

new_object_out_ptr

 pointer to a variable, passed in by the user,
    in which a handle to the object being created will be placed.

Prev: Compare Object IDs. Next: Create Reference Symbol. Up:Index.