或者怎么调用静态链接库文件 .lib ??谢谢!

解决方案 »

  1.   

    我再网上找了半天也没找到,谁知道啊?帮忙啊!
    据说可在vc++.net中将静态库编译成动态库就可在c#中用了,可我没用过vc++.net啊,且任务时间又紧,望知道的兄弟们给个步骤。如能有示例就更好了。
      

  2.   

    Suggest you see the MSDN, having a lot of example concerning this aspects inside
      

  3.   

    可以
    参考msn
    介绍:
    ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.2052/dv_evtuv/html/etconplatforminvokesupport.htm
    example:
    ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.2052/dv_evtuv/html/etconplatforminvokewrapperexample.htm
    class AlertClass
    {
        [DLLImport("ALERT.DLL", EntryPoint="DoAlertRequestThunk"]
        private static extern int DoRequestThunk(String RequestName, int Count);    public static int DoRequest(ref AlertRequst Req)
               {
                   return DoRequestThunk(Req.RequestName, Req.Count);
               }
    }
      

  4.   

    to  billqi(bill):
      你所说的是调用动态链接库吧!我现在要调的是lib文件,不是dll文件!
      

  5.   

    a dll is loaded into your process, so you can call the API directly, but an exe needs to reside in another process, how are you supposed to call a function in another process? 
      

  6.   

    to  saucer(思归)老大:
      开始搞错了,发贴发成调用exe文件了。现在的问题是我们要将第三方厂商的验证集成到我们的系统中,而他们提供的开发库是一个lib文件(静态的链接库),不知道怎么在asp.net中调用?
      

  7.   

    DllImport works with LoadLibrary, if they provide 静态的链接库, you canot call it, consider to write a DLL wrapper
      

  8.   

    to saucer(思归):
      老大,怎么在.net下将静态链接库封装到一个DLL中,请给小弟指点一下!
      

  9.   

    use C++ or whatever language your vendor supports
      

  10.   

    用中文说就是用VB中转一下,将这个lib变成dll
      

  11.   

    use visual studio, create a dll project, expose the functions as is, but call the related functions in the statically linked lib