谢谢楼上各位,但还是不行啊,我用project->add reference->com加入我用vc6写的dll——ForCSharp.dll时,弹出了出错对话框,写着: A reference to "D:\c#\ForCSharp.dll"could not be added.This is not a valid assembly or com component.Only assemblies with extention 'dll' or com component can be referenced .Please make sure that the file is accessible and that it is a valid assemblies or com component.小弟实在不懂,ForCSharp.dll不是做成com的,是不是必须要做成com才可以添加引用啊,用vc++6做的非com的dll是不是要在.net 下经过一些转换啊,困惑中,望高手指点
然后在你的程序开始处使用using 语句
方法声明如果DLL中有多个函数要使用,那么上面的代码要重复多次。
.Please make sure that the file is accessible and that it is a valid assemblies or com component.小弟实在不懂,ForCSharp.dll不是做成com的,是不是必须要做成com才可以添加引用啊,用vc++6做的非com的dll是不是要在.net 下经过一些转换啊,困惑中,望高手指点
http://blog.csdn.net/zhzuo/archive/2004/04/26/22031.aspx