2020年9月15日

WMI 获取操作系统名称和版本

摘要: SysInfo.cpp 1 #pragma once 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 10 class SysInfo 11 { 12 public: 13 SysInfo(); 14 virtual ~SysInfo();... 阅读全文

posted @ 2020-09-15 18:48 thinkinc999 阅读(830) 评论(0) 推荐(0)

2020年8月25日

http 基本代理 C++实现(极简)

摘要: 1 // ProxySvr.cpp : This file contains the 'main' function. Program execution begins and ends there. 2 // 3 #define _WINSOCK_DEPRECATED_NO_WARNINGS 1 4 #include 5 #include 6 #include 7 #inc... 阅读全文

posted @ 2020-08-25 14:33 thinkinc999 阅读(946) 评论(0) 推荐(0)

2020年8月21日

获取内存大小、CPU大小、硬盘大小及使用率

摘要: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 #include 12 13 using namespace std; 14 #pragma comment(lib, "Psa... 阅读全文

posted @ 2020-08-21 15:14 thinkinc999 阅读(377) 评论(0) 推荐(0)

2020年8月19日

winsock2.h 编译冲突的终极解决办法

摘要: 将所有的 #include 换成 #include 解决!!! 阅读全文

posted @ 2020-08-19 16:37 thinkinc999 阅读(409) 评论(0) 推荐(0)

2020年8月7日

获取本机IP

摘要: 1 // ConsoleApplication12.cpp : This file contains the 'main' function. Program execution begins and ends there. 2 // 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include ... 阅读全文

posted @ 2020-08-07 20:11 thinkinc999 阅读(126) 评论(0) 推荐(0)

2020年8月1日

windows C++捕获CMD命令输出

摘要: 1 #include "windows.h" 2 #include "stdio.h" 3 #include 4 #include 5 6 HANDLE hReadPipeCmd = NULL; 7 HANDLE hWritePipeCmd = NULL; 8 HANDLE hReadPipeShell = NULL; 9 HANDLE hWritePipeShell =... 阅读全文

posted @ 2020-08-01 16:57 thinkinc999 阅读(626) 评论(0) 推荐(0)

2020年7月23日

windows下面生成 dump

摘要: main.cpp 1 #include "Windows.h" 2 #include "DbgHelp.h" 3 #include 4 5 int GenerateMiniDump(PEXCEPTION_POINTERS pExceptionPointers) 6 { 7 // 定义函数指针 8 typedef BOOL(WINAPI * MiniDumpWri... 阅读全文

posted @ 2020-07-23 15:26 thinkinc999 阅读(300) 评论(0) 推荐(0)

2020年7月7日

windows 控制台命令输出 捕获

摘要: #include #include #include /* gcc defined unix */#ifdef unix#include #endif#ifdef WIN32#include #define pipe(X) _pipe(X,40,O_BINARY) #define fileno _fileno#define dup2 _dup2#define read _read#endif#in... 阅读全文

posted @ 2020-07-07 16:42 thinkinc999 阅读(416) 评论(0) 推荐(0)

2020年7月3日

不使用PEM 文件建立SSL通道

摘要: 1 2 static unsigned char public_pem[]="-----BEGIN CERTIFICATE-----\n" 3 "MIIDazCCAlOgAwIBAgIUEk+7+NYeiinQ6EwHUC878nYvrxswDQYJKoZIhvcNAQEL\n" 4 "BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbW... 阅读全文

posted @ 2020-07-03 18:14 thinkinc999 阅读(705) 评论(0) 推荐(0)

2020年6月18日

OpenSSL socket 服务端

摘要: 这是我从网上找来改好的,需要添加 include 和 lib 路径需要自己手动生成 pem 文件,在注释里面有命行,自己动手。 1 #define WIN32_LEAN_AND_MEAN 2 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #includ... 阅读全文

posted @ 2020-06-18 17:41 thinkinc999 阅读(500) 评论(0) 推荐(0)

导航