C语言的DLL编写与调用.docxVIP

  • 4
  • 0
  • 约 9页
  • 2016-12-08 发布于贵州
  • 举报
  C语言的DLL编写与调用

C语言的DLL编写打开C语言的Microsoft Visual C++ 6.0选择file-- new ,在project选项中选择MFC AppWizard(dll),给工程起名字,选择保存路径。选择Regular DLL using shared MFC DLL,点击finish此时工程的结构图如下所示在FourthSample源文件中写上对外暴露的dll函数方法在FourthSample.def中追加对外暴露的方法名选中FourthSample.cpp,编译源文件生成dll文件注意事项:在编译源文件时可能要报以下错误,解决方法:选中该源文件,点击右键Settings,再次编译,通过。C语言调用DLL新建一个c的源文件,进行dll调用的测试源代码如下,代码中有关键词用法,请参考其他资料弹出一个对话框,说明dll调用成功。注意事项:注意将test.dll动态链接库放在该程序目录下(FourthSample.dll重名为test.dll)districts under the jurisdiction of great thanks, South of the River, River North, Mao Ta, 6 towns, less than 5 km from the enemy town of shengze, only separated by a wide

文档评论(0)

1亿VIP精品文档

相关文档