Skip navigation.

CORBA Programming Reference

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents View as PDF   Get Adobe Reader

 


CreateObject

Synopsis

Creates an instance of a Current environmental object.

MIDL Mapping

HRESULT CreateObject(
[in] BSTR progid,
[out, retval] IDispatch** rtrn);

Automation Mapping

Function CreateObject(progid As String) As Object	

Parameter

progid

The progid of the environmental object to create. Valid progids are:

Tobj.FactoryFinder
Tobj.SecurityCurrent
Tobj.TransactionCurrent

Return Value

A reference to the interface pointer of the created environmental object.

Exceptions

Table 4-6 describes the exceptions.

Table 4-6 CreateObject Exceptions 

Exception

Description

Meaning

ITF_E_NO_PERMISSION_YES

Bootstrap object must be initialized

The Bootstrap object has not been initialized.

ITF_E_NO_PERMISSION_NO

No permission

If the progid specifies a transaction or security current and another Bootstrap object in the client owns the current objects.

E_INVALIDARG

Invalid progid parameter

The progid specified is not valid.

E_INVALIDARG

Invalid name

The requested progid is not one of the valid parameter values specified above.

E_INVALIDARG

Unknown object

The requested progid is not registered on your system.

<SYSTEM ERROR>

CoCreate Instance() failed

The Bootstrap object could not create an instance of the requested object. The system error is returned in the "Number" member of the error object.


 

 

Skip navigation bar  Back to Top Previous Next