#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.
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.
69 pStiCreateInstance = (
void*)
71 pStiCreateInstanceA = (
void*)
73 pStiCreateInstanceW = (
void*)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
#define GetProcAddress(x, y)
Referenced by START_TEST().
◆ START_TEST()
Definition at line 262 of file sti.c.
274 skip(
"could not load sti.dll\n");
278 skip(
"CoInitialize failed\n");
static void test_version_flag_versus_aw(void)
static void test_stillimage_aggregation(void)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
static BOOL init_function_pointers(void)
static void test_launch_app_registry(void)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
◆ test_launch_app_registry()
static void test_launch_app_registry |
( |
void |
| ) |
|
|
static |
Definition at line 231 of file sti.c.
233 static WCHAR appName[] = {
'w',
'i',
'n',
'e',
's',
't',
'i',
't',
'e',
's',
't',
'a',
'p',
'p',0};
234 IStillImageW *pStiW =
NULL;
237 if (pStiCreateInstanceW ==
NULL)
239 win_skip(
"No StiCreateInstanceW function\n");
248 skip(
"Not authorized to register a launch application\n");
252 ok(
SUCCEEDED(
hr),
"could not unregister launch application, error 0x%X\n",
hr);
255 ok(0,
"could not register launch application, error 0x%X\n",
hr);
259 ok(0,
"could not create StillImageW, hr = 0x%X\n",
hr);
#define IStillImage_RegisterLaunchApplication(p, a, b)
#define STI_VERSION_FLAG_UNICODE
#define IStillImage_UnregisterLaunchApplication(p, a)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
#define IStillImage_Release(p)
const char * appName(const char *argv0)
Referenced by START_TEST().
◆ test_stillimage_aggregation()
static void test_stillimage_aggregation |
( |
void |
| ) |
|
|
static |
Definition at line 164 of file sti.c.
166 if (pStiCreateInstanceW)
181 IStillImageW *pStiW2 =
NULL;
198 ok(pStiW != pStiW2,
"the aggregated IStillImageW and its queried IStillImageW unexpectedly match\n");
207 ok(0,
"could not query for IID_IStillImageW, hr = 0x%x\n",
hr);
212 ok(0,
"could not create StillImageW, hr = 0x%X\n",
hr);
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);
228 skip(
"No StiCreateInstanceW function\n");
static BOOL aggregator_addref_called
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
#define CLASS_E_NOAGGREGATION
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
#define IStillImage_Release(p)
#define IStillImage_QueryInterface(p, a, b)
#define IStillImage_AddRef(p)
static struct IUnknownVtbl aggregator_vtbl
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.
86 if (pStiCreateInstance)
102 ok(0,
"could not create StillImageA, hr = 0x%X\n",
hr);
116 ok(0,
"could not create StillImageW, hr = 0x%X\n",
hr);
119 skip(
"No StiCreateInstance function\n");
121 if (pStiCreateInstanceA)
137 todo_wine ok(0,
"could not create StillImageA, hr = 0x%X\n",
hr);
140 skip(
"No StiCreateInstanceA function\n");
142 if (pStiCreateInstanceW)
158 ok(0,
"could not create StillImageW, hr = 0x%X\n",
hr);
161 skip(
"No StiCreateInstanceW function\n");
struct IStillImageW * PSTIW
#define STI_VERSION_FLAG_UNICODE
struct IStillImageA * PSTIA
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Referenced by START_TEST().
◆ aggregator_addref_called
BOOL aggregator_addref_called |
|
static |
◆ aggregator_vtbl
struct IUnknownVtbl aggregator_vtbl |
|
static |
Initial value:=
{
}
static HRESULT WINAPI aggregator_QueryInterface(IUnknown *iface, REFIID riid, void **ppvObject)
static ULONG WINAPI aggregator_Release(IUnknown *iface)
static ULONG WINAPI aggregator_AddRef(IUnknown *iface)
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