Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
tools
vsnet.act
vsnet.debugging
vsnet.documentation
vsnet.enterprise.tools
vsnet.general
vsnet.ide
vsnet.jlca
vsnet.servicepacks
vsnet.setup
vsnet.vsip
vsnet.vss
vsnet.vstools.office
vstudio.development
vstudio.extensibility
vstudio.general
vstudio.helpauthoring
vstudio.setup
vstudio.sourcesafe
  
 
date: Wed, 2 Jul 2008 12:00:22 +0200,    group: microsoft.public.vstudio.extensibility        back       


VCCodeVariable   
Hello NG,

I started to learn the basics of the C++ code model and am stuck with most 
VCCode* interfaces, especially VCCodeVariable. According to the MSDN, the 
following code should display all variables of the current solution:

Sub GetAllVars()
    Dim vcCM As VCCodeModel
    Dim vcVar As VCCodeVariable
    vcCM = DTE.Solution.Item(1).CodeModel
    For Each vcVar in vcCM.Variables
        MsgBox(vcVar.DisplayName)
    Next
End Sub

But no matter which solution I have loaded, the array vcCM.Variables seems 
to be empty and no variable name is displayed.

I even added some global variables to some projects, but still none of them 
is displayed.

What is the problem...?

Regards,
Marc
date: Wed, 2 Jul 2008 12:00:22 +0200   author:   Marc Weichhold

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us