ReactOS  0.4.15-dev-1397-g19779b3
sti.h File Reference
#include <objbase.h>
#include <pshpack8.h>
#include <poppack.h>
Include dependency graph for sti.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _STI_DEV_CAPS
 
struct  _STI_DEVICE_INFORMATIONW
 
struct  _STINOTIFY
 

Macros

#define STI_VERSION_REAL   0x00000002
 
#define STI_VERSION_FLAG_UNICODE   0x01000000
 
#define STI_VERSION   (STI_VERSION_REAL)
 
#define StiCreateInstance   WINELIB_NAME_AW(StiCreateInstance)
 
#define GET_STIDEVICE_TYPE(dwDevType)   HIWORD(dwDevType)
 
#define GET_STIDEVICE_SUBTYPE(dwDevType)   LOWORD(dwDevType)
 
#define STI_MAX_INTERNAL_NAME_LENGTH   128
 
#define MAX_NOTIFICATION_DATA   64
 
#define INTERFACE   IStillImageW
 
#define IStillImage_QueryInterface(p, a, b)   (p)->lpVtbl->QueryInterface(p,a,b)
 
#define IStillImage_AddRef(p)   (p)->lpVtbl->AddRef(p)
 
#define IStillImage_Release(p)   (p)->lpVtbl->Release(p)
 
#define IStillImage_Initialize(p, a, b)   (p)->lpVtbl->Initialize(p,a,b)
 
#define IStillImage_GetDeviceList(p, a, b, c, d)   (p)->lpVtbl->GetDeviceList(p,a,b,c,d)
 
#define IStillImage_GetDeviceInfo(p, a, b)   (p)->lpVtbl->GetDeviceInfo(p,a,b)
 
#define IStillImage_CreateDevice(p, a, b, c, d)   (p)->lpVtbl->CreateDevice(p,a,b,c,d)
 
#define IStillImage_GetDeviceValue(p, a, b, c, d, e)   (p)->lpVtbl->GetDeviceValue(p,a,b,c,d,e)
 
#define IStillImage_SetDeviceValue(p, a, b, c, d, e)   (p)->lpVtbl->SetDeviceValue(p,a,b,c,d,e)
 
#define IStillImage_GetSTILaunchInformation(p, a, b, c)   (p)->lpVtbl->GetSTILaunchInformation(p,a,b,c)
 
#define IStillImage_RegisterLaunchApplication(p, a, b)   (p)->lpVtbl->RegisterLaunchApplication(p,a,b)
 
#define IStillImage_UnregisterLaunchApplication(p, a)   (p)->lpVtbl->UnregisterLaunchApplication(p,a)
 
#define IStillImage_EnableHwNotifications(p, a, b)   (p)->lpVtbl->EnableHwNotifications(p,a,b)
 
#define IStillImage_GetHwNotificationState(p, a, b)   (p)->lpVtbl->GetHwNotificationState(p,a,b)
 
#define IStillImage_RefreshDeviceBus(p, a)   (p)->lpVtbl->RefreshDeviceBus(p,a)
 
#define IStillImage_LaunchApplicationForDevice(p, a, b, c)   (p)->lpVtbl->LaunchApplicationForDevice(p,a,b,c)
 
#define IStillImage_SetupDeviceParameters(p, a)   (p)->lpVtbl->SetupDeviceParameters(p,a)
 
#define IStillImage_WriteToErrorLog(p, a, b)   (p)->lpVtbl->WriteToErrorLog(p,a,b)
 

Typedefs

typedef struct IStillImageA * PSTIA
 
typedef struct IStillImageW * PSTIW
 
typedef struct IStillImageA * LPSTILLIMAGEA
 
typedef struct IStillImageW * LPSTILLIMAGEW
 
typedef struct IStiDeviceA * PSTIDEVICEA
 
typedef struct IStiDeviceW * PSTIDEVICEW
 
typedef DWORD STI_DEVICE_TYPE
 
typedef enum _STI_DEVICE_MJ_TYPE STI_DEVICE_MJ_TYPE
 
typedef struct _STI_DEV_CAPS STI_DEV_CAPS
 
typedef struct _STI_DEV_CAPSPSTI_DEV_CAPS
 
typedef struct _STI_DEVICE_INFORMATIONW STI_DEVICE_INFORMATIONW
 
typedef struct _STI_DEVICE_INFORMATIONWPSTI_DEVICE_INFORMATIONW
 
typedef STI_DEVICE_INFORMATIONW STI_DEVICE_INFORMATION
 
typedef PSTI_DEVICE_INFORMATIONW PSTI_DEVICE_INFORMATION
 
typedef struct _STINOTIFY STINOTIFY
 
typedef struct _STINOTIFYLPSTINOTIFY
 

Enumerations

enum  _STI_DEVICE_MJ_TYPE { StiDeviceTypeDefault = 0, StiDeviceTypeScanner = 1, StiDeviceTypeDigitalCamera = 2, StiDeviceTypeStreamingVideo = 3 }
 

Functions

 DEFINE_GUID (CLSID_Sti, 0xB323F8E0L, 0x2E68, 0x11D0, 0x90, 0xEA, 0x00, 0xAA, 0x00, 0x60, 0xF8, 0x6C)
 
 DEFINE_GUID (IID_IStillImageW, 0x641BD880, 0x2DC8, 0x11D0, 0x90, 0xEA, 0x00, 0xAA, 0x00, 0x60, 0xF8, 0x6C)
 
 DEFINE_GUID (IID_IStillImageA, 0xA7B1F740, 0x1D7F, 0x11D1, 0xAC, 0xA9, 0x00, 0xA0, 0x24, 0x38, 0xAD, 0x48)
 
HRESULT WINAPI StiCreateInstanceA (HINSTANCE hinst, DWORD dwVer, PSTIA *ppSti, LPUNKNOWN pUnkOuter)
 
HRESULT WINAPI StiCreateInstanceW (HINSTANCE hinst, DWORD dwVer, PSTIW *ppSti, LPUNKNOWN pUnkOuter)
 
 DECLARE_INTERFACE_ (IStillImageW, IUnknown)
 

Macro Definition Documentation

◆ GET_STIDEVICE_SUBTYPE

#define GET_STIDEVICE_SUBTYPE (   dwDevType)    LOWORD(dwDevType)

Definition at line 73 of file sti.h.

◆ GET_STIDEVICE_TYPE

#define GET_STIDEVICE_TYPE (   dwDevType)    HIWORD(dwDevType)

Definition at line 72 of file sti.h.

◆ INTERFACE

#define INTERFACE   IStillImageW

Definition at line 105 of file sti.h.

◆ IStillImage_AddRef

#define IStillImage_AddRef (   p)    (p)->lpVtbl->AddRef(p)

Definition at line 134 of file sti.h.

◆ IStillImage_CreateDevice

#define IStillImage_CreateDevice (   p,
  a,
  b,
  c,
  d 
)    (p)->lpVtbl->CreateDevice(p,a,b,c,d)

Definition at line 140 of file sti.h.

◆ IStillImage_EnableHwNotifications

#define IStillImage_EnableHwNotifications (   p,
  a,
  b 
)    (p)->lpVtbl->EnableHwNotifications(p,a,b)

Definition at line 146 of file sti.h.

◆ IStillImage_GetDeviceInfo

#define IStillImage_GetDeviceInfo (   p,
  a,
  b 
)    (p)->lpVtbl->GetDeviceInfo(p,a,b)

Definition at line 139 of file sti.h.

◆ IStillImage_GetDeviceList

#define IStillImage_GetDeviceList (   p,
  a,
  b,
  c,
  d 
)    (p)->lpVtbl->GetDeviceList(p,a,b,c,d)

Definition at line 138 of file sti.h.

◆ IStillImage_GetDeviceValue

#define IStillImage_GetDeviceValue (   p,
  a,
  b,
  c,
  d,
  e 
)    (p)->lpVtbl->GetDeviceValue(p,a,b,c,d,e)

Definition at line 141 of file sti.h.

◆ IStillImage_GetHwNotificationState

#define IStillImage_GetHwNotificationState (   p,
  a,
  b 
)    (p)->lpVtbl->GetHwNotificationState(p,a,b)

Definition at line 147 of file sti.h.

◆ IStillImage_GetSTILaunchInformation

#define IStillImage_GetSTILaunchInformation (   p,
  a,
  b,
  c 
)    (p)->lpVtbl->GetSTILaunchInformation(p,a,b,c)

Definition at line 143 of file sti.h.

◆ IStillImage_Initialize

#define IStillImage_Initialize (   p,
  a,
  b 
)    (p)->lpVtbl->Initialize(p,a,b)

Definition at line 137 of file sti.h.

◆ IStillImage_LaunchApplicationForDevice

#define IStillImage_LaunchApplicationForDevice (   p,
  a,
  b,
  c 
)    (p)->lpVtbl->LaunchApplicationForDevice(p,a,b,c)

Definition at line 149 of file sti.h.

◆ IStillImage_QueryInterface

#define IStillImage_QueryInterface (   p,
  a,
  b 
)    (p)->lpVtbl->QueryInterface(p,a,b)

Definition at line 133 of file sti.h.

◆ IStillImage_RefreshDeviceBus

#define IStillImage_RefreshDeviceBus (   p,
  a 
)    (p)->lpVtbl->RefreshDeviceBus(p,a)

Definition at line 148 of file sti.h.

◆ IStillImage_RegisterLaunchApplication

#define IStillImage_RegisterLaunchApplication (   p,
  a,
  b 
)    (p)->lpVtbl->RegisterLaunchApplication(p,a,b)

Definition at line 144 of file sti.h.

◆ IStillImage_Release

#define IStillImage_Release (   p)    (p)->lpVtbl->Release(p)

Definition at line 135 of file sti.h.

◆ IStillImage_SetDeviceValue

#define IStillImage_SetDeviceValue (   p,
  a,
  b,
  c,
  d,
  e 
)    (p)->lpVtbl->SetDeviceValue(p,a,b,c,d,e)

Definition at line 142 of file sti.h.

◆ IStillImage_SetupDeviceParameters

#define IStillImage_SetupDeviceParameters (   p,
  a 
)    (p)->lpVtbl->SetupDeviceParameters(p,a)

Definition at line 150 of file sti.h.

◆ IStillImage_UnregisterLaunchApplication

#define IStillImage_UnregisterLaunchApplication (   p,
  a 
)    (p)->lpVtbl->UnregisterLaunchApplication(p,a)

Definition at line 145 of file sti.h.

◆ IStillImage_WriteToErrorLog

#define IStillImage_WriteToErrorLog (   p,
  a,
  b 
)    (p)->lpVtbl->WriteToErrorLog(p,a,b)

Definition at line 151 of file sti.h.

◆ MAX_NOTIFICATION_DATA

#define MAX_NOTIFICATION_DATA   64

Definition at line 97 of file sti.h.

◆ STI_MAX_INTERNAL_NAME_LENGTH

#define STI_MAX_INTERNAL_NAME_LENGTH   128

Definition at line 79 of file sti.h.

◆ STI_VERSION

#define STI_VERSION   (STI_VERSION_REAL)

Definition at line 45 of file sti.h.

◆ STI_VERSION_FLAG_UNICODE

#define STI_VERSION_FLAG_UNICODE   0x01000000

Definition at line 39 of file sti.h.

◆ STI_VERSION_REAL

#define STI_VERSION_REAL   0x00000002

Definition at line 38 of file sti.h.

◆ StiCreateInstance

#define StiCreateInstance   WINELIB_NAME_AW(StiCreateInstance)

Definition at line 61 of file sti.h.

Typedef Documentation

◆ LPSTILLIMAGEA

typedef struct IStillImageA* LPSTILLIMAGEA

Definition at line 52 of file sti.h.

◆ LPSTILLIMAGEW

typedef struct IStillImageW* LPSTILLIMAGEW

Definition at line 53 of file sti.h.

◆ LPSTINOTIFY

◆ PSTI_DEV_CAPS

◆ PSTI_DEVICE_INFORMATION

Definition at line 95 of file sti.h.

◆ PSTI_DEVICE_INFORMATIONW

◆ PSTIA

typedef struct IStillImageA* PSTIA

Definition at line 49 of file sti.h.

◆ PSTIDEVICEA

typedef struct IStiDeviceA* PSTIDEVICEA

Definition at line 55 of file sti.h.

◆ PSTIDEVICEW

typedef struct IStiDeviceW* PSTIDEVICEW

Definition at line 56 of file sti.h.

◆ PSTIW

typedef struct IStillImageW* PSTIW

Definition at line 50 of file sti.h.

◆ STI_DEV_CAPS

◆ STI_DEVICE_INFORMATION

Definition at line 94 of file sti.h.

◆ STI_DEVICE_INFORMATIONW

◆ STI_DEVICE_MJ_TYPE

◆ STI_DEVICE_TYPE

Definition at line 63 of file sti.h.

◆ STINOTIFY

Enumeration Type Documentation

◆ _STI_DEVICE_MJ_TYPE

Enumerator
StiDeviceTypeDefault 
StiDeviceTypeScanner 
StiDeviceTypeDigitalCamera 
StiDeviceTypeStreamingVideo 

Definition at line 64 of file sti.h.

Function Documentation

◆ DECLARE_INTERFACE_()

DECLARE_INTERFACE_ ( IStillImageW  ,
IUnknown   
)

Definition at line 106 of file sti.h.

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 };
#define REFIID
Definition: guiddef.h:118
#define THIS_
Definition: basetyps.h:65
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define THIS
Definition: basetyps.h:66
REFIID riid
Definition: precomp.h:44
static HRESULT QueryInterface(REFIID, void **)
Definition: events.c:2587
#define STDMETHOD(m)
Definition: basetyps.h:62
unsigned char * LPBYTE
Definition: typedefs.h:53
unsigned int BOOL
Definition: ntddk_ex.h:94
static LPUNKNOWN
Definition: ndr_ole.c:49
FxDevice * pDevice
LONG HRESULT
Definition: typedefs.h:79
unsigned long DWORD
Definition: ntddk_ex.h:95
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
REFIID LPVOID * ppvObject
Definition: precomp.h:44
_In_ LPWSTR _In_ ULONG _In_ ULONG _In_ ULONG _Out_ DEVINFO _In_ HDEV _In_ LPWSTR pwszDeviceName
Definition: winddi.h:3553
_In_ BOOLEAN Release
Definition: cdrom.h:920
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 IStiDeviceW * PSTIDEVICEW
Definition: sti.h:56
uint32_t * LPDWORD
Definition: typedefs.h:59
unsigned int ULONG
Definition: retypes.h:1
static HINSTANCE hinst
Definition: edit.c:551
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
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

◆ DEFINE_GUID() [1/3]

DEFINE_GUID ( CLSID_Sti  ,
0xB323F8E0L  ,
0x2E68  ,
0x11D0  ,
0x90  ,
0xEA  ,
0x00  ,
0xAA  ,
0x00  ,
0x60  ,
0xF8  ,
0x6C   
)

◆ DEFINE_GUID() [2/3]

DEFINE_GUID ( IID_IStillImageW  ,
0x641BD880  ,
0x2DC8  ,
0x11D0  ,
0x90  ,
0xEA  ,
0x00  ,
0xAA  ,
0x00  ,
0x60  ,
0xF8  ,
0x6C   
)

◆ DEFINE_GUID() [3/3]

DEFINE_GUID ( IID_IStillImageA  ,
0xA7B1F740  ,
0x1D7F  ,
0x11D1  ,
0xAC  ,
0xA9  ,
0x00  ,
0xA0  ,
0x24  ,
0x38  ,
0xAD  ,
0x48   
)

◆ StiCreateInstanceA()

HRESULT WINAPI StiCreateInstanceA ( HINSTANCE  hinst,
DWORD  dwVer,
PSTIA ppSti,
LPUNKNOWN  pUnkOuter 
)

Definition at line 320 of file sti.c.

321 {
322  FIXME("(%p, %u, %p, %p): stub, unimplemented on Windows Vista too, please report if it's needed\n", hinst, dwVer, ppSti, pUnkOuter);
324 }
#define STG_E_UNIMPLEMENTEDFUNCTION
Definition: winerror.h:2586
#define FIXME(fmt,...)
Definition: debug.h:111
static HINSTANCE hinst
Definition: edit.c:551

Referenced by sti_create().

◆ StiCreateInstanceW()

HRESULT WINAPI StiCreateInstanceW ( HINSTANCE  hinst,
DWORD  dwVer,
PSTIW ppSti,
LPUNKNOWN  pUnkOuter 
)

Definition at line 329 of file sti.c.

330 {
331  stillimage *This;
332  HRESULT hr;
333 
334  TRACE("(%p, %u, %p, %p)\n", hinst, dwVer, ppSti, pUnkOuter);
335 
337  if (This)
338  {
339  This->IStillImageW_iface.lpVtbl = &stillimagew_vtbl;
340  This->IUnknown_inner.lpVtbl = &internal_unk_vtbl;
341  if (pUnkOuter)
342  This->outer_unk = pUnkOuter;
343  else
344  This->outer_unk = &This->IUnknown_inner;
345  This->ref = 1;
346 
347  hr = IStillImage_Initialize(&This->IStillImageW_iface, hinst, dwVer);
348  if (SUCCEEDED(hr))
349  {
350  if (pUnkOuter)
351  *ppSti = (IStillImageW*) &This->IUnknown_inner;
352  else
353  *ppSti = &This->IStillImageW_iface;
354  }
355  }
356  else
357  hr = E_OUTOFMEMORY;
358 
359  return hr;
360 }
static const struct IStillImageWVtbl stillimagew_vtbl
Definition: sti.c:242
#define IStillImage_Initialize(p, a, b)
Definition: sti.h:137
HRESULT hr
Definition: shlfolder.c:183
static const struct IUnknownVtbl internal_unk_vtbl
Definition: sti.c:310
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
if SUCCEEDED(hr)
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:595
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
LONG HRESULT
Definition: typedefs.h:79
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
static HINSTANCE hinst
Definition: edit.c:551

Referenced by sti_create().