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