File: CeGetSpecialFolderPath.cpp

package info (click to toggle)
librapi2 0.9.0-6
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,204 kB
  • ctags: 1,258
  • sloc: sh: 9,013; ansic: 5,743; cpp: 522; makefile: 171
file content (29 lines) | stat: -rw-r--r-- 1,157 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include "test.h"

int main()
{
	VERIFY_HRESULT(CeRapiInit());

	WCHAR buffer[MAX_PATH];
	DWORD length;
	
	// XXX: CSIDL_DESKTOPDIRECTORY does not work, but that's probably OK
	//TEST_NOT_FALSE(length = CeGetSpecialFolderPath(CSIDL_DESKTOPDIRECTORY, MAX_PATH, buffer));

	TEST_NOT_FALSE(length = CeGetSpecialFolderPath(CSIDL_FAVORITES, MAX_PATH, buffer));
	printf("CSIDL_FAVORITES: %s\n", from_unicode(buffer));
	TEST_NOT_FALSE(length = CeGetSpecialFolderPath(CSIDL_FONTS, MAX_PATH, buffer));
	printf("CSIDL_FONTS: %s\n", from_unicode(buffer));
	TEST_NOT_FALSE(length = CeGetSpecialFolderPath(CSIDL_PERSONAL, MAX_PATH, buffer));
	printf("CSIDL_PERSONAL: %s\n", from_unicode(buffer));
	TEST_NOT_FALSE(length = CeGetSpecialFolderPath(CSIDL_PROGRAMS, MAX_PATH, buffer));
	printf("CSIDL_PROGRAMS: %s\n", from_unicode(buffer));
	TEST_NOT_FALSE(length = CeGetSpecialFolderPath(CSIDL_RECENT, MAX_PATH, buffer));
	printf("CSIDL_RECENT: %s\n", from_unicode(buffer));
	TEST_NOT_FALSE(length = CeGetSpecialFolderPath(CSIDL_STARTUP, MAX_PATH, buffer));
	printf("CSIDL_STARTUP: %s\n", from_unicode(buffer));
	
	VERIFY_HRESULT(CeRapiUninit());
	return TEST_SUCCEEDED;
}