PInvoke runtime error when deploy Word Addin

Add-in Express™ Support Service
That's what is more important than anything else

PInvoke runtime error when deploy Word Addin
PInvoke runtime error when deploy Word Addin 
Dustin Burke




Posts: 1
Joined: 2007-06-29
I'm creating a Word Add-in which depends on an unmanaged dll that I wrapped with SWIG ("Simplified Wrapper Interface Generator"). Essentially SWIG generates a managed c# wrapper of an unmanaged dll that uses P/Invoke. The add-in runs as expected on my machine when I use the "Register ADX Project" feature. However, P/Invoke fails with a runtime exception when I deploy the addin to another machine using the Setup installer project. I made sure to add the unmanaged dll to the Program Folder in the Setup project and I've verified that the unmanaged dll is alongside the dll of my addin (in "c:/Program Files/company/addinname/" where the addin is installed). Any ideas why P/Invoke is failing? I'm not using either the adx loader nor the shim (to avoid having to sign my assemblies). Could this have something to do with it? Why isn't the addin's installed directory in the search path for P/Invoke?

Thanks in advance, Dustin
Posted 29 Jun, 2007 13:19:01 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Dustin.

Where the unmanaged dll is located on the development PC?



P.S. We always do our best to answer your forum requests as soon as
possible. However, we apply the rule "first in first out" with Premium
Support Service subscribers taking priority. Please understand it may take
us some time to do research on the issue. Please be assured we will let you know as soon as the best possible solution is found.

Posted 29 Jun, 2007 17:44:29 Top