开发者

How to invoke a COM DLL from Sharepoint

I am trying to invoke a COM dll (ReqPro) from an EventListener in SharePoint. But it says that it can not find the assembly. So I wrote a wrapper assembly refering to the COM dll and put it in GAC. But the same problem is persisting. Please guide me. I am new to SharePoint.

I am basically using the Inter开发者_StackOverflow中文版op.Reqpro40.dll to call the reqpro40.dll (the actual library). The issue is that it seems that the host application (SharePoint) expect the assemblies in the GAC, but it can not.


Assuming the COM dll is registered you should be able to use Add Reference in Visual Studio to create the Runtime Callable Wrapper (RCW) assembly (http://msdn.microsoft.com/en-us/library/xwzy44e4.aspx). You should then be able to use the COM dll during development.

For deployment, make sure the RCW is setup to be included in the solution package (http://blog.sharepointdevelopment.nl/post/Add-an-assembly-to-your-Visual-Studio-2010-SharePoint-Package.aspx). You'll also need to make sure the COM dll is properly installed and configured on the servers in your SharePoint farm.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜