我参考过这篇文章:
http://search.csdn.net/Expert/topic/2559/2559637.xml?temp=.1949121
但是经这么转换后形成的是com组件,在.net里就不能被使用了!谁有好办法,谢谢!

解决方案 »

  1.   

    1) Create a class library in VS choose whatever language you want either Vb.NEt or C#
    2) Goto to Project Properties->ConfigurationProperties->build, check the Register for Com Interop checkbox. This creates the COM wrapper for your .NET assembly and hance need not use regasm.
    3) Write whatever code you want, expose the classes publicly, expose the properties, functions you want publicly.
      

  2.   

    Creating a .net com component
    1) In your .net project, select project/properties/configuration properties
    select the build tab and check the box "Register for COM Interoperability"In the .NET class add the following attributes for VB.NET:
    Declaration:
    Imports System.Runtime.InteropServicesAbove the class definition add the following attribute:
    <comClass()>Above each method call add the following attribute:
    <comVisible(True)>Build copmonent using RegAsm.exe:
    RegAsm dllfilename.dll /codebase
      

  3.   

    http://www.codeproject.com/dotnet/cominterop.asp
      

  4.   

    我发现只要在.net项目的属性-->配置属性-->生成-->为com interop注册,这项选true就可以了,但问题是,我要把这个dll部署到其它没有装vs2003的服务器上,应该怎么做呢??