How to view library functions of c++ in visual studio? - c++

Without downloading or accessing the internet, is there a way to view all library functions in visual studio? Let's say i forgot what the sort() function is named as, but i know it is in "algorithm.h"; Without opening the header file itself, does visual studio offer a cleaner way of viewing those functions?

Related

Two dlls breaking project

There is a project in Visual Studio that simulates physics. It uses some functions from the library gsl. I wrote a C++ plugin my plugin.dll to call functions from this project inside Unity. It acts as an interface, where you pass parameters and it calls the project' functions.
Initially the Visual Studio build was generating only myplugin.dll and C# was calling the C++ functions just fine. Probably because the functions it was calling didn't use the gsl functions.
After I added more functions, some of them had to use things from gsl, so when I generate the build, one more file (gsl.dll) was generated.
When I drag all build files (from the x64/Release folder) to Unity Assets folder and run my project, it breaks, giving me this error:
I'm pretty sure the problem is the need of this extra gsl.dll. The functions work fine while testing inside visual studio, so I guess gsl is fine. How can I approach this problem?

How do I utilize Visual C++'s code model outside of Visual Studio?

I would like to build a tool that takes a set of C/C++ headers and macro definitions and outputs a list of visible types, functions, variables, and macros, preferably with full type information. At first, I thought about using the Clang APIs, but I primarily wanted to use this tool on the Windows SDK headers and I would probably need to pre-process them to get Clang to parse them correctly. The C++ parser in Visual Studio already extracts the information I need, so it would be nice if I could just use that.
Is it possible to do something like that without writing a Visual Studio extension?

How to use ActiveX dll in win32 C++ project visual studio 2010

Background: Vendor has provided me ActiveX Dll, no header files or .tlb file or anything such.
I am using Visual Stdio 2010 and using win32 C++.
The problem I am facing is how to load or reference dll?
I cannot reference the dll through solution explorer because it is unmanaged project.
When I try to use #import, it give me compile error saying XXX.tlb file not found. But I don't have .tlb type file.
The other option I tried was to open the dll with OLE viewer and copy the dll definitions and then paste in .idl extension file I created with Visual Studio. Then I executed midl on the idl file to create .h file but that did not help either. When I try use the classes, its gives me "abstract classes cannot be used or referenced" error.
There are other questions asked on the matter but not straight forward and the answers are not marked as answered or upvoted.
I want to know what are the different methods available to load the ActiveX dll in win32 C++ project in visual studio 2010 and which one should be preferred when? If there is a thread that actually addresses my issue please point me to that.
Thanks
If you are able to see the interface definitions using OLE View it means that the type library is embedded into the dll resources. So if you use #import "YourActiveX.dll" it should work.
You need
Register the COM (Active X) component in windows using regsvr32 : regsvr32 my_dll.dll
Then use COM to interact with the component. This is a good tutorial.

Using Visual studio .ncb file for reflection

I am developing visual game level editor in C++.
For this I want reflection(RTTI) mechanism to know class attributes at runtime.
I am currently using PDB files for this.But using PDB I couldn't retrieve actual code line for extra information in commented format which is given for that attribute.
Visual studio uses NCB files for intelligence.
So will it be better idea to use NCB instead PDB?
If yes,How to retrieve information from NCB files?
Is there any SDK like DIA SDK?
The NCB file format isn't publicly documented and changes with every version of Visual Studio. With the upcoming VS2010 (due out in about a week and a half), it's going away entirely in favor of a new SQL-based format that should be much easier to work with. Microsoft is also implementing an API for integrating with the Intellisense data from the parser.
I really wouldn't rely on the .ncb files for reflection. Those files are meant for intellisense, and only intellisense. They could change without warning, not be up to date, or what have you...
You could do some macro hackery to get the reflection you seek (something like push your variables/methods into some container, and declare it simultaneously)... or use a framework like Qt (which is what I've been using for my level editor).

Automatic generation of function stubs

Is there any Visual Studio add-on (or windows/unix stand-alone program) that creates stub implementations in the cpp file for the functions (including class member functions) that are defined in the header file?
I have the same problem before and now I am using trial version of Visual Assist X. The task mentioned can be done by right clicking on the method name -> Refactor -> Create Implementation and then Refactor -> Move Implementation to CPP file.
I am no Visual Assist X's affiliate or what, but this really increases my coding speed with Visual C++ dramatically.
Refactor! for C++ works with Dev Studio 2005 and 2008. The free version "kind-of" let's you do this; if you type your stub method in your header file (by typing something like void Foo(int bar){} instead of void Foo(int bar);) you can then "Move method to source file."
The full version has many more features but I'm not familiar with their usage.