上一页 1 2 3 4 5 6 ··· 15 下一页

2023年7月31日

C# 获取XML文件内容的多种方式

摘要: C# 获取XML文件内容的多种方式首先设定有一个xml文件Configs.xml,其内容如下: <?xml version="1.0" encoding="utf-8" ?><Config> <Device name="aaa"> <Type name="a01" func="1"></Type> 阅读全文

posted @ 2023-07-31 15:36 wu.g.q 阅读(713) 评论(0) 推荐(0) 编辑

VC6.0 dll debug

摘要: 现象是用 debug中的 step info或者run to cursor合着设置断点会出现One or morebreakpoints cannot be set and have been disabled. Execution will stopat the beginning of the 阅读全文

posted @ 2023-07-31 10:22 wu.g.q 阅读(37) 评论(0) 推荐(0) 编辑

2023年7月28日

C#与C++动态链接库DLL参数互传

摘要: C#与C++动态链接库DLL参数互传一、C#中导入C++动态链接库二、C#传入字符串参数三、C++传出字符串参数四、C++传出vector一、C#中导入C++动态链接库从界面程序开发的角度来说,C#语言效率较C++高,且通过WPF开发出的程序界面更为美观,但在开发实际项目中有时不可避免的需要使用C+ 阅读全文

posted @ 2023-07-28 17:42 wu.g.q 阅读(782) 评论(0) 推荐(0) 编辑

C#调用C/C++动态库dll异常:对 PInvoke 函数调用导致堆栈不对称问题

摘要: C#调用C/C++动态库dll异常:对 PInvoke 函数调用导致堆栈不对称问题 雨渡石桥 已于 2023-02-21 12:04:29 修改 973 收藏 1文章标签: windows c++ c#版权结论:如果你是用C#调用C的动态库,如果出现“对 PInvoke 函数调用导致堆栈不对称问题” 阅读全文

posted @ 2023-07-28 17:39 wu.g.q 阅读(318) 评论(0) 推荐(0) 编辑

C#动态调用C/C++的DLL

摘要: C#调用C/C++的dll有两种方式,下边就写一下两种不同方式的调用方法。 1.DllImport方式[DllImport("CalcDll")]public extern int Add(int a, int b);其中CalcDll为C++动态库,Add为动态库中的方法,使用DllImport引 阅读全文

posted @ 2023-07-28 17:38 wu.g.q 阅读(382) 评论(0) 推荐(0) 编辑

2023年7月27日

非托管代码(C++)转托管代码(转换类型对应关系)

摘要: 本以为这篇搜集整理的代码会是很不错的文章,花了一天时间,搜索到最后居然出来一篇叫做"C# 与 C++ 数据类型对照表"的文章.几乎囊括掉和大部分的数据了,太打击a56爆大奖在线娱乐了. a56爆大奖在线娱乐中有部分的数据没有测试.也有一些不错的是看了上百篇网文对比整理得来的.希望有帮助. /C++中的DLL函数原型为 //exter 阅读全文

posted @ 2023-07-27 10:17 wu.g.q 阅读(150) 评论(0) 推荐(0) 编辑

2023年7月21日

wpf 子窗口调用主窗口控件

摘要: 子窗口: public delegate void RowSelectedHandler(); //首先在子窗口定义委托 注意,此委托定义在NameSpace下,不要定义在Class内,只有定义在NameSpace下的委托才会父窗口被找到 然后在子窗口下定义委托事件: public event Ro 阅读全文

posted @ 2023-07-21 09:32 wu.g.q 阅读(105) 评论(0) 推荐(0) 编辑

2023年6月10日

Wpf DataGrid 'Refresh' is not allowed during an AddNew or EditItem transaction.

摘要: DataGrid对象.CancelEdit(); DataGrid对象.CommitEdit();DataGrid对象.Items.Refresh(); 阅读全文

posted @ 2023-06-10 13:28 wu.g.q 阅读(62) 评论(0) 推荐(0) 编辑

2023年6月7日

C# 获取本地磁盘驱动器、U盘、共享目录所在驱动器的大小

摘要: string filePathRoot = Path.GetPathRoot(fileName); if (!filePathRoot.EndsWith("\\")) { filePathRoot = filePathRoot + "\\"; } DriveType driveType = (Dri 阅读全文

posted @ 2023-06-07 15:24 wu.g.q 阅读(245) 评论(0) 推荐(0) 编辑

2023年6月6日

C# MemoryStream转GZipStream 到文件

摘要: 压缩: public static void MemoryStreamCompress(string fileName, MemoryStream memStream) { FileStream fsWrite = File.OpenWrite(fileName); byte[] bytes = n 阅读全文

posted @ 2023-06-06 15:03 wu.g.q 阅读(46) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 ··· 15 下一页

导航