Microsoft SDK for Java

createControl

The createControl method of the ActiveXControl Class contains the following signatures:

createControl(String clsid)
createControl(IUnknown punk)

createControl(String clsid)

Creates an ActiveXControl object that is a container for an ActiveX control. This method hosts the control specified by the CLSID (or ProgID).

Syntax

protected void createControl(String clsid) throws Exception;

Parameters

clsid Identifies the CLSID (or ProgID) for the ActiveX control. The CLSID is in the form "{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}", where "x" is a valid hexadecimal number.

Remarks

This method is used to defer the hosting of an ActiveX control, and is typically used when a control host was created using the ActiveXControl () constructor or when extending the ActiveXControl class.

Exceptions

Exception if there is an error when initializing the control.

NullPointerException if clsid is null or if the IUnknown for the ActiveX control is not valid.

createControl(IUnknown punk)

Creates an ActiveXControl object that is a container for an ActiveX control. This method hosts a control that has already been created.

Syntax

protected void createControl(IUnknown punk) throws Exception;

Parameters

punk The identity of the ActiveX control.

Remarks

This method is used to defer the hosting of an ActiveX control, and is typically used when a control host was created using the ActiveXControl() constructor or when extending the ActiveXControl class.

Exceptions

Exception if there is an error when initializing the control.

NullPointerException if punk is null.

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