LPCTSTR PathCombine( LPTSTR Dest, LPCTSTR Dir, LPCTSTR File);
引数の意味は以下の通り。
Dest | 結合結果のパス。 |
Dir | ディレクトリ名。 |
File | ファイルパス。 |
戻り値はDestへのポインタである。関数の実行に失敗した場合、NULLが返される。
void TestPathCombine(void) { char *Dir = "c:\\windows\\system32"; char *File = "..\\notepad.exe"; char Path[100]; PathCombine(Path, Dir, File); printf("%s\n", Path); }