' ########################################################################################
' Microsoft Windows
' File: wiascr.inc
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
' ########################################################################################
' Library name: WIALib
' Version: 1.0
' Documentation string: Microsoft Windows Image Acquisition 1.01 Type Library
' Path: C:\WINDOWS\system32\wiascr.dll
' Library GUID: {95CEDD63-2E34-4B84-9FB3-F86AF1D4BF7A}
' ########################################################################################
#IF NOT %DEF(PBX_wiascr_PBI)
#DEFINE PBX_wiascr_PBI
%EQUATE `WIASCR_INC = 1
#INCLUDE ONCE "Legacy/COM/Ole2.inc"
' ========================================================================================
' ProgIDs (Program identifiers)
' ========================================================================================
' CLSID = {0DAD5531-BF31-43AC-A513-1F8926BBF5EC}
$PROGID_SafeWiaScript1 = "SafeWia.Script.1"
' CLSID = {4EC4272E-2E6F-4EEB-91D0-EBC4D58E8DEE}
$PROGID_WiaScript1 = "Wia.Script.1"
' CLSID = {13F3EA8B-91D7-4F0A-AD76-D2853AC8BECE}
$PROGID_WiaWiaProtocol1 = "Wia.WiaProtocol.1"
' ========================================================================================
' Version independent ProgIDs
' ========================================================================================
' CLSID = {0DAD5531-BF31-43AC-A513-1F8926BBF5EC}
$PROGID_SafeWiaScript = "SafeWia.Script"
' CLSID = {4EC4272E-2E6F-4EEB-91D0-EBC4D58E8DEE}
$PROGID_WiaScript = "Wia.Script"
' CLSID = {13F3EA8B-91D7-4F0A-AD76-D2853AC8BECE}
$PROGID_WiaWiaProtocol = "Wia.WiaProtocol"
' ========================================================================================
' ClsIDs (Class identifiers)
' ========================================================================================
$CLSID_WiaCollection = GUID$("{6E27C0E7-1D45-4CA7-9BF7-BD6CDDAA1ADC}")
$CLSID_WiaDeviceInfo = GUID$("{34E1C006-99D2-4335-B0B1-CE7B9FE5396C}")
$CLSID_WiaDispatchItem = GUID$("{E6C45109-442C-4585-BE44-F5D2884E544A}")
$CLSID_SafeWia = GUID$("{0DAD5531-BF31-43AC-A513-1F8926BBF5EC}")
$CLSID_Wia = GUID$("{4EC4272E-2E6F-4EEB-91D0-EBC4D58E8DEE}")
$CLSID_WiaProtocol = GUID$("{13F3EA8B-91D7-4F0A-AD76-D2853AC8BECE}")
' ========================================================================================
' IIDs (Interface identifiers)
' ========================================================================================
$IID_IWiaCollection = GUID$("{C34C8CE7-B253-4F89-AA25-8A24AD71D0C0}")
$IID_IWia = GUID$("{B10BA1BC-3713-4EC0-8EEA-690EBD2CED8A}")
$IID_IWiaDeviceInfo = GUID$("{5267FF5E-7CAF-4769-865D-17A25968525E}")
$IID_IWiaDispatchItem = GUID$("{D06D503F-4B71-40F3-94A7-66478F732BC9}")
$IID__IWiaEvents = GUID$("{E5F04D72-6C16-42E2-BCCA-F8D0DB4ADE06}")
' ========================================================================================
' WiaIntent enum
' IID: {E9F173A4-EF5C-4553-9F80-87ECFB636D9B}
' WiaIntents
' ========================================================================================
%EQUATE `ImageTypeColor = 1
%EQUATE `ImageTypeGrayscale = 2
%EQUATE `ImageTypeText = 4
%EQUATE `MinimizeSize = &H00010000
%EQUATE `MaximizeQuality = &H00020000
%EQUATE `BestPreview = &H00040000
' ========================================================================================
' WiaFlag enum
' IID: {56385E6A-12C5-419D-8516-062B9613E042}
' WiaFlags
' ========================================================================================
%EQUATE `SingleImage = 2
%EQUATE `UseCommonUI = 4
' ========================================================================================
' WiaDeviceInfoPropertyId enum
' IID: {9EED984D-AAC3-43CB-A993-98403F5ADC55}
' WiaDeviceInfoPropertyIds
' ========================================================================================
%EQUATE `DeviceInfoDevId = 2
%EQUATE `DeviceInfoVendDesc = 3
%EQUATE `DeviceInfoDevDesc = 4
%EQUATE `DeviceInfoDevType = 5
%EQUATE `DeviceInfoPortName = 6
%EQUATE `DeviceInfoDevName = 7
%EQUATE `DeviceInfoServerName = 8
%EQUATE `DeviceInfoRemoteDevId = 9
%EQUATE `DeviceInfoUIClsid = 10
%EQUATE `DeviceInfoHwConfig = 11
%EQUATE `DeviceInfoBaudRate = 12
%EQUATE `DeviceInfoStiGenCapabilities = 13
%EQUATE `DeviceInfoWiaVersion = 14
%EQUATE `DeviceInfoDriverVersion = 15
' ========================================================================================
' WiaItemPropertyId enum
' IID: {A0115E47-C46A-4C1D-A3B5-5ADB9F2FCD04}
' WiaDeviceItemPropertyIds
' ========================================================================================
%EQUATE `DeviceFirmwareVersion = 1026
%EQUATE `DeviceConnectStatus = 1027
%EQUATE `DeviceDeviceTime = 1028
%EQUATE `CameraDevicePicturesTaken = 2050
%EQUATE `CameraDevicePicturesRemaining = 2051
%EQUATE `CameraDeviceExposureMode = 2052
%EQUATE `CameraDeviceExposureComp = 2053
%EQUATE `CameraDeviceExposureTime = 2054
%EQUATE `CameraDeviceFNumber = 2055
%EQUATE `CameraDeviceFlashMode = 2056
%EQUATE `CameraDeviceFocusMode = 2057
%EQUATE `CameraDevicePanPosition = 2060
%EQUATE `CameraDeviceTiltPosition = 2061
%EQUATE `CameraDeviceTimerMode = 2062
%EQUATE `CameraDeviceTimerValue = 2063
%EQUATE `CameraDevicePowerMode = 2064
%EQUATE `CameraDeviceBatteryStatus = 2065
%EQUATE `CameraDeviceThumbWidth = 2066
%EQUATE `CameraDeviceThumbHeight = 2067
%EQUATE `CameraDevicePictWidth = 2068
%EQUATE `CameraDevicePictHeight = 2069
%EQUATE `CameraDeviceCompressionSetting = 2071
%EQUATE `CameraDeviceTimelapseInterval = 2073
%EQUATE `CameraDeviceTimelapseNumber = 2074
%EQUATE `CameraDeviceBurstInterval = 2075
%EQUATE `CameraDeviceBurstNumber = 2076
%EQUATE `CameraDeviceEffectMode = 2077
%EQUATE `CameraDeviceDigitalZoom = 2078
%EQUATE `CameraDeviceSharpness = 2079
%EQUATE `CameraDeviceContrast = 2080
%EQUATE `CameraDeviceCaptureMode = 2081
%EQUATE `CameraDeviceCaptureDelay = 2082
%EQUATE `CameraDeviceExposureIndex = 2083
%EQUATE `CameraDeviceExposureMeteringMode = 2084
%EQUATE `CameraDeviceFocusMeteringMode = 2085
%EQUATE `CameraDeviceFocusDistance = 2086
%EQUATE `CameraDeviceFocalLength = 2087
%EQUATE `CameraDeviceRGBGain = 2088
%EQUATE `CameraDeviceWhiteBalance = 2089
%EQUATE `CameraDeviceUploadURL = 2090
%EQUATE `CameraDeviceArtist = 2091
%EQUATE `CameraDeviceCopyrightInfo = 2092
%EQUATE `ScannerDeviceHorizontalBedSize = 3074
%EQUATE `ScannerDeviceVerticalBedSize = 3075
%EQUATE `ScannerDeviceHorizontalSheetFeedSize = 3076
%EQUATE `ScannerDeviceVerticalSheetFeedSize = 3077
%EQUATE `ScannerDeviceSheetFeederRegistration = 3078
%EQUATE `ScannerDeviceHorizontalBedRegistration = 3079
%EQUATE `ScannerDeviceVerticalBedRegistration = 3080
%EQUATE `ScannerDevicePlatenColor = 3081
%EQUATE `ScannerDevicePadColor = 3082
%EQUATE `ScannerDeviceDocumentHandlingCapabilities = 3086
%EQUATE `ScannerDeviceDocumentHandlingStatus = 3087
%EQUATE `ScannerDeviceDocumentHandlingSelect = 3088
%EQUATE `ScannerDeviceDocumentHandlingCapacity = 3089
%EQUATE `ScannerDeviceOpticalXres = 3090
%EQUATE `ScannerDeviceOpticalYres = 3091
%EQUATE `ScannerDeviceEndorserCharacters = 3092
%EQUATE `ScannerDeviceEndorserString = 3093
%EQUATE `ScannerDeviceScanAheadPages = 3094
%EQUATE `ScannerDeviceMaxScanTime = 3095
%EQUATE `ScannerDevicePages = 3096
%EQUATE `ScannerDevicePageSize = 3097
%EQUATE `ScannerDevicePageWidth = 3098
%EQUATE `ScannerDevicePageHeight = 3099
%EQUATE `ScannerDevicePreview = 3100
%EQUATE `ScannerDeviceTransparency = 3101
%EQUATE `ScannerDeviceTransparencySelect = 3102
%EQUATE `ScannerDeviceShowPreviewControl = 3103
%EQUATE `ScannerDeviceMinHorizontalSheetFeedSize = 3104
%EQUATE `ScannerDeviceMinVerticalSheetFeedSize = 3105
%EQUATE `FileDeviceMountPoint = 3330
%EQUATE `VideoDeviceLastPictureTaken = 3586
%EQUATE `VideoDeviceImagesDirectory = 3587
%EQUATE `VideoDeviceDShowDevicePath = 3588
%EQUATE `PictureItemName = 4098
%EQUATE `PictureFullItemName = 4099
%EQUATE `PictureItemTime = 4100
%EQUATE `PictureItemFlags = 4101
%EQUATE `PictureAccessRights = 4102
%EQUATE `PictureDatatype = 4103
%EQUATE `PictureDepth = 4104
%EQUATE `PicturePreferredFormat = 4105
%EQUATE `PictureFormat = 4106
%EQUATE `PictureCompression = 4107
%EQUATE `PictureTymed = 4108
%EQUATE `PictureChannelsPerPixel = 4109
%EQUATE `PictureBitsPerChannel = 4110
%EQUATE `PicturePlanar = 4111
%EQUATE `PicturePixelsPerLine = 4112
%EQUATE `PictureBytesPerLine = 4113
%EQUATE `PictureNumberOfLines = 4114
%EQUATE `PictureGammaCurves = 4115
%EQUATE `PictureItemSize = 4116
%EQUATE `PictureColorProfile = 4117
%EQUATE `PictureMinBufferSize = 4118
%EQUATE `PictureBufferSize = 4118
%EQUATE `PictureRegionType = 4119
%EQUATE `PictureIcmProfileName = 4120
%EQUATE `PictureAppColorMapping = 4121
%EQUATE `PicturePropStreamCompatId = 4122
%EQUATE `PictureFilenameExtension = 4123
%EQUATE `PictureSuppressPropertyPage = 4124
%EQUATE `CameraPictureThumbnail = 5122
%EQUATE `CameraPictureThumbWidth = 5123
%EQUATE `CameraPictureThumbHeight = 5124
%EQUATE `CameraPictureAudioAvailable = 5125
%EQUATE `CameraPictureAudioDataFormat = 5126
%EQUATE `CameraPictureAudioData = 5127
%EQUATE `CameraPictureNumPictPerRow = 5128
%EQUATE `CameraPictureSequence = 5129
%EQUATE `CameraPictureTimedelay = 5130
%EQUATE `ScannerPictureCurIntent = 6146
%EQUATE `ScannerPictureXres = 6147
%EQUATE `ScannerPictureYres = 6148
%EQUATE `ScannerPictureXpos = 6149
%EQUATE `ScannerPictureYpos = 6150
%EQUATE `ScannerPictureXextent = 6151
%EQUATE `ScannerPictureYextent = 6152
%EQUATE `ScannerPicturePhotometricInterp = 6153
%EQUATE `ScannerPictureBrightness = 6154
%EQUATE `ScannerPictureContrast = 6155
%EQUATE `ScannerPictureOrientation = 6156
%EQUATE `ScannerPictureRotation = 6157
%EQUATE `ScannerPictureMirror = 6158
%EQUATE `ScannerPictureThreshold = 6159
%EQUATE `ScannerPictureInvert = 6160
%EQUATE `ScannerPictureWarmUpTime = 6161
' ########################################################################################
' Interface name = ICollection
' IID = {C34C8CE7-B253-4F89-AA25-8A24AD71D0C0}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%IWiaCollection_INTERFACE_DEFINED)
 %IWiaCollection_INTERFACE_DEFINED = 1
INTERFACE IWiaCollection $IID_IWiaCollection
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET Item <0> ( ' VTable offset = 28
 BYVAL Index AS LONG
 ) AS IDispatch
 ' =====================================================================================
 PROPERTY GET Count <1> ( ' VTable offset = 32
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET Length <2> ( ' VTable offset = 36
 ) AS DWORD
 ' =====================================================================================
 PROPERTY GET NewEnum_ <-4> ( ' VTable offset = 40
 ) AS IUnknown
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ICollection_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IWiaDispatchItem
' IID = {D06D503F-4B71-40F3-94A7-66478F732BC9}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%IWiaDispatchItem_INTERFACE_DEFINED)
 %IWiaDispatchItem_INTERFACE_DEFINED = 1
INTERFACE IWiaDispatchItem $IID_IWiaDispatchItem
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET ConnectStatus <1> ( ' VTable offset = 28
 ) AS WSTRING
 ' =====================================================================================
 PROPERTY GET Time <2> ( ' VTable offset = 32
 ) AS WSTRING
 ' =====================================================================================
 PROPERTY GET FirmwareVersion <3> ( ' VTable offset = 36
 ) AS WSTRING
 ' =====================================================================================
 METHOD GetItemsFromUI <4> ( ' VTable offset = 40
 OPTIONAL BYVAL Flags AS LONG
 , OPTIONAL BYVAL Intent AS LONG
 ) AS IWiaCollection
 ' =====================================================================================
 METHOD Transfer <5> ( ' VTable offset = 44
 BYVAL Filename AS WSTRING
 , OPTIONAL BYVAL AsyncTransfer AS INTEGER
 ) ' void
 ' =====================================================================================
 METHOD TakePicture <6> ( ' VTable offset = 48
 ) AS IWiaDispatchItem
 ' =====================================================================================
 PROPERTY GET Name <20> ( ' VTable offset = 52
 ) AS WSTRING
 ' =====================================================================================
 PROPERTY GET FullName <21> ( ' VTable offset = 56
 ) AS WSTRING
 ' =====================================================================================
 PROPERTY GET ItemType <22> ( ' VTable offset = 60
 ) AS WSTRING
 ' =====================================================================================
 PROPERTY GET Width <23> ( ' VTable offset = 64
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET Height <24> ( ' VTable offset = 68
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET ThumbWidth <50> ( ' VTable offset = 72
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET ThumbHeight <51> ( ' VTable offset = 76
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET Thumbnail <52> ( ' VTable offset = 80
 ) AS WSTRING
 ' =====================================================================================
 PROPERTY GET PictureHeight <53> ( ' VTable offset = 84
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET PictureWidth <54> ( ' VTable offset = 88
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET Children <500> ( ' VTable offset = 92
 ) AS IWiaCollection
 ' =====================================================================================
 METHOD GetPropById <1000> ( ' VTable offset = 96
 BYVAL Id AS LONG
 ) AS VARIANT
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IWiaDispatchItem_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IWiaDeviceInfo
' IID = {5267FF5E-7CAF-4769-865D-17A25968525E}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%IWiaDeviceInfo_INTERFACE_DEFINED)
 %IWiaDeviceInfo_INTERFACE_DEFINED = 1
INTERFACE IWiaDeviceInfo $IID_IWiaDeviceInfo
 INHERIT IDispatch
 ' =====================================================================================
 METHOD Create <1> ( ' VTable offset = 28
 ) AS IWiaDispatchItem
 ' =====================================================================================
 PROPERTY GET Id <2> ( ' VTable offset = 32
 ) AS WSTRING
 ' =====================================================================================
 PROPERTY GET Name <3> ( ' VTable offset = 36
 ) AS WSTRING
 ' =====================================================================================
 PROPERTY GET Type <4> ( ' VTable offset = 40
 ) AS WSTRING
 ' =====================================================================================
 PROPERTY GET Port <5> ( ' VTable offset = 44
 ) AS WSTRING
 ' =====================================================================================
 PROPERTY GET UIClsid <6> ( ' VTable offset = 48
 ) AS WSTRING
 ' =====================================================================================
 PROPERTY GET Manufacturer <7> ( ' VTable offset = 52
 ) AS WSTRING
 ' =====================================================================================
 METHOD GetPropById <1000> ( ' VTable offset = 56
 BYVAL Id AS LONG
 ) AS VARIANT
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IWiaDeviceInfo_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IWia
' IID = {B10BA1BC-3713-4EC0-8EEA-690EBD2CED8A}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%IWia_INTERFACE_DEFINED)
 %IWia_INTERFACE_DEFINED = 1
INTERFACE IWia $IID_IWia
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET Devices <1> ( ' VTable offset = 28
 ) AS IWiaCollection
 ' =====================================================================================
 METHOD Create <2> ( ' VTable offset = 32
 BYREF Device AS VARIANT
 ) AS IWiaDispatchItem
 ' =====================================================================================
 METHOD DebugDialog_ <10010> ( ' VTable offset = 36
 BYVAL fWait AS LONG
 ) ' void
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IWia_INTERFACE_DEFINED__ */
#ENDIF
