COMVariant.variantInOutFlag Method

Sets or returns the InOutFlag setting for a COMVariant object.

Syntax

public COMVariantInOut variantInOutFlag([COMVariantInOut newValue])

Run On

Called

Parameters

Return Value

Type: COMVariantInOut Enumeration
The current InOutFlag setting.

Remarks

The following is a list of possible values for the newValue parameter.

  • COMVariantInOut::IN

  • COMVariantInOut::IN_OUT

  • COMVariantInOut::OUT

  • COMVariantInOut::OUT_RETVAL.

The InOutFlag setting describes how the data that is stored in the object is treated when the object is used as an argument in the COMDispFunction.call method.

The possible values of the InOutFlag setting correspond to the values for COM Automation objects described in the Win32 SDK.

The data stored in the COMVariant object is unaffected when the InOutFlag setting is changed.

Examples

The following example creates a COMVariant object that has the InOutFlag setting set to IN, and then uses the variantInOutFlag method to change the setting to OUT.

{ 
    COMVariant var = new COMVariant(COMVariantInOut::IN); 
  
    // Change the 'var' object to be used as an out argument 
    var.variantInOutFlag(COMVariantInOut::OUT); 
}

See Also

COMVariant Class

COMDispFunction.call Method

COMVariant.new Method

COMVariant.variantType Method