File: CeFindFirstFile.cpp

package info (click to toggle)
librapi2 0.15-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 2,820 kB
  • ctags: 1,474
  • sloc: ansic: 14,036; sh: 10,572; cpp: 851; python: 338; makefile: 226
file content (20 lines) | stat: -rw-r--r-- 408 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
#include "test.h"

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

	HANDLE handle;
	CE_FIND_DATA find_data;
	
	WCHAR * all_files = to_unicode("*.*");
	TEST_NOT_EQUAL(INVALID_HANDLE_VALUE, handle = CeFindFirstFile(all_files, &find_data));

	printf("First file: \"%s\"\n", from_unicode(find_data.cFileName));

	TEST_NOT_EQUAL(0, CeFindClose(handle));
	
	VERIFY_HRESULT(CeRapiUninit());
	return TEST_SUCCEEDED;
}