Jaa


COMVariant.createFromCOM Method

Definition

Overloads

createFromCOM(COM, COMVariantInOut)
createFromCOM(COM)

Creates a new COMVariant object and initializes it with a COM class in one operation.

createFromCOM(COM, COMVariantInOut)

public:
 static Dynamics::AX::Application::COMVariant ^ createFromCOM(Dynamics::AX::Application::COM ^ _value, Dynamics::AX::Application::COMVariantInOut _inOutFlag);
public static Dynamics.AX.Application.COMVariant createFromCOM (Dynamics.AX.Application.COM _value, Dynamics.AX.Application.COMVariantInOut _inOutFlag);
static member createFromCOM : Dynamics.AX.Application.COM * Dynamics.AX.Application.COMVariantInOut -> Dynamics.AX.Application.COMVariant
Public Shared Function createFromCOM (_value As COM, _inOutFlag As COMVariantInOut) As COMVariant

Parameters

_value
COM

A flag that determines whether the object can be used to pass data to a COM method or COM property, to receive data, or both. This parameter is optional. Possible values are:

_inOutFlag
COMVariantInOut

A flag that determines whether the object can be used to pass data to a COM method or COM property, to receive data, or both. This parameter is optional. Possible values are:

Returns

Applies to

createFromCOM(COM)

Creates a new COMVariant object and initializes it with a COM class in one operation.

public:
 static Dynamics::AX::Application::COMVariant ^ createFromCOM(Dynamics::AX::Application::COM ^ com1);
public static Dynamics.AX.Application.COMVariant createFromCOM (Dynamics.AX.Application.COM com1);
static member createFromCOM : Dynamics.AX.Application.COM -> Dynamics.AX.Application.COMVariant
Public Shared Function createFromCOM (com1 As COM) As COMVariant

Parameters

com1
COM

Returns

The new COMVariant object.

Remarks

Possible values of the inOutFlag parameter are as follows:

  • COMVariantInOut::IN
  • COMVariantInOut::IN_OUT
  • COMVariantInOut::OUT
  • COMVariantInOut::OUT_RETVAL

The following example creates a new COMVariant object and initializes it with a COM object.

{ 
    COMVariant var; 
    COM com = new COM("MyCOM.Object"); 
    var = COMVariant::createFromCOM(com); 
}

Applies to