摘要:
WCHAR path[MAX_PATH];RegSetValueEx(hKey, L"test", 0, REG_SZ, (BYTE*)path, wcslen(path)*2);wcslen(path)返回的是字符串中的字符数;在 UNICODE 编码中,一个字符占2个字节;sizeof(TCHAR)在 UNICODE 中等于 2 ;所以,这里直接乘以 2 也可以。 阅读全文
posted @ 2012-10-24 23:06
94cool
阅读(1127)
评论(0)
推荐(0)
摘要:
#include "stdafx.h"#include <windows.h>#include <shellapi.h>//ShellExecute 要引用的库int main(int argc, _TCHAR* argv[]){ ShellExecute(NULL,NULL,_T("E:\\App\\test\\test\\bin\\Debug\\test.exe"),NULL,NULL,SW_SHOW);//双斜杠 return 0;} 阅读全文
posted @ 2012-10-24 09:08
94cool
阅读(233)
评论(0)
推荐(0)
浙公网安备 33010602011771号