08 2021 档案
摘要:1、通过访问域名判断网络 封装函数代码: /// <summary> /// 通过访问域名判断网络 /// </summary> /// <returns></returns> public static bool IsInternetAvailable() { try { Dns.GetHostE
阅读全文
摘要:C#将录音数据文件保存为wav格式文件,这里使用到的是WavHelper工具类。 WavHelper工具类: using System; using System.Collections.Generic; using System.IO; using System.Linq; using Syste
阅读全文
摘要:C#调用C++ dll函数,如果返回值为字符串,我们使用string去接收就会报错,因为C++返回的是char*,是个指针,所以c# 要用 IntPtr 来接收。 C++: //预编译的标头 .h extern "C" _declspec(dllexport) char* demo(const ch
阅读全文