IMethodDef::CreateParameterDef
This method creates a new parameter definition and attaches it to the end of the parameter list for the particular method.
HRESULT CreateParameterDef (
VARIANT sObjID,
BSTR Name,
long Type,
long Flags,
BSTR Description,
BSTR Default,
IParameterDef **pParamDef
);
Parts
sObjID
[in]
Object ID for the parameter.
Name
[in]
Name of the parameter.
Type
[in]
Type of the parameter. This should be one of the VT_XXXX values defined by OLE Automation.
Flags
[in]
A flag that can take one of the following values. Enumerated values are defined through the IParameterDef Flags property.
PARAMFLAGS_IN = 1
PARAMFLAGS_OUT = 2
PARAMFLAGS_RETVAL = 4
PARAMFLAGS_OPTIONAL = 8
Description
[in]
Text inserted into the type library to define the parameter type.
Default
[in]
This is inserted into the type library to define the default value of the parameter.
*ppParamDef
[out]
A pointer to the IParameterDef interface that returns the newly created parameter definition.
Return Value
S_OK
The method completed successfully.
This method failed to complete successfully.