zoukankan      html  css  js  c++  java
  • MFC DLL的创建

     

    MFC DLL的创建

     

    关键点

     

     

    实现过程

     
     
    1.创建1个 MFC AppWizard(dll),Project name:project01
    2.选中 Regular DLL using shared MFC DLL.单击Finished完成。
    3.在project01.cpp中加入自定义的函数,代码如下
     
    1
    2

     

     

    // project01.cpp : Defines the initialization routines for the DLL.  

    CProject01App theApp;
    int add(int x,int y)
    {
        return x+y;
    }
     
    int sub(int x,int y)
    {
        return x-y;

    }

    函数导出

    ; project01.def : Declares the module parameters for the DLL.
     
    LIBRARY      "project01"
    DESCRIPTION  'project01 Windows Dynamic Link Library'
     
    EXPORTS
        ; Explicit exports can go here
        sub
        add

     

       


     

    备注

    只导出函数名字,而不包括参数

     

    相关链接

    MFC DLL的调用                           

     

     




    附件列表

    • 相关阅读:
      Logstash收集Tomcat日志
      Logstash收集日志
      ELK搭建&Logstash 日志收集
      ELK介绍
      中文分词器
      ES数据备份与恢复
      Python开发之路
      Linux阅读目录
      333
      22222222
    • 原文地址:https://www.cnblogs.com/xe2011/p/2923674.html
    Copyright © 2011-2022 走看看