ReactOS  0.4.15-dev-316-g938df97
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
29 extern "C" {
30 #endif
31 
32 DEFINE_GUID(CLSID_Sti, 0xB323F8E0L, 0x2E68, 0x11D0, 0x90, 0xEA, 0x00, 0xAA, 0x00, 0x60, 0xF8, 0x6C);
33 
34 DEFINE_GUID(IID_IStillImageW, 0x641BD880, 0x2DC8, 0x11D0, 0x90, 0xEA, 0x00, 0xAA, 0x00, 0x60, 0xF8, 0x6C);
35 
36 DEFINE_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 
49 typedef struct IStillImageA *PSTIA;
50 typedef struct IStillImageW *PSTIW;
52 typedef struct IStillImageA *LPSTILLIMAGEA;
53 typedef struct IStillImageW *LPSTILLIMAGEW;
54 DECL_WINELIB_TYPE_AW(LPSTILLIMAGE)
55 typedef struct IStiDeviceA *PSTIDEVICEA;
56 typedef struct IStiDeviceW *PSTIDEVICEW;
57 DECL_WINELIB_TYPE_AW(PSTIDEVICE)
58 
61 #define StiCreateInstance WINELIB_NAME_AW(StiCreateInstance)
62 
64 typedef enum _STI_DEVICE_MJ_TYPE
65 {
71 
72 #define GET_STIDEVICE_TYPE(dwDevType) HIWORD(dwDevType)
73 #define GET_STIDEVICE_SUBTYPE(dwDevType) LOWORD(dwDevType)
74 
75 typedef struct _STI_DEV_CAPS {
78 
79 #define STI_MAX_INTERNAL_NAME_LENGTH 128
80 
81 typedef struct _STI_DEVICE_INFORMATIONW {
93 
96 
97 #define MAX_NOTIFICATION_DATA 64
98 
99 typedef 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 MAX_NOTIFICATION_DATA
Definition: sti.h:97
DEFINE_GUID(CLSID_Sti, 0xB323F8E0L, 0x2E68, 0x11D0, 0x90, 0xEA, 0x00, 0xAA, 0x00, 0x60, 0xF8, 0x6C)
struct _STI_DEVICE_INFORMATIONW * PSTI_DEVICE_INFORMATIONW
struct IStillImageW * PSTIW
Definition: sti.h:50
#define REFIID
Definition: guiddef.h:118
DWORD STI_DEVICE_TYPE
Definition: sti.h:63
#define THIS_
Definition: basetyps.h:65
STI_DEVICE_TYPE DeviceType
Definition: sti.h:83
_In_ BOOLEAN Release
Definition: classpnp.h:929
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define THIS
Definition: basetyps.h:66
DWORD dwSize
Definition: sti.h:100
REFIID riid
Definition: precomp.h:44
static HRESULT QueryInterface(REFIID, void **)
Definition: events.c:2587
LPWSTR pszPortName
Definition: sti.h:89
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
DECLARE_INTERFACE_(IStillImageW, IUnknown)
Definition: sti.h:106
#define STDMETHOD(m)
Definition: basetyps.h:62
struct IStillImageW * LPSTILLIMAGEW
Definition: sti.h:53
LPWSTR pszDeviceDescription
Definition: sti.h:88
unsigned char * LPBYTE
Definition: typedefs.h:53
#define DECL_WINELIB_TYPE_AW(type)
Definition: windef.h:401
unsigned int BOOL
Definition: ntddk_ex.h:94
static LPUNKNOWN
Definition: ndr_ole.c:49
LPWSTR pszVendorDescription
Definition: sti.h:87
STI_DEVICE_INFORMATIONW STI_DEVICE_INFORMATION
Definition: sti.h:94
GUID guidNotificationCode
Definition: sti.h:101
DWORD dwGeneric
Definition: sti.h:76
struct IStillImageA * PSTIA
Definition: sti.h:49
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:78
struct _STI_DEV_CAPS * PSTI_DEV_CAPS
HRESULT WINAPI StiCreateInstanceA(HINSTANCE hinst, DWORD dwVer, PSTIA *ppSti, LPUNKNOWN pUnkOuter)
Definition: sti.c:320
PSTI_DEVICE_INFORMATIONW PSTI_DEVICE_INFORMATION
Definition: sti.h:95
#define WINAPI
Definition: msvc.h:6
#define STI_MAX_INTERNAL_NAME_LENGTH
Definition: sti.h:79
unsigned long DWORD
Definition: ntddk_ex.h:95
BYTE abNotificationData[MAX_NOTIFICATION_DATA]
Definition: sti.h:102
STI_DEV_CAPS DeviceCapabilities
Definition: sti.h:85
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
REFIID LPVOID * ppvObject
Definition: precomp.h:44
struct _STI_DEV_CAPS STI_DEV_CAPS
struct _STI_DEVICE_INFORMATIONW STI_DEVICE_INFORMATIONW
_In_ LPWSTR _In_ ULONG _In_ ULONG _In_ ULONG _Out_ DEVINFO _In_ HDEV _In_ LPWSTR pwszDeviceName
Definition: winddi.h:3553
unsigned char BYTE
Definition: xxhash.c:193
LPWSTR pszPropProvider
Definition: sti.h:90
_STI_DEVICE_MJ_TYPE
Definition: sti.h:64
BOOL Initialize(HINSTANCE hInstance)
Definition: msconfig.c:341
#define PURE
Definition: basetyps.h:64
static ULONG WINAPI AddRef(IStream *iface)
Definition: clist.c:90
struct _STINOTIFY STINOTIFY
struct _STINOTIFY * LPSTINOTIFY
struct IStiDeviceW * PSTIDEVICEW
Definition: sti.h:56
uint32_t * LPDWORD
Definition: typedefs.h:58
HRESULT WINAPI StiCreateInstanceW(HINSTANCE hinst, DWORD dwVer, PSTIW *ppSti, LPUNKNOWN pUnkOuter)
Definition: sti.c:329
unsigned int ULONG
Definition: retypes.h:1
static HINSTANCE hinst
Definition: edit.c:551
DWORD dwHardwareConfiguration
Definition: sti.h:86
WCHAR * LPWSTR
Definition: xmlstorage.h:184
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827
#define STDMETHOD_(t, m)
Definition: basetyps.h:63
Definition: sti.h:99
LPWSTR pszLocalName
Definition: sti.h:91
WCHAR szDeviceInternalName[STI_MAX_INTERNAL_NAME_LENGTH]
Definition: sti.h:84
enum _STI_DEVICE_MJ_TYPE STI_DEVICE_MJ_TYPE
struct IStiDeviceA * PSTIDEVICEA
Definition: sti.h:55
struct IStillImageA * LPSTILLIMAGEA
Definition: sti.h:52