#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include <initguid.h>
#include <sti.h>
#include <guiddef.h>
#include <devguid.h>
#include <stdio.h>
#include "wine/test.h"
Go to the source code of this file.
◆ COBJMACROS
Definition at line 25 of file sti.c.
◆ aggregator_AddRef()
Definition at line 46 of file sti.c.
47{
49 return 2;
50}
static BOOL aggregator_addref_called
◆ aggregator_QueryInterface()
Definition at line 41 of file sti.c.
◆ aggregator_Release()
Definition at line 52 of file sti.c.
◆ HRESULT()
◆ init_function_pointers()
static BOOL init_function_pointers |
( |
void |
| ) |
|
|
static |
Definition at line 64 of file sti.c.
65{
68 {
69 pStiCreateInstance = (void*)
71 pStiCreateInstanceA = (void*)
73 pStiCreateInstanceW = (void*)
76 }
78}
#define GetProcAddress(x, y)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
Referenced by START_TEST().
◆ START_TEST()
Definition at line 262 of file sti.c.
263{
265 {
267 {
272 }
273 else
274 skip(
"could not load sti.dll\n");
276 }
277 else
278 skip(
"CoInitialize failed\n");
279}
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
static void test_stillimage_aggregation(void)
static BOOL init_function_pointers(void)
static void test_launch_app_registry(void)
static void test_version_flag_versus_aw(void)
◆ test_launch_app_registry()
static void test_launch_app_registry |
( |
void |
| ) |
|
|
static |
Definition at line 231 of file sti.c.
232{
233 static WCHAR appName[] = {
'w',
'i',
'n',
'e',
's',
't',
'i',
't',
'e',
's',
't',
'a',
'p',
'p',0};
234 IStillImageW *pStiW =
NULL;
236
237 if (pStiCreateInstanceW ==
NULL)
238 {
239 win_skip(
"No StiCreateInstanceW function\n");
240 return;
241 }
242
245 {
248 skip(
"Not authorized to register a launch application\n");
250 {
252 ok(
SUCCEEDED(
hr),
"could not unregister launch application, error 0x%X\n",
hr);
253 }
254 else
255 ok(0,
"could not register launch application, error 0x%X\n",
hr);
257 }
258 else
259 ok(0,
"could not create StillImageW, hr = 0x%X\n",
hr);
260}
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
const char * appName(const char *argv0)
#define STI_VERSION_FLAG_UNICODE
#define IStillImage_Release(p)
#define IStillImage_UnregisterLaunchApplication(p, a)
#define IStillImage_RegisterLaunchApplication(p, a, b)
Referenced by START_TEST().
◆ test_stillimage_aggregation()
static void test_stillimage_aggregation |
( |
void |
| ) |
|
|
static |
Definition at line 164 of file sti.c.
165{
166 if (pStiCreateInstanceW)
167 {
169 IStillImageW *pStiW;
172
173
174
175
176
177
180 {
181 IStillImageW *pStiW2 =
NULL;
182
183
188
189
190
191
192
193
194
197 {
198 ok(pStiW != pStiW2,
"the aggregated IStillImageW and its queried IStillImageW unexpectedly match\n");
199
205 }
206 else
207 ok(0,
"could not query for IID_IStillImageW, hr = 0x%x\n",
hr);
208
210 }
211 else
212 ok(0,
"could not create StillImageW, hr = 0x%X\n",
hr);
213
214
215
216 hr =
CoCreateInstance(&CLSID_Sti, &aggregator, CLSCTX_ALL, &IID_IStillImageW, (
void**)&pStiW);
217 ok(
FAILED(
hr),
"CoCreateInstance unexpectedly succeeded when querying for IStillImageW during aggregation\n");
223 "CoCreateInstance unexpectedly failed when querying for IUnknown during aggregation, hr = 0x%x\n",
hr);
226 }
227 else
228 skip(
"No StiCreateInstanceW function\n");
229}
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
static struct IUnknownVtbl aggregator_vtbl
#define IStillImage_AddRef(p)
#define IStillImage_QueryInterface(p, a, b)
#define CLASS_E_NOAGGREGATION
Referenced by START_TEST().
◆ test_version_flag_versus_aw()
static void test_version_flag_versus_aw |
( |
void |
| ) |
|
|
static |
Definition at line 80 of file sti.c.
81{
83
84
85
86 if (pStiCreateInstance)
87 {
91 {
95 {
98 }
100 }
101 else
102 ok(0,
"could not create StillImageA, hr = 0x%X\n",
hr);
105 {
109 {
112 }
114 }
115 else
116 ok(0,
"could not create StillImageW, hr = 0x%X\n",
hr);
117 }
118 else
119 skip(
"No StiCreateInstance function\n");
120
121 if (pStiCreateInstanceA)
122 {
126 {
130 {
133 }
135 }
136 else
137 todo_wine ok(0,
"could not create StillImageA, hr = 0x%X\n",
hr);
138 }
139 else
140 skip(
"No StiCreateInstanceA function\n");
141
142 if (pStiCreateInstanceW)
143 {
147 {
151 {
154 }
156 }
157 else
158 ok(0,
"could not create StillImageW, hr = 0x%X\n",
hr);
159 }
160 else
161 skip(
"No StiCreateInstanceW function\n");
162}
struct IStillImageW * PSTIW
struct IStillImageA * PSTIA
Referenced by START_TEST().
◆ aggregator_addref_called
BOOL aggregator_addref_called |
|
static |
◆ aggregator_vtbl
struct IUnknownVtbl aggregator_vtbl |
|
static |
Initial value:=
{
}
static ULONG WINAPI aggregator_Release(IUnknown *iface)
static ULONG WINAPI aggregator_AddRef(IUnknown *iface)
static HRESULT WINAPI aggregator_QueryInterface(IUnknown *iface, REFIID riid, void **ppvObject)
Definition at line 57 of file sti.c.
Referenced by test_stillimage_aggregation().
◆ DWORD
Definition at line 35 of file sti.c.
◆ LPUNKNOWN
Definition at line 35 of file sti.c.
◆ sti_dll