![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Windows
book_zhouqingjun216
这个作者很懒,什么都没留下…
展开
-
windows 常用函数
tchar.h:ascil unicode通用函数例:_tstrcat _stprintf _tgetcwd(取得当前目录)WINAPI (__stdcall)__stdcall表示1.参数从右向左压入堆栈2.函数被调用者修改堆栈3.函数名(在编译器这个层次)自动加前导的下划线,后面紧跟一个@符号,其后紧跟着参数的尺寸在win32应用程序里,宏APIENT转载 2015-04-13 22:05:39 · 337 阅读 · 0 评论 -
QueryPerformanceCounter/QueryPerformanceFrequency
INT64 EscapeTime(){ LARGE_INTEGER nFreq; LARGE_INTEGER nBeginTime; LARGE_INTEGER nEndTime; QueryPerformanceFrequency(&nFreq); QueryPerformanceCounter(&nBeginTime);转载 2015-06-15 09:31:04 · 403 阅读 · 0 评论 -
分解命令行以及环境变量函数
SHSTDAPI_(LPWSTR *) CommandLineToArgvW(_In_ LPCWSTR lpCmdLine, _Out_ int* pNumArgs);例: PTSTR strCmd = GetCommandLine(); int nCount = 0; LPWSTR* pData = CommandLineToArgvW(strCm转载 2015-06-11 20:34:43 · 308 阅读 · 0 评论 -
Unicode、ANSI相互转换
char* WtoA(const wchar_t* szData){ int nLen = WideCharToMultiByte(CP_ACP, 0, szData, -1, NULL, 0,0,0); char* pData = new char[nLen]; int nLen1 = WideCharToMultiByte(CP_ACP, 0, szDat原创 2015-06-10 20:47:23 · 352 阅读 · 0 评论 -
字符串比较
1、CompareString( _In_ LCID Locale, _In_ DWORD dwCmpFlags, _In_NLS_string_(cchCount1) PCNZWCH lpString1, _In_ int cchCount1, _In_NLS_string_(cchCount2) PCNZWCH lpString2, _I原创 2015-06-10 20:11:09 · 511 阅读 · 0 评论 -
StrSafe.h 使用安全字符串操作函数
const TCHAR P[] = _T("测试一下"); int nLen = sizeof(P)/sizeof(TCHAR); //5 int nLen1 = sizeof(P); // 10; TCHAR szData[MAX_PATH] = { 0 }; int nLen2 = lstrlen(P); //4 if (S_OK !=转载 2015-06-10 17:49:36 · 549 阅读 · 0 评论 -
创建多级目录
MakeSureDirectoryPathExistsBOOL bRet = MakeSureDirectoryPathExists(("one\\two\\three\\four\\"));you need to #include the imagehlp.h file, and link to the imagehlp.lib library转载 2015-04-20 17:21:26 · 409 阅读 · 0 评论 -
SHFileOperation
Copies, moves, renames, or deletes a file system object.SHFILEOPSTRUCT structureContains information that the SHFileOperation function uses to perform file operations. Note As o转载 2015-04-20 17:05:49 · 300 阅读 · 0 评论 -
VS 中捕获内存泄露
内存泄露十分讨厌,捕获内存泄露更加令人厌烦……其实,VS本身就有内存泄露的检测机制。只需做以下操作即可开启。(同时必须在debug模式 下运行程序并且以 正常流程退出 )// 在入口函数cpp中添加以下定义和头文件 #define CRTDBG_MAP_ALLOC #include #include // 在入口函数一开始添加以下代码 _CrtDumpMemoryLe转载 2015-09-03 21:38:20 · 387 阅读 · 0 评论