123456

 

相对路径和绝对路径相到转换

 

相对路径到绝对路径
PathCombine
http://msdn2.microsoft.com/en-us/library/ms628544.aspx
绝对路径到相对路径
PathRelativePathTo
http://msdn2.microsoft.com/en-us/library/ms628614.aspx

 

#include "stdafx.h"
#include "shlwapi.h"
#pragma comment(lib, "shlwapi.lib")


int _tmain(int argc, _TCHAR* argv[])
{
	char lpszDir[] = "F:\\软件区\\界面库\\SkinHgy";
	char lpszFile[] = "..\\..\\SkinHgy1\\include\\h.txt";

	char lpszDest[MAX_PATH] = {0};
	PathCombine(lpszDest, lpszDir, lpszFile);
	return 0;
}


 

posted on 2012-07-31 21:53  hgy413  阅读(153)  评论(0编辑  收藏  举报

导航