Documenting a COM Object for Intellisense/Object Browser, etc - c++

A C++ (native) application I'm working on uses a COM interface for its modules.
In the .odl file there are tonnes of documentation providing information outlining the function/parameters, etc..
Between the typelib generation, and subsequent tlbimp.exe importation; the interop assembly I get back to use in .NET includes only the function/interface names and a list of their parameters and types.
I'm wondering if there is any way (format documentation in a specific way / third party applications / parameters for tlbimp.exe / ???) that I could transfer this documentation across so that it appears in the Visual Studio object browser, or even better, the .NET intellisense.
Thanks,

You author auto-completion help for a COM automation component with the [helpstring] attribute in the IDL file. Unfortunately Tlbimp.exe does not support that, there is no mechanism in .NET to embed help text inside an assembly. .NET IntelliSense use .xml files, they are normally auto-generated from the source code with the /doc compiler option. They are much easier to localize.
While it sounds feasible to auto-generate the .xml file from the type library, I don't know anybody that has tackled this yet. A starting point would be the managed tlbimp project located here.

Related

information regarding .idl files in cpp

I am working on webkit(webkit.org), an open source code browser.
While looking the webcore code i find there there are some .idl files and these idl looks different then normal cpp/c code.
I want to understand the use of .idl files and how they are useful.
IDL means Interface Definition Language. It is part of RPC (Remote Procedure Call). Search for RPC. There are tons on info on this topic..
WebKit IDL files are used to generate bindings, for JavaScript, Objective-C, and COM, so programs using WebKit can get at the DOM from those languages.
For example, the JavaScript bindings expose DOM to scripts in web pages, while the Objective-C bindings exposed DOM to programs on Mac OS X.
You can find details of what are WebKit IDLs and how to use in this link.

Referencing a .net 4 library via COM in vs2005

I have a visual studio 2005 c++ project (that uses QT framework). I would like to reference and use a .net 4 library that I have via COM. I know that if I have a .net project (.net 2 or .net 3.5) in 2005, I cannot reference the .net 4 library but I am curious to know if I would have any issues trying to use it in a c++ project thru COM. I'm not at a point were I can create and test a proof-of-concept application yet so I was wondering if anyone else has tried this or know anything about it.
Thanks
Using COM is a fine way to get the CLR loaded so you can execute managed code. But you'll have to use COM programming techniques in the C++ code. Using Add Reference doesn't work, that's a option that's only available if you write managed code in the C++/CLI language.
One good way is to use the #import directive in your C++ code. That can load a type library and auto-generates smart pointer types and method wrappers that you can directly call in your C++ code. Generate the type library you need with the Tlbexp.exe utility or the Regasm.exe /tlb command line option. QT has built-in COM support as well, I don't know enough about it.

Visual C++ adding WSDL file

From my understanding a .wsdl file consists of an xml specification. This abstract way of defining code is then converted into usable code via some means.
I have a C++ program that I am creating in Visual C++ express. I am trying to use a .wsdl file but am unsure about how to proceed. I am presuming that somehow I can add the url of the wsdl and have the code generated automatically.
I've seen similar questions which seem to suggest that there is a way to add web reference but I have looked and cannot find this option on Visual C++ 2010 Express.
You can use WsUtil to generate client stub in C++ that you can call from your code.
I am not sure if visual studio provides such an option, having said that I think
You need a library like Apache Axis's WSDL2WS tool which will generate stubs for you by using the wsdl as input.

Read multiple files

I'm new to c++ and am trying to alter the console app code posted below to read multiple files, ideally using a wildcard extension. Can some please give me some pointers..?
http://msdn.microsoft.com/en-us/library/ms916815#odc_wssusageeventlogging_examiningtheusagelogfileformat
-----------Edit-------
What I need is how to change the code above instead of pointing it to a specific [filename.log] point it to a directory name and let it process all the log files in that directory.
--------------Tools-----
Win32 Console Application project in Visual Studio 2010 in C++
[To be run on win 32 bit platform]
Using Win32 APIs you can list the files in a directory by following this example. From there it should be relatively trivial for you to incorporate that code into your application to allow you to process multiple files as requested.
Specifically the FindFirstFile API allows for wildcard when search for files.
If you're willing to use the boost library check out
this post. If you're using something like C++/CLI then there is support in .NET for this as well (I'm assuming for now you're not using C++/CLI). If you specify the tools at your disposal maybe you can get a more directed answer.

C++ Reads/Writes XML without CLR

I know this is a very stupid question and I'm very new to C++.
I'm developing Starcraft AI, it is DLL file. I'm trying to use XML to gather some data to the bot, however whenever I build the DLL with /clr option. The bot doesn't load properly. So, my question is what is CLR and is there a way to read/write XML without using /clr build option.
Thanks so much.
The /clr compiler option enables the
use of Managed Extensions for C++ and
creates an output file that will
require the .NET Framework common
language runtime at run time.
(from MSDN)
Starcraft is probably not developed under CLR (.NET Framework runtime).
I've used the free tinyxml library from C++ code - it was quick to get running and reasonably efficient. Well, about as efficient as it's possible for XML to be, anyway.
Starcraft probably won't run .NET binaries. You would have to either write your own XML parser, which probably isn't for you seeing as you are new to C++, or find a C++ library that can do it for you.
Example of one:
http://sourceforge.net/projects/tinyxml/