0

I have two ocx files which i registered on my computer using regsvr32. I use them in my visual studio project by adding a reference to the COM objects, to the project.

The problem is that when I attempt to add these to a SharePoint project, when I attempt to invoke the COM object, I get the error:

"Could not load file or assembly 'Interop.TsSDKActiveX, Version=1.0.0.0, Culture=neutral, PublicKeyToken=60b2ad56e2b9ec22' or one of its dependencies. The system cannot find the file specified."

How can I work around this? TsSDKActiveX does not exist in the GAC (but in my Program Riles (x86), which is why I assume it is not finding it. Also, I suspect the fact that sharepoint likes 64 bit DLLs is a problem.

I tried to isolate the code in a separate application and invoked it through a WCF service, but this has been giving some problem due to how this COM component works. I need to eliminate the service.

Any suggestions on how to proceed?

user1365247
  • 337
  • 7
  • 17

1 Answers1

0

You cannot load 32-bit DLLs into 64-bit process, even through COM. You could possibly rely on COM to communicate across process boundaries but i dont think it applies in your case. I think your initial approach with WCF is most natural one. Expose a thin WCF endpoint that wraps the interface for the COM wrapper object in managed code and then interact with it from SharePoint using standard WCF client API. Now, if you must have state in your interaction, create a business object within sharepoint process that maintains and only makes calls to WCF as needed. What was your reason to abandon the WCF?

Roman
  • 1,177
  • 1
  • 17
  • 25