远程调用客户端的dll? 可能吗?感觉很危险阿

解决方案 »

  1.   

    你试试这种方法能不能行
    在IE中托管.NET Windows Forms
    http://www.yesky.com/SoftChannel/72342380484755456/20030701/1711401.shtml
      

  2.   

    调用客户端dll,如果客户端是基于com的,直接使用javascript 的createobject()具体写法因为js不熟,记不清了
    如果不是,写个com组件,封装dll,再用javascript调用,
      

  3.   

    这也行吗?
    做成Web Service 
    com等差不多
      

  4.   

    hdt:您好!
       我也听说COM可以调,可是我对js不熟悉,能不能写个例子给我,谢谢!
      

  5.   


    <html>
    <head>
    <title>无标题文档</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <script language="javascript">
    function postxml()
    {
    debugger;//调试,可以不要,
    var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");//在客户端建立一个msxml组件的实例
    xmlhttp.Open("POST" , "http://localhost/postxml/5.asp" , false);//调用他的方法
    xmlhttp.Send( "<he>" + x.value + "</he>");
    answer.innerText = xmlhttp.responseXML.firstChild.xml;
    }
    </script>
    </head><body bgcolor="#FFFFFF" text="#000000">
    <input id=x size=10><span id="answer"></span>
    <input type = button value="squre" onclick = "postxml();">
    </body>
    </html>
      

  6.   

    5.asp
    <%
     if  Request.ServerVariables("REQUEST_METHOD") ="POST"    then
    SET LISTIN      = Server.CreateObject("Microsoft.XMLDOM")
    SET LISTOUT = Server.CreateObject( "Microsoft.XMLDOM")
     listin.load( Request )
     str = listin.documentElement.text
     str=Cint(str)*Cint(str)
     str = Cstr(str)
     listout.loadXML("<ddout>"&str&"</ddout>")
     Response.ContentType = "text/xml"
     listout.save(Response)
    else
    Response.Write("haha")
     end if
    %>
    上边的例子是书上的抄的基于asp的,大概是这个思路
      

  7.   

    忘了说了,客户端要安装msxml解析器,你可以从微软站点下msxml4.0,
      

  8.   

    嘿嘿,我正在搞一个同样的项目,就是要自己写一个activex控件嵌入网页,然后用javascript交互,结果通过xmlhttp提交,保证不刷新
      

  9.   

    你可以变一个com组件,在组件里loadlibray 装入dll,getprocessaddress(),找到dll的输出函数。在调用他。(好久不用c++)具体api函数记不太清楚,查一下msdn,
    还有这个dll最好放在%System32%下。
      

  10.   

    xiaha3:你好
          能不能把你做的这个东西发给我,我看看,谢谢!很急.