tags:

views:

29

answers:

1

Hi All, I have a c# com dll which I register to registry Using regasm . I communicate with this c# dll from a c++ exe . I use create instance to initialize the dll . when both these components are not signed digital it is working perfectly . when they are digitally signed cocreate instance fails. get last error says "Token not found" . this happens in WIN 7 ultimate and PRo where as in xp and vista it works.

+2  A: 

Do you re-register your DLLs using regasm once you sign them?

Use regedit to check the registration info at HKEY_CLASSES_ROOT\CLSID\{your-guid-here}\InProceServer32, eg:

Assembly REG_SZ YourComObjectName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=abcdfc550b465bd3

If your PublicKeyToken=null then this is the cause. To get the token from your DLL use sn.exe tool, eg: sn.exe -T path\to\your.dll

AOI Karasu