WindowsでDocumentsのパスを取得

概要

WindowsでDocumentsへのパスを取得するC言語プログラム。

環境
  1. WindowsVista
  2. bcc32コンパイラ
内容
#include <shlobj.h>
#include <stdio.h>

int main()
{
	char buf[MAX_PATH];
	SHGetSpecialFolderPath(NULL, buf, CSIDL_PERSONAL, FALSE);
	
	printf("%s\n",buf);

	return 0;
}