OCX Registration requiring use as a Type Library

Issues related to Enigma Virtual Box
Post Reply
tleahy
Posts: 3
Joined: Fri Mar 09, 2012 6:48 pm

OCX Registration requiring use as a Type Library

Post by tleahy » Fri Mar 09, 2012 8:11 pm

I am using Far Point Spread 8.0 as a component in my virtualized application. Normally, if I want to register this .ocx manually using RegSvr32 I need to have to run RegSvr32 with administrator rights. The reason for this is that the .ocx needs to be accessed as a Type Library in addition to the basic Com interface. I am using Delphi as a the development tool.

As things stand, I am getting an access violation when I try to create an instance of the .ocx object in my application at runtime. The "Type Library" requirement does not seem to be handled. I think some kind of additional flag has to be set in a Windows Api call. Surely using a virtual registry means that I should not need administration rights? I am pretty sure its an additional flag or parameter call setting.

Otherwise everything else works really well including firing Firebird as an embedded database (even using the Windows 8 Consumer Preview as an operating system! Brilliant!).

Thanks.

Enigma
Site Admin
Posts: 2516
Joined: Wed Aug 20, 2008 2:24 pm

Re: OCX Registration requiring use as a Type Library

Post by Enigma » Fri Mar 09, 2012 8:25 pm

Hi tleahy, thanks you for the note!

For ActiveX registration in virtual registry you should be sure the following options are enabled:
1. For all ActiveX files in the Files tree call Properties dialog and select option "Register As ActiveX" this option says to virtualization that some internal function for ActiveX initialization should be called for this file (similar like RegSvr32 does).
2. Enable Registry virtualization and make sure that at least HKEY_CLASSES_ROOT and HKEY_LOCAL_MACHINE paths are set as Virtual (path icon should be yellow). If registry virtualization is not enabled, then program will try to register ActiveX in real registry and of course will fail without administrator privileges.

If your problem is still not solved, please send us non packed sample at vbox@enigmaprotector.com and we will try to check it out.

tleahy
Posts: 3
Joined: Fri Mar 09, 2012 6:48 pm

Re: OCX Registration requiring use as a Type Library

Post by tleahy » Thu Mar 15, 2012 7:33 pm

Ah, this is a tricky one. I followed your advice and had no success but what I did then was set all other registry folders to "Real". Now the application works on Vista SP2. The cause of my latest problem is "Shdocvw.dll". This is called by a Delphi component called TWebbrowser which is instantiated on component load. I will perform a suite of tests now to see how the application performs from XP to Windows 8 CP and let you know the outcome.

Thanks.

Enigma
Site Admin
Posts: 2516
Joined: Wed Aug 20, 2008 2:24 pm

Re: OCX Registration requiring use as a Type Library

Post by Enigma » Fri Mar 16, 2012 12:14 pm

If you set registry items as Real, then ActiveX registration will fail on the Windows without administrator privileges..

This would be good if you send us non packed project at vbox@enigmaprotector.com for tests..

Also, make sure you have enabled the option Options - Map Executable Files with Temporary File.

tleahy
Posts: 3
Joined: Fri Mar 09, 2012 6:48 pm

Re: OCX Registration requiring use as a Type Library

Post by tleahy » Fri Mar 23, 2012 10:56 am

Yes you are correct, only HKEY_CURRENT_USER is set to real, the others are all virtual. Apologies for the confusion. Windows 8 CP test was a success :D.

Post Reply