blob: d0099ddae6efb6c0055a945c445741392818c179 (
plain)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#ifndef IFILE_DIALOG_HEADER_916743921746324
#define IFILE_DIALOG_HEADER_916743921746324
#ifdef IFILE_DIALOG_VISTA_DLL_EXPORTS
#define DLL_FUNCTION_DECLARATION extern "C" __declspec(dllexport)
#else
#define DLL_FUNCTION_DECLARATION extern "C" __declspec(dllimport)
#endif
#include <zen/build_info.h>
namespace ifile
{
/*--------------
|declarations|
--------------*/
//COM needs to be initialized before calling any of these functions! CoInitializeEx/CoUninitialize
//Requires Windows Vista and later
DLL_FUNCTION_DECLARATION
void showFolderPicker(void* ownerWindow, //in; ==HWND
const wchar_t* defaultFolder, //in, optional!
const wchar_t*& selectedFolder, //out: call freeString() after use!
bool& cancelled, //out
const wchar_t*& errorMsg); //out, optional: call freeString() after use!
DLL_FUNCTION_DECLARATION
void freeString(const wchar_t* str);
/*----------
|typedefs|
----------*/
typedef bool (*FunType_showFolderPicker)(void* ownerWindow,
const wchar_t* defaultFolder,
const wchar_t*& selectedFolder,
bool& cancelled,
const wchar_t*& errorMsg);
typedef void (*FunType_freeString)(const wchar_t* str);
/*--------------
|symbol names|
--------------*/
//(use const pointers to ensure internal linkage)
const char funName_showFolderPicker[] = "showFolderPicker";
const char funName_freeString [] = "freeString";
/*---------------
|library names|
---------------*/
inline const wchar_t* getDllName() { return zen::is64BitBuild ? L"IFileDialog_Vista_x64.dll" : L"IFileDialog_Vista_Win32.dll"; }
}
#undef DLL_FUNCTION_DECLARATION
#endif //IFILE_DIALOG_HEADER_916743921746324
|