ReactOS 0.4.15-dev-7842-g558ab78
sti.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2009 Damjan Jovanovic
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#ifndef __WINE_STI_H
20#define __WINE_STI_H
21
22#include <objbase.h>
23/* #include <stireg.h> */
24/* #include <stierr.h> */
25
26#include <pshpack8.h>
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
32DEFINE_GUID(CLSID_Sti, 0xB323F8E0L, 0x2E68, 0x11D0, 0x90, 0xEA, 0x00, 0xAA, 0x00, 0x60, 0xF8, 0x6C);
33
34DEFINE_GUID(IID_IStillImageW, 0x641BD880, 0x2DC8, 0x11D0, 0x90, 0xEA, 0x00, 0xAA, 0x00, 0x60, 0xF8, 0x6C);
35
36DEFINE_GUID(IID_IStillImageA, 0xA7B1F740, 0x1D7F, 0x11D1, 0xAC, 0xA9, 0x00, 0xA0, 0x24, 0x38, 0xAD, 0x48);
37
38#define STI_VERSION_REAL 0x00000002
39#define STI_VERSION_FLAG_UNICODE 0x01000000
40
41#ifndef WINE_NO_UNICODE_MACROS
42# ifdef UNICODE
43# define STI_VERSION (STI_VERSION_REAL | STI_VERSION_FLAG_UNICODE)
44# else
45# define STI_VERSION (STI_VERSION_REAL)
46# endif
47#endif
48
49typedef struct IStillImageA *PSTIA;
50typedef struct IStillImageW *PSTIW;
52typedef struct IStillImageA *LPSTILLIMAGEA;
53typedef struct IStillImageW *LPSTILLIMAGEW;
54DECL_WINELIB_TYPE_AW(LPSTILLIMAGE)
55typedef struct IStiDeviceA *PSTIDEVICEA;
56typedef struct IStiDeviceW *PSTIDEVICEW;
57DECL_WINELIB_TYPE_AW(PSTIDEVICE)
58
61#define StiCreateInstance WINELIB_NAME_AW(StiCreateInstance)
62
65{
71
72#define GET_STIDEVICE_TYPE(dwDevType) HIWORD(dwDevType)
73#define GET_STIDEVICE_SUBTYPE(dwDevType) LOWORD(dwDevType)
74
75typedef struct _STI_DEV_CAPS {
78
79#define STI_MAX_INTERNAL_NAME_LENGTH 128
80
93
96
97#define MAX_NOTIFICATION_DATA 64
98
99typedef struct _STINOTIFY {
104
105#define INTERFACE IStillImageW
107{
108 /*** IUnknown methods ***/
112 /*** IStillImageW methods ***/
114 STDMETHOD(GetDeviceList)(THIS_ DWORD dwType, DWORD dwFlags, DWORD *pdwItemsReturned, LPVOID *ppBuffer) PURE;
115 STDMETHOD(GetDeviceInfo)(THIS_ LPWSTR pwszDeviceName, LPVOID *ppBuffer) PURE;
116 STDMETHOD(CreateDevice)(THIS_ LPWSTR pwszDeviceName, DWORD dwMode, PSTIDEVICEW *pDevice, LPUNKNOWN pUnkOuter) PURE;
117 STDMETHOD(GetDeviceValue)(THIS_ LPWSTR pwszDeviceName, LPWSTR pValueName, LPDWORD pType, LPBYTE pData, LPDWORD cbData) PURE;
118 STDMETHOD(SetDeviceValue)(THIS_ LPWSTR pwszDeviceName, LPWSTR pValueName, DWORD type, LPBYTE pData, DWORD cbData) PURE;
119 STDMETHOD(GetSTILaunchInformation)(THIS_ LPWSTR pwszDeviceName, DWORD *pdwEventCode, LPWSTR pwszEventName) PURE;
120 STDMETHOD(RegisterLaunchApplication)(THIS_ LPWSTR pwszAppName, LPWSTR pwszCommandLine) PURE;
121 STDMETHOD(UnregisterLaunchApplication)(THIS_ LPWSTR pwszAppName) PURE;
122 STDMETHOD(EnableHwNotifications)(THIS_ LPCWSTR pwszDeviceName, BOOL bNewState) PURE;
123 STDMETHOD(GetHwNotificationState)(THIS_ LPCWSTR pwszDeviceName, BOOL *pbCurrentState) PURE;
124 STDMETHOD(RefreshDeviceBus)(THIS_ LPCWSTR pwszDeviceName) PURE;
125 STDMETHOD(LaunchApplicationForDevice)(THIS_ LPWSTR pwszDeviceName, LPWSTR pwszAppName, LPSTINOTIFY pStiNotify);
126 STDMETHOD(SetupDeviceParameters)(THIS_ PSTI_DEVICE_INFORMATIONW pDevInfo);
127 STDMETHOD(WriteToErrorLog)(THIS_ DWORD dwMessageType, LPCWSTR pszMessage) PURE;
128};
129#undef INTERFACE
130
131#if !defined(__cplusplus) || defined(CINTERFACE)
132/*** IUnknown methods ***/
133#define IStillImage_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
134#define IStillImage_AddRef(p) (p)->lpVtbl->AddRef(p)
135#define IStillImage_Release(p) (p)->lpVtbl->Release(p)
136/*** IStillImage methods ***/
137#define IStillImage_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
138#define IStillImage_GetDeviceList(p,a,b,c,d) (p)->lpVtbl->GetDeviceList(p,a,b,c,d)
139#define IStillImage_GetDeviceInfo(p,a,b) (p)->lpVtbl->GetDeviceInfo(p,a,b)
140#define IStillImage_CreateDevice(p,a,b,c,d) (p)->lpVtbl->CreateDevice(p,a,b,c,d)
141#define IStillImage_GetDeviceValue(p,a,b,c,d,e) (p)->lpVtbl->GetDeviceValue(p,a,b,c,d,e)
142#define IStillImage_SetDeviceValue(p,a,b,c,d,e) (p)->lpVtbl->SetDeviceValue(p,a,b,c,d,e)
143#define IStillImage_GetSTILaunchInformation(p,a,b,c) (p)->lpVtbl->GetSTILaunchInformation(p,a,b,c)
144#define IStillImage_RegisterLaunchApplication(p,a,b) (p)->lpVtbl->RegisterLaunchApplication(p,a,b)
145#define IStillImage_UnregisterLaunchApplication(p,a) (p)->lpVtbl->UnregisterLaunchApplication(p,a)
146#define IStillImage_EnableHwNotifications(p,a,b) (p)->lpVtbl->EnableHwNotifications(p,a,b)
147#define IStillImage_GetHwNotificationState(p,a,b) (p)->lpVtbl->GetHwNotificationState(p,a,b)
148#define IStillImage_RefreshDeviceBus(p,a) (p)->lpVtbl->RefreshDeviceBus(p,a)
149#define IStillImage_LaunchApplicationForDevice(p,a,b,c) (p)->lpVtbl->LaunchApplicationForDevice(p,a,b,c)
150#define IStillImage_SetupDeviceParameters(p,a) (p)->lpVtbl->SetupDeviceParameters(p,a)
151#define IStillImage_WriteToErrorLog(p,a,b) (p)->lpVtbl->WriteToErrorLog(p,a,b)
152#else
153/*** IUnknown methods ***/
154#define IStillImage_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
155#define IStillImage_AddRef(p) (p)->AddRef()
156#define IStillImage_Release(p) (p)->Release()
157/*** IStillImage methods ***/
158#define IStillImage_Initialize(p,a,b) (p)->Initialize(a,b)
159#define IStillImage_GetDeviceList(p,a,b,c,d) (p)->GetDeviceList(a,b,c,d)
160#define IStillImage_GetDeviceInfo(p,a,b) (p)->GetDeviceInfo(a,b)
161#define IStillImage_CreateDevice(p,a,b,c,d) (p)->CreateDevice(a,b,c,d)
162#define IStillImage_GetDeviceValue(p,a,b,c,d,e) (p)->GetDeviceValue(a,b,c,d,e)
163#define IStillImage_SetDeviceValue(p,a,b,c,d,e) (p)->SetDeviceValue(a,b,c,d,e)
164#define IStillImage_GetSTILaunchInformation(p,a,b,c) (p)->GetSTILaunchInformation(a,b,c)
165#define IStillImage_RegisterLaunchApplication(p,a,b) (p)->RegisterLaunchApplication(a,b)
166#define IStillImage_UnregisterLaunchApplication(p,a) (p)->UnregisterLaunchApplication(a)
167#define IStillImage_EnableHwNotifications(p,a,b) (p)->EnableHwNotifications(a,b)
168#define IStillImage_GetHwNotificationState(p,a,b) (p)->GetHwNotificationState(a,b)
169#define IStillImage_RefreshDeviceBus(p,a) (p)->RefreshDeviceBus(a)
170#define IStillImage_LaunchApplicationForDevice(p,a,b,c) (p)->LaunchApplicationForDevice(a,b,c)
171#define IStillImage_SetupDeviceParameters(p,a) (p)->SetupDeviceParameters(a)
172#define IStillImage_WriteToErrorLog(p,a,b) (p)->WriteToErrorLog(a,b)
173#endif
174
175#ifdef __cplusplus
176}
177#endif
178
179#include <poppack.h>
180
181#endif /* __WINE_STI_H */
#define DECLARE_INTERFACE_(i, b)
Definition: basetyps.h:78
#define PURE
Definition: basetyps.h:64
#define THIS_
Definition: basetyps.h:65
#define THIS
Definition: basetyps.h:66
#define STDMETHOD_(t, m)
Definition: basetyps.h:63
#define STDMETHOD(m)
Definition: basetyps.h:62
_In_ BOOLEAN Release
Definition: cdrom.h:920
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
FxDevice * pDevice
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
REFIID riid
Definition: atlbase.h:39
static HINSTANCE hinst
Definition: edit.c:551
static HRESULT QueryInterface(REFIID, void **)
Definition: events.c:2587
static ULONG WINAPI AddRef(IStream *iface)
Definition: clist.c:90
static LPUNKNOWN
Definition: ndr_ole.c:49
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
Definition: guiddef.h:68
#define REFIID
Definition: guiddef.h:118
#define MAX_NOTIFICATION_DATA
Definition: sti.h:97
struct IStiDeviceW * PSTIDEVICEW
Definition: sti.h:56
struct IStillImageW * PSTIW
Definition: sti.h:50
struct IStillImageA * PSTIA
Definition: sti.h:49
HRESULT WINAPI StiCreateInstanceA(HINSTANCE hinst, DWORD dwVer, PSTIA *ppSti, LPUNKNOWN pUnkOuter)
Definition: sti.c:320
HRESULT WINAPI StiCreateInstanceW(HINSTANCE hinst, DWORD dwVer, PSTIW *ppSti, LPUNKNOWN pUnkOuter)
Definition: sti.c:329
struct IStiDeviceA * PSTIDEVICEA
Definition: sti.h:55
#define STI_MAX_INTERNAL_NAME_LENGTH
Definition: sti.h:79
_STI_DEVICE_MJ_TYPE
Definition: sti.h:65
@ StiDeviceTypeDefault
Definition: sti.h:66
@ StiDeviceTypeStreamingVideo
Definition: sti.h:69
@ StiDeviceTypeScanner
Definition: sti.h:67
@ StiDeviceTypeDigitalCamera
Definition: sti.h:68
struct _STINOTIFY * LPSTINOTIFY
DWORD STI_DEVICE_TYPE
Definition: sti.h:63
struct _STI_DEV_CAPS * PSTI_DEV_CAPS
STI_DEVICE_INFORMATIONW STI_DEVICE_INFORMATION
Definition: sti.h:94
struct _STINOTIFY STINOTIFY
struct _STI_DEV_CAPS STI_DEV_CAPS
struct _STI_DEVICE_INFORMATIONW * PSTI_DEVICE_INFORMATIONW
enum _STI_DEVICE_MJ_TYPE STI_DEVICE_MJ_TYPE
struct IStillImageA * LPSTILLIMAGEA
Definition: sti.h:52
struct IStillImageW * LPSTILLIMAGEW
Definition: sti.h:53
struct _STI_DEVICE_INFORMATIONW STI_DEVICE_INFORMATIONW
PSTI_DEVICE_INFORMATIONW PSTI_DEVICE_INFORMATION
Definition: sti.h:95
Definition: sti.h:99
BYTE abNotificationData[MAX_NOTIFICATION_DATA]
Definition: sti.h:102
DWORD dwSize
Definition: sti.h:100
GUID guidNotificationCode
Definition: sti.h:101
LPWSTR pszLocalName
Definition: sti.h:91
DWORD dwHardwareConfiguration
Definition: sti.h:86
LPWSTR pszPortName
Definition: sti.h:89
LPWSTR pszVendorDescription
Definition: sti.h:87
LPWSTR pszPropProvider
Definition: sti.h:90
WCHAR szDeviceInternalName[STI_MAX_INTERNAL_NAME_LENGTH]
Definition: sti.h:84
STI_DEV_CAPS DeviceCapabilities
Definition: sti.h:85
STI_DEVICE_TYPE DeviceType
Definition: sti.h:83
LPWSTR pszDeviceDescription
Definition: sti.h:88
DWORD dwGeneric
Definition: sti.h:76
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1830
unsigned char * LPBYTE
Definition: typedefs.h:53
uint32_t * LPDWORD
Definition: typedefs.h:59
uint32_t ULONG
Definition: typedefs.h:59
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
Definition: wincrypt.h:6082
_In_ LPWSTR _In_ ULONG _In_ ULONG _In_ ULONG _Out_ DEVINFO _In_ HDEV _In_ LPWSTR pwszDeviceName
Definition: winddi.h:3556
#define DECL_WINELIB_TYPE_AW(type)
Definition: windef.h:401
#define WINAPI
Definition: msvc.h:6
static void Initialize()
Definition: xlate.c:212
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
unsigned char BYTE
Definition: xxhash.c:193