COMShim wizard with CustomTaskPane and seperated usercontrol dll

B

BatKing

Hi,

I am facing a problem with COMShim wizard 2.3.1. I have a PPT add-in which
implements ICustomTaskPaneConsumer. Everything works fine until I use COMShim
Wizard to wrap my managed add-in. everytime I start PPT, it will give me a
error says "Unable to create specified ActiveX control." and my add-in is
half baked in PPT (i.e. the custom task pane won't show but the iRobbin
button for my add-in shows).


the CustomTaskPane uses a usercontrol which I created in a different DLL
with C#. So I guess my problem here is I have 2 dll files both in managed
code. one is the addin.dll and one is control.dll. When I use COMShim wizard,
I targeted the addin.dll.

my add-in works if I build the control.dll then addin.dll project within my
solution. but if I build my addinShim project then I will get the error I
mentioned. I guess building the addinShim project will override the addin.dll
registration. but it seems the problem here is my control.dll. what should I
do with it?

I had tried to run regasm.exe on the control.dll but no luck.
I had copy all the control.dll and control.tlb file into the addinShim's
$(TargetDir) but still won't work.


I have another outlook add-in which don't use the CustomTaskPane and without
a 2nd usercontrol dll file, then the Shim created by COMShim wizard works fine

Any help is appriciated

Thanks.
 
K

Ken Slovak - [MVP - Outlook]

Can you add the UserControl as a source module to your addin project? You
shouldn't have a problem then.
 
B

BatKing

Yes this will work but will be a nightmare to manage a big add-in project
with multiple dll files? What is the correct way to do this if I have
multiple projects in my add-in solution with multiple objects?

Also this seems this problem only isolated to my development machines. I
created a setup project. I set the usercontrol.dll and shim.dll both to
vsdrpCOM. addin.dll and ManagedAggregator to vsdrpDoNotRegister, then it
seems working fine on target deployment machine.

Thanks.
 
K

Ken Slovak - [MVP - Outlook]

Those settings for the aggregator, addin dll and shim dll are all required
for shimming to work correctly. If that was your only problem then just set
up those registrations. You'd need them set that way with or without that
usercontrol.dll in the project.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top