Skip to content
DarkKaiser의 블로그
DarkKaiser의 블로그
  • 개발 관련 자료(노션)
  • Raspberry Pi(노션)
  • WD My Cloud(노션)
  • GitHub
DarkKaiser의 블로그

Windows 폴더를 얻어올때 주의 사항

DarkKaiser, 2009년 2월 8일2023년 9월 2일

1)  GetWindowsDirectory

가장 많이 사용하는 API 입니다.
그런데 아래에도 나오지만 윈도우 서버 운영체제에서는 우리가 원하는 c:\windows를 리턴하지 않고 다른 경로를 리턴합니다.^^;;

2) GetSystemWindowsDirectory

이 API는 API는 하위 호환을 위해서 남은 것입니다.(This function is provided primarily for compatibility)

3) SHGetFolderPath

MSDN에서는 ShGetFolderPath를 사용할것을 권장합니다.
(Applications should store code in the Program Files folder and persistent data in the Application Data folder in the user’s profile. For more information, see ShGetFolderPath.)

Remark

터미널 서비스를 사용하는 운영체제에서는 GetWindowsDirectory는 각각의 사용자마다 윈도우 디렉토리를 다르게 리턴합니다. GetSystemWindowsDirectory 를 사용해야지만 시스템 윈도우 디렉토리를 리턴합니다.

On a system that is running Terminal Services, each user has a unique Windows directory. The system Windows directory is shared by all users, so it is the directory where an application should store initialization and help files that apply to all users.
With Terminal Services, the GetSystemWindowsDirectory function retrieves the path of the system Windows directory, while the GetWindowsDirectory function retrieves the path of a Windows directory that is private for each user. On a single-user system, GetSystemWindowsDirectory is the same as GetWindowsDirectory.

즉, 윈도우 2000 터미널 서비스에서 동작하는 프로그램을 개발할 때에는 GetSystemWindowsDirectory  API를 사용해야 합니다.

Windows

글 내비게이션

Previous post
Next post

답글 남기기 응답 취소

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다

최신 글

  • AssertJ 소개testCompile ‘org.assertj:assertj-core:3.6.2’ 2017년 9월 14일
  • 자주 사용되는 Lombok 어노테이션 2017년 9월 14일
  • 유니코드 #3 2017년 9월 14일
  • 유니코드 #2 2017년 9월 14일
  • 유니코드 #1 2017년 9월 14일

최신 댓글

    카테고리

    • 개인 자료 (1)
      • 일기 (1)
    • 주절주절 (7)
    • 프로그래밍 갤러리 (16)
    • 프로그래밍 언어 (186)
      • Java (29)
      • C/C++/VC++ (114)
      • C# (11)
      • Visual Basic (6)
      • 안드로이드 (9)
      • Objective-C (5)
      • JavaScript (4)
      • JSP/Servlet (2)
      • Python (4)
      • 어셈블러 (1)
    • 개발++ (44)
      • Book (11)
        • Joel On Software (10)
      • 프로젝트 관리 (6)
      • Maven (1)
      • 디버깅 (1)
      • DirectX (1)
      • Silverlight (1)
      • RESTful (1)
      • Hacking (1)
      • WDM (4)
      • VoIP (5)
      • 기타 (1)
    • 개발 도구 (15)
      • eclipse (14)
      • Sublime Text (1)
    • 네트워크 (7)
    • 설치 및 배포 (7)
      • InstallShield (2)
      • NSIS (4)
    • 버전 관리 (9)
      • Git (2)
      • CVS (2)
      • Subversion (5)
    • 데이터베이스 (7)
      • Oracle (3)
      • Sybase (2)
      • MS-SQL (2)
    • 단위테스트 (3)
      • JUnit (1)
      • NUnit (2)
    • 버그추적시스템 (2)
      • mantis (2)
    • 운영체제 (7)
      • Windows (5)
      • 리눅스 (2)
    • WAS (3)
      • WebLogic (3)
    • 디자인패턴 (1)
    • 디지털 이미지 프로세싱 (16)

    태그

    AutoExp.dat CppUnit CreateFile CVS Detours Generic ignore파일 Installer Isolation level LogCat OSI OSI 7 layer PRODUCTION_MODE request RunInstaller Runnable SafeInt session setPoperty startWebLogic.cmd STL synchronized TAB time_t VC Vector VS2005 날짜 디버깅 리치에디트컨트롤 매핑모드 문서화 주석 변환 사설 IP 성능 주석 트랜젝션 트리 프로젝트관리 프로파일러 픽셀 형변환 형식 확장자 히스토그램

    메타

    • 로그인
    • 엔트리 피드
    • 댓글 피드
    • WordPress.org
    ©2025 DarkKaiser의 블로그 | WordPress Theme by SuperbThemes