1 | /*
|
---|
2 | * Implementation of IPersist interfaces for IE Web Browser control
|
---|
3 | *
|
---|
4 | * 2001 John R. Sheets (for CodeWeavers)
|
---|
5 | */
|
---|
6 |
|
---|
7 | #include "debugtools.h"
|
---|
8 | #include "shdocvw.h"
|
---|
9 |
|
---|
10 | DEFAULT_DEBUG_CHANNEL(shdocvw);
|
---|
11 |
|
---|
12 | /**********************************************************************
|
---|
13 | * Implement the IPersistStorage interface
|
---|
14 | */
|
---|
15 |
|
---|
16 | static HRESULT WINAPI WBPS_QueryInterface(LPPERSISTSTORAGE iface,
|
---|
17 | REFIID riid, LPVOID *ppobj)
|
---|
18 | {
|
---|
19 | ICOM_THIS(IPersistStorageImpl, iface);
|
---|
20 |
|
---|
21 | FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
|
---|
22 | return E_NOINTERFACE;
|
---|
23 | }
|
---|
24 |
|
---|
25 | static ULONG WINAPI WBPS_AddRef(LPPERSISTSTORAGE iface)
|
---|
26 | {
|
---|
27 | ICOM_THIS(IPersistStorageImpl, iface);
|
---|
28 |
|
---|
29 | TRACE("\n");
|
---|
30 | return ++(This->ref);
|
---|
31 | }
|
---|
32 |
|
---|
33 | static ULONG WINAPI WBPS_Release(LPPERSISTSTORAGE iface)
|
---|
34 | {
|
---|
35 | ICOM_THIS(IPersistStorageImpl, iface);
|
---|
36 |
|
---|
37 | /* static class, won't be freed */
|
---|
38 | TRACE("\n");
|
---|
39 | return --(This->ref);
|
---|
40 | }
|
---|
41 |
|
---|
42 | static HRESULT WINAPI WBPS_GetClassID(LPPERSISTSTORAGE iface, CLSID *pClassID)
|
---|
43 | {
|
---|
44 | FIXME("stub: CLSID = %s\n", debugstr_guid(pClassID));
|
---|
45 | return S_OK;
|
---|
46 | }
|
---|
47 |
|
---|
48 | static HRESULT WINAPI WBPS_IsDirty(LPPERSISTSTORAGE iface)
|
---|
49 | {
|
---|
50 | FIXME("stub\n");
|
---|
51 | return S_OK;
|
---|
52 | }
|
---|
53 |
|
---|
54 | static HRESULT WINAPI WBPS_InitNew(LPPERSISTSTORAGE iface, LPSTORAGE pStg)
|
---|
55 | {
|
---|
56 | FIXME("stub: LPSTORAGE = %p\n", pStg);
|
---|
57 | return S_OK;
|
---|
58 | }
|
---|
59 |
|
---|
60 | static HRESULT WINAPI WBPS_Load(LPPERSISTSTORAGE iface, LPSTORAGE pStg)
|
---|
61 | {
|
---|
62 | FIXME("stub: LPSTORAGE = %p\n", pStg);
|
---|
63 | return S_OK;
|
---|
64 | }
|
---|
65 |
|
---|
66 | static HRESULT WINAPI WBPS_Save(LPPERSISTSTORAGE iface, LPSTORAGE pStg,
|
---|
67 | BOOL fSameAsLoad)
|
---|
68 | {
|
---|
69 | FIXME("stub: LPSTORAGE = %p, fSameAsLoad = %d\n", pStg, fSameAsLoad);
|
---|
70 | return S_OK;
|
---|
71 | }
|
---|
72 |
|
---|
73 | static HRESULT WINAPI WBPS_SaveCompleted(LPPERSISTSTORAGE iface, LPSTORAGE pStgNew)
|
---|
74 | {
|
---|
75 | FIXME("stub: LPSTORAGE = %p\n", pStgNew);
|
---|
76 | return S_OK;
|
---|
77 | }
|
---|
78 |
|
---|
79 | /**********************************************************************
|
---|
80 | * IPersistStorage virtual function table for IE Web Browser component
|
---|
81 | */
|
---|
82 |
|
---|
83 | static ICOM_VTABLE(IPersistStorage) WBPS_Vtbl =
|
---|
84 | {
|
---|
85 | ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
---|
86 | WBPS_QueryInterface,
|
---|
87 | WBPS_AddRef,
|
---|
88 | WBPS_Release,
|
---|
89 | WBPS_GetClassID,
|
---|
90 | WBPS_IsDirty,
|
---|
91 | WBPS_InitNew,
|
---|
92 | WBPS_Load,
|
---|
93 | WBPS_Save,
|
---|
94 | WBPS_SaveCompleted
|
---|
95 | };
|
---|
96 |
|
---|
97 | IPersistStorageImpl SHDOCVW_PersistStorage = { &WBPS_Vtbl, 1 };
|
---|
98 |
|
---|
99 |
|
---|
100 | /**********************************************************************
|
---|
101 | * Implement the IPersistStreamInit interface
|
---|
102 | */
|
---|
103 |
|
---|
104 | static HRESULT WINAPI WBPSI_QueryInterface(LPPERSISTSTREAMINIT iface,
|
---|
105 | REFIID riid, LPVOID *ppobj)
|
---|
106 | {
|
---|
107 | ICOM_THIS(IPersistStreamInitImpl, iface);
|
---|
108 |
|
---|
109 | FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
|
---|
110 | return E_NOINTERFACE;
|
---|
111 | }
|
---|
112 |
|
---|
113 | static ULONG WINAPI WBPSI_AddRef(LPPERSISTSTREAMINIT iface)
|
---|
114 | {
|
---|
115 | ICOM_THIS(IPersistStreamInitImpl, iface);
|
---|
116 |
|
---|
117 | TRACE("\n");
|
---|
118 | return ++(This->ref);
|
---|
119 | }
|
---|
120 |
|
---|
121 | static ULONG WINAPI WBPSI_Release(LPPERSISTSTREAMINIT iface)
|
---|
122 | {
|
---|
123 | ICOM_THIS(IPersistStreamInitImpl, iface);
|
---|
124 |
|
---|
125 | /* static class, won't be freed */
|
---|
126 | TRACE("\n");
|
---|
127 | return --(This->ref);
|
---|
128 | }
|
---|
129 |
|
---|
130 | static HRESULT WINAPI WBPSI_GetClassID(LPPERSISTSTREAMINIT iface, CLSID *pClassID)
|
---|
131 | {
|
---|
132 | FIXME("stub: CLSID = %s\n", debugstr_guid(pClassID));
|
---|
133 | return S_OK;
|
---|
134 | }
|
---|
135 |
|
---|
136 | static HRESULT WINAPI WBPSI_IsDirty(LPPERSISTSTREAMINIT iface)
|
---|
137 | {
|
---|
138 | FIXME("stub\n");
|
---|
139 | return S_OK;
|
---|
140 | }
|
---|
141 |
|
---|
142 | static HRESULT WINAPI WBPSI_Load(LPPERSISTSTREAMINIT iface, LPSTREAM pStg)
|
---|
143 | {
|
---|
144 | FIXME("stub: LPSTORAGE = %p\n", pStg);
|
---|
145 | return S_OK;
|
---|
146 | }
|
---|
147 |
|
---|
148 | static HRESULT WINAPI WBPSI_Save(LPPERSISTSTREAMINIT iface, LPSTREAM pStg,
|
---|
149 | BOOL fSameAsLoad)
|
---|
150 | {
|
---|
151 | FIXME("stub: LPSTORAGE = %p, fSameAsLoad = %d\n", pStg, fSameAsLoad);
|
---|
152 | return S_OK;
|
---|
153 | }
|
---|
154 |
|
---|
155 | static HRESULT WINAPI WBPSI_GetSizeMax(LPPERSISTSTREAMINIT iface,
|
---|
156 | ULARGE_INTEGER *pcbSize)
|
---|
157 | {
|
---|
158 | FIXME("stub: ULARGE_INTEGER = %p\n", pcbSize);
|
---|
159 | return S_OK;
|
---|
160 | }
|
---|
161 |
|
---|
162 | static HRESULT WINAPI WBPSI_InitNew(LPPERSISTSTREAMINIT iface)
|
---|
163 | {
|
---|
164 | FIXME("stub\n");
|
---|
165 | return S_OK;
|
---|
166 | }
|
---|
167 |
|
---|
168 | /**********************************************************************
|
---|
169 | * IPersistStreamInit virtual function table for IE Web Browser component
|
---|
170 | */
|
---|
171 |
|
---|
172 | static ICOM_VTABLE(IPersistStreamInit) WBPSI_Vtbl =
|
---|
173 | {
|
---|
174 | ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
---|
175 | WBPSI_QueryInterface,
|
---|
176 | WBPSI_AddRef,
|
---|
177 | WBPSI_Release,
|
---|
178 | WBPSI_GetClassID,
|
---|
179 | WBPSI_IsDirty,
|
---|
180 | WBPSI_Load,
|
---|
181 | WBPSI_Save,
|
---|
182 | WBPSI_GetSizeMax,
|
---|
183 | WBPSI_InitNew
|
---|
184 | };
|
---|
185 |
|
---|
186 | IPersistStreamInitImpl SHDOCVW_PersistStreamInit = { &WBPSI_Vtbl, 1 };
|
---|