hahahia

시스템 디렉터리와 Windows 디렉터리 예제 소스 본문

Windows Programming/Windows::System

시스템 디렉터리와 Windows 디렉터리 예제 소스

hahahia 2012. 3. 6. 21:21

/* WinSysDir.cpp */

#include <stdio.h>
#include <tchar.h>
#include <windows.h>

#define DIR_LEN MAX_PATH+1

int _tmain(int argc, TCHAR** argv)
{
TCHAR sysDir[DIR_LEN];
TCHAR winDir[DIR_LEN];

GetSystemDirectory(sysDir, DIR_LEN); // 시스템 디렉터리 정보 추출

GetWindowsDirectory(winDir, DIR_LEN); // 윈도우즈 디렉터리 정보 추출

_tprintf(_T("System Dir : %s\n"), sysDir);
_tprintf(_T("Windows Dir : %s\n"), winDir);
return 0;
}
Comments