views:

555

answers:

4

Can any one tell me how to convert an legacy application which is vb6 ( COM dll's ocx and exes) to use Regfree COM .

I tried opening the dlls in visual studio and created manifest file, but some of the dlls it is giving error.

Is there any tools out there which will help me to do this process?

I tried a tool from codeproject which is called regsvr42, which is not creating the manifest fully.

I used tools like PE explorer where I get all the typelib information , but converting them into manifest files is too difficult.

We have started migrating that to .NET, for some months we have to deploy it, it will easier if it is xcopy based deployment.

+3  A: 

To create manifest files you can try to use Make My Manifest from http://mmm4vb6.atom5.com/.

If you can control creation of objects you can use DirectCOM from http://www.thecommon.net/10.html

Keep in mind that if one of used DLLs or OCXs is creating other COM objects dynamically with CreateObject calls, that reference will not be stored in vbp project file and you won't get full manifest file. Probably you will have to catch object creations while the application is running. Depends.exe application can profile running application and report all used dlls. I don't know if there is tool that can find additional COM related information.

Goran Peroš
A: 

Make My Manifest can accomodate late binding as well as early binding. You simply have to add the references to the late-bound dependencies manually, by file location or by ProgId.

You might look at http://mmm4vb6.atom5.com/mmm-demo-1248.html for additional help in using the utility.

Bob
+1  A: 

There is an excellent walkthrough of what to do in this article on MSDN: Registration-Free Activation of COM Components: A Walkthrough.

Tim Farley
A: 

MakeMyManifest is well spoken of as an automatic tool for creating manifests for VB6 projects, haven't tried it myself. DirectCOM also has fans, again I haven't tried it.

There is a semi-automatic technique. You can create the manifests with Visual Studio 2008 (you can use a free version like Visual Basic Express Edition). Then make a couple of edits by hand to make the manifests suitable for use from VB6. See this section of this MSDN article for step-by-step instructions - ignore the rest of the article which is about ClickOnce.

MarkJ