vb6 xcopy deployment

牧云@^-^@ 提交于 2019-12-17 19:03:46

问题


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.


回答1:


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

EDIT The MMM website is down. I see here that the author was having trouble with their hosting and has provided another location to get Make My Manifest - download it here.

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.




回答2:


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




回答3:


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.




回答4:


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.

EDIT The MMM website is down. I see here that the author was having trouble with their hosting and has provided another location to get Make My Manifest - download it here.

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.



来源:https://stackoverflow.com/questions/270523/vb6-xcopy-deployment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!