本文整理汇总了C++中PathAppend函数的典型用法代码示例。如果您正苦于以下问题:C++ PathAppend函数的具体用法?C++ PathAppend怎么用?C++ PathAppend使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PathAppend函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: GetDefaultAspellPath
void GetDefaultAspellPath (TCHAR *&Path)
{
TCHAR pszPath[MAX_PATH];
pszPath[0] = '\0';
HKEY hKey = NULL;
DWORD size = MAX_PATH;
if (ERROR_SUCCESS == ::RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T ("SOFTWARE\\Aspell"), 0, KEY_READ, &hKey))
{
if (ERROR_SUCCESS == ::RegQueryValueEx(hKey, _T ("Path"), NULL ,NULL, (LPBYTE)pszPath, &size))
wcscat(pszPath, _T ("\\aspell-15.dll"));
::RegCloseKey(hKey);
}
else
{
TCHAR Pf[MAX_PATH];
SHGetSpecialFolderPath(
0,
Pf,
CSIDL_PROGRAM_FILES,
FALSE );
PathAppend(pszPath, Pf);
PathAppend(pszPath, _T("\\Aspell\\bin\\aspell-15.dll"));
}
SetString (Path, pszPath);
}
开发者ID:gbale,项目名称:DSpellCheck,代码行数:26,代码来源:aspell.cpp
示例2: SHGetFolderPath
void CEyepatch::LoadCreateModeClassifiers() {
WCHAR rootpath[MAX_PATH];
WCHAR searchpath[MAX_PATH];
WCHAR fullpath[MAX_PATH];
SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, SHGFP_TYPE_CURRENT, rootpath);
PathAppend(rootpath, APP_CLASS);
wcscpy(searchpath,rootpath);
PathAppend(searchpath, L"*.*");
HANDLE hFind;
WIN32_FIND_DATA win32fd;
if ((hFind = FindFirstFile(searchpath, &win32fd)) == INVALID_HANDLE_VALUE) {
return;
}
do {
if (win32fd.cFileName[0] != '.' &&
(win32fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) &&
!(win32fd.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN)) {
wcscpy(fullpath, rootpath);
PathAppend(fullpath, win32fd.cFileName);
m_videoMarkup.LoadClassifier(fullpath);
}
} while(FindNextFile(hFind, &win32fd) != 0);
FindClose(hFind);
}
开发者ID:gotomypc,项目名称:eyepatch,代码行数:31,代码来源:Eyepatch.cpp
示例3: AddDxccDllPath
bool AddDxccDllPath(CStringA& ErrorMsg)
{
ErrorMsg= "No Errors";
#define DXCC_PATH TEXT("..\\..\\..\\..\\x86\\")
#define DXCC_FILE TEXT("DXCC.DLL")
HMODULE hMLL = GetModuleHandle(TEXT(THISFILENAME));
TCHAR mllPath[MAX_PATH];
DWORD mllPathLen = GetModuleFileName(hMLL, mllPath, MAX_PATH);
if (!(mllPathLen != 0 && mllPathLen < MAX_PATH))
{
ErrorMsg= "Could not fetch this module's filename and length.";
return false;
}
TCHAR fullPath[MAX_PATH];
TCHAR* fileName;
DWORD fullPathLen = GetFullPathName(mllPath, MAX_PATH, fullPath, &fileName);
if (!(fullPathLen != 0 && fullPathLen < MAX_PATH && fileName))
{
ErrorMsg= "Could not fetch the full path of this module.";
return false;
}
fileName[0] = 0; // lop off file name from path
//no need to add the current path at this time
//we dont want local overrides at this time
//PrependPathToEnv(fullPath);
PathAppend(fullPath, DXCC_PATH);
PrependPathToEnv(fullPath);
HMODULE hDXCC = LoadLibrary(DXCC_FILE);
if(hDXCC == NULL)
{
ErrorMsg="DXCC.DLL could not be found";
return false;
}
PathAppend(fullPath, DXCC_FILE);
TCHAR dxccPath[MAX_PATH];
DWORD dxccPathLen = GetModuleFileName(hDXCC, dxccPath, MAX_PATH);
if( 0 != lstrcmpi( fullPath , dxccPath ) )
{
ErrorMsg.Format( "Incompatable DXCC.DLL was loaded: %S\nDesired DXCC.DLL is in path: %S", dxccPath, fullPath);
return false;
}
ErrorMsg= "No Errors";
return true;
}
开发者ID:steadyfield,项目名称:SourceEngine2007,代码行数:60,代码来源:MayaManager.cpp
示例4: GetKeyBoard
LPCTSTR GetKeyBoard(UINT Index, TCHAR * szKBPath){
TCHAR szINI[MAX_PATH];
TCHAR szKBNames[500];
TCHAR szKBFile[MAX_PATH];
TCHAR szAllUser[MAX_PATH];
TCHAR szKBP[] = TEXT("KeyBoardPaths");
lstrcpy(szINI,szDir);
PathAppend(szINI, TEXT("KeyMagic.ini"));
GetPrivateProfileString(szKBP, NULL, NULL, (LPTSTR)szKBNames, 500, szINI);
for (int i=0,Length = lstrlen(&szKBNames[i]),j=0;
j <= Index;
i+=Length+1, j++, Length = lstrlen(&szKBNames[i])){
GetPrivateProfileString(szKBP, (LPCTSTR)&szKBNames[i], NULL, (LPTSTR)szKBFile, MAX_PATH, szINI);
}
if (szKBFile[1] == ':'){
lstrcpy(szKBPath, szKBFile);
return szKBPath;
}
lstrcpy(szKBPath, szDir);
PathAppend(szKBPath, szKBFile);
return szKBPath;
}
开发者ID:HughP,项目名称:keymagic,代码行数:28,代码来源:common.cpp
示例5: GetCompleteLogFileName
/**
* @brief Create complete log file name.
* @param pszCompleteLogFileName - output complete file name.
* @param pszLogFileName - base log file name.
* @param pszDefFileExtension - default extension.
* @return true if log file name was created and false otherwise.
*/
BOOL GetCompleteLogFileName(PTSTR pszCompleteLogFileName, PCTSTR pszLogFileName, PCTSTR pszDefFileExtension)
{
if (pszLogFileName && *pszLogFileName && PathIsRoot(pszLogFileName))
{
_tcscpy_s(pszCompleteLogFileName, MAX_PATH, pszLogFileName);
return TRUE;
}
TCHAR szAppDataPath[MAX_PATH];
if (! SHGetSpecialFolderPath(NULL, szAppDataPath, CSIDL_APPDATA, TRUE))
return FALSE;
TCHAR szAppName[MAX_PATH];
if (! GetCanonicalAppName(szAppName, countof(szAppName), TRUE))
return FALSE;
TCHAR szAppFileName[MAX_PATH];
if (! GetModuleFileName(NULL, szAppFileName, countof(szAppFileName)))
return FALSE;
PTSTR pszFileName = PathFindFileName(szAppFileName);
PathRemoveExtension(pszFileName);
PTSTR pszAppName = *szAppName ? szAppName : pszFileName;
PathCombine(pszCompleteLogFileName, szAppDataPath, pszAppName);
if (pszLogFileName == NULL || *pszLogFileName == _T('\0'))
{
if (pszDefFileExtension == NULL || *pszDefFileExtension != _T('.'))
return FALSE;
PathAppend(pszCompleteLogFileName, pszFileName);
PathAddExtension(pszCompleteLogFileName, pszDefFileExtension);
}
else
PathAppend(pszCompleteLogFileName, pszLogFileName);
return TRUE;
}
开发者ID:3rdexp,项目名称:fxfile,代码行数:38,代码来源:BugTrapUtils.cpp
示例6: settings_path
static std::string settings_path(bool *firsttime)
{
TCHAR szPath[MAX_PATH];
if(SUCCEEDED(SHGetFolderPath(NULL,
CSIDL_APPDATA,
NULL,
0,
szPath)))
{
FILE *f;
PathAppend(szPath,TEXT("vrok"));
CreateDirectory(szPath,NULL);
PathAppend(szPath,TEXT("vrok.conf"));
f=_wfopen(szPath,TEXT("r"));
DBG(szPath);
if (!f) {
*firsttime = true;
} else {
*firsttime = false;
fclose(f);
}
char upath[1024];
WideCharToMultiByte(CP_UTF8,0,szPath,-1,upath,1024,0,NULL);
return std::string(upath);
} else {
DBG("Can't get settings path, exiting");
exit(-1);
}
}
开发者ID:manushanga,项目名称:vrok,代码行数:30,代码来源:settings.cpp
示例7: spool_instance_isAlive
BOOL spool_instance_isAlive(P_SPOOL spool, int instance) {
TCHAR path[MAX_PATH];
TCHAR instance_str[32];
snprintf(instance_str, sizeof(instance_str), "%d", instance);
snprintf(path, sizeof(path), "%s", spool->path);
if (PathAppend(path, SPOOL_DIR_INSTANCE) == FALSE) {
fprintf(stderr, "PathAppend error\n");
return FALSE;
}
if (PathAppend(path, instance_str) == FALSE) {
fprintf(stderr, "PathAppend error\n");
return FALSE;
}
if (! PathFileExists(path)) {
snprintf(instance_str, sizeof(instance_str), "%d", instance);
snprintf(path, sizeof(path), "%s", spool->path);
if (PathAppend(path, SPOOL_DIR_TOSTART) == FALSE) {
fprintf(stderr, "PathAppend error\n");
return FALSE;
}
if (PathAppend(path, instance_str) == FALSE) {
fprintf(stderr, "PathAppend error\n");
return FALSE;
}
return PathFileExists(path);
}
return TRUE;
}
开发者ID:Oyatsumi,项目名称:ulteo4Kode4kids,代码行数:34,代码来源:spool.c
示例8: spool_instance_create
int spool_instance_create(P_SPOOL spool, const LPSTR appId, const LPSTR args) {
int instance;
TCHAR path[MAX_PATH];
TCHAR instance_str[32];
FILE *f = NULL;
instance = spool_build_unique_id(spool);
snprintf(instance_str, sizeof(instance_str), "%d", instance);
snprintf(path, sizeof(path), "%s", spool->path);
if (PathAppend(path, SPOOL_DIR_TOSTART) == FALSE) {
fprintf(stderr, "PathAppend error\n");
return -1;
}
if (PathAppend(path, instance_str) == FALSE) {
fprintf(stderr, "PathAppend error\n");
return -1;
}
f = fopen(path, "w");
if (! f)
return -1;
fprintf(f, "id = %s", appId);
if (args != NULL && strlen(args) > 0) {
fprintf(f, "\narg = %s", args);
}
fclose(f);
return instance;
}
开发者ID:Oyatsumi,项目名称:ulteo4Kode4kids,代码行数:33,代码来源:spool.c
示例9: LoadRainmeterLibrary
/*
** Attempts to load Rainmeter.dll. If it fails, retries after loading our own copies of the CRT
** DLLs in the Runtime directory.
*/
HINSTANCE LoadRainmeterLibrary()
{
HINSTANCE rmDll = LoadLibrary(L"Rainmeter.dll");
if (!rmDll)
{
WCHAR path[MAX_PATH];
if (GetModuleFileName(nullptr, path, MAX_PATH) > 0)
{
PathRemoveFileSpec(path);
PathAppend(path, L"Runtime");
SetDllDirectory(path);
PathAppend(path, L"msvcp120.dll");
// Loading msvcpNNN.dll will load msvcrNNN.dll as well.
HINSTANCE msvcrDll = LoadLibrary(path);
SetDllDirectory(L"");
if (msvcrDll)
{
rmDll = LoadLibrary(L"Rainmeter.dll");
FreeLibrary(msvcrDll);
}
}
}
return rmDll;
}
开发者ID:BraxtonEveslage,项目名称:rainmeter,代码行数:31,代码来源:Application.cpp
示例10: RemoveAll
//-----------------------------------------------------------------------------
// ストレスファイルの削除
//-----------------------------------------------------------------------------
void RemoveAll(LPCTSTR path) {
WIN32_FIND_DATA data;
TCHAR wc[MAX_PATH];
PathAppend(lstrcpy(wc, path), _T("*.*"));
HANDLE hFind = FindFirstFile(wc, &data);
if (hFind == INVALID_HANDLE_VALUE) {
return;
}
do {
if ((data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0) {
TCHAR fname[MAX_PATH];
PathAppend(lstrcpy(fname, path), data.cFileName);
_tprintf(_T("削除 '%s' ... "), fname);
if (DeleteFile(fname)) {
_tprintf(_T("done\n"));
} else {
_tprintf(_T("error %d\n"), GetLastError());
}
}
} while (FindNextFile(hFind, &data));
FindClose(hFind);
}
开发者ID:willmomo,项目名称:ry2kojima,代码行数:29,代码来源:hddstress.cpp
示例11: TEXT
BOOL CSpecialApp::ScanXunleiSearch(int iType)
{
KSearchSoftwareStruct sss;
std::vector<std::wstring>::iterator it;
WCHAR szPath[MAX_PATH] = {0};
sss.pszMainFileName = TEXT( "Program\\thunder.exe" );
sss.hRegRootKey = HKEY_LOCAL_MACHINE;
sss.pszRegSubKey = TEXT( "SOFTWARE\\Thunder Network\\ThunderOem\\thunder_backwnd" );
sss.pszPathValue = TEXT( "dir" );
sss.bFolder = TRUE;
BOOL bRet = FALSE;
std::wstring str;
std::wstring strPath;
std::wstring strTemp;
bRet = SearchSoftwarePath( &sss, strPath);
wcscpy_s(szPath, MAX_PATH - 1, strPath.c_str());
PathRemoveFileSpec(szPath);
PathRemoveFileSpec(szPath);
PathAppend(szPath, L"Profiles\\GougouSearch\\history.history");
strPath = szPath;
if (GetFileAttributes(strPath.c_str()) == INVALID_FILE_ATTRIBUTES)
{
WCHAR* pEnv = NULL;
WCHAR szPath[MAX_PATH] = {0};
pEnv = _wgetenv(_T("public"));
if (pEnv != NULL)
{
wcscpy(szPath, pEnv);
PathAppend(szPath, L"Documents\\Thunder Network\\Thunder\\Profiles\\GougouSearch\\history.history");
strPath = szPath;
}
else
{
return TRUE;
}
}
g_fnScanFile(g_pMain, BEGINPROC(XUNLEI7_DOWNLOADER), 0, 0, 0);
for (it = g_listProcessName.begin(); it != g_listProcessName.end(); it++ )
{
str = *it;
transform(str.begin(), str.end(), str.begin(), towlower);
if (str == L"thunder.exe")
{
str = L"正在运行,跳过";
goto clean0;
}
}
str = L"";
if (m_bScan)
{
ModifyTxtData(iType, strPath.c_str());
// m_appHistory.CommfunFile(KUWOMUSIC_PLAYER, strPath.c_str(), vec_file);
}
clean0:
g_fnScanFile(g_pMain, ENDPROC(XUNLEI7_DOWNLOADER), str.c_str(), 0, 0);
return TRUE;
}
开发者ID:dreamsxin,项目名称:PcManager,代码行数:59,代码来源:specialapp.cpp
示例12: PathAppend
CString &CompletePathWithModulePath(CString &strPath, LPCTSTR lpszFilename)
{
TCHAR szPath[MAX_PATH] = {0};
::GetModuleFileName( (HMODULE)&__ImageBase, szPath, MAX_PATH);
PathAppend(szPath, _T("..\\"));
PathAppend(szPath, lpszFilename);
strPath = szPath;
return strPath;
}
开发者ID:6520874,项目名称:pcmanager,代码行数:9,代码来源:BeikeUtils.cpp
示例13: SHGetSpecialFolderPath
BOOL CKSogoClean::ScanSogoAdvForm()
{
if (!_CheckSogouExist())
{
g_vsNoinstallapp.Add(SOGO_ADVFORM);
return TRUE;
}
BOOL bRet = FALSE;
WCHAR szSogoAppPath[MAX_PATH] = {0};
std::wstring strTemp;
SHGetSpecialFolderPath(NULL, szSogoAppPath, CSIDL_APPDATA, FALSE);
PathAppend(szSogoAppPath, L"SogouExplorer");
strTemp = szSogoAppPath;
PathAppend(szSogoAppPath, L"FormData.dat");
g_fnScanFile(g_pMain,BEGINPROC(SOGO_ADVFORM),0,0,0);
std::wstring str;
std::vector<std::wstring>::iterator it;
for (it = g_listProcessName.begin(); it != g_listProcessName.end(); it++ )
{
str = *it;
transform(str.begin(), str.end(), str.begin(), towlower);
if (str == L"sogouexplorer.exe")
{
str = L"正在运行,跳过";
goto clean0;
}
}
str = L"";
if (m_bScan)
{
ScanDbTable(szSogoAppPath, L"IndexPrecise", SOGO_ADVFORM);
ScanDbTable(szSogoAppPath, L"PreciseData", SOGO_ADVFORM);
std::vector<std::wstring> vec_userInfo;
std::vector<std::wstring>::iterator it;
if (GetUserInfo(vec_userInfo))
{
for (it = vec_userInfo.begin(); it != vec_userInfo.end(); it++)
{
std::wstring strUserPath;
strUserPath = strTemp;
strUserPath += L"\\";
strUserPath += *it;
strUserPath += L"\\FormData.dat";
ScanDbTable(strUserPath, L"IndexPrecise", SOGO_ADVFORM);
ScanDbTable(strUserPath, L"PreciseData", SOGO_ADVFORM);
}
}
}
clean0:
g_fnScanFile(g_pMain,ENDPROC(SOGO_ADVFORM),str.c_str(),0,0);
return bRet;
}
开发者ID:dreamsxin,项目名称:PcManager,代码行数:57,代码来源:sogoclean.cpp
示例14: GetPiUserDir
std::string GetPiUserDir(const std::string &subdir)
{
// i think this test only works with glibc...
#if _GNU_SOURCE
const char *homedir = getenv("HOME");
std::string path = join_path(homedir, ".pioneer", 0);
DIR *dir = opendir(path.c_str());
if (!dir) {
if (mkdir(path.c_str(), 0770) == -1) {
Gui::Screen::ShowBadError(stringf(128, "Error: Could not create or open '%s'.", path.c_str()).c_str());
}
}
closedir(dir);
if (subdir != "") {
path = join_path(homedir, ".pioneer", subdir.c_str(), 0);
dir = opendir(path.c_str());
if (!dir) {
if (mkdir(path.c_str(), 0770) == -1) {
Gui::Screen::ShowBadError(stringf(128, "Error: Could not create or open '%s'.", path.c_str()).c_str());
}
}
closedir(dir);
}
return path+"/";
#elif _WIN32
try {
TCHAR path[MAX_PATH];
if(S_OK != SHGetFolderPath(0, CSIDL_LOCAL_APPDATA, 0, SHGFP_TYPE_CURRENT, path))
throw std::runtime_error("SHGetFolderPath");
TCHAR temp[MAX_PATH];
MultiByteToWideChar(CP_ACP, 0, "Pioneer", strlen("Pioneer")+1, temp, MAX_PATH);
if(!PathAppend(path, temp))
throw std::runtime_error("PathAppend");
if (subdir != "") {
MultiByteToWideChar(CP_ACP, 0, subdir.c_str(), subdir.size()+1, temp, MAX_PATH);
if(!PathAppend(path, temp))
throw std::runtime_error("PathAppend");
}
if(!PathFileExists(path) && ERROR_SUCCESS != SHCreateDirectoryEx(0, path, 0))
throw std::runtime_error("SHCreateDirectoryEx");
char temp2[MAX_PATH];
WideCharToMultiByte(CP_ACP, 0, path, wcslen(path)+1, temp2, MAX_PATH, 0, 0);
return std::string(temp2)+"/";
}
catch(const std::exception&) {
Gui::Screen::ShowBadError("Can't get path to save directory");
return "";
}
#else
# error Unsupported system
#endif
}
开发者ID:Snaar,项目名称:pioneer,代码行数:56,代码来源:utils.cpp
示例15: GetIniPath
static void GetIniPath(void)
{
TCHAR me[MAX_PATH];
HRESULT hResult = SHGetFolderPath(NULL, CSIDL_LOCAL_APPDATA|CSIDL_FLAG_CREATE, NULL, SHGFP_TYPE_CURRENT, me);
PathAppend(me, _T("TTSwTask"));
SHCreateDirectoryEx(NULL, me, NULL);
PathAppend(me, _T("TTSwTask.ini"));
g_IniPath = CopyString(me);
}
开发者ID:tetu-dc5,项目名称:TTSwTask,代码行数:10,代码来源:TTSwTask.cpp
示例16: args
//目录拷贝
int Lua_Test::Lua_copyPath(LuaPlus::LuaState* state)
{
LuaStack args(state);
if(!(args[2].IsString()))
{
throw std::exception("TestUtil::copyPath[2] param parameter error");
}
if(!(args[3].IsString()))
{
throw std::exception("TestUtil::copyPath[3] param parameter error");
}
if(!(args[4].IsBoolean()))
{
throw std::exception("TestUtil::copyPath[4] param parameter error");
}
const char* szPath1 = args[2].GetString();
const char* szPath2 = args[3].GetString();
bool bRecusive = args[4].GetBoolean();
_log("copy path%s \"%s\" -> \"%s\"", bRecusive ? "[R]" : "", szPath1, szPath2);
//清空Path2
char szTemp[MAX_PATH];
strncpy(szTemp, szPath2, MAX_PATH);
PathAppend(szTemp, "*.*");
SHFILEOPSTRUCT shf;
memset(&shf,0,sizeof(SHFILEOPSTRUCT));
shf.hwnd = NULL;
shf.pFrom = szTemp;
shf.wFunc = FO_DELETE;
shf.fFlags = FOF_NOCONFIRMMKDIR|FOF_NOCONFIRMATION|FOF_NOERRORUI|FOF_SILENT;
SHFileOperation(&shf);
CreateDirectory(szPath2, 0);
//copy path1 -> path2
strncpy(szTemp, szPath1, MAX_PATH);
PathAppend(szTemp, "*.*");
memset(&shf,0,sizeof(SHFILEOPSTRUCT));
shf.hwnd = NULL;
shf.pFrom = szTemp;
shf.pTo = szPath2;
shf.wFunc = FO_COPY;
shf.fFlags = bRecusive ?
FOF_NOCONFIRMMKDIR|FOF_NOCONFIRMATION|FOF_NOERRORUI|FOF_SILENT :
FOF_NOCONFIRMMKDIR|FOF_NOCONFIRMATION|FOF_NOERRORUI|FOF_SILENT|FOF_NORECURSION|FOF_FILESONLY;
SHFileOperation(&shf);
return 0;
}
开发者ID:gitrider,项目名称:wxsj2,代码行数:54,代码来源:AxpUtilTest.cpp
示例17: getDbPath
void getDbPath(char* path) {
char* envValue;
if ((envValue = getenv(ENV_DB)) == NULL) {
/* If the 'BITMETER_DB' environment variable hasn't been set then we expect the
database to exist in the 'All Users\Application Data\BitMeterOS folder. */
SHGetFolderPath(NULL, CSIDL_COMMON_APPDATA, NULL, 0, path);
PathAppend(path, TEXT(OUT_DIR));
PathAppend(path, TEXT(DB_NAME));
} else {
// The 'BITMETER_DB' environment variable is set, so use that location instead.
strcpy(path, envValue);
}
}
开发者ID:n00n,项目名称:bitmeteros,代码行数:13,代码来源:platform.c
示例18: InitDelayTime
// 初始化延时时间
void InitDelayTime()
{
TCHAR szFilePath[MAX_PATH] = { 0 };
GetModuleFileName(NULL, szFilePath, MAX_PATH);
PathAppend(szFilePath, _T("..\\..\\"));
PathAppend(szFilePath, _T("data2\\mc.dat"));
IXMLRW xml;
xml.init(szFilePath);
xml.ReadInt(_T("MC"), _T("QuickPhoto"), _T("delay_for_each_keyword"), g_iDelayForKeyWord, -1);
xml.ReadInt(_T("MC"), _T("QuickPhoto"), _T("delay_for_each_site"), g_iDalayForSite, -1);
xml.ReadInt(_T("MC"), _T("QuickPhoto"), _T("count"), g_iThreadCount, -1);
g_pageLog.Trace(LOGL_TOP, LOGT_PROMPT, __TFILE__, __LINE__, _T("初始化数据:%d,%d,%d"), g_iDalayForSite, g_iDelayForKeyWord, g_iThreadCount);
}
开发者ID:vizcount,项目名称:work,代码行数:15,代码来源:UpdateRank.cpp
示例19: ConfigurationPath
std::string ConfigurationPath(const std::string& name)
{
TCHAR path[MAX_PATH];
if (SUCCEEDED(SHGetFolderPath(
nullptr, CSIDL_APPDATA, nullptr, 0, path))) {
PathAppend(path, TEXT("\\SynchronousAudioRouter\\"));
CreateDirectory(path, nullptr);
PathAppend(path, UTF8ToWide(name).c_str());
}
return TCHARToUTF8(path);
}
开发者ID:swalcott1,项目名称:SynchronousAudioRouter,代码行数:14,代码来源:utility.cpp
示例20: _path_t
// IMPLEMENTATION FILE
CSkinEnumerator::CSkinEnumerator(HINSTANCE hInstance, const wchar_t* deskletPath)
{
char path[MAX_PATH+1] = {0};
_bstr_t _path_t(deskletPath);
strcpy(path, _path_t);
PathAppend(path,"configs\\"); // search in the configs directory for skins/configs.
_bstr_t s = path;
s += "*.ini"; // only make INI files show up in our search
WIN32_FIND_DATA data = {0};
HANDLE h = FindFirstFile(s, &data);
if(h != INVALID_HANDLE_VALUE)
{
do
{
if(strcmp(data.cFileName,".") != 0 && strcmp(data.cFileName,"..") != 0)
{
char file[MAX_PATH+1] = {0};
strcpy(file, path);
PathAppend(file, data.cFileName);
CSkinValue value;
value.filename = file;
::PathRemoveExtension(data.cFileName);
char buf[1024];
::GetPrivateProfileString("General", "name", data.cFileName, buf, sizeof(buf), file);
if (*buf == 0)
{
// name property was left blank
strncpy(buf, data.cFileName, sizeof(buf));
}
value.name = buf;
::GetPrivateProfileString("General", "author", "", buf, sizeof(buf), file);
value.author = buf;
::GetPrivateProfileString("General", "dversion", "", buf, sizeof(buf), file);
value.version = buf;
::GetPrivateProfileString("General", "description", "", buf, sizeof(buf), file);
value.description = buf;
m_Skins[_bstr_t(data.cFileName)] = value;
}
} while (FindNextFile(h,&data));
FindClose(h);
}
}
开发者ID:Templier,项目名称:desktopx,代码行数:51,代码来源:SkinEnumerator.cpp
注:本文中的PathAppend函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论