[ACCEPTED]-Use OCX without registering it-regfreecom

Accepted answer
Score: 35

Yes, this can be done. You must assume 21 your application will only be deployed on 20 Windows XP (or Windows Server 2003) or later, and 19 then you can use what is called 'registration 18 free COM' to make this happen.

Essentially 17 what you do is create a manifest file for 16 the ActiveX control DLL so the Windows loader 15 & COM DLL's know what its registration 14 is without having to put that in the registry.

A 13 walkthrough of what to do is in this article 12 on MSDN: Registration-Free Activation of COM Components: A Walkthrough

"Step 6" and "Step 11 7" in that article contain everything you will 10 need.

I just tried this out on one of my 9 own C# programs that uses a Microsoft ActiveX 8 grid control (the old "MS Flex Grid") and 7 it works just fine. Make sure you create 6 a manifest file for both your application 5 and the COM DLL, and substitute the appropriate 4 GUIDs in the right places. You may need 3 to use OLEVIEW to dig out the right IDs 2 to use from the ActiveX DLL if you don't 1 have them handy.

Score: 5

Be warned that apparently using registry-free 6 COM for COM components authored in .NET 5 can randomly cause crashes on Windows XP!

Links: Stackoverflow question where 4 I learned this, Microsoft knowledgebase 3 article referred to in that question. There is 2 a hotfix but you aren't allowed to redistribute 1 it.

Score: 3

It is even a lot simplier in Visual Studio: just 7 go to References, find positions created 6 by your ocx (there should be 2, AxSomething 5 and Something) and set for both of them 4 Isolated: true in their properties. No manifestes, no 3 code. You should now distribute your exe 2 with dll file containing ocx. On your developement 1 machine, the ocx can be registered.

Score: 2

Now, there is a copy of the unreachable 33 click site solution: mmm4vb6.atom5.com/yes-update-0-12-5479.html#c 32 on web archive: http://web.archive.org/web/20140828233304/http://mmm4vb6.atom5.com/yes-update-0-12-5479.html

and the context of:

Make My Manifest

Sunday, April 31 7, 2013

Yes, An Update

While I am not as active using VB6 30 for day to day work anymore, along the way 29 my colleagues and I have needed to repackage 28 some existing applications after bug fixes 27 and just to cope with the changing Windows 26 landscape.

We've made a few changes since 25 the last version posted and things look 24 good. I decided to post this update but 23 please note that it has not been tested 22 as thoroughly as most of the earlier releases!

So 21 be sure to test your MMM'ed applications 20 packaged using MMM 0.12 thoroughly before 19 releasing them.

See the Change Log (Related\MMMChangeLog.txt) for 18 details. Here are the notable changes though:

Another 17 attempt to improve/correct the DPI-Aware 16 node of the manifest. A change to TLB handling 15 to prevent them from being included. TLBs 14 are not normally needed at runtime. If 13 you do need to include them add them yourself 12 via Add Files or copy them to the target 11 folder afterward. An attempt to cope with 10 Microsoft patches that ended up causing 9 "duplicate" coClass entries in 8 MMM's manifests. Better (we hope) handling 7 of non-creatable classes contained in some 6 VB6-supplied OCXs. I hope this addresses 5 some concerns you too may be facing in these 4 areas. And of course I hope this version 3 doesn't break anything or make things worse 2 in some way.

Get the new version by downloading:


Posted 1 at Sunday, April 7, 2013 02:59 PM ...

Score: 0

After 10 hours of searching how to run VB6 6 app with OCX on Win7 without registering 5 it and admin rights, I found few click solution 4 here : http://mmm4vb6.atom5.com/yes-update-0-12-5479.html#c

Need to check Embed Manifest to make 3 it work. Works as charm !

I do post solution 2 here, because I also found this question 1 here.

Score: 0

I converted an ocx to dll by

  • opening the "Developer Command Prompt for VS 2019"
  • calling "tlbimp filename.ocx"

then I imported 2 the resulting filename.dll as reference 1 in my project.

Reference: https://docs.microsoft.com/en-us/dotnet/framework/tools/tlbimp-exe-type-library-importer

More Related questions