![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
轮子
Frank.Ginger
coder
展开
-
windows环境C++抓取dump信息
Minidump文件生成1、Minidump概念 minidump(小存储器转储)可以理解为一个dump文件,里面记录了能够帮助调试crash的最小有用信息。实际上,如果你在系统属性->高级->启动和故障恢复->设置->写入调试信息中选择“小内存转储(64 KB)”的话,当系统意外停止时都会在C:\Windows\Minidump\路径下生...原创 2019-04-09 11:24:40 · 1851 阅读 · 0 评论 -
string转换
string、wstring、cstring、 char、 tchar、int、dword转换方法最近编程一直头痛这集中类型的转化,明知都可以转却总是记不住,不断的上网查来查去,在这里小结一下。以备以后方便使用,当然有些方法可能不是最新的,或者最简单的,但是对于自己已经了解的使用起来应该方便的多:1》string转wstringwstring s2ws(const string&...转载 2019-06-20 10:35:03 · 522 阅读 · 0 评论 -
C++使用HTTP上传
#include <stdio.h>#include <string.h> #include <curl/curl.h> int main(int argc, char *argv[]){ CURL *curl; CURLcode res; struct curl_httppost *formpost=NULL; struct ...转载 2019-04-09 17:26:30 · 2368 阅读 · 0 评论 -
获取计算机的网络信息
BOOL GetNetInterFaceInfo( ){ HINSTANCE hIphlpapiDll = NULL; hIphlpapiDll = ::LoadLibrary(_T("C:\\Windows\\System32\\Iphlpapi.dll")); if(hIphlpapiDll == NULL) return FALSE; PIP_INTERFACE_INFO ...原创 2019-05-14 16:40:15 · 331 阅读 · 0 评论 -
拆分字符串
template<typename T = std::string,typename Tout = std::vector<T>>unsigned int SplitString( const T& in, const T& sp, Tout* out ){ if ( in.empty() || out == nullptr )return 0...原创 2020-01-17 14:37:14 · 135 阅读 · 0 评论 -
替换字符串
int ReplaceAll( std::string* str, const std::string& pattern, const std::string& newpat ){ int count = 0; const size_t nsize = newpat.size(); const size_t psize = pattern.size();...原创 2020-01-17 14:45:54 · 141 阅读 · 0 评论 -
字符串转换
(1)ASCII转UNICODEvoid ConvertAnsiTounicode(const CHAR* strIn, WCHAR * wstrOut){ int nLength = 0; nLength = MultiByteToWideChar(CP_ACP, 0, strIn, -1, NULL, 0); MultiByteToWideChar(CP_ACP...原创 2020-01-17 15:12:58 · 135 阅读 · 0 评论 -
msecond
staticdoublemsecond(){#ifndefWIN32structtimevaltv;gettimeofday(&tv,0);return(tv.tv_sec*1.0e3+tv.tv_usec*1.0e-3);#elseclock_tclk;clk=clock();return(clk*1000.0/CLOCKS_PER_SEC);#endif}...原创 2021-08-02 10:34:15 · 154 阅读 · 0 评论 -
Windows C++ 常用的时间类型和函数
方案—:使用C标准库优点:提供跨平台性;缺点:只能精确到秒级;C运行库关于时间的主要函数介绍:所需头文件:#include <time.h>1. time()函数功能:获取当前的系统时间函数原型:time_t time( time_t *timer );参数:timer存储时间的内存空间;返回值:返回的结果是一个time_t...转载 2020-04-07 10:06:42 · 342 阅读 · 0 评论 -
使用 WinInte API 发送 HTTP 请求
BOOL bResult = FALSE;// 初始化WinInet 环境HINTERNET hInternet = InternetOpen("CEHTTP", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, NULL);// 打开http sessionHINTERNET hSession = InternetConnect(hInternet, "...转载 2020-04-03 16:47:53 · 253 阅读 · 0 评论 -
c++ 时间类型详解 time_t
Unix时间戳(Unix timestamp),或称Unix时间(Unix time)、POSIX时间(POSIX time),是一种时间表示方式,定义为从格林威治时间1970年01月01日00时00分00秒起至现在的总秒数。Unix时间戳不仅被使用在Unix 系统、类Unix系统中,也在许多其他操作系统中被广告采用。目前相当一部分操作系统使用32位二进制数字表示时间。此类系统的Unix时间戳...转载 2020-04-03 09:38:55 · 2370 阅读 · 0 评论