How do I highlight virtual functions in Visual Studio - visual-studio-2010

When I am looking at a header file I would like to be able to tell, at a glance, which functions are virtual and which are not.
Is there a way, without using add-ins as I have the Express version, that I can set this up?
For example, I have used the 'Fonts and Colors' option to change the color of member functions, local variables etc. so I can easily see at a glance which is which. I would like to do the same with virtual functions.

(Disclaimer: I work on Visual Studio, though not on Visual C/C++)
Unfortunately there is no syntax-highlighting option for virtual methods. The only thing I can suggest is that your team adopt the override specifier keyword, which was introduced in C++11: http://en.cppreference.com/w/cpp/language/override
However I don't believe there is a compiler option which makes this specifier mandatory.

Related

What are the differences between Microsoft.Office.Core.CustomTaskPane and Microsoft.Office.Tools.CustomTaskPane..?

I'm creating my first VSTO add-in for Microsoft Office, and just I realized there are two types for CustomTaskPane, and I got them crossed:
Imports Core = Microsoft.Office.Core 'Version 12
Imports Tools = Microsoft.Office.Tools 'Version 9
What are the differences..?
I understand they're in different libraries, but I was wondering what else might be different. If I look in Object Browser, the Tools version has some additional methods and functions, but otherwise seems the same. I cannot remove the Office reference, since I'm using members from it which do not exists in Tools.
They seem to be the same type, but looking at the Base Types, the Tools version makes no references to the Core version. I inadvertently crossed the two versions in my code, and it still worked. But since this is a VSTO add-in, it seems prudent to clean up the code and stick with the Tools version.
Can someone with more experience shed some light on this..?
As you noticed, the Tools version provides expanded functionality. There are a large number of Tools objects of this type, not all provide expanded functionality, however.
VSTO "wraps" objects provided by Office COM libraries so that they can be used more "natively" by the .NET Framework and, in special instances, provide additional, useful functionality not provided by the COM libraries.
As long as you don't want to use any of the expanded functionality, in theory it doesn't matter whether you use the Tools or COM Interop namespace. In practise, using the original COM version can be faster in execution.
Personally, my preference is to consistently work with the COM Interop objects unless I specifically want to work with functionality provided by the Tools.
In the case of Custom Task Panes, however, you should use the Tools namespace. This has been optimized to work with Windows Forms and WPF controls and generally integrate with .NET Framework code.

Force Visual Studio to Decorate Function Name in a Particular Way

thank you for your time.
The company I work for has a program, originally written in 1998, which does some work on a specialty system. We wrote the DLL files in house that provide the API that the program uses to interface with the system. The Windows user interface was farmed out to another company back in 1998. It was originally written for Windows 98 but we are still using it succesfully on our Win7 64bit systems (in compatibility mode).
Then along comes the need to make some changes to the DLL files. Fine, no problem. We have the code. But we don't have the code for the user interface program. So in order to continue to use the same user interface program, I need my exports to EXACTLY match the names that were exported in the old DLLs.
But the old DLLs were written in 1998 on a Borland compiler. And I'm using Visual Studio.
I need to be able to FORCE the linker to use a particular name verbatim.
For example, the function SysReg::TandemUnlock(DWORD) was originally exported decorated as #SysReg#TandemUnlock$quil.
I need to be able to match that. I though I could do it with a DEF file.
I have tried DEF file that has
EXPORTS
#SysReg#TandemUnlock$quil
did not work.
I have also tried linker option /EXPORT:#SysReg#TandemUnlock$quil=SysReg::TandemUnlock
also did not work
Any ideas how to force this?
Do I have no option but to build the DLL first and then edit the PE?
Thanks,
Josh

Can I format $CALLER like $FUNCTION (with full signature) in a Visual Studio "When Hit" Breakpoint?

I've been using trace points on C++ functions of interest to build a dynamic call graph in Graphviz. The syntax I'm using in the Breakpoint UI to do that is
"$CALLER" -> "$FUNCTION";
Unfortunately, the output isn't quite what i need, because while $FUNCTION expands to the full signature, $CALLER does not. Is there a way to get the signature of the caller in the same format as $FUNCTION? Without that, the node names on my call graph don't match. (I can get around that by removing the signatures for the callees after the fact, but that merges calls to overloaded functions, and isn't ideal.)
In VS 2010, there was a provision for invoking a macro when a breakpoint was hit. Is there a replacement for that in VS 2012 now that Macros are no longer supported?
Or is there a much simpler way to get this information? (I have the Performance Wizard, but I didn't think it had the same fidelity as the debugger, since it uses CPU sampling. And Intellitrace isn't supported for C++, so even if I had the Ultimate edition it wouldn't be an option.)
Thank you.
A good way to collect this information with Visual Studio is to use the Visual Studio Profiler in 'Instrumentation mode'. For more information, refer to MSDN.
You should be able to configure the profiler to collect the entire call-graph and C++ collection is supported.

autoexp.dat equivalent in emacs

Does anybody know if an equivalent of "auto expansion" mechanism (works with Visual Studio ) exist for emacs (used in debug mode with gdb).
In Visual Studio i can really hover over any class instance / structure and it shows me desired structure field (which i had specify through autoexp.dat).
Right now i am using .gdbinit but every time i have to type the aliases in (gdb) prompt to get the value of an struct instance. I am wondering any plugin/extension exist which can do autoexp.dat kind of work for me.
http://mariusbancila.ro/blog/2007/04/06/tweaking-autoexpdat-for-custom-types-in-vs2005
there are a number of ways to do this in Emacs. two popular ones are CEDET, which is powerful but heavyweight and can be brittle, and auto-complete combined with yasnippet, e.g. as described here, which was a bit slow for me but worked. All three can be installed with emacs 24's package facility.

Latex plugin for visual studio 2010

I am looking for a latex plugin for Visual Studio 2010 (preferably free) .
Features it must have:
Code folding
Syntax highlighting
AUTOCOMPLETION
Error Handling
I do not think there is anything available for VS.
As an alternative, I use eclipse with the texlipse plugin. It has all of the features on your list. I do not use windows but ubuntu with eclipse, R, MySQL and Sweave is sufficient to cater for all my data connection, management, manipulation, analytical and reporting needs. All the tools listed are available on Windows with sufficient connectivity to SQLserver with RODBC.
I do not think that there's anything that comes close to what you want to do. But as far as I know, you can - in principle - use Visual Studio with any programming language. If you have enough time to configure it properly.
You can create your own LaTeX-specific language service. Moreover, you would have to create own build rules.
But since I think that is too much work, I recommend TeXnicCenter, a freeware program that has syntax highlight, autocompletion and error handling. I'm not sure about code folding, but I think it does not have this.
Another freeware is LEd (LaTeX Editor), that should have all the features you like, but as far as I remember, I was not that happy with code completion.
A good choice for a LaTeX Editor is TeXWorks. You should try it, since there is no LaTeX support for Visual Studio.
Actually I think MS VS has been developed as a programmers 'editor'. Of course it's much more than just an editor, but editing (la)tex files doesn't fit into this model. So it's better not to waste the time and to try other solutions. I suggest open-source Lyx which is available on Linux and Windows (and AFAIK on Mac OS) platforms and easy to use. Just try it while waiting for other (possibly better) answers.
Visual Studio Code with LaTeX extension is available. It is free of charge as well.

Resources