VSL vs. COM Addin Shim

B

Brian

OK, I'm interested in how everyone feels about COM Add-ins vs VSL's. I've
spent the last two months getting my COM Add-in to work only to get to the
end and think that I need to switch to a VSL.

I avoided VSL's because I didn't want to write anything that had to
communicate through C++, since I'm not that good at it. So, I went down the
managed Addin road. Now that I'm here and getting my code out to some users
machines I found that my code won't run. I isolate this down to a users
computer with a high security setting (forced by their IT department) and
find that managed Addins are called in through the mscoree.dll, which is a
Microsoft dll used for calling managed addins. This dll is not signed so
when the security is high, no managed addins run unless they're signed. How
to get around this? There's a very well documented C++ "Shim" that you use
to call your dll (very good article at
http://msdn.microsoft.com/library/d...ry/en-us/dnout2k2/html/odc_outlookcomshim.asp).
You get the C++ sample code, a $400 verisign certificate, compile things,
sign it with a verisign cert, and now avoid the security dialogs. This
actually works but this new "Shim" has HORRIBLE performance. Before the shim
I click on a button to draw some stuff and it's under a second. Now it takes
28 seconds!? I've isolated it down to setting cell values...

Is there some horrid marshalling that happens now because the code is signed
or because I'm going from unmanaged to managed code? You'd think that this
would be more efficient, not less.

Now that I'm having to depend on a C++ project to communicate with my code
I'm thinking I might as well do a VSL now...

Any opinions on this from anyone?

Brian
 
P

Paul Herber

I avoided VSL's because I didn't want to write anything that had to
communicate through C++, since I'm not that good at it.

VSLs can also be written in Delphi, perhaps a much easier route for
you than C++. Try the Delphi VSL Framework at

www.diagramantics.com
 
A

Al Edlund

Suggest you investigate Graham Wideman's excellent book "Visio 2003
Developer's Survival Pack". He has some great utilities to help in this
area. Even though I am NOT a DotNet advocate, the V2003SDK has some nice
add-ins to help in this area also.
Al
 
B

Brian

Thanks for the responses! We have to use .Net, C++, or VB6. Another
developer is using c# communicating with the drawing control and we've got
all the MS tools. I have Graham's excellent book and was going to try the
VBVSL route but the last time I checked the adapter was in beta.

I'm thinking there's something wrong with the shim that I have from the
article. I tried it with and without code signing as well as release and
debug for both; neither made any difference. It's funny that with and
without the shim (mscoree.dll vs. shim) there is such an incredible
performance gap, which makes me think there's something wrong with the C++
shim code. I was able to use SetFormulas instead of setting each cell and
that made a big difference but it's still not good enough. Is there a C++
guru that wants to look at this? Maybe we could turn it into a
"best-practices shim with Visio 2003 article". The big issue I think is just
getting something that you can sign to avoid the security issues. The only
hurdle I see is performance with what I've got.

Brian
Email me if you're interested - brian dot webb at gmail dot com
 

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