zoukankan      html  css  js  c++  java
  • VC++调用C#动态链接库DLL

    #using <mscorlib.dll>
    using namespace System;
    using namespace System::Runtime::InteropServices;
    #using "D:ExerciseSampleAccessSampleReleaseaccessUpdate.dll"/* 需要调取的DLL */ 
    using namespace accessUpdate;/* 使用命名空间 */
    int _tmain(int argc, _TCHAR* argv[])
    {
                     char*p = "C:\Windows\system\NetLock.mdb" ;
                     long a = 5030201;
                     char room[32] = "8302" ;
     
                    Class1 ^myclass= gcnew Class1();
                    System::String ^aa = myclass->accessUpdate(Marshal::PtrToStringAnsi((IntPtr)( char*)p), a, Marshal::PtrToStringAnsi((IntPtr)(char *)room), true);
                    printf_s( "aa = %s ",aa);
                    system( "pause");
                     return 0;
    }
    ——Death、Mr
  • 相关阅读:
    JSON和Object数组在js中的转换
    Raphael绘制箭头arrow
    Web后台框架开发
    数据库开发
    docker
    git
    linux
    正则表达式工具
    python模拟ls命令
    python3基础
  • 原文地址:https://www.cnblogs.com/deathmr/p/5777530.html
Copyright © 2011-2022 走看看