Microsoft SDK for Java

createInstance

The createInstance method of the ActiveXComponent Class contains the following signatures:

createInstance(String c)
createInstance()
createInstance(IUnknown punk)

createInstance(String c)

Creates a new instance of the ActiveXComponent class.

Syntax

public IUnknown createInstance(String c);

Return Value

Returns the IUnknown interface of the new object.

Parameters

c The CLSID (or ProgID) of the object that is created. The CLSID must be in the form "{xxx...xxx}", where x represents a numeric character between 0 and 9, inclusive.

createInstance()

Creates a new ActiveXComponent object with the CLSID that was previously set by the constructor or by the setCLSID method.

Syntax

public IUnknown createInstance();

Return Value

Returns the IUnknown interface of the new object.

createInstance(IUnknown punk)

Creates a new ActiveXComponent object using the identity of a pre-existing COM object.

Syntax

public void createInstance(IUnknown punk);

Parameters

punk The identity of the COM object.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.