01 2015 档案

摘要:1.查看INI文件是否存在,不存在则创建INI文件 //查看是否有First.ini文件 CFileFind fd; if(fd.FindFile(".First.int")) { MessageBox("找到文件"); } else { ... 阅读全文
posted @ 2015-01-23 11:38 qq921201008 阅读(304) 评论(0) 推荐(0) 编辑
摘要:1.在Form1类中添加以下代码 private delegate void UpdateStatusDelegate(string status); private void UpdateStatus(string status) { this.t... 阅读全文
posted @ 2015-01-03 16:46 qq921201008 阅读(268) 评论(0) 推荐(0) 编辑
摘要:1. 项目右键--属性---生成--允许不安全代码2.在代码中加入unsafe关键字[DllImport("DLL.dll")] unsafe public static extern bool UsbWrite(char* WriteBuffer, int size); ... 阅读全文
posted @ 2015-01-03 15:24 qq921201008 阅读(216) 评论(0) 推荐(0) 编辑
摘要:1.将DLL复制到工程下 2.添加如下代码 阅读全文
posted @ 2015-01-03 01:18 qq921201008 阅读(179) 评论(0) 推荐(0) 编辑
摘要:静态链接库的使用方法: 示例代码:http://pan.baidu.com/s/1i303qZV 1.创建工程 2.向工程中添加.cpp 和.h 3.头文件代码 #ifdef MyDLL_API #else #define MyDLL_API _declspec(dllexport) #endif MyDLL_API int Add(int a,int b); MyDLL_API in... 阅读全文
posted @ 2015-01-02 23:17 qq921201008 阅读(228) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示