码迷,mamicode.com
首页 >  
搜索关键字:wchar    ( 412个结果
字符串编码之间的转换(GB2312<->UTF8<->Unicode)及URLEncoding
LPWSTR GB2312ToUnicode(LPCSTR lpszInBuf){ if(NULL == lpszInBuf) { return NULL; } WCHAR* pBuf = NULL; int nLen = MultiByteToWideChar(CP_ACP, 0, lpszIn....
分类:Web程序   时间:2015-10-22 19:08:01    阅读次数:259
C++ 设置自动启动
WCHAR pFileName[MAX_PATH] = {0}; //得到程序自身的全路径 DWORD dwRet = GetModuleFileName(NULL, pFileName, MAX_PATH); HKEY hKey; RE...
分类:编程语言   时间:2015-10-08 18:04:48    阅读次数:196
得到指定进程PID
//#include "targetver.h"#include "stdio.h"#include #include int GetProcessIdByName(WCHAR* Namestr) //进程名取pid{ HANDLE hSnapshot; PROCESSENTRY32 p...
分类:系统相关   时间:2015-09-21 15:49:14    阅读次数:173
得到某个进程所有线程ID和入口地址
1 #include 2 #include 3 #include "iostream" 4 using namespace std; 5 void PASS_TPTHREAD(WCHAR ProcessName[]); 6 typedef LONG NTSTATUS; 7 typedef NT...
分类:编程语言   时间:2015-09-21 15:36:40    阅读次数:297
文件操作类CFile
CFile file; CString str1= L"写入文件成功!"; wchar_t *str2; if (!file.Open(L"Hello.txt", CFile::modeReadWrite| CFile::modeRead)) { AfxMess...
分类:其他好文   时间:2015-09-21 15:34:05    阅读次数:186
strcpy
strcpy宽字符拷贝,总是记不住wcscpy wchar_t wbuf[255]; String s1="中国"; wcscpy(wbuf,s1.c_str());
分类:其他好文   时间:2015-09-11 18:59:56    阅读次数:110
[00013]-[2015-08-27]-[01]-[Windows 程序设计 ---GDI+ 截图---> BMP OR JPG OR PNG ...]
int GetEncoderClsid(const WCHAR* format, CLSID* pClsid){ UINT num = 0; UINT size = 0; ImageCodecInfo* pImageCodecInfo = NULL; Gdiplus::GetImageEncoder...
分类:Windows程序   时间:2015-08-27 10:51:07    阅读次数:173
C++: std::string 与 Unicode 结合
一旦知道 TCHAR 和_T 是如何工作的,那么这个问题很简单。基本思想是 TCHAR 要么是char,要么是 wchar_t,这取决于_UNICODE 的值:// abridged from tchar.h #ifdef _UNICODE typedef wchar_t TCHAR; ...
分类:编程语言   时间:2015-08-17 11:22:39    阅读次数:131
系统函数C字符串的实现(13):wcscpy与wcslen
实现宽字符的拷贝与计算宽字符的长度 int mywcslen(wchar_t *wstr) { int i = 0; while (*wstr!=L'\0') { i++; wstr++; } return i; } wchar_t *mywcscpy(wchar_t *dest, const wchar_t *source) { if (NULL==dest||NULL==...
分类:其他好文   时间:2015-08-16 07:11:15    阅读次数:483
系统函数C字符串的实现(7):wcsrev
实现宽字符串的逆转//将空格处理成字符串结束标志 void set0(wchar_t wstr[20]) { wchar_t *p = wstr; while (*p != L'\0') { if (*p == L' ') { *p = L'\0'; } p++; } } //结束标志各位空格 void set1(wchar_t wstr[...
分类:其他好文   时间:2015-08-15 23:04:50    阅读次数:138
412条   上一页 1 ... 24 25 26 27 28 ... 42 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!