1 | /*
|
---|
2 | * Copyright (C) 2012 Alistair Leslie-Hughes
|
---|
3 | *
|
---|
4 | * This library is free software; you can redistribute it and/or
|
---|
5 | * modify it under the terms of the GNU Lesser General Public
|
---|
6 | * License as published by the Free Software Foundation; either
|
---|
7 | * version 2.1 of the License, or (at your option) any later version.
|
---|
8 | *
|
---|
9 | * This library is distributed in the hope that it will be useful,
|
---|
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
12 | * Lesser General Public License for more details.
|
---|
13 | *
|
---|
14 | * You should have received a copy of the GNU Lesser General Public
|
---|
15 | * License along with this library; if not, write to the Free Software
|
---|
16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
---|
17 | */
|
---|
18 |
|
---|
19 | /*
|
---|
20 | * Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
21 | * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
|
---|
22 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
23 | * a choice of LGPL license versions is made available with the language indicating
|
---|
24 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
25 | * of the LGPL is applied is otherwise unspecified.
|
---|
26 | */
|
---|
27 |
|
---|
28 | import "oaidl.idl";
|
---|
29 | import "ocidl.idl";
|
---|
30 | import "oledb.idl";
|
---|
31 |
|
---|
32 | #if !defined(progid) && !defined(__WIDL__)
|
---|
33 | #define threading(model)
|
---|
34 | #define progid(str)
|
---|
35 | #define vi_progid(str)
|
---|
36 | #endif
|
---|
37 |
|
---|
38 | typedef LONG_PTR COMPATIBLE_LONG;
|
---|
39 |
|
---|
40 | [
|
---|
41 | uuid(2206CEB0-19C1-11D1-89E0-00C04FD7A829),
|
---|
42 | version(1.0)
|
---|
43 | ]
|
---|
44 | library MSDASC
|
---|
45 | {
|
---|
46 | importlib("stdole2.tlb");
|
---|
47 |
|
---|
48 | typedef DWORD DBPROMPTOPTIONS;
|
---|
49 |
|
---|
50 | typedef enum tagDBPROMPTOPTIONSENUM
|
---|
51 | {
|
---|
52 | DBPROMPTOPTIONS_NONE = 0x00,
|
---|
53 | DBPROMPTOPTIONS_WIZARDSHEET = 0x01,
|
---|
54 | DBPROMPTOPTIONS_PROPERTYSHEET = 0x02,
|
---|
55 | DBPROMPTOPTIONS_BROWSEONLY = 0x08,
|
---|
56 | DBPROMPTOPTIONS_DISABLE_PROVIDER_SELECTION = 0x10,
|
---|
57 | DBPROMPTOPTIONS_DISABLESAVEPASSWORD = 0x20
|
---|
58 | } DBPROMPTOPTIONSENUM;
|
---|
59 |
|
---|
60 | [
|
---|
61 | odl,
|
---|
62 | uuid(2206CCB2-19C1-11D1-89E0-00C04FD7A829),
|
---|
63 | helpstring("OLE DB Service Component Automation Interface"),
|
---|
64 | dual,
|
---|
65 | oleautomation
|
---|
66 | ]
|
---|
67 | interface IDataSourceLocator : IDispatch
|
---|
68 | {
|
---|
69 | [id(0x60020000), propget]
|
---|
70 | HRESULT hWnd([out, retval] COMPATIBLE_LONG* phwndParent);
|
---|
71 |
|
---|
72 | [id(0x60020000), propput]
|
---|
73 | HRESULT hWnd([in] COMPATIBLE_LONG hwndParent);
|
---|
74 |
|
---|
75 | [id(0x60020002), helpstring("PromptNew")]
|
---|
76 | HRESULT PromptNew([out, retval] IDispatch** ppADOConnection);
|
---|
77 |
|
---|
78 | [id(0x60020003), helpstring("PromptEdit")]
|
---|
79 | HRESULT PromptEdit([in, out] IDispatch** ppADOConnection, [out, retval] VARIANT_BOOL* pbSuccess);
|
---|
80 | }
|
---|
81 |
|
---|
82 | [
|
---|
83 | odl,
|
---|
84 | uuid(2206CCB0-19C1-11D1-89E0-00C04FD7A829),
|
---|
85 | restricted
|
---|
86 | ]
|
---|
87 | interface IDBPromptInitialize : IUnknown
|
---|
88 | {
|
---|
89 | HRESULT _stdcall PromptDataSource([in] IUnknown* pUnkOuter, [in] HWND hWndParent,
|
---|
90 | [in] DBPROMPTOPTIONS dwPromptOptions, [in] ULONG cSourceTypeFilter,
|
---|
91 | [in] DBSOURCETYPE* rgSourceTypeFilter, [in] LPWSTR pwszszzProviderFilter,
|
---|
92 | [in] GUID* riid, [in, out] IUnknown** ppDataSource);
|
---|
93 |
|
---|
94 | HRESULT _stdcall PromptFileName([in] HWND hWndParent, [in] ULONG dwPromptOptions,
|
---|
95 | [in] LPWSTR pwszInitialDirectory, [in] LPWSTR pwszInitialFile, [out] LPWSTR* ppwszSelectedFile);
|
---|
96 | }
|
---|
97 |
|
---|
98 | [
|
---|
99 | uuid(2206CCB1-19C1-11D1-89E0-00C04FD7A829),
|
---|
100 | ]
|
---|
101 | interface IDataInitialize : IUnknown
|
---|
102 | {
|
---|
103 | HRESULT GetDataSource([in] IUnknown* pUnkOuter, [in] DWORD dwClsCtx,
|
---|
104 | [in] LPWSTR pwszInitializationString, [in] REFIID riid,
|
---|
105 | [in, out] IUnknown** ppDataSource);
|
---|
106 |
|
---|
107 | HRESULT GetInitializationString([in] IUnknown* pDataSource, [in] boolean fIncludePassword,
|
---|
108 | [out] LPWSTR* ppwszInitString);
|
---|
109 |
|
---|
110 | HRESULT CreateDBInstance([in] REFCLSID clsidProvider, [in] IUnknown* pUnkOuter,
|
---|
111 | [in] DWORD dwClsCtx, [in] LPWSTR pwszReserved,
|
---|
112 | [in] REFIID riid, [out] IUnknown** ppDataSource);
|
---|
113 |
|
---|
114 | HRESULT RemoteCreateDBInstanceEx([in] REFCLSID clsidProvider, [in] IUnknown* pUnkOuter,
|
---|
115 | [in] DWORD dwClsCtx, [in] LPWSTR pwszReserved, [in] COSERVERINFO* pServerInfo,
|
---|
116 | [in] DWORD cmq, [in] GUID** rgpIID, [out] IUnknown** rgpItf,
|
---|
117 | [out] HRESULT* rghr);
|
---|
118 |
|
---|
119 | HRESULT LoadStringFromStorage([in] LPWSTR pwszFileName, [out] LPWSTR* ppwszInitializationString);
|
---|
120 |
|
---|
121 | HRESULT WriteStringToStorage([in] LPWSTR pwszFileName, [in] LPWSTR pwszInitializationString,
|
---|
122 | [in] DWORD dwCreationDisposition);
|
---|
123 | }
|
---|
124 |
|
---|
125 | [
|
---|
126 | uuid(2206CDB0-19C1-11D1-89E0-00C04FD7A829),
|
---|
127 | threading(both),
|
---|
128 | progid("MSDASC.MSDAINITIALIZE.1"),
|
---|
129 | vi_progid("MSDASC.MSDAINITIALIZE"),
|
---|
130 | ]
|
---|
131 | coclass MSDAINITIALIZE
|
---|
132 | {
|
---|
133 | [default] interface IDataInitialize;
|
---|
134 | }
|
---|
135 |
|
---|
136 | [
|
---|
137 | uuid(2206CDB2-19C1-11D1-89E0-00C04FD7A829),
|
---|
138 | threading(both),
|
---|
139 | progid("DataLinks")
|
---|
140 | ]
|
---|
141 | coclass DataLinks
|
---|
142 | {
|
---|
143 | [default] interface IDataSourceLocator;
|
---|
144 | interface IDBPromptInitialize;
|
---|
145 | interface IDataInitialize;
|
---|
146 | }
|
---|
147 | }
|
---|