Problems with ActiveX after deployment
Hello,
I have a VS2005 VB ActiveX class library (phew!) in which I am writing code to synchronise outlook with owr own application.
I have a vB6 testharness which does a createobject refering to the .net dll and invoking a function.
Inside the net dll I access outlook via a com reference.
everything is working fine on my dev machine where I have VS2005.
However on a test machine which has office and the redistributable net 2 framework
when I deploy the software (via a VS2005 deployment project) and invoke the dll via my testharness I got
429 "ActiveX Component Can't Create Object"
So I tried to regasm the dll's (including the interop.dlls in my deployment package)
I got the error -2147024894 when I ran it.
Any ideas - do I need permissions.
Is there any inteops or stuff I need for office that isnt delievered?
basically HELPPPPPPPPPPPPPPPPPPPPPPP!!!!!!!
Thanks
ok sorted it
it seems that the deloyment project did not register the dlls with a codebase entry and so the pc didnt have a clue where to find the dll
I have done a manual Regasm /unregister folled by a regasm / codebase and this seemed to fix the issue
anyone know how to make the deployment project do that?
ta
Thanks for posting this info. I'm glad you were able to narrow it down.
Yes, you can run the equivalent of regasm in a setup project. Please try this:
1) click on the appropriate DLL, get properties, set Register = vsdraCOM
2) click on the appropriate TLB (corresponding to the DLL in step 1), get properties, set Register = vsdraCOM
Step 1 ensures that the DLL types are callable at runtime from a COM host. Step 2 ensures that VB6 and COM loaders can understand the type definition and interfaces, so it can do things like display Intellisense.
Note: you'll want to ensure that VS can always find the DLL and dependencies or else you'll entounter subtle errors. E.g. VS would be unhappy if you moved the projects or files and it can't find the DLLs and TLBs anymore.
I hope this does the trick.
Best,
Paul