
C/C++
RootSuper
C++ 学习中!
展开
-
C++ 隐藏系统托盘图标(支持XP-Win10)
#include "stdafx.h"#include #include #include BOOL IsWow64(){ BOOL bIsWow64 = FALSE; //IsWow64Process is not available on all supported versions of Windows. //Use GetModuleHandle to get a han原创 2016-06-07 07:26:03 · 1920 阅读 · 1 评论 -
C++ 获取计算机语言和国家
#include "stdafx.h"#include <windows.h>#include <Urlmon.h>#pragma comment(lib, "Urlmon")int main(){ TCHAR szLanguage[MAX_PATH] = { 0 }; TCHAR szCountry[MAX_PATH] = { 0 }; // Get language原创 2016-12-22 13:03:12 · 1026 阅读 · 0 评论 -
C++ 获取父进程PID
我们可以使用ntddl.dll中有一个函数叫NtQueryInformationProcess,用它可以将指定类型的进程信息拷贝到某个缓冲。其原型如下:NTSYSAPINTSTATUSNTAPINtQueryInformationProcess (IN HANDLE ProcessHandle, // 进程句柄IN PROCESSINFOCLASS InformationClass, //原创 2016-12-22 12:56:16 · 2165 阅读 · 2 评论 -
C++ 使用模板(template) 扩展std::string
C++ 使用模板(template) 扩展std::stringstring_helper.hpp/** Author: LowBoyTeam (https://github.com/LowBoyTeam)* License: Code Project Open License* Disclaimer: The software is provided "as-is". No claim of原创 2017-02-15 16:40:37 · 899 阅读 · 0 评论 -
C++ Win32 Api 实现了atlconv.h 编码转换的功能
textconv_helper.hpp/** Author: LowBoyTeam (https://github.com/LowBoyTeam)* License: Code Project Open License* Disclaimer: The software is provided "as-is". No claim of suitability, guarantee, or an原创 2017-02-15 17:52:33 · 947 阅读 · 0 评论 -
C++ std::vector<MyStruct> 去重复
#include <iostream>#include <string>#include <vector>#include <algorithm>struct MyStruct{ std::string a1; std::string a2; std::string a3; bool operator <(const M...原创 2019-01-16 01:00:44 · 724 阅读 · 0 评论