Home | History | Annotate | Download | only in include
      1 /**
      2  * This file has no copyright assigned and is placed in the Public Domain.
      3  * This file is part of the mingw-w64 runtime package.
      4  * No warranty is given; refer to the file DISCLAIMER.PD within this package.
      5  */
      6 #ifndef _STICOM_
      7 #define _STICOM_
      8 
      9 #include <pshpack8.h>
     10 
     11 #define STI_UNICODE 1
     12 
     13 #ifndef _NO_COM
     14 #include <objbase.h>
     15 #endif
     16 
     17 #include <stireg.h>
     18 #include <stierr.h>
     19 
     20 #define DLLEXP __declspec(dllexport)
     21 
     22 #ifdef __cplusplus
     23 extern "C" {
     24 #endif
     25 
     26 #ifndef _NO_COM
     27   DEFINE_GUID(CLSID_Sti,0xB323F8E0,0x2E68,0x11D0,0x90,0xEA,0x00,0xAA,0x00,0x60,0xF8,0x6C);
     28   DEFINE_GUID(IID_IStillImageW,0x641BD880,0x2DC8,0x11D0,0x90,0xEA,0x00,0xAA,0x00,0x60,0xF8,0x6C);
     29   DEFINE_GUID(IID_IStillImageA,0xA7B1F740,0x1D7F,0x11D1,0xAC,0xA9,0x00,0xA0,0x24,0x38,0xAD,0x48);
     30   DEFINE_GUID(IID_IStiDevice,0x6CFA5A80,0x2DC8,0x11D0,0x90,0xEA,0x00,0xAA,0x00,0x60,0xF8,0x6C);
     31   DEFINE_GUID(GUID_DeviceArrivedLaunch,0x740d9ee6,0x70f1,0x11d1,0xad,0x10,0x0,0xa0,0x24,0x38,0xad,0x48);
     32   DEFINE_GUID(GUID_ScanImage,0xa6c5a715,0x8c6e,0x11d2,0x97,0x7a,0x0,0x0,0xf8,0x7a,0x92,0x6f);
     33   DEFINE_GUID(GUID_ScanPrintImage,0xb441f425,0x8c6e,0x11d2,0x97,0x7a,0x0,0x0,0xf8,0x7a,0x92,0x6f);
     34   DEFINE_GUID(GUID_ScanFaxImage,0xc00eb793,0x8c6e,0x11d2,0x97,0x7a,0x0,0x0,0xf8,0x7a,0x92,0x6f);
     35   DEFINE_GUID(GUID_STIUserDefined1,0xc00eb795,0x8c6e,0x11d2,0x97,0x7a,0x0,0x0,0xf8,0x7a,0x92,0x6f);
     36   DEFINE_GUID(GUID_STIUserDefined2,0xc77ae9c5,0x8c6e,0x11d2,0x97,0x7a,0x0,0x0,0xf8,0x7a,0x92,0x6f);
     37   DEFINE_GUID(GUID_STIUserDefined3,0xc77ae9c6,0x8c6e,0x11d2,0x97,0x7a,0x0,0x0,0xf8,0x7a,0x92,0x6f);
     38 #endif
     39 
     40 #define STI_VERSION_FLAG_MASK 0xff000000
     41 #define STI_VERSION_FLAG_UNICODE 0x01000000
     42 
     43 #define GET_STIVER_MAJOR(dwVersion) (HIWORD(dwVersion) & ~STI_VERSION_FLAG_MASK)
     44 #define GET_STIVER_MINOR(dwVersion) LOWORD(dwVersion)
     45 
     46 #define STI_VERSION_REAL 0x00000002
     47 #define STI_VERSION_MIN_ALLOWED 0x00000002
     48 
     49 #if defined(UNICODE)
     50 #define STI_VERSION (STI_VERSION_REAL | STI_VERSION_FLAG_UNICODE)
     51 #else
     52 #define STI_VERSION (STI_VERSION_REAL)
     53 #endif
     54 
     55 #define STI_MAX_INTERNAL_NAME_LENGTH 128
     56 
     57   typedef enum _STI_DEVICE_MJ_TYPE {
     58     StiDeviceTypeDefault = 0,StiDeviceTypeScanner = 1,StiDeviceTypeDigitalCamera = 2,StiDeviceTypeStreamingVideo = 3
     59   } STI_DEVICE_MJ_TYPE;
     60 
     61   typedef DWORD STI_DEVICE_TYPE;
     62 
     63 #define GET_STIDEVICE_TYPE(dwDevType) HIWORD(dwDevType)
     64 #define GET_STIDEVICE_SUBTYPE(dwDevType) LOWORD(dwDevType)
     65 
     66   typedef struct _STI_DEV_CAPS {
     67     DWORD dwGeneric;
     68   } STI_DEV_CAPS,*PSTI_DEV_CAPS;
     69 
     70 #define GET_STIDCOMMON_CAPS(dwGenericCaps) LOWORD(dwGenericCaps)
     71 #define GET_STIVENDOR_CAPS(dwGenericCaps) HIWORD(dwGenericCaps)
     72 
     73 #define STI_GENCAP_COMMON_MASK (DWORD)0x00ff
     74 #define STI_GENCAP_NOTIFICATIONS 0x00000001
     75 #define STI_GENCAP_POLLING_NEEDED 0x00000002
     76 #define STI_GENCAP_GENERATE_ARRIVALEVENT 0x00000004
     77 #define STI_GENCAP_AUTO_PORTSELECT 0x00000008
     78 #define STI_GENCAP_WIA 0x00000010
     79 #define STI_GENCAP_SUBSET 0x00000020
     80 #define STI_HW_CONFIG_UNKNOWN 0x0001
     81 #define STI_HW_CONFIG_SCSI 0x0002
     82 #define STI_HW_CONFIG_USB 0x0004
     83 #define STI_HW_CONFIG_SERIAL 0x0008
     84 #define STI_HW_CONFIG_PARALLEL 0x0010
     85 
     86   typedef struct _STI_DEVICE_INFORMATIONW {
     87     DWORD dwSize;
     88     STI_DEVICE_TYPE DeviceType;
     89     WCHAR szDeviceInternalName[STI_MAX_INTERNAL_NAME_LENGTH];
     90     STI_DEV_CAPS DeviceCapabilities;
     91     DWORD dwHardwareConfiguration;
     92     LPWSTR pszVendorDescription;
     93     LPWSTR pszDeviceDescription;
     94     LPWSTR pszPortName;
     95     LPWSTR pszPropProvider;
     96     LPWSTR pszLocalName;
     97   } STI_DEVICE_INFORMATIONW,*PSTI_DEVICE_INFORMATIONW;
     98 
     99   typedef struct _STI_DEVICE_INFORMATIONA {
    100     DWORD dwSize;
    101     STI_DEVICE_TYPE DeviceType;
    102     CHAR szDeviceInternalName[STI_MAX_INTERNAL_NAME_LENGTH];
    103     STI_DEV_CAPS DeviceCapabilities;
    104     DWORD dwHardwareConfiguration;
    105     LPCSTR pszVendorDescription;
    106     LPCSTR pszDeviceDescription;
    107     LPCSTR pszPortName;
    108     LPCSTR pszPropProvider;
    109     LPCSTR pszLocalName;
    110   } STI_DEVICE_INFORMATIONA,*PSTI_DEVICE_INFORMATIONA;
    111 
    112 #if defined(UNICODE) || defined(STI_UNICODE)
    113   typedef STI_DEVICE_INFORMATIONW STI_DEVICE_INFORMATION;
    114   typedef PSTI_DEVICE_INFORMATIONW PSTI_DEVICE_INFORMATION;
    115 #else
    116   typedef STI_DEVICE_INFORMATIONA STI_DEVICE_INFORMATION;
    117   typedef PSTI_DEVICE_INFORMATIONA PSTI_DEVICE_INFORMATION;
    118 #endif
    119 
    120   typedef struct _STI_WIA_DEVICE_INFORMATIONW {
    121     DWORD dwSize;
    122     STI_DEVICE_TYPE DeviceType;
    123     WCHAR szDeviceInternalName[STI_MAX_INTERNAL_NAME_LENGTH];
    124     STI_DEV_CAPS DeviceCapabilities;
    125     DWORD dwHardwareConfiguration;
    126     LPWSTR pszVendorDescription;
    127     LPWSTR pszDeviceDescription;
    128     LPWSTR pszPortName;
    129     LPWSTR pszPropProvider;
    130     LPWSTR pszLocalName;
    131     LPWSTR pszUiDll;
    132     LPWSTR pszServer;
    133   } STI_WIA_DEVICE_INFORMATIONW,*PSTI_WIA_DEVICE_INFORMATIONW;
    134 
    135   typedef struct _STI_WIA_DEVICE_INFORMATIONA {
    136     DWORD dwSize;
    137     STI_DEVICE_TYPE DeviceType;
    138     CHAR szDeviceInternalName[STI_MAX_INTERNAL_NAME_LENGTH];
    139     STI_DEV_CAPS DeviceCapabilities;
    140     DWORD dwHardwareConfiguration;
    141     LPCSTR pszVendorDescription;
    142     LPCSTR pszDeviceDescription;
    143     LPCSTR pszPortName;
    144     LPCSTR pszPropProvider;
    145     LPCSTR pszLocalName;
    146     LPCSTR pszUiDll;
    147     LPCSTR pszServer;
    148   } STI_WIA_DEVICE_INFORMATIONA,*PSTI_WIA_DEVICE_INFORMATIONA;
    149 
    150 #if defined(UNICODE) || defined(STI_UNICODE)
    151   typedef STI_WIA_DEVICE_INFORMATIONW STI_WIA_DEVICE_INFORMATION;
    152   typedef PSTI_WIA_DEVICE_INFORMATIONW PSTI_WIA_DEVICE_INFORMATION;
    153 #else
    154   typedef STI_WIA_DEVICE_INFORMATIONA STI_WIA_DEVICE_INFORMATION;
    155   typedef PSTI_WIA_DEVICE_INFORMATIONA PSTI_WIA_DEVICE_INFORMATION;
    156 #endif
    157 
    158 #define STI_DEVSTATUS_ONLINE_STATE 0x0001
    159 #define STI_DEVSTATUS_EVENTS_STATE 0x0002
    160 
    161 #define STI_ONLINESTATE_OPERATIONAL 0x00000001
    162 #define STI_ONLINESTATE_PENDING 0x00000002
    163 #define STI_ONLINESTATE_ERROR 0x00000004
    164 #define STI_ONLINESTATE_PAUSED 0x00000008
    165 #define STI_ONLINESTATE_PAPER_JAM 0x00000010
    166 #define STI_ONLINESTATE_PAPER_PROBLEM 0x00000020
    167 #define STI_ONLINESTATE_OFFLINE 0x00000040
    168 #define STI_ONLINESTATE_IO_ACTIVE 0x00000080
    169 #define STI_ONLINESTATE_BUSY 0x00000100
    170 #define STI_ONLINESTATE_TRANSFERRING 0x00000200
    171 #define STI_ONLINESTATE_INITIALIZING 0x00000400
    172 #define STI_ONLINESTATE_WARMING_UP 0x00000800
    173 #define STI_ONLINESTATE_USER_INTERVENTION 0x00001000
    174 #define STI_ONLINESTATE_POWER_SAVE 0x00002000
    175 
    176 #define STI_EVENTHANDLING_ENABLED 0x00000001
    177 #define STI_EVENTHANDLING_POLLING 0x00000002
    178 #define STI_EVENTHANDLING_PENDING 0x00000004
    179 
    180   typedef struct _STI_DEVICE_STATUS {
    181     DWORD dwSize;
    182     DWORD StatusMask;
    183     DWORD dwOnlineState;
    184     DWORD dwHardwareStatusCode;
    185     DWORD dwEventHandlingState;
    186     DWORD dwPollingInterval;
    187   } STI_DEVICE_STATUS,*PSTI_DEVICE_STATUS;
    188 
    189 #define STI_DIAGCODE_HWPRESENCE 0x00000001
    190 
    191   typedef struct _ERROR_INFOW {
    192     DWORD dwSize;
    193     DWORD dwGenericError;
    194     DWORD dwVendorError;
    195     WCHAR szExtendedErrorText[255];
    196   } STI_ERROR_INFOW,*PSTI_ERROR_INFOW;
    197 
    198   typedef struct _ERROR_INFOA {
    199     DWORD dwSize;
    200     DWORD dwGenericError;
    201     DWORD dwVendorError;
    202     CHAR szExtendedErrorText[255];
    203   } STI_ERROR_INFOA,*PSTI_ERROR_INFOA;
    204 
    205 #if defined(UNICODE) || defined(STI_UNICODE)
    206   typedef STI_ERROR_INFOW STI_ERROR_INFO;
    207 #else
    208   typedef STI_ERROR_INFOA STI_ERROR_INFO;
    209 #endif
    210 
    211   typedef STI_ERROR_INFO *PSTI_ERROR_INFO;
    212 
    213   typedef struct _STI_DIAG {
    214     DWORD dwSize;
    215     DWORD dwBasicDiagCode;
    216     DWORD dwVendorDiagCode;
    217     DWORD dwStatusMask;
    218     STI_ERROR_INFO sErrorInfo;
    219   } STI_DIAG,*LPSTI_DIAG;
    220 
    221   typedef STI_DIAG DIAG;
    222   typedef LPSTI_DIAG LPDIAG;
    223 
    224 #define STI_TRACE_INFORMATION 0x00000001
    225 #define STI_TRACE_WARNING 0x00000002
    226 #define STI_TRACE_ERROR 0x00000004
    227 
    228 #define STI_SUBSCRIBE_FLAG_WINDOW 0x0001
    229 
    230 #define STI_SUBSCRIBE_FLAG_EVENT 0x0002
    231 
    232   typedef struct _STISUBSCRIBE {
    233     DWORD dwSize;
    234     DWORD dwFlags;
    235     DWORD dwFilter;
    236     HWND hWndNotify;
    237     HANDLE hEvent;
    238     UINT uiNotificationMessage;
    239   } STISUBSCRIBE,*LPSTISUBSCRIBE;
    240 
    241 #define MAX_NOTIFICATION_DATA 64
    242 
    243   typedef struct _STINOTIFY {
    244     DWORD dwSize;
    245     GUID guidNotificationCode;
    246     BYTE abNotificationData[MAX_NOTIFICATION_DATA];
    247   } STINOTIFY,*LPSTINOTIFY;
    248 
    249 #define STI_ADD_DEVICE_BROADCAST_ACTION "Arrival"
    250 #define STI_REMOVE_DEVICE_BROADCAST_ACTION "Removal"
    251 
    252 #define STI_ADD_DEVICE_BROADCAST_STRING "STI\\" STI_ADD_DEVICE_BROADCAST_ACTION "\\%s"
    253 #define STI_REMOVE_DEVICE_BROADCAST_STRING "STI\\" STI_REMOVE_DEVICE_BROADCAST_ACTION "\\%s"
    254 
    255 #define STI_DEVICE_CREATE_STATUS 0x00000001
    256 #define STI_DEVICE_CREATE_DATA 0x00000002
    257 #define STI_DEVICE_CREATE_BOTH 0x00000003
    258 #define STI_DEVICE_CREATE_MASK 0x0000FFFF
    259 
    260 #define STIEDFL_ALLDEVICES 0x00000000
    261 #define STIEDFL_ATTACHEDONLY 0x00000001
    262 
    263   typedef DWORD STI_RAW_CONTROL_CODE;
    264 
    265 #define STI_RAW_RESERVED 0x1000
    266 
    267 #ifdef __cplusplus
    268   struct IStillImageW;
    269   struct IStillImageA;
    270   struct IStiDevice;
    271 #endif
    272 
    273   STDMETHODIMP StiCreateInstanceW(HINSTANCE hinst,DWORD dwVer,struct IStillImageW **ppSti,LPUNKNOWN punkOuter);
    274   STDMETHODIMP StiCreateInstanceA(HINSTANCE hinst,DWORD dwVer,struct IStillImageA **ppSti,LPUNKNOWN punkOuter);
    275 
    276 #if defined(UNICODE) || defined(STI_UNICODE)
    277 #define IID_IStillImage IID_IStillImageW
    278 #define IStillImage IStillImageW
    279 #define StiCreateInstance StiCreateInstanceW
    280 #else
    281 #define IID_IStillImage IID_IStillImageA
    282 #define IStillImage IStillImageA
    283 #define StiCreateInstance StiCreateInstanceA
    284 #endif
    285 
    286   typedef struct IStiDevice *LPSTILLIMAGEDEVICE;
    287   typedef struct IStillImage *PSTI;
    288   typedef struct IStiDevice *PSTIDEVICE;
    289   typedef struct IStillImageA *PSTIA;
    290   typedef struct IStiDeviceA *PSTIDEVICEA;
    291   typedef struct IStillImageW *PSTIW;
    292   typedef struct IStiDeviceW *PSTIDEVICEW;
    293 
    294 #undef INTERFACE
    295 #define INTERFACE IStillImageW
    296   DECLARE_INTERFACE_(IStillImageW,IUnknown) {
    297     STDMETHOD(QueryInterface) (THIS_ REFIID riid,LPVOID *ppvObj) PURE;
    298     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
    299     STDMETHOD_(ULONG,Release) (THIS) PURE;
    300     STDMETHOD(Initialize) (THIS_ HINSTANCE hinst,DWORD dwVersion) PURE;
    301     STDMETHOD(GetDeviceList)(THIS_ DWORD dwType,DWORD dwFlags,DWORD *pdwItemsReturned,LPVOID *ppBuffer) PURE;
    302     STDMETHOD(GetDeviceInfo)(THIS_ LPWSTR pwszDeviceName,LPVOID *ppBuffer) PURE;
    303     STDMETHOD(CreateDevice) (THIS_ LPWSTR pwszDeviceName,DWORD dwMode,PSTIDEVICE *pDevice,LPUNKNOWN punkOuter) PURE;
    304     STDMETHOD(GetDeviceValue)(THIS_ LPWSTR pwszDeviceName,LPWSTR pValueName,LPDWORD pType,LPBYTE pData,LPDWORD cbData);
    305     STDMETHOD(SetDeviceValue)(THIS_ LPWSTR pwszDeviceName,LPWSTR pValueName,DWORD Type,LPBYTE pData,DWORD cbData);
    306     STDMETHOD(GetSTILaunchInformation)(THIS_ LPWSTR pwszDeviceName,DWORD *pdwEventCode,LPWSTR pwszEventName) PURE;
    307     STDMETHOD(RegisterLaunchApplication)(THIS_ LPWSTR pwszAppName,LPWSTR pwszCommandLine) PURE;
    308     STDMETHOD(UnregisterLaunchApplication)(THIS_ LPWSTR pwszAppName) PURE;
    309     STDMETHOD(EnableHwNotifications)(THIS_ LPCWSTR pwszDeviceName,WINBOOL bNewState) PURE;
    310     STDMETHOD(GetHwNotificationState)(THIS_ LPCWSTR pwszDeviceName,WINBOOL *pbCurrentState) PURE;
    311     STDMETHOD(RefreshDeviceBus)(THIS_ LPCWSTR pwszDeviceName) PURE;
    312     STDMETHOD(LaunchApplicationForDevice)(THIS_ LPWSTR pwszDeviceName,LPWSTR pwszAppName,LPSTINOTIFY pStiNotify);
    313     STDMETHOD(SetupDeviceParameters)(THIS_ PSTI_DEVICE_INFORMATIONW);
    314     STDMETHOD(WriteToErrorLog)(THIS_ DWORD dwMessageType,LPCWSTR pszMessage) PURE;
    315 #ifdef NOT_IMPLEMENTED
    316     STIMETHOD(RegisterDeviceNotification(THIS_ LPWSTR pwszAppName,LPSUBSCRIBE lpSubscribe) PURE;
    317     STIMETHOD(UnregisterDeviceNotification(THIS_) PURE;
    318 #endif
    319   };
    320 
    321   typedef struct IStillImageW *LPSTILLIMAGEW;
    322 
    323 #undef INTERFACE
    324 #define INTERFACE IStillImageA
    325   DECLARE_INTERFACE_(IStillImageA,IUnknown) {
    326     STDMETHOD(QueryInterface) (THIS_ REFIID riid,LPVOID *ppvObj) PURE;
    327     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
    328     STDMETHOD_(ULONG,Release) (THIS) PURE;
    329     STDMETHOD(Initialize) (THIS_ HINSTANCE hinst,DWORD dwVersion) PURE;
    330     STDMETHOD(GetDeviceList)(THIS_ DWORD dwType,DWORD dwFlags,DWORD *pdwItemsReturned,LPVOID *ppBuffer) PURE;
    331     STDMETHOD(GetDeviceInfo)(THIS_ LPCSTR pwszDeviceName,LPVOID *ppBuffer) PURE;
    332     STDMETHOD(CreateDevice) (THIS_ LPCSTR pwszDeviceName,DWORD dwMode,PSTIDEVICE *pDevice,LPUNKNOWN punkOuter) PURE;
    333     STDMETHOD(GetDeviceValue)(THIS_ LPCSTR pwszDeviceName,LPCSTR pValueName,LPDWORD pType,LPBYTE pData,LPDWORD cbData);
    334     STDMETHOD(SetDeviceValue)(THIS_ LPCSTR pwszDeviceName,LPCSTR pValueName,DWORD Type,LPBYTE pData,DWORD cbData);
    335     STDMETHOD(GetSTILaunchInformation)(THIS_ LPSTR pwszDeviceName,DWORD *pdwEventCode,LPSTR pwszEventName) PURE;
    336     STDMETHOD(RegisterLaunchApplication)(THIS_ LPCSTR pwszAppName,LPCSTR pwszCommandLine) PURE;
    337     STDMETHOD(UnregisterLaunchApplication)(THIS_ LPCSTR pwszAppName) PURE;
    338     STDMETHOD(EnableHwNotifications)(THIS_ LPCSTR pwszDeviceName,WINBOOL bNewState) PURE;
    339     STDMETHOD(GetHwNotificationState)(THIS_ LPCSTR pwszDeviceName,WINBOOL *pbCurrentState) PURE;
    340     STDMETHOD(RefreshDeviceBus)(THIS_ LPCSTR pwszDeviceName) PURE;
    341     STDMETHOD(LaunchApplicationForDevice)(THIS_ LPCSTR pwszDeviceName,LPCSTR pwszAppName,LPSTINOTIFY pStiNotify);
    342     STDMETHOD(SetupDeviceParameters)(THIS_ PSTI_DEVICE_INFORMATIONA);
    343     STDMETHOD(WriteToErrorLog)(THIS_ DWORD dwMessageType,LPCSTR pszMessage) PURE;
    344 #ifdef NOT_IMPLEMENTED
    345     STIMETHOD(RegisterDeviceNotification(THIS_ LPWSTR pwszAppName,LPSUBSCRIBE lpSubscribe) PURE;
    346     STIMETHOD(UnregisterDeviceNotification(THIS_) PURE;
    347 #endif
    348   };
    349 
    350   typedef struct IStillImageA *LPSTILLIMAGEA;
    351 
    352 #if defined(UNICODE) || defined(STI_UNICODE)
    353 #define IStillImageVtbl IStillImageWVtbl
    354 #else
    355 #define IStillImageVtbl IStillImageAVtbl
    356 #endif
    357 
    358   typedef struct IStillImage *LPSTILLIMAGE;
    359 
    360 #if !defined(__cplusplus) || defined(CINTERFACE)
    361 #define IStillImage_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
    362 #define IStillImage_AddRef(p) (p)->lpVtbl->AddRef(p)
    363 #define IStillImage_Release(p) (p)->lpVtbl->Release(p)
    364 #define IStillImage_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
    365 #define IStillImage_GetDeviceList(p,a,b,c,d) (p)->lpVtbl->GetDeviceList(p,a,b,c,d)
    366 #define IStillImage_GetDeviceInfo(p,a,b) (p)->lpVtbl->GetDeviceInfo(p,a,b)
    367 #define IStillImage_CreateDevice(p,a,b,c,d) (p)->lpVtbl->CreateDevice(p,a,b,c,d)
    368 #define IStillImage_GetDeviceValue(p,a,b,c,d,e) (p)->lpVtbl->GetDeviceValue(p,a,b,c,d,e)
    369 #define IStillImage_SetDeviceValue(p,a,b,c,d,e) (p)->lpVtbl->SetDeviceValue(p,a,b,c,d,e)
    370 #define IStillImage_GetSTILaunchInformation(p,a,b,c) (p)->lpVtbl->GetSTILaunchInformation(p,a,b,c)
    371 #define IStillImage_RegisterLaunchApplication(p,a,b) (p)->lpVtbl->RegisterLaunchApplication(p,a,b)
    372 #define IStillImage_UnregisterLaunchApplication(p,a) (p)->lpVtbl->UnregisterLaunchApplication(p,a)
    373 #define IStillImage_EnableHwNotifications(p,a,b) (p)->lpVtbl->EnableHwNotifications(p,a,b)
    374 #define IStillImage_GetHwNotificationState(p,a,b) (p)->lpVtbl->GetHwNotificationState(p,a,b)
    375 #define IStillImage_RefreshDeviceBus(p,a) (p)->lpVtbl->RefreshDeviceBus(p,a)
    376 #endif
    377 
    378 #undef INTERFACE
    379 #define INTERFACE IStiDevice
    380   DECLARE_INTERFACE_(IStiDevice,IUnknown) {
    381     STDMETHOD(QueryInterface) (THIS_ REFIID riid,LPVOID *ppvObj) PURE;
    382     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
    383     STDMETHOD_(ULONG,Release) (THIS) PURE;
    384     STDMETHOD(Initialize) (THIS_ HINSTANCE hinst,LPCWSTR pwszDeviceName,DWORD dwVersion,DWORD dwMode) PURE;
    385     STDMETHOD(GetCapabilities) (THIS_ PSTI_DEV_CAPS pDevCaps) PURE;
    386     STDMETHOD(GetStatus) (THIS_ PSTI_DEVICE_STATUS pDevStatus) PURE;
    387     STDMETHOD(DeviceReset)(THIS) PURE;
    388     STDMETHOD(Diagnostic)(THIS_ LPSTI_DIAG pBuffer) PURE;
    389     STDMETHOD(Escape)(THIS_ STI_RAW_CONTROL_CODE EscapeFunction,LPVOID lpInData,DWORD cbInDataSize,LPVOID pOutData,DWORD dwOutDataSize,LPDWORD pdwActualData) PURE;
    390     STDMETHOD(GetLastError) (THIS_ LPDWORD pdwLastDeviceError) PURE;
    391     STDMETHOD(LockDevice) (THIS_ DWORD dwTimeOut) PURE;
    392     STDMETHOD(UnLockDevice) (THIS) PURE;
    393     STDMETHOD(RawReadData)(THIS_ LPVOID lpBuffer,LPDWORD lpdwNumberOfBytes,LPOVERLAPPED lpOverlapped) PURE;
    394     STDMETHOD(RawWriteData)(THIS_ LPVOID lpBuffer,DWORD nNumberOfBytes,LPOVERLAPPED lpOverlapped) PURE;
    395     STDMETHOD(RawReadCommand)(THIS_ LPVOID lpBuffer,LPDWORD lpdwNumberOfBytes,LPOVERLAPPED lpOverlapped) PURE;
    396     STDMETHOD(RawWriteCommand)(THIS_ LPVOID lpBuffer,DWORD nNumberOfBytes,LPOVERLAPPED lpOverlapped) PURE;
    397     STDMETHOD(Subscribe)(THIS_ LPSTISUBSCRIBE lpSubsribe) PURE;
    398     STDMETHOD(GetLastNotificationData)(THIS_ LPSTINOTIFY lpNotify) PURE;
    399     STDMETHOD(UnSubscribe)(THIS) PURE;
    400     STDMETHOD(GetLastErrorInfo) (THIS_ STI_ERROR_INFO *pLastErrorInfo) PURE;
    401   };
    402 
    403 #if !defined(__cplusplus) || defined(CINTERFACE)
    404 #define IStiDevice_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
    405 #define IStiDevice_AddRef(p) (p)->lpVtbl->AddRef(p)
    406 #define IStiDevice_Release(p) (p)->lpVtbl->Release(p)
    407 #define IStiDevice_Initialize(p,a,b,c,d) (p)->lpVtbl->Initialize(p,a,b,c,d)
    408 #define IStiDevice_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
    409 #define IStiDevice_GetStatus(p,a) (p)->lpVtbl->GetStatus(p,a)
    410 #define IStiDevice_DeviceReset(p) (p)->lpVtbl->DeviceReset(p)
    411 #define IStiDevice_LockDevice(p,a) (p)->lpVtbl->LockDevice(p,a)
    412 #define IStiDevice_UnLockDevice(p) (p)->lpVtbl->UnLockDevice(p)
    413 #define IStiDevice_Diagnostic(p,a) (p)->lpVtbl->Diagnostic(p,a)
    414 #define IStiDevice_Escape(p,a,b,c,d,e,f) (p)->lpVtbl->Escape(p,a,b,c,d,e,f)
    415 #define IStiDevice_GetLastError(p,a) (p)->lpVtbl->GetLastError(p,a)
    416 #define IStiDevice_RawReadData(p,a,b,c) (p)->lpVtbl->RawReadData(p,a,b,c)
    417 #define IStiDevice_RawWriteData(p,a,b,c) (p)->lpVtbl->RawWriteData(p,a,b,c)
    418 #define IStiDevice_RawReadCommand(p,a,b,c) (p)->lpVtbl->RawReadCommand(p,a,b,c)
    419 #define IStiDevice_RawWriteCommand(p,a,b,c) (p)->lpVtbl->RawWriteCommand(p,a,b,c)
    420 #define IStiDevice_Subscribe(p,a) (p)->lpVtbl->Subscribe(p,a)
    421 #define IStiDevice_GetNotificationData(p,a) (p)->lpVtbl->GetNotificationData(p,a)
    422 #define IStiDevice_UnSubscribe(p) (p)->lpVtbl->UnSubscribe(p)
    423 #define IStiDevice_GetLastErrorInfo(p,a) (p)->lpVtbl->GetLastErrorInfo(p,a)
    424 #endif
    425 
    426 #ifdef __cplusplus
    427 };
    428 #endif
    429 
    430 #include <poppack.h>
    431 #endif
    432