-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDataTransferManagerHelper.pas
41 lines (31 loc) · 1.39 KB
/
DataTransferManagerHelper.pas
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
unit DataTransferManagerHelper;
interface
uses
Winapi.Windows, Winapi.ActiveX, System.Win.ComObj;
const
IID_DataTransferManagerInterop: TGUID = '{3A3DCD6C-3EAB-43DC-BCDE-45671CE800C8}';
CLSID_DataTransferManagerInterop: TGUID = '{A5CAEE9B-8708-49D1-8D36-67D25A8DA00C}';
type
IDataTransferManagerInterop = interface(IUnknown)
['{3A3DCD6C-3EAB-43DC-BCDE-45671CE800C8}']
// function GetForWindow(appWindow: HWND; const riid: TGUID): IDataTransferManager; stdcall;
function GetForWindow(appWindow: HWND; const riid: TGUID; out dataTransferManager: Pointer): HRESULT; stdcall;
function ShowShareUIForWindow(appWindow: HWND): HRESULT; stdcall;
end;
//function GetDataTransferManagerInterop: IDataTransferManagerInterop;
//function GetDataTransferManagerForWindow(hwnd: HWND): IDataTransferManager;
//procedure ShowShareUIForWindow(hwnd: HWND);
implementation
//function GetDataTransferManagerInterop: IDataTransferManagerInterop;
//begin
// Result := CoClassFromFactoryHelper<IDataTransferManagerInterop>(CLSID_DataTransferManagerInterOp, DTM_IID);
//end;
//function GetDataTransferManagerForWindow(hwnd: HWND): IDataTransferManager;
//begin
// Result := GetDataTransferManagerInterop.GetForWindow(hwnd, DTM_IID);
//end;
//procedure ShowShareUIForWindow(hwnd: HWND);
//begin
// GetDataTransferManagerInterop.ShowShareUIForWindow(hwnd);
//end;
end.