PDA

View Full Version : Solved: Run-time Error 70 creating application object in Windows 7



ofellguth
07-28-2010, 05:21 PM
I have a C++ application that has an automation interface accessible via Visual Basic. I've added the app's type library as a Reference, and the application object is initialized using the following code (this is in Excel):

dim erapp as ERStudio.Application

set erapp = New ERStudio.Application


This works fine on Windows XP, but on Windows 7 when it tries to create the new object I get a "Run-time error '70': Permission Denied" error.

Does anyone know why this might occur? I tried disabling the UAC, and I tried running under the Administrator account (actually logged in as Administrator, not using the file context menu), but no luck. I also tried CreateObject method of creating the object, but that made no difference. I checked the registry and the app and CLSID are registered properly.

Any help would be greatly appreciated. Thanks!

ofellguth
07-28-2010, 06:57 PM
I figured it out! The app was actually not registered properly. In the LocalServer32 key in the CLSID key didn't include the executable name. It only had the app directory. We seem to be having issues registering the app on Windows 7, but that's for us to figure out.

Simon Lloyd
07-28-2010, 07:00 PM
Thanks for posting back! :)