http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnoxpta/htm
l/odc_comshim.asp
I have tried to get this example working several times, on several machines.
The result is that after the project is installed and MS Word 2002 is
launched, I am asked to trust my test certificate bound to the unmanaged
shim, but the managed VB.Net code does not run. If word is shut down and
restarted, I am not asked to trust the certificate regardless of whether I
chose to always trust the issuer or not.
The only departures from the tutorial I have made are:
1. I have generated a test certificate, and bound it to the unmanaged
shim as described in the article Digital Code Signing Step-by-Step Guide
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsmarttag
/html/odc_dcss.asp). I assume test certificates are OK.
2. I have instructed the setup project not to build the shim or managed
add-in, as this removes the certificate attached to the shim earlier.
3. I have tried this tutorial with auto-generated interops, and with the
Office XP PIAs.
Any advice will be very much appreciated. Even some assurance that managed
code can be trusted in office would keep me sane...
Cheer
Murray
>>>If word is shut down and
> restarted, I am not asked to trust the certificate regardless of whether I
> chose to always trust the issuer or not.
Could you check the registry and see whether the LoadBehavior has
changed\reset? If it has been reset, it could be something wrong with your
com add-in. Does your managed com add-in work without the shim?
BTW, there is a simpler shim solution:
http://msdn.microsoft.com/library/en-us/dnoxpta/html/odc_ofshim.asp (watch
out for word wrap)
Siew Moi
---
This posting is provided 'AS IS' with no warranties, and confers no rights.
Sample code subject to http://www.microsoft.com/info/cpyright.htm
"Murray" <mu...@onetel.net.uk> wrote in message
news:e59bWQfV...@tk2msftngp13.phx.gbl...
Thanks for the reply.
I am using the same machine on which the test cert was generated.
With security settings on medium and 'trust all' unchecked, I am prompted to
enable the certificate once only, the first time Word is run after
installing the add-in.
Yes, the LoadBehavior registry entry changes from 3 when the add-in is first
installed to 2 after the add-in has attempted to run once. You indicate that
this means the add-in is faulty. However the add in has not been changed,
and it ran successfully without the shim when I first started the tutorial.
So I assume I have done something wrong with strong naming or GUID
generation. It's got me stumped!
I'm looking forward to attempting the simpler solution you provide when I
next get some down-time. Thanks.
Cheers
Murray
"Siew Moi Khor [MS]" <smk...@online.microsoft.com> wrote in message
news:#UnsrkyV...@TK2MSFTNGP11.phx.gbl...
One example: let's say nothing is wrong with the managed com add-ins but the
PIAs that the com add-ins need aren't installed on the machine. This will
cause the LoadBehavior to reset from 3 to 2 because even though the managed
com add-in gets, loaded, it won't get connected as it'll fail OnConnection.
Another example: there is actually a fault with the com add-in.
Siew Moi
---
This posting is provided 'AS IS' with no warranties, and confers no rights.
Sample code subject to http://www.microsoft.com/info/cpyright.htm
"Murray" <mu...@onetel.net.uk> wrote in message
news:%23Cw9rvC...@TK2MSFTNGP10.phx.gbl...