VCWizCtlClass.CppParseTypeString Method
Parses a string containing the C++ variable declaration into its parts (type, name, and initial value).
Namespace: Microsoft.VisualStudio.VsWizard
Assembly: Microsoft.VisualStudio.VsWizard (in Microsoft.VisualStudio.VsWizard.dll)
Syntax
'Declaration
Public Overridable Function CppParseTypeString ( _
bstrTypeDecl As String _
) As Object
'Usage
Dim instance As VCWizCtlClass
Dim bstrTypeDecl As String
Dim returnValue As Object
returnValue = instance.CppParseTypeString(bstrTypeDecl)
public virtual Object CppParseTypeString(
string bstrTypeDecl
)
public:
virtual Object^ CppParseTypeString(
[InAttribute] String^ bstrTypeDecl
)
public function CppParseTypeString(
bstrTypeDecl : String
) : Object
Parameters
bstrTypeDecl
Type: System.StringRequired. A string containing the C++ variable declaration.
Return Value
Type: System.Object
An object containing the parts of a C++ variable declaration.
Implements
IVCWizCtlUI.CppParseTypeString(String)
Examples
// From the ATL Add Event wizard
function ExtractParamNames()
{
var strParamNames = "";
var Params = document.all.tags("SELECT").item("PARAMETERS");
for(var index=0; index < Params.options.length; index++)
{
var strParam = Params.options[index].text;
var NamePos, NameLength;
var NameLengthPos = new VBArray(window.external.CppParseTypeString(strParam));
NamePos = NameLengthPos.getItem(0);
NameLength = NameLengthPos.getItem(1);
if(index!=0)
strParamNames += ","
strParamNames += strParam.substr(NamePos, NameLength);
}
return strParamNames;
}
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Concepts
Visual C++ Extensibility Object Model