asp如何调用C# .NET生成的DLL文件

来源:百度知道 编辑:UC知道 时间:2024/06/30 05:09:58
如何在ASP中调用。NET生成的DLL文件,如果可以调用的时候。这个类库DLL要如何作才能可以。
在VS2008中。
不要直接复制网上搜索的。我都已经试过了。在VS2008中我没有成功。如果你成功了。你说一下你是怎么成功的。请不要复制网上的。可以吗?谢谢了

最好是C#代码。还有就是下面这位兄弟发的。[DllImport("user32.dll", EntryPoint = "SetCursorPos", CharSet = CharSet.Auto)] 为什么要引用这个?

可以不可以得看那个dll怎么写的,你搜索一下.net 标准COM 的知识!我以前回答过这样的问题!
就是说.net写的DLL必须写成标准的COM才能给其他JAVA ASP调用。要不.net的DLL只能给.net自己调用!
namespace mytest
{
[Guid("E8AED3AE-5CEB-4c81-8E3C-A1BA3FAC8440")]
//Guid在工具里生成
public class SPPCryptCom
{

public SPPCryptCom()
{
myapi = new CriptAPI();
}

/// <summary>
/// test method,use to verify if this com is ok.
/// </summary>
/// <param name="whatyouwantoencrypt">s tring</param>
/// <returns>what you passed in</returns>
[DispId(1)]
//COM入口地址
public string hello(string whatyouwantoencrypt)
{
return "hello!,you want to crypt:" + whatyouwantoencrypt;
}}
再加一个强签名!
我就回答这里了。自己查找!
}

只是一个方法 我要调用系统的DLL罢了!

在bin里 添加引用 不好用么。。添