' ########################################################################################
' Microsoft Windows
' File: PortableDeviceApi.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.
' ########################################################################################
#IF NOT %DEF(PBX_PortableDeviceApi_PBI)
#DEFINE PBX_PortableDeviceApi_PBI
%EQUATE `PORTABLEDEVICEAPI_INC = 1
' /* header files for imported files */
#INCLUDE ONCE "Legacy/System/PropIdl.inc"
#INCLUDE ONCE "Legacy/UI/PortableDeviceTypes.inc"
$LIBID_PortableDeviceApiLib = GUID$("{1F001332-1A57-4934-BE31-AFFC99F4EE0A}")
'#if (_WIN32_WINNT >= 0x0501) // XP and later
$CLSID_PortableDevice = GUID$("{728A21C5-3D9E-48D7-9810-864848F0F404}")
$CLSID_PortableDeviceManager = GUID$("{0AF10CEC-2ECD-4B92-9581-34F6AE0637F3}")
$CLSID_PortableDeviceService = GUID$("{EF5DB4C2-9312-422C-9152-411CD9C4DD84}")
$CLSID_PortableDeviceDispatchFactory = GUID$("{43232233-8338-4658-AE01-0B4AE830B6B0}")
$CLSID_PortableDeviceFTM = GUID$("{F7C0039A-4762-488A-B4B3-760EF9A1BA9B}")
$CLSID_PortableDeviceServiceFTM = GUID$("{1649B154-C794-497A-9B03-F3F0121302F3}")
' ########################################################################################
' Interface name = IPortableDeviceManager
' IID = {A1567595-4C2F-4574-A6FA-ECEF917B9A40}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IPortableDeviceManager_INTERFACE_DEFINED)
 %IPortableDeviceManager_INTERFACE_DEFINED = 1
$IID_IPortableDeviceManager = GUID$("{A1567595-4C2F-4574-A6FA-ECEF917B9A40}")
INTERFACE IPortableDeviceManager $IID_IPortableDeviceManager
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetDevices ( ' VTable offset = 12
 BYREF pPnPDeviceIDs AS DWORD
 , BYREF pcPnPDeviceIDs AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD RefreshDeviceList ( ' VTable offset = 16
 ) AS LONG
 ' =====================================================================================
 METHOD GetDeviceFriendlyName ( ' VTable offset = 20
 BYVAL pszPnPDeviceID AS WSTRINGZ PTR
 , BYVAL pDeviceFriendlyName AS WSTRINGZ PTR
 , BYREF pcchDeviceFriendlyName AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetDeviceDescription ( ' VTable offset = 24
 BYVAL pszPnPDeviceID AS WSTRINGZ PTR
 , BYVAL pDeviceDescription AS WSTRINGZ PTR
 , BYREF pcchDeviceDescription AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetDeviceManufacturer ( ' VTable offset = 28
 BYVAL pszPnPDeviceID AS WSTRINGZ PTR
 , BYVAL pDeviceManufacturer AS WSTRINGZ PTR
 , BYREF pcchDeviceManufacturer AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetDeviceProperty ( ' VTable offset = 32
 BYVAL pszPnPDeviceID AS WSTRINGZ PTR
 , BYREF pszDevicePropertyName AS WSTRINGZ
 , BYVAL pData AS BYTE PTR
 , BYREF pcbData AS DWORD
 , BYREF pdwType AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetPrivateDevices ( ' VTable offset = 36
 BYREF pPnPDeviceIDs AS DWORD
 , BYREF pcPnPDeviceIDs AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IPortableDeviceManager_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IPortableDevice
' IID = {625E2DF8-6392-4CF0-9AD1-3CFA5F17775C}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IPortableDevice_INTERFACE_DEFINED)
 %IPortableDevice_INTERFACE_DEFINED = 1
$IID_IPortableDevice = GUID$("{625E2DF8-6392-4CF0-9AD1-3CFA5F17775C}")
INTERFACE IPortableDevice $IID_IPortableDevice
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Open ( ' VTable offset = 12
 BYVAL pszPnPDeviceID AS WSTRINGZ PTR
 , BYVAL pClientInfo AS IPortableDeviceValues
 ) AS LONG
 ' =====================================================================================
 METHOD SendCommand ( ' VTable offset = 16
 BYVAL dwFlags AS DWORD
 , BYVAL pParameters AS IPortableDeviceValues
 , BYREF ppResults AS IPortableDeviceValues
 ) AS LONG
 ' =====================================================================================
 METHOD Content ( ' VTable offset = 20
 BYREF ppContent AS IPortableDeviceContent
 ) AS LONG
 ' =====================================================================================
 METHOD Capabilities ( ' VTable offset = 24
 BYREF ppCapabilities AS IPortableDeviceCapabilities
 ) AS LONG
 ' =====================================================================================
 METHOD Cancel ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 METHOD Close ( ' VTable offset = 32
 ) AS LONG
 ' =====================================================================================
 METHOD Advise ( ' VTable offset = 36
 BYVAL dwFlags AS DWORD
 , BYVAL pCallback AS IPortableDeviceEventCallback
 , BYVAL pParameters AS IPortableDeviceValues
 , BYREF ppszCookie AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Unadvise ( ' VTable offset = 40
 BYREF pszCookie AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD GetPnPDeviceID ( ' VTable offset = 44
 BYVAL ppszPnPDeviceID AS WSTRINGZ PTR
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IPortableDevice_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IPortableDeviceContent
' IID = {6A96ED84-7C73-4480-9938-BF5AF477D426}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IPortableDeviceContent_INTERFACE_DEFINED)
 %IPortableDeviceContent_INTERFACE_DEFINED = 1
$IID_IPortableDeviceContent = GUID$("{6A96ED84-7C73-4480-9938-BF5AF477D426}")
INTERFACE IPortableDeviceContent $IID_IPortableDeviceContent
 INHERIT IUnknown
 ' =====================================================================================
 METHOD EnumObjects ( ' VTable offset = 12
 BYVAL dwFlags AS DWORD
 , BYREF pszParentObjectID AS WSTRINGZ
 , BYVAL pFilter AS IPortableDeviceValues
 , BYREF ppenum AS IEnumPortableDeviceObjectIDs
 ) AS LONG
 ' =====================================================================================
 METHOD Properties ( ' VTable offset = 16
 BYREF ppProperties AS IPortableDeviceProperties
 ) AS LONG
 ' =====================================================================================
 METHOD Transfer ( ' VTable offset = 20
 BYREF ppResources AS IPortableDeviceResources
 ) AS LONG
 ' =====================================================================================
 METHOD CreateObjectWithPropertiesOnly ( ' VTable offset = 24
 BYVAL pValues AS IPortableDeviceValues
 , BYREF ppszObjectID AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD CreateObjectWithPropertiesAndData ( ' VTable offset = 28
 BYVAL pValues AS IPortableDeviceValues
 , BYREF ppData AS IStream
 , BYREF pdwOptimalWriteBufferSize AS DWORD
 , BYREF ppszCookie AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Delete ( ' VTable offset = 32
 BYVAL dwOptions AS DWORD
 , BYVAL pObjectIDs AS IPortableDevicePropVariantCollection
 , BYREF ppResults AS IPortableDevicePropVariantCollection
 ) AS LONG
 ' =====================================================================================
 METHOD GetObjectIDsFromPersistentUniqueIDs ( ' VTable offset = 36
 BYVAL pPersistentUniqueIDs AS IPortableDevicePropVariantCollection
 , BYREF ppObjectIDs AS IPortableDevicePropVariantCollection
 ) AS LONG
 ' =====================================================================================
 METHOD Cancel ( ' VTable offset = 40
 ) AS LONG
 ' =====================================================================================
 METHOD Move ( ' VTable offset = 44
 BYVAL pObjectIDs AS IPortableDevicePropVariantCollection
 , BYREF pszDestinationFolderObjectID AS WSTRINGZ
 , BYREF ppResults AS IPortableDevicePropVariantCollection
 ) AS LONG
 ' =====================================================================================
 METHOD Copy ( ' VTable offset = 48
 BYVAL pObjectIDs AS IPortableDevicePropVariantCollection
 , BYREF pszDestinationFolderObjectID AS WSTRINGZ
 , BYREF ppResults AS IPortableDevicePropVariantCollection
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IPortableDeviceContent_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IPortableDeviceContent2
' IID = 9b4add96-f6bf-4034-8708-eca72bf10554
' Inherited interface = IPortableDeviceContent
' ########################################################################################
#IF NOT %DEF(%IPortableDeviceContent2_INTERFACE_DEFINED)
 %IPortableDeviceContent2_INTERFACE_DEFINED = 1
$IID_IPortableDeviceContent2 = GUID$("{9b4add96-f6bf-4034-8708-eca72bf10554}")
INTERFACE IPortableDeviceContent2 $IID_IPortableDeviceContent2
 INHERIT IUnknown
 ' =====================================================================================
 ' IPortableDeviceContent methods
 ' =====================================================================================
 METHOD EnumObjects ( ' VTable offset = 12
 BYVAL dwFlags AS DWORD
 , BYREF pszParentObjectID AS WSTRINGZ
 , BYVAL pFilter AS IPortableDeviceValues
 , BYREF ppenum AS IEnumPortableDeviceObjectIDs
 ) AS LONG
 ' =====================================================================================
 METHOD Properties ( ' VTable offset = 16
 BYREF ppProperties AS IPortableDeviceProperties
 ) AS LONG
 ' =====================================================================================
 METHOD Transfer ( ' VTable offset = 20
 BYREF ppResources AS IPortableDeviceResources
 ) AS LONG
 ' =====================================================================================
 METHOD CreateObjectWithPropertiesOnly ( ' VTable offset = 24
 BYVAL pValues AS IPortableDeviceValues
 , BYREF ppszObjectID AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD CreateObjectWithPropertiesAndData ( ' VTable offset = 28
 BYVAL pValues AS IPortableDeviceValues
 , BYREF ppData AS IStream
 , BYREF pdwOptimalWriteBufferSize AS DWORD
 , BYREF ppszCookie AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Delete ( ' VTable offset = 32
 BYVAL dwOptions AS DWORD
 , BYVAL pObjectIDs AS IPortableDevicePropVariantCollection
 , BYREF ppResults AS IPortableDevicePropVariantCollection
 ) AS LONG
 ' =====================================================================================
 METHOD GetObjectIDsFromPersistentUniqueIDs ( ' VTable offset = 36
 BYVAL pPersistentUniqueIDs AS IPortableDevicePropVariantCollection
 , BYREF ppObjectIDs AS IPortableDevicePropVariantCollection
 ) AS LONG
 ' =====================================================================================
 METHOD Cancel ( ' VTable offset = 40
 ) AS LONG
 ' =====================================================================================
 METHOD Move ( ' VTable offset = 44
 BYVAL pObjectIDs AS IPortableDevicePropVariantCollection
 , BYREF pszDestinationFolderObjectID AS WSTRINGZ
 , BYREF ppResults AS IPortableDevicePropVariantCollection
 ) AS LONG
 ' =====================================================================================
 METHOD Copy ( ' VTable offset = 48
 BYVAL pObjectIDs AS IPortableDevicePropVariantCollection
 , BYREF pszDestinationFolderObjectID AS WSTRINGZ
 , BYREF ppResults AS IPortableDevicePropVariantCollection
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IPortableDeviceContent2 methods
 ' =====================================================================================
 METHOD UpdateObjectWithPropertiesAndData ( ' VTable offset = 52
 BYVAL pszObjectID AS WSTRINGZ PTR
 , BYVAL pProperties AS IPortableDeviceValues
 , BYREF ppData AS IStream
 , BYREF pdwOptimalWriteBufferSize AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IPortableDeviceContent2_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IEnumPortableDeviceObjectIDs
' IID = {10ECE955-CF41-4728-BFA0-41EEDF1BBF19}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IEnumPortableDeviceObjectIDs_INTERFACE_DEFINED)
 %IEnumPortableDeviceObjectIDs_INTERFACE_DEFINED = 1
$IID_IEnumPortableDeviceObjectIDs = GUID$("{10ECE955-CF41-4728-BFA0-41EEDF1BBF19}")
INTERFACE IEnumPortableDeviceObjectIDs $IID_IEnumPortableDeviceObjectIDs
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Next ( ' VTable offset = 12
 BYVAL cObjects AS DWORD
 , BYREF pObjIDs AS WSTRINGZ
 , BYREF pcFetched AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Skip ( ' VTable offset = 16
 BYVAL cObjects AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Reset ( ' VTable offset = 20
 ) AS LONG
 ' =====================================================================================
 METHOD Clone ( ' VTable offset = 24
 BYREF ppenum AS IEnumPortableDeviceObjectIDs
 ) AS LONG
 ' =====================================================================================
 METHOD Cancel ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IEnumPortableDeviceObjectIDs_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IPortableDeviceProperties
' IID = {7F6D695C-03DF-4439-A809-59266BEEE3A6}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IPortableDeviceProperties_INTERFACE_DEFINED)
 %IPortableDeviceProperties_INTERFACE_DEFINED = 1
$IID_IPortableDeviceProperties = GUID$("{7F6D695C-03DF-4439-A809-59266BEEE3A6}")
INTERFACE IPortableDeviceProperties $IID_IPortableDeviceProperties
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetSupportedProperties ( ' VTable offset = 12
 BYVAL pszObjectID AS WSTRINGZ PTR
 , BYREF ppKeys AS IPortableDeviceKeyCollection
 ) AS LONG
 ' =====================================================================================
 METHOD GetPropertyAttributes ( ' VTable offset = 16
 BYVAL pszObjectID AS WSTRINGZ PTR
 , BYREF key AS PROPERTYKEY
 , BYREF ppAttributes AS IPortableDeviceValues
 ) AS LONG
 ' =====================================================================================
 METHOD GetValues ( ' VTable offset = 20
 BYVAL pszObjectID AS WSTRINGZ PTR
 , BYVAL pKeys AS IPortableDeviceKeyCollection
 , BYREF ppValues AS IPortableDeviceValues
 ) AS LONG
 ' =====================================================================================
 METHOD SetValues ( ' VTable offset = 24
 BYVAL pszObjectID AS WSTRINGZ PTR
 , BYVAL pValues AS IPortableDeviceValues
 , BYREF ppResults AS IPortableDeviceValues
 ) AS LONG
 ' =====================================================================================
 METHOD Delete ( ' VTable offset = 28
 BYVAL pszObjectID AS WSTRINGZ PTR
 , BYVAL pKeys AS IPortableDeviceKeyCollection
 ) AS LONG
 ' =====================================================================================
 METHOD Cancel ( ' VTable offset = 32
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IPortableDeviceProperties_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IPortableDeviceResources
' IID = {FD8878AC-D841-4D17-891C-E6829CDB6934}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IPortableDeviceResources_INTERFACE_DEFINED)
 %IPortableDeviceResources_INTERFACE_DEFINED = 1
$IID_IPortableDeviceResources = GUID$("{FD8878AC-D841-4D17-891C-E6829CDB6934}")
INTERFACE IPortableDeviceResources $IID_IPortableDeviceResources
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetSupportedResources ( ' VTable offset = 12
 BYVAL pszObjectID AS WSTRINGZ PTR
 , BYREF IPortableDeviceKeyCollection AS IPortableDeviceKeyCollection
 ) AS LONG
 ' =====================================================================================
 METHOD GetResourceAttributes ( ' VTable offset = 16
 BYVAL pszObjectID AS WSTRINGZ PTR
 , BYREF key AS PROPERTYKEY
 , BYREF ppResourceAttributes AS IPortableDeviceValues
 ) AS LONG
 ' =====================================================================================
 METHOD GetStream ( ' VTable offset = 20
 BYVAL pszObjectID AS WSTRINGZ PTR
 , BYREF key AS PROPERTYKEY
 , BYVAL dwMode AS DWORD
 , BYREF pdwOptimalBufferSize AS DWORD
 , BYREF ppStream AS IStream
 ) AS LONG
 ' =====================================================================================
 METHOD Delete ( ' VTable offset = 24
 BYVAL pszObjectID AS WSTRINGZ PTR
 , BYVAL pKeys AS IPortableDeviceKeyCollection
 ) AS LONG
 ' =====================================================================================
 METHOD Cancel ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 METHOD CreateResource ( ' VTable offset = 32
 BYVAL pResourceAttributes AS IPortableDeviceValues
 , BYREF ppData AS IStream
 , OPTIONAL BYREF pdwOptimalWriteBufferSize AS DWORD
 , OPTIONAL BYREF ppszCookie AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IPortableDeviceResources_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IPortableDeviceCapabilities
' IID = {2C8C6DBF-E3DC-4061-BECC-8542E810D126}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IPortableDeviceCapabilities_INTERFACE_DEFINED)
 %IPortableDeviceCapabilities_INTERFACE_DEFINED = 1
$IID_IPortableDeviceCapabilities = GUID$("{2C8C6DBF-E3DC-4061-BECC-8542E810D126}")
INTERFACE IPortableDeviceCapabilities $IID_IPortableDeviceCapabilities
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetSupportedCommands ( ' VTable offset = 12
 BYREF ppCommands AS IPortableDeviceKeyCollection
 ) AS LONG
 ' =====================================================================================
 METHOD GetCommandOptions ( ' VTable offset = 16
 BYREF Command AS PROPERTYKEY
 , BYREF ppOptions AS IPortableDeviceValues
 ) AS LONG
 ' =====================================================================================
 METHOD GetFunctionalCategories ( ' VTable offset = 20
 BYREF ppCategories AS IPortableDevicePropVariantCollection
 ) AS LONG
 ' =====================================================================================
 METHOD GetFunctionalObjects ( ' VTable offset = 24
 BYREF Category AS GUID
 , BYREF ppObjectIDs AS IPortableDevicePropVariantCollection
 ) AS LONG
 ' =====================================================================================
 METHOD GetSupportedContentTypes ( ' VTable offset = 28
 BYREF Category AS GUID
 , BYREF ppContentTypes AS IPortableDevicePropVariantCollection
 ) AS LONG
 ' =====================================================================================
 METHOD GetSupportedFormats ( ' VTable offset = 32
 BYREF ContentType AS GUID
 , BYREF ppFormats AS IPortableDevicePropVariantCollection
 ) AS LONG
 ' =====================================================================================
 METHOD GetSupportedFormatProperties ( ' VTable offset = 36
 BYREF Format AS GUID
 , BYREF ppKeys AS IPortableDeviceKeyCollection
 ) AS LONG
 ' =====================================================================================
 METHOD GetFixedPropertyAttributes ( ' VTable offset = 40
 BYREF Format AS GUID
 , BYREF key AS PROPERTYKEY
 , BYREF ppAttributes AS IPortableDeviceValues
 ) AS LONG
 ' =====================================================================================
 METHOD Cancel ( ' VTable offset = 44
 ) AS LONG
 ' =====================================================================================
 METHOD GetSupportedEvents ( ' VTable offset = 48
 BYREF ppEvents AS IPortableDevicePropVariantCollection
 ) AS LONG
 ' =====================================================================================
 METHOD GetEventOptions ( ' VTable offset = 52
 BYREF Event AS GUID
 , BYREF ppOptions AS IPortableDeviceValues
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IPortableDeviceCapabilities_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IPortableDeviceEventCallback
' IID = {A8792A31-F385-493C-A893-40F64EB45F6E}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IPortableDeviceEventCallback_INTERFACE_DEFINED)
 %IPortableDeviceEventCallback_INTERFACE_DEFINED = 1
$IID_IPortableDeviceEventCallback = GUID$("{A8792A31-F385-493C-A893-40F64EB45F6E}")
INTERFACE IPortableDeviceEventCallback $IID_IPortableDeviceEventCallback
 INHERIT IUnknown
 ' =====================================================================================
 METHOD OnEvent ( ' VTable offset = 12
 BYVAL pEventParameters AS IPortableDeviceValues
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IPortableDeviceEventCallback_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IPortableDeviceDataStream
' IID = {A8792A31-F385-493C-A893-40F64EB45F6E}
' Inherited interface = IStream
' ########################################################################################
#IF NOT %DEF(%IPortableDeviceDataStream_INTERFACE_DEFINED)
 %IPortableDeviceDataStream_INTERFACE_DEFINED = 1
$IID_IPortableDeviceDataStream = GUID$("{88E04DB3-1012-4D64-9996-F703A950D3F4}")
INTERFACE IPortableDeviceDataStream $IID_IPortableDeviceDataStream
 INHERIT IUnknown
 ' =====================================================================================
 ' ISequentialStream Methods
 ' =====================================================================================
 METHOD Read ( ' VTable offset = 12
 BYVAL pv AS DWORD
 , BYVAL cb AS DWORD
 , BYREF pcbRead AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Write ( ' VTable offset = 16
 BYVAL pv AS DWORD
 , BYVAL cb AS DWORD
 , BYREF pcbWritten AS DWORD
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IStream Methods
 ' =====================================================================================
 METHOD Seek ( ' VTable offset = 20
 BYVAL dlibMove AS QUAD
 , BYVAL dwOrigin AS DWORD
 , BYREF plibNewPosition AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD SetSize ( ' VTable offset = 24
 BYVAL libNewSize AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD CopyTo ( ' VTable offset = 28
 BYVAL pstm AS IStream
 , BYVAL cb AS QUAD
 , BYREF pcbRead AS QUAD
 , BYREF pcbWritten AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD Commit ( ' VTable offset = 32
 BYVAL grfCommitFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Revert ( ' VTable offset = 36
 ) AS LONG
 ' =====================================================================================
 METHOD LockRegion ( ' VTable offset = 40
 BYVAL libOffset AS QUAD
 , BYVAL cb AS QUAD
 , BYVAL dwLockType AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD UnlockRegion ( ' VTable offset = 44
 BYVAL libOffset AS QUAD
 , BYVAL cb AS QUAD
 , BYVAL dwLockType AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Stat ( ' VTable offset = 48
 BYREF pstatstg AS STATSTG
 , BYVAL grfStatFlag AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Clone ( ' VTable offset = 52
 BYREF ppstm AS IStream
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IPortableDeviceDataStream Methods
 ' =====================================================================================
 METHOD GetObjectID ( ' VTable offset = 56
 BYREF ppszObjectID AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Cancel ( ' VTable offset = 60
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IPortableDeviceDataStream_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IPortableDevicePropertiesBulk
' IID = 482B05C0-4056-44ED-9E0F-5E23B009DA93
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IPortableDevicePropertiesBulk_INTERFACE_DEFINED)
 %IPortableDevicePropertiesBulk_INTERFACE_DEFINED = 1
$IID_IPortableDevicePropertiesBulk = GUID$("{482B05C0-4056-44ED-9E0F-5E23B009DA93}")
INTERFACE IPortableDevicePropertiesBulk $IID_IPortableDevicePropertiesBulk
 INHERIT IUnknown
 ' =====================================================================================
 METHOD QueueGetValuesByObjectList ( ' VTable offset = 12
 BYVAL pObjectIDs AS IPortableDevicePropVariantCollection
 , BYVAL pKeys AS IPortableDeviceKeyCollection
 , BYVAL pCallback AS IPortableDevicePropertiesBulkCallback
 , BYREF pContext AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD QueueGetValuesByObjectFormat ( ' VTable offset = 16
 BYREF pguidObjectFormat AS GUID
 , BYREF pszParentObjectID AS WSTRINGZ
 , BYVAL dwDepth AS DWORD
 , BYVAL pKeys AS IPortableDeviceKeyCollection
 , BYVAL pCallback AS IPortableDevicePropertiesBulkCallback
 , BYREF pContext AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD QueueSetValuesByObjectList ( ' VTable offset = 20
 BYVAL pObjectValues AS IPortableDeviceValuesCollection
 , BYVAL pCallback AS IPortableDevicePropertiesBulkCallback
 , BYREF pContext AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD Start ( ' VTable offset = 24
 BYREF pContext AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD Cancel ( ' VTable offset = 28
 BYREF pContext AS GUID
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IPortableDevicePropertiesBulk_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IPortableDevicePropertiesBulkCallback
' IID = 9DEACB80-11E8-40E3-A9F3-F557986A7845
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IPortableDevicePropertiesBulkCallback_INTERFACE_DEFINED)
 %IPortableDevicePropertiesBulkCallback_INTERFACE_DEFINED = 1
$IID_IPortableDevicePropertiesBulkCallback = GUID$("{9DEACB80-11E8-40E3-A9F3-F557986A7845}")
INTERFACE IPortableDevicePropertiesBulkCallback $IID_IPortableDevicePropertiesBulkCallback
 INHERIT IUnknown
 ' =====================================================================================
 METHOD OnStart ( ' VTable offset = 12
 BYREF pContext AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD OnProgress ( ' VTable offset = 16
 BYREF pContext AS GUID
 , BYVAL pResults AS IPortableDeviceValuesCollection
 ) AS LONG
 ' =====================================================================================
 METHOD OnEnd ( ' VTable offset = 20
 BYREF pContext AS GUID
 , BYVAL hrStatus AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IPortableDevicePropertiesBulkCallback_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IPortableDeviceServiceManager
' IID = a8abc4e9-a84a-47a9-80b3-c5d9b172a961
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IPortableDeviceServiceManager_INTERFACE_DEFINED)
 %IPortableDeviceServiceManager_INTERFACE_DEFINED = 1
$IID_IPortableDeviceServiceManager = GUID$("{a8abc4e9-a84a-47a9-80b3-c5d9b172a961}")
INTERFACE IPortableDeviceServiceManager $IID_IPortableDeviceServiceManager
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetDeviceServices ( ' VTable offset = 12
 BYVAL pszPnPDeviceID AS WSTRINGZ PTR
 , BYREF guidServiceCategory AS GUID
 , BYREF pServices AS DWORD
 , BYREF pcServices AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetDeviceForService ( ' VTable offset = 16
 BYVAL pszPnPServiceID AS WSTRINGZ PTR
 , BYREF ppszPnPDeviceID AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IPortableDeviceServiceManager_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IPortableDeviceService
' IID = d3bd3a44-d7b5-40a9-98b7-2fa4d01dec08
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IPortableDeviceService_INTERFACE_DEFINED)
 %IPortableDeviceService_INTERFACE_DEFINED = 1
$IID_IPortableDeviceService = GUID$("{d3bd3a44-d7b5-40a9-98b7-2fa4d01dec08}")
INTERFACE IPortableDeviceService $IID_IPortableDeviceService
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Open ( ' VTable offset = 12
 BYREF pszPnPServiceID AS WSTRINGZ
 , BYVAL pClientInfo AS IPortableDeviceValues
 ) AS LONG
 ' =====================================================================================
 METHOD Capabilities ( ' VTable offset = 16
 BYREF ppCapabilities AS IPortableDeviceServiceCapabilities
 ) AS LONG
 ' =====================================================================================
 METHOD Content ( ' VTable offset = 20
 BYREF ppContent AS IPortableDeviceContent2
 ) AS LONG
 ' =====================================================================================
 METHOD Methods ( ' VTable offset = 24
 BYREF ppMethods AS IPortableDeviceServiceMethods
 ) AS LONG
 ' =====================================================================================
 METHOD Cancel ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 METHOD Close ( ' VTable offset = 32
 ) AS LONG
 ' =====================================================================================
 METHOD GetServiceObjectID ( ' VTable offset = 36
 BYREF ppszServiceObjectID AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetPnPServiceID ( ' VTable offset = 40
 BYREF ppszPnPServiceID AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Advise ( ' VTable offset = 44
 BYVAL dwFlags AS DWORD
 , BYVAL pCallback AS DWORD
 , BYVAL pParameters AS IPortableDeviceValues
 , BYREF ppszCookie AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Unadvise ( ' VTable offset = 48
 BYREF pszCookie AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SendCommand ( ' VTable offset = 52
 BYVAL dwFlags AS DWORD
 , BYVAL pParameters AS IPortableDeviceValues
 , BYREF ppResults AS IPortableDeviceValues
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IPortableDeviceService_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IPortableDeviceServiceCapabilities
' IID = 24dbd89d-413e-43e0-bd5b-197f3c56c886
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IPortableDeviceServiceCapabilities_INTERFACE_DEFINED)
 %IPortableDeviceServiceCapabilities_INTERFACE_DEFINED = 1
$IID_IPortableDeviceServiceCapabilities = GUID$("{24dbd89d-413e-43e0-bd5b-197f3c56c886}")
INTERFACE IPortableDeviceServiceCapabilities $IID_IPortableDeviceServiceCapabilities
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetSupportedMethods ( ' VTable offset = 12
 BYREF ppMethods AS IPortableDevicePropVariantCollection
 ) AS LONG
 ' =====================================================================================
 METHOD GetSupportedMethodsByFormat ( ' VTable offset = 16
 BYREF Format AS GUID
 , BYREF ppMethods AS IPortableDevicePropVariantCollection
 ) AS LONG
 ' =====================================================================================
 METHOD GetMethodAttributes ( ' VTable offset = 20
 BYREF Method AS GUID
 , BYREF ppAttributes AS IPortableDeviceValues
 ) AS LONG
 ' =====================================================================================
 METHOD GetMethodParameterAttributes ( ' VTable offset = 24
 BYREF Method AS GUID
 , BYREF Parameter AS PROPERTYKEY
 , BYREF ppAttributes AS IPortableDeviceValues
 ) AS LONG
 ' =====================================================================================
 METHOD GetSupportedFormats ( ' VTable offset = 28
 BYREF ppFormats AS IPortableDevicePropVariantCollection
 ) AS LONG
 ' =====================================================================================
 METHOD GetFormatAttributes ( ' VTable offset = 32
 BYREF Format AS GUID
 , BYREF ppAttributes AS IPortableDeviceValues
 ) AS LONG
 ' =====================================================================================
 METHOD GetSupportedFormatProperties ( ' VTable offset = 36
 BYREF Format AS GUID
 , BYREF ppKeys AS IPortableDeviceKeyCollection
 ) AS LONG
 ' =====================================================================================
 METHOD GetFormatPropertyAttributes ( ' VTable offset = 40
 BYREF Format AS GUID
 , BYREF Property AS PROPERTYKEY
 , BYREF ppAttributes AS IPortableDeviceValues
 ) AS LONG
 ' =====================================================================================
 METHOD GetSupportedEvents ( ' VTable offset = 44
 BYREF ppEvents AS IPortableDevicePropVariantCollection
 ) AS LONG
 ' =====================================================================================
 METHOD GetEventAttributes ( ' VTable offset = 48
 BYREF Event AS GUID
 , BYREF ppAttributes AS IPortableDeviceValues
 ) AS LONG
 ' =====================================================================================
 METHOD GetEventParameterAttributes ( ' VTable offset = 52
 BYREF Event AS GUID
 , BYREF Parameter AS PROPERTYKEY
 , BYREF ppAttributes AS IPortableDeviceValues
 ) AS LONG
 ' =====================================================================================
 METHOD GetInheritedServices ( ' VTable offset = 56
 BYVAL dwInheritanceType AS DWORD
 , BYREF ppServices AS IPortableDevicePropVariantCollection
 ) AS LONG
 ' =====================================================================================
 METHOD GetFormatRenderingProfiles ( ' VTable offset = 60
 BYREF Format AS GUID
 , BYREF ppRenderingProfiles AS IPortableDeviceValuesCollection
 ) AS LONG
 ' =====================================================================================
 METHOD GetSupportedCommands ( ' VTable offset = 64
 BYREF ppCommands AS IPortableDeviceKeyCollection
 ) AS LONG
 ' =====================================================================================
 METHOD GetCommandOptions ( ' VTable offset = 68
 BYREF Command AS PROPERTYKEY
 , BYREF ppOptions AS IPortableDeviceValues
 ) AS LONG
 ' =====================================================================================
 METHOD Cancel ( ' VTable offset = 72
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IPortableDeviceServiceCapabilities_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IPortableDeviceServiceMethods
' IID = e20333c9-fd34-412d-a381-cc6f2d820df7
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IPortableDeviceServiceMethods_INTERFACE_DEFINED)
 %IPortableDeviceServiceMethods_INTERFACE_DEFINED = 1
$IID_IPortableDeviceServiceMethods = GUID$("{e20333c9-fd34-412d-a381-cc6f2d820df7}")
INTERFACE IPortableDeviceServiceMethods $IID_IPortableDeviceServiceMethods
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Invoke ( ' VTable offset = 12
 BYREF Method AS GUID
 , BYVAL pParameters AS IPortableDeviceValues
 , BYREF ppResults AS IPortableDeviceValues
 ) AS LONG
 ' =====================================================================================
 METHOD InvokeAsync ( ' VTable offset = 16
 BYREF Method AS GUID
 , BYVAL pParameters AS IPortableDeviceValues
 , BYVAL pCallback AS IPortableDeviceServiceMethodCallback
 ) AS LONG
 ' =====================================================================================
 METHOD Cancel ( ' VTable offset = 20
 BYVAL pCallback AS IPortableDeviceServiceMethodCallback
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IPortableDeviceServiceMethods_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IPortableDeviceServiceMethodCallback
' IID = c424233c-afce-4828-a756-7ed7a2350083
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IPortableDeviceServiceMethodCallback_INTERFACE_DEFINED)
 %IPortableDeviceServiceMethodCallback_INTERFACE_DEFINED = 1
$IID_IPortableDeviceServiceMethodCallback = GUID$("{c424233c-afce-4828-a756-7ed7a2350083}")
INTERFACE IPortableDeviceServiceMethodCallback $IID_IPortableDeviceServiceMethodCallback
 INHERIT IUnknown
 ' =====================================================================================
 METHOD OnComplete ( ' VTable offset = 12
 BYVAL hrStatus AS LONG
 , BYVAL pResults AS IPortableDeviceValues
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IPortableDeviceServiceMethodCallback_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IPortableDeviceDispatchFactory
' IID = 5e1eafc3-e3d7-4132-96fa-759c0f9d1e0f
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IPortableDeviceDispatchFactory_INTERFACE_DEFINED)
 %IPortableDeviceDispatchFactory_INTERFACE_DEFINED = 1
$IID_IPortableDeviceDispatchFactory = GUID$("{5e1eafc3-e3d7-4132-96fa-759c0f9d1e0f}")
INTERFACE IPortableDeviceDispatchFactory $IID_IPortableDeviceDispatchFactory
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetDeviceDispatch ( ' VTable offset = 12
 BYVAL pszPnPDeviceID AS WSTRINGZ PTR
 , BYREF ppDeviceDispatch AS IDispatch
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IPortableDeviceDispatchFactory_INTERFACE_DEFINED__ */
#ENDIF
