This document is archived and information here might be outdated.  Recommended version.


IGpDispatch.CreateObject Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Geoprocessing)  

IGpDispatch.CreateObject Method

Creates a geoprocessing object that can be used in a scripting environment.

[Visual Basic .NET]
Public Function CreateObject ( _
    ByRef pObjectName As Object, _
    [ByRef pExtraArg As Object] _
) As Object
[C#]
public object CreateObject (
    ref object pObjectName,
    ref object pExtraArg
);
[C#]

Optional Values

pExtraArg   To indicate that this parameter is undefined, first define a variable object Missing=Type.Missing; then pass this in as ref Missing.
[C++]
HRESULT CreateObject(
  VARIANT* pObjectName,
  VARIANT* pExtraArg,
  IDispatch** ppObject
);
[C++]

Parameters pObjectName [in] pObjectName is a parameter of type VARIANT pExtraArg [optional] pExtraArg is a parameter of type VARIANT
To indicate this parameter is undefined pass a reference to a VARIANT with type VT_ERROR and scode value of DISP_E_PARAMNOTFOUND. ppObject [out, retval] ppObject is a parameter of type IDispatch*

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

See Also

IGpDispatch Interface