Win32API マルチユーザーシステム上の共有 Windows ディレクトリのパスを取得する GetSystemWindowsDirectory
マルチユーザーシステム上の共有 Windows ディレクトリのパスを取得するには、GetSystemWindowsDirectory関数を用いる。
- GetSystemWindowsDirectoryのプロトタイプ
UINT GetSystemWindowsDirectory( LPTSTR lpBuffer, // ディレクトリ名を受け取るバッファ UINT uSize // 名前を受け取るバッファのサイズ );
- 使用例
#include <windows.h> int main() { char lpBuffer[MAX_PATH] = {'\0'}; GetSystemWindowsDirectory(lpBuffer, MAX_PATH); puts(lpBuffer); return 0; }