Share via


ICorDebugEval::CreateValue Method

Creates a value of the specified type, with an initial value of zero or null.

This method is obsolete in the .NET Framework version 2.0. Use ICorDebugEval2::CreateValueForType Method instead.

HRESULT CreateValue (
    [in] CorElementType     elementType,
    [in] ICorDebugClass     *pElementClass,
    [out] ICorDebugValue    **ppValue
);

Parameters

  • pElementClass
    [in] Pointer to an ICorDebugClass Interface object that specifies the class of the value, if the type is not a primitive type.

Remarks

CreateValue creates an ICorDebugValue object of the given type for the sole purpose of using it in a function evaluation. This value object can be used to pass user constants as parameters.

If the type of the value is a primitive type, its initial value is zero or null. Use ICorDebugGenericValue::SetValue Method to set the value of a primitive type.

If the value of elementType is ELEMENT_TYPE_CLASS, you get an ICorDebugReferenceValue Interface (returned in ppValue) representing the null object reference. You can use this object to pass null to a function evaluation that has object reference parameters. You cannot set the ICorDebugValue to anything; it always remains null.

Requirements

Platforms: Windows 2000, Windows XP, Windows Server 2003 family

Header: CorDebug.idl

Library: CorGuids.lib

.NET Framework Version: 1.1, 1.0

See Also

Reference

ICorDebugEval Interface
ICorDebugEval2::CreateValueForType Method
ICorDebugValue Interface