' ########################################################################################
' Microsoft Windows
' File: mfidl.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_mfidl_PBI)
#DEFINE PBX_mfidl_PBI
%EQUATE `MFIDL_INC = 1
'/* header files for imported files */
#INCLUDE ONCE "Legacy/System/mfobjects.inc"
#INCLUDE ONCE "Legacy/System/mftransform.inc"
#INCLUDE ONCE "Legacy/Platform/WinDef.inc"
' enum MFSESSION_SETTOPOLOGY_FLAGS
%EQUATE `MFSESSION_SETTOPOLOGY_IMMEDIATE = &H1
%EQUATE `MFSESSION_SETTOPOLOGY_NORESOLUTION = &H2
%EQUATE `MFSESSION_SETTOPOLOGY_CLEAR_CURRENT = &H4
' enum MFSESSION_GETFULLTOPOLOGY_FLAGS
%EQUATE `MFSESSION_GETFULLTOPOLOGY_CURRENT = &H1
' enum MFPMPSESSION_CREATION_FLAGS
%EQUATE `MFPMPSESSION_UNPROTECTED_PROCESS = &H1
'typedef unsigned __int64 TOPOID;
' ########################################################################################
' Interface name = IMFMediaSession
' IID = 90377834-21D0-4DEE-8214-BA2E3E6C1127
' Inherited interface = IMFMediaEventGenerator
' ########################################################################################
#IF NOT %DEF(%IMFMediaSession_INTERFACE_DEFINED)
 %IMFMediaSession_INTERFACE_DEFINED = 1
$IID_IMFMediaSession = GUID$("{90377834-21D0-4DEE-8214-BA2E3E6C1127}")
INTERFACE IMFMediaSession $IID_IMFMediaSession
 INHERIT IUnknown
 ' =====================================================================================
 ' IMFMediaEventGenerator methods
 ' =====================================================================================
 METHOD GetEvent ( ' VTable offset = 12
 BYVAL dwFlags AS DWORD
 , BYREF ppEvent AS IMFMediaEvent
 ) AS LONG
 ' =====================================================================================
 METHOD BeginGetEvent ( ' VTable offset = 16
 BYVAL pCallback AS IMFAsyncCallback
 , BYVAL punkState AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD EndGetEvent ( ' VTable offset = 20
 BYVAL pResult AS IMFAsyncResult
 , BYREF ppEvent AS IMFMediaEvent
 ) AS LONG
 ' =====================================================================================
 METHOD QueueEvent ( ' VTable offset = 24
 BYVAL met AS DWORD
 , BYREF guidExtendedType AS GUID
 , BYVAL hrStatus AS LONG
 , BYREF pvValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMFMediaSession methods
 ' =====================================================================================
 METHOD SetTopology ( ' VTable offset = 28
 BYVAL dwSetTopologyFlags AS DWORD
 , BYVAL pTopology AS IMFTopology
 ) AS LONG
 ' =====================================================================================
 METHOD ClearTopologies ( ' VTable offset = 32
 ) AS LONG
 ' =====================================================================================
 METHOD Start ( ' VTable offset = 36
 BYREF pguidTimeFormat AS GUID
 , BYREF pvarStartPosition AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD Pause ( ' VTable offset = 40
 ) AS LONG
 ' =====================================================================================
 METHOD Stop ( ' VTable offset = 44
 ) AS LONG
 ' =====================================================================================
 METHOD Close ( ' VTable offset = 48
 ) AS LONG
 ' =====================================================================================
 METHOD Shutdown ( ' VTable offset = 52
 ) AS LONG
 ' =====================================================================================
 METHOD GetClock ( ' VTable offset = 56
 BYREF ppClock AS IMFClock
 ) AS LONG
 ' =====================================================================================
 METHOD GetSessionCapabilities ( ' VTable offset = 60
 BYREF pdwCaps AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetFullTopology ( ' VTable offset = 64
 BYVAL dwGetFullTopologyFlags AS DWORD
 , BYVAL TopoId AS QUAD
 , BYREF ppFullTopology AS IMFTopology
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFMediaSession_INTERFACE_DEFINED__ */
$MF_SESSION_TOPOLOADER = GUID$("{1E83D482-1F1C-4571-8405-88F4B2181F71}")
$MF_SESSION_GLOBAL_TIME = GUID$("{1E83D482-1F1C-4571-8405-88F4B2181F72}")
$MF_SESSION_QUALITY_MANAGER = GUID$("{1E83D482-1F1C-4571-8405-88F4B2181F73}")
$MF_SESSION_CONTENT_PROTECTION_MANAGER = GUID$("{1E83D482-1F1C-4571-8405-88F4B2181F74}")
$MF_SESSION_SERVER_CONTEXT = GUID$("{AFE5B291-50FA-46E8-B9BE-0C0C3CE4B3A5}")
$MF_SESSION_REMOTE_SOURCE_MODE = GUID$("{F4033EF4-9BB3-4378-941F-85A0856BC244}")
$MF_SESSION_APPROX_EVENT_OCCURRENCE_TIME = GUID$("{190E852F-6238-42D1-B5AF-69EA338EF850}")
$MF_PMP_SERVER_CONTEXT = GUID$("{2F00C910-D2CF-4278-8B6A-D077FAC3A25F}")
DECLARE FUNCTION MFCreateMediaSession LIB "mf.dll" ALIAS "MFCreateMediaSession" ( BYVAL pConfiguration AS IMFAttributes , BYREF ppMediaSession AS IMFMediaSession ) AS LONG
DECLARE FUNCTION MFCreatePMPMediaSession LIB "mf.dll" ALIAS "MFCreatePMPMediaSession" ( BYVAL dwCreationFlags AS QUAD
 , BYVAL pConfiguration AS IMFAttributes
 , BYREF ppMediaSession AS IMFMediaSession
 , BYREF ppEnablerActivate AS IMFActivate
 ) AS LONG
' enum MF_OBJECT_TYPE
%EQUATE `MF_OBJECT_MEDIASOURCE = 0
%EQUATE `MF_OBJECT_BYTESTREAM = %MF_OBJECT_MEDIASOURCE + 1
%EQUATE `MF_OBJECT_INVALID = %MF_OBJECT_BYTESTREAM + 1
' enum __MIDL___MIDL_itf_mfidl_0000_0001_0001
%EQUATE `MF_RESOLUTION_MEDIASOURCE = &H1
%EQUATE `MF_RESOLUTION_BYTESTREAM = &H2
%EQUATE `MF_RESOLUTION_CONTENT_DOES_NOT_HAVE_TO_MATCH_EXTENSION_OR_MIME_TYPE = &H10
%EQUATE `MF_RESOLUTION_KEEP_BYTE_STREAM_ALIVE_ON_FAIL = &H20
%EQUATE `MF_RESOLUTION_READ = &H10000
%EQUATE `MF_RESOLUTION_WRITE = &H20000
' enum MF_CONNECT_METHOD
%EQUATE `MF_CONNECT_DIRECT = 0
%EQUATE `MF_CONNECT_ALLOW_CONVERTER = &H1
%EQUATE `MF_CONNECT_ALLOW_DECODER = &H3
%EQUATE `MF_CONNECT_AS_OPTIONAL = &H10000
%EQUATE `MF_CONNECT_AS_OPTIONAL_BRANCH = &H20000
' enum MF_TOPOLOGY_RESOLUTION_STATUS_FLAGS
%EQUATE `MF_TOPOLOGY_RESOLUTION_SUCCEEDED = 0
%EQUATE `MF_OPTIONAL_NODE_REJECTED_MEDIA_TYPE = &H1
%EQUATE `MF_OPTIONAL_NODE_REJECTED_PROTECTED_PROCESS = &H2
' ########################################################################################
' Interface name = IMFSourceResolver
' IID = FBE5A32D-A497-4b61-BB85-97B1A848A6E3
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFSourceResolver_INTERFACE_DEFINED)
 %IMFSourceResolver_INTERFACE_DEFINED = 1
$IID_IMFSourceResolver = GUID$("{FBE5A32D-A497-4b61-BB85-97B1A848A6E3}")
INTERFACE IMFSourceResolver $IID_IMFSourceResolver
 INHERIT IUnknown
 ' =====================================================================================
 METHOD CreateObjectFromURL ( ' VTable offset = 12
 BYREF pwszURL AS WSTRINGZ
 , BYVAL dwFlags AS DWORD
 , BYVAL pProps AS IPropertyStore
 , BYVAL pObjectType AS LONG
 , BYREF ppObject AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD CreateObjectFromByteStream ( ' VTable offset = 16
 BYVAL pByteStream AS IMFByteStream
 , BYREF pwszURL AS WSTRINGZ
 , BYVAL dwFlags AS DWORD
 , BYVAL pProps AS IPropertyStore
 , BYREF pObjectType AS LONG
 , BYREF ppObject AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD BeginCreateObjectFromURL ( ' VTable offset = 20
 BYREF pwszURL AS WSTRINGZ
 , BYVAL dwFlags AS DWORD
 , BYVAL pProps AS IPropertyStore
 , BYREF ppIUnknownCancelCookie AS IUnknown
 , BYVAL pCallback AS IMFAsyncCallback
 , BYVAL punkState AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD EndCreateObjectFromURL ( ' VTable offset = 24
 BYVAL pResult AS IMFAsyncResult
 , BYREF pObjectType AS LONG
 , BYREF ppObject AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD BeginCreateObjectFromByteStream ( ' VTable offset = 28
 BYVAL pByteStream AS IMFByteStream
 , BYREF pwszURL AS WSTRINGZ
 , BYVAL dwFlags AS DWORD
 , BYVAL pProps AS IPropertyStore
 , BYREF ppIUnknownCancelCookie AS IUnknown
 , BYVAL pCallback AS IMFAsyncCallback
 , BYVAL punkState AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD EndCreateObjectFromByteStream ( ' VTable offset = 32
 BYVAL pResult AS IMFAsyncResult
 , BYREF pObjectType AS LONG
 , BYREF ppObject AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD CancelObjectCreation ( ' VTable offset = 36
 BYVAL pIUnknownCancelCookie AS IUnknown
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFSourceResolver_INTERFACE_DEFINED__ */
DECLARE FUNCTION MFCreateSourceResolver LIB "mf.dll" ALIAS "MFCreateSourceResolver" ( BYREF ppISourceResolver AS IMFSourceResolver ) AS LONG
DECLARE FUNCTION CreatePropertyStore LIB "mfplat.dll" ALIAS "CreatePropertyStore" ( BYREF ppStore AS IPropertyStore
 ) AS LONG
DECLARE FUNCTION MFGetSupportedSchemes LIB "mf.dll" ALIAS "MFGetSupportedSchemes" ( BYREF pPropVarSchemeArray AS PROPVARIANT
 ) AS LONG
DECLARE FUNCTION MFGetSupportedMimeTypes LIB "mf.dll" ALIAS "MFGetSupportedMimeTypes" ( BYREF pPropVarMimeTypeArray AS PROPVARIANT
 ) AS LONG
'static const PROPERTYKEY MFPKEY_SourceOpenMonitor = { { 0x074d4637, 0xb5ae, 0x465d, 0xaf, 0x17, 0x1a, 0x53, 0x8d, 0x28, 0x59, 0xdd}, 0x02 };
'static const PROPERTYKEY MFPKEY_ASFMediaSource_ApproxSeek = { { 0xb4cd270f, 0x244d, 0x4969, 0xbb, 0x92, 0x3f, 0x0f, 0xb8, 0x31, 0x6f, 0x10}, 0x01 };
MACRO MFPKEY_SourceOpenMonitor = GUID$("{074D4637-B5AE-465D-AF17-1A538D2859DD}") & MKDWD$(&H02)
MACRO MFPKEY_ASFMediaSource_ApproxSeek = GUID$("{B4CD270F-244D-4969-BB92-3F0FB8316F10}") & MKDWD$(&H01)
'#if (WINVER >= _WIN32_WINNT_WIN7)
MACRO MFPKEY_ASFMediaSource_IterativeSeekIfNoIndex = GUID$("{170b65dc-4a4e-4407a-ac22-577f50e4a37c}") & MKDWD$(&H01)
MACRO MFPKEY_ASFMediaSource_IterativeSeek_Max_Count = GUID$("{170b65dc-4a4e-4407a-ac22-577f50e4a37c}") & MKDWD$(&H02)
MACRO MFPKEY_ASFMediaSource_IterativeSeek_Tolerance_In_MilliSecond = GUID$("{170b65dc-4a4e-4407a-ac22-577f50e4a37c}") & MKDWD$(&H03)
MACRO MFPKEY_Content_DLNA_Profile_ID = GUID$("{cfa31b45-525d-4998-bb44-3f7d81542fa4}") & MKDWD$(&H01)
MACRO MFPKEY_MediaSource_DisableReadAhead = GUID$("{26366c14-c5bf-4c76-887b-9f1754db5f09}") & MKDWD$(&H01)
'#endif // (WINVER >= _WIN32_WINNT_WIN7)
' enum _MFMEDIASOURCE_CHARACTERISTICS
%EQUATE `MFMEDIASOURCE_IS_LIVE = &H1
%EQUATE `MFMEDIASOURCE_CAN_SEEK = &H2
%EQUATE `MFMEDIASOURCE_CAN_PAUSE = &H4
%EQUATE `MFMEDIASOURCE_HAS_SLOW_SEEK = &H8
%EQUATE `MFMEDIASOURCE_HAS_MULTIPLE_PRESENTATIONS = &H10
%EQUATE `MFMEDIASOURCE_CAN_SKIPFORWARD = &H20
%EQUATE `MFMEDIASOURCE_CAN_SKIPBACKWARD = &H40
'#if (WINVER >= _WIN32_WINNT_WIN7)
$MF_TIME_FORMAT_ENTRY_RELATIVE = GUID$("{4399f178-46d3-4504-afda-20d32e9ba360}")
'#endif // (WINVER >= _WIN32_WINNT_WIN7)
' ########################################################################################
' Interface name = IMFMediaSource
' IID = 279A808D-AEC7-40C8-9C6B-A6B492C78A66
' Inherited interface = IMFMediaEventGenerator
' ########################################################################################
#IF NOT %DEF(%IMFMediaSource_INTERFACE_DEFINED)
 %IMFMediaSource_INTERFACE_DEFINED = 1
$IID_IMFMediaSource = GUID$("{279A808D-AEC7-40C8-9C6B-A6B492C78A66}")
INTERFACE IMFMediaSource $IID_IMFMediaSource
 INHERIT IUnknown
 ' =====================================================================================
 ' IMFMediaEventGenerator methods
 ' =====================================================================================
 METHOD GetEvent ( ' VTable offset = 12
 BYVAL dwFlags AS DWORD
 , BYREF ppEvent AS IMFMediaEvent
 ) AS LONG
 ' =====================================================================================
 METHOD BeginGetEvent ( ' VTable offset = 16
 BYVAL pCallback AS IMFAsyncCallback
 , BYVAL punkState AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD EndGetEvent ( ' VTable offset = 20
 BYVAL pResult AS IMFAsyncResult
 , BYREF ppEvent AS IMFMediaEvent
 ) AS LONG
 ' =====================================================================================
 METHOD QueueEvent ( ' VTable offset = 24
 BYVAL met AS DWORD
 , BYREF guidExtendedType AS GUID
 , BYVAL hrStatus AS LONG
 , BYREF pvValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMFMediaSource methods
 ' =====================================================================================
 METHOD GetCharacteristics ( ' VTable offset = 28
 BYREF pdwCharacteristics AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD CreatePresentationDescriptor ( ' VTable offset = 32
 BYREF ppPresentationDescriptor AS IMFPresentationDescriptor
 ) AS LONG
 ' =====================================================================================
 METHOD Start ( ' VTable offset = 36
 BYVAL pPresentationDescriptor AS IMFPresentationDescriptor
 , BYREF pguidTimeFormat AS GUID
 , BYREF pvarStartPosition AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD Stop ( ' VTable offset = 40
 ) AS LONG
 ' =====================================================================================
 METHOD Pause ( ' VTable offset = 44
 ) AS LONG
 ' =====================================================================================
 METHOD Shutdown ( ' VTable offset = 48
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFMediaSource_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMFMediaStream
' IID = D182108F-4EC6-443F-AA42-A71106EC825F
' Inherited interface = IMFMediaEventGenerator
' ########################################################################################
#IF NOT %DEF(%IMFMediaStream_INTERFACE_DEFINED)
 %IMFMediaStream_INTERFACE_DEFINED = 1
$IID_IMFMediaStream = GUID$("{D182108F-4EC6-443F-AA42-A71106EC825F}")
INTERFACE IMFMediaStream $IID_IMFMediaStream
 INHERIT IUnknown
 ' =====================================================================================
 ' IMFMediaEventGenerator methods
 ' =====================================================================================
 METHOD GetEvent ( ' VTable offset = 12
 BYVAL dwFlags AS DWORD
 , BYREF ppEvent AS IMFMediaEvent
 ) AS LONG
 ' =====================================================================================
 METHOD BeginGetEvent ( ' VTable offset = 16
 BYVAL pCallback AS IMFAsyncCallback
 , BYVAL punkState AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD EndGetEvent ( ' VTable offset = 20
 BYVAL pResult AS IMFAsyncResult
 , BYREF ppEvent AS IMFMediaEvent
 ) AS LONG
 ' =====================================================================================
 METHOD QueueEvent ( ' VTable offset = 24
 BYVAL met AS DWORD
 , BYREF guidExtendedType AS GUID
 , BYVAL hrStatus AS LONG
 , BYREF pvValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMFMediaStream methods
 ' =====================================================================================
 METHOD GetMediaSource ( ' VTable offset = 28
 BYREF ppMediaSource AS IMFMediaSource
 ) AS LONG
 ' =====================================================================================
 METHOD GetStreamDescriptor ( ' VTable offset = 32
 BYREF ppStreamDescriptor AS IMFStreamDescriptor
 ) AS LONG
 ' =====================================================================================
 METHOD RequestSample ( ' VTable offset = 36
 BYVAL pToken AS IUnknown
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFMediaStream_INTERFACE_DEFINED__ */
%EQUATE `MEDIASINK_FIXED_STREAMS = &H00000001
%EQUATE `MEDIASINK_CANNOT_MATCH_CLOCK = &H00000002
%EQUATE `MEDIASINK_RATELESS = &H00000004
%EQUATE `MEDIASINK_CLOCK_REQUIRED = &H00000008
%EQUATE `MEDIASINK_CAN_PREROLL = &H00000010
%EQUATE `MEDIASINK_REQUIRE_REFERENCE_MEDIATYPE = &H00000020
' ########################################################################################
' Interface name = IMFMediaSink
' IID = 6EF2A660-47C0-4666-B13D-CBB717F2FA2C
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFMediaSink_INTERFACE_DEFINED)
 %IMFMediaSink_INTERFACE_DEFINED = 1
$IID_IMFMediaSink = GUID$("{6EF2A660-47C0-4666-B13D-CBB717F2FA2C}")
INTERFACE IMFMediaSink $IID_IMFMediaSink
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetCharacteristics ( ' VTable offset = 12
 BYREF pdwCharacteristics AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD AddStreamSink ( ' VTable offset = 16
 BYVAL dwStreamSinkIdentifier AS DWORD
 , BYVAL pMediaType AS IMFMediaType
 , BYREF ppStreamSink AS IMFStreamSink
 ) AS LONG
 ' =====================================================================================
 METHOD RemoveStreamSink ( ' VTable offset = 20
 BYVAL dwStreamSinkIdentifier AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetStreamSinkCount ( ' VTable offset = 24
 BYREF pcStreamSinkCount AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetStreamSinkByIndex ( ' VTable offset = 28
 BYVAL dwIndex AS DWORD
 , BYREF ppStreamSink AS IMFStreamSink
 ) AS LONG
 ' =====================================================================================
 METHOD GetStreamSinkById ( ' VTable offset = 32
 BYVAL dwStreamSinkIdentifier AS DWORD
 , BYREF ppStreamSink AS IMFStreamSink
 ) AS LONG
 ' =====================================================================================
 METHOD SetPresentationClock ( ' VTable offset = 36
 BYVAL pPresentationClock AS IMFPresentationClock
 ) AS LONG
 ' =====================================================================================
 METHOD GetPresentationClock ( ' VTable offset = 40
 BYREF ppPresentationClock AS IMFPresentationClock
 ) AS LONG
 ' =====================================================================================
 METHOD Shutdown ( ' VTable offset = 44
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFMediaSink_INTERFACE_DEFINED__ */
' enum MFSTREAMSINK_MARKER_TYPE
%EQUATE `MFSTREAMSINK_MARKER_DEFAULT = 0
%EQUATE `MFSTREAMSINK_MARKER_ENDOFSEGMENT = %MFSTREAMSINK_MARKER_DEFAULT + 1
%EQUATE `MFSTREAMSINK_MARKER_TICK = %MFSTREAMSINK_MARKER_ENDOFSEGMENT + 1
%EQUATE `MFSTREAMSINK_MARKER_EVENT = %MFSTREAMSINK_MARKER_TICK + 1
' ########################################################################################
' Interface name = IMFStreamSink
' IID = 0A97B3CF-8E7C-4A3D-8F8C-0C843DC247FB
' Inherited interface = IMFMediaEventGenerator
' ########################################################################################
#IF NOT %DEF(%IMFStreamSink_INTERFACE_DEFINED)
 %IMFStreamSink_INTERFACE_DEFINED = 1
$IID_IMFStreamSink = GUID$("{0A97B3CF-8E7C-4A3D-8F8C-0C843DC247FB}")
INTERFACE IMFStreamSink $IID_IMFStreamSink
 INHERIT IUnknown
 ' =====================================================================================
 ' IMFMediaEventGenerator methods
 ' =====================================================================================
 METHOD GetEvent ( ' VTable offset = 12
 BYVAL dwFlags AS DWORD
 , BYREF ppEvent AS IMFMediaEvent
 ) AS LONG
 ' =====================================================================================
 METHOD BeginGetEvent ( ' VTable offset = 16
 BYVAL pCallback AS IMFAsyncCallback
 , BYVAL punkState AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD EndGetEvent ( ' VTable offset = 20
 BYVAL pResult AS IMFAsyncResult
 , BYREF ppEvent AS IMFMediaEvent
 ) AS LONG
 ' =====================================================================================
 METHOD QueueEvent ( ' VTable offset = 24
 BYVAL met AS DWORD
 , BYREF guidExtendedType AS GUID
 , BYVAL hrStatus AS LONG
 , BYREF pvValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMFStreamSink methods
 ' =====================================================================================
 METHOD GetMediaSink ( ' VTable offset = 28
 BYREF ppMediaSink AS IMFMediaSink
 ) AS LONG
 ' =====================================================================================
 METHOD GetIdentifier ( ' VTable offset = 32
 BYREF pdwIdentifier AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetMediaTypeHandler ( ' VTable offset = 36
 BYREF ppHandler AS IMFMediaTypeHandler
 ) AS LONG
 ' =====================================================================================
 METHOD ProcessSample ( ' VTable offset = 40
 BYVAL pSample AS IMFSample
 ) AS LONG
 ' =====================================================================================
 METHOD PlaceMarker ( ' VTable offset = 44
 BYVAL eMarkerType AS LONG
 , BYREF pvarMarkerValue AS PROPVARIANT
 , BYREF pvarContextValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD Flush ( ' VTable offset = 48
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFStreamSink_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMFVideoSampleAllocator
' IID = 86CBC910-E533-4751-8E3B-F19B5B806A03
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFVideoSampleAllocator_INTERFACE_DEFINED)
 %IMFVideoSampleAllocator_INTERFACE_DEFINED = 1
$IID_IMFVideoSampleAllocator = GUID$("{86CBC910-E533-4751-8E3B-F19B5B806A03}")
INTERFACE IMFVideoSampleAllocator $IID_IMFVideoSampleAllocator
 INHERIT IUnknown
 ' =====================================================================================
 METHOD SetDirectXManager ( ' VTable offset = 12
 BYVAL pManager AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD UninitializeSampleAllocator ( ' VTable offset = 16
 ) AS LONG
 ' =====================================================================================
 METHOD InitializeSampleAllocator ( ' VTable offset = 20
 BYVAL cRequestedFrames AS DWORD
 , BYVAL pMediaType AS IMFMediaType
 ) AS LONG
 ' =====================================================================================
 METHOD AllocateSample ( ' VTable offset = 24
 BYREF ppSample AS IMFSample
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFVideoSampleAllocator_INTERFACE_DEFINED__ */
'#if (WINVER >= _WIN32_WINNT_WIN7)
' ########################################################################################
' Interface name = IMFVideoSampleAllocatorNotify
' IID = A792CDBE-C374-4e89-8335-278E7B9956A
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFVideoSampleAllocatorNotify_INTERFACE_DEFINED)
 %IMFVideoSampleAllocatorNotify_INTERFACE_DEFINED = 1
$IID_IMFVideoSampleAllocatorNotify = GUID$("{A792CDBE-C374-4e89-8335-278E7B9956A4}")
INTERFACE IMFVideoSampleAllocatorNotify $IID_IMFVideoSampleAllocatorNotify
 INHERIT IUnknown
 ' =====================================================================================
 METHOD NotifyRelease ( ' VTable offset = 12
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFVideoSampleAllocatorNotify_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMFVideoSampleAllocatorCallback
' IID = 992388B4-3372-4f67-8B6F-C84C071F4751
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFVideoSampleAllocatorCallback_INTERFACE_DEFINED)
 %IMFVideoSampleAllocatorCallback_INTERFACE_DEFINED = 1
$IID_IMFVideoSampleAllocatorCallback = GUID$("{992388B4-3372-4f67-8B6F-C84C071F4751}")
INTERFACE IMFVideoSampleAllocatorCallback $IID_IMFVideoSampleAllocatorCallback
 INHERIT IUnknown
 ' =====================================================================================
 METHOD SetCallback ( ' VTable offset = 12
 BYVAL pNotify AS IMFVideoSampleAllocatorNotify
 ) AS LONG
 ' =====================================================================================
 METHOD GetFreeSampleCount ( ' VTable offset = 16
 BYREF plSamples AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFVideoSampleAllocatorCallback_INTERFACE_DEFINED__ */
'#endif // (WINVER >= _WIN32_WINNT_WIN7)
' ########################################################################################
' Interface name = IMFTopology
' IID = 83CF873A-F6DA-4BC8-823F-BACFD55DC433
' Inherited interface = IMFAttributes
' ########################################################################################
#IF NOT %DEF(%IMFTopology_INTERFACE_DEFINED)
 %IMFTopology_INTERFACE_DEFINED = 1
$IID_IMFTopology = GUID$("{83CF873A-F6DA-4BC8-823F-BACFD55DC433}")
INTERFACE IMFTopology $IID_IMFTopology
 INHERIT IUnknown
 ' =====================================================================================
 ' IMFAttributes methods
 ' =====================================================================================
 METHOD GetItem ( ' VTable offset = 12
 BYREF guidKey AS GUID
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD GetItemType ( ' VTable offset = 16
 BYREF guidKey AS GUID
 , BYREF pType AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD CompareItem ( ' VTable offset = 20
 BYREF guidKey AS GUID
 , BYREF Value AS PROPVARIANT
 , BYREF pbResult AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD Compare ( ' VTable offset = 24
 BYVAL pTheirs AS IMFAttributes
 , BYVAL MatchType AS LONG
 , BYREF pbResult AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetUINT32 ( ' VTable offset = 28
 BYREF guidKey AS GUID
 , BYREF punValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetUINT64 ( ' VTable offset = 32
 BYREF guidKey AS GUID
 , BYREF punValue AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD GetDouble ( ' VTable offset = 36
 BYREF guidKey AS GUID
 , BYREF pfValue AS DOUBLE
 ) AS LONG
 ' =====================================================================================
 METHOD GetGUID ( ' VTable offset = 40
 BYREF guidKey AS GUID
 , BYREF pguidValue AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD GetStringLength ( ' VTable offset = 44
 BYREF guidKey AS GUID
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetString ( ' VTable offset = 48
 BYREF guidKey AS GUID
 , BYREF pwszValue AS WSTRINGZ
 , BYVAL cchBufSize AS DWORD
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAllocatedString ( ' VTable offset = 52
 BYREF guidKey AS GUID
 , BYREF ppwszValue AS DWORD
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetBlobSize ( ' VTable offset = 56
 BYREF guidKey AS GUID
 , BYREF pcbBlobSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetBlob ( ' VTable offset = 60
 BYREF guidKey AS GUID
 , BYVAL pBuf AS DWORD
 , BYVAL cbBufSize AS DWORD
 , BYREF pcbBlobSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAllocatedBlob ( ' VTable offset = 64
 BYREF guidKey AS GUID
 , BYVAL ppBuf AS DWORD
 , BYREF pcbSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetUnknown ( ' VTable offset = 68
 BYREF guidKey AS GUID
 , BYREF riid AS GUID
 , BYREF ppv AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD SetItem ( ' VTable offset = 72
 BYREF guidKey AS GUID
 , BYREF Value AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteItem ( ' VTable offset = 76
 BYREF guidKey AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteAllItems ( ' VTable offset = 80
 ) AS LONG
 ' =====================================================================================
 METHOD SetUINT32 ( ' VTable offset = 84
 BYREF guidKey AS GUID
 , BYVAL unValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetUINT64 ( ' VTable offset = 88
 BYREF guidKey AS GUID
 , BYVAL unValue AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD SetDouble ( ' VTable offset = 92
 BYREF guidKey AS GUID
 , BYVAL fValue AS DOUBLE
 ) AS LONG
 ' =====================================================================================
 METHOD SetGUID ( ' VTable offset = 96
 BYREF guidKey AS GUID
 , BYREF guidValue AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD SetString ( ' VTable offset = 100
 BYREF guidKey AS GUID
 , BYREF wszValue AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetBlob ( ' VTable offset = 104
 BYREF guidKey AS GUID
 , BYVAL pBuf AS DWORD
 , BYVAL cbBufSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetUnknown ( ' VTable offset = 108
 BYREF guidKey AS GUID
 , BYVAL pUnknown AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD LockStore ( ' VTable offset = 112
 ) AS LONG
 ' =====================================================================================
 METHOD UnlockStore ( ' VTable offset = 116
 ) AS LONG
 ' =====================================================================================
 METHOD GetCount ( ' VTable offset = 120
 BYREF pcItems AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetItemByIndex ( ' VTable offset = 124
 BYVAL unIndex AS DWORD
 , BYREF pguidKey AS GUID
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD CopyAllItems ( ' VTable offset = 128
 BYVAL pDest AS LONG
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMFTopology methods
 ' =====================================================================================
 METHOD GetTopologyID ( ' VTable offset = 132
 BYREF pID AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD AddNode ( ' VTable offset = 136
 BYVAL pNode AS IMFTopologyNode
 ) AS LONG
 ' =====================================================================================
 METHOD RemoveNode ( ' VTable offset = 140
 BYVAL pNode AS IMFTopologyNode
 ) AS LONG
 ' =====================================================================================
 METHOD GetNodeCount ( ' VTable offset = 144
 BYREF pwNodes AS WORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetNode ( ' VTable offset = 148
 BYVAL wIndex AS WORD
 , BYREF ppNode AS IMFTopologyNode
 ) AS LONG
 ' =====================================================================================
 METHOD Clear ( ' VTable offset = 152
 ) AS LONG
 ' =====================================================================================
 METHOD CloneFrom ( ' VTable offset = 156
 BYVAL pTopology AS IMFTopology
 ) AS LONG
 ' =====================================================================================
 METHOD GetNodeByID ( ' VTable offset = 160
 BYVAL qwTopoNodeID AS QUAD
 , BYREF ppNode AS IMFTopologyNode
 ) AS LONG
 ' =====================================================================================
 METHOD GetSourceNodeCollection ( ' VTable offset = 164
 BYREF ppCollection AS IMFCollection
 ) AS LONG
 ' =====================================================================================
 METHOD GetOutputNodeCollection ( ' VTable offset = 168
 BYREF ppCollection AS IMFCollection
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFTopology_INTERFACE_DEFINED__ */
$MF_TOPOLOGY_PROJECTSTART = GUID$("{7ED3F802-86BB-4B3F-B7E4-7CB43AFD4B80}")
$MF_TOPOLOGY_PROJECTSTOP = GUID$("{7ED3F803-86BB-4B3F-B7E4-7CB43AFD4B80}")
$MF_TOPOLOGY_NO_MARKIN_MARKOUT = GUID$("{7ED3F804-86BB-4B3F-B7E4-7CB43AFD4B80}")
'#if (WINVER >= _WIN32_WINNT_WIN7)
' enum MFTOPOLOGY_DXVA_MODE
%EQUATE `MFTOPOLOGY_DXVA_DEFAULT = 0
%EQUATE `MFTOPOLOGY_DXVA_NONE = 1
%EQUATE `MFTOPOLOGY_DXVA_FULL = 2
$MF_TOPOLOGY_DXVA_MODE = GUID$("{1e8d34f6-f5ab-4e23-bb88-874aa3a1a74d}")
$MF_TOPOLOGY_STATIC_PLAYBACK_OPTIMIZATIONS = GUID$("{b86cac42-41a6-4b79-897a-1ab0e52b4a1b}")
$MF_TOPOLOGY_PLAYBACK_MAX_DIMS = GUID$("{5715cf19-5768-44aa-ad6e-8721f1b0f9bb}")
' enum MFTOPOLOGY_HARDWARE_MODE
%EQUATE `MFTOPOLOGY_HWMODE_SOFTWARE_ONLY = 0
%EQUATE `MFTOPOLOGY_HWMODE_USE_HARDWARE = 1
$MF_TOPOLOGY_HARDWARE_MODE = GUID$("{d2d362fd-4e4f-4191-a579-c618b66706af}")
$MF_TOPOLOGY_PLAYBACK_FRAMERATE = GUID$("{c164737a-c2b1-4553-83bb-5a526072448f}")
$MF_TOPOLOGY_DYNAMIC_CHANGE_NOT_ALLOWED = GUID$("{d529950b-d484-4527-a9cd-b1909532b5b0}")
$MF_TOPOLOGY_ENUMERATE_SOURCE_TYPES = GUID$("{6248c36d-5d0b-4f40-a0bb-b0b305f77698}")
$MF_TOPOLOGY_START_TIME_ON_PRESENTATION_SWITCH = GUID$("{c8cc113f-7951-4548-aad6-9ed6202e62b3}")
'#endif // (WINVER >= _WIN32_WINNT_WIN7)
DECLARE FUNCTION MFCreateTopology LIB "mf.dll" ALIAS "MFCreateTopology" ( BYREF ppTopo AS IMFTopology ) AS LONG
' enum MF_TOPOLOGY_TYPE
%EQUATE `MF_TOPOLOGY_OUTPUT_NODE = 0
%EQUATE `MF_TOPOLOGY_SOURCESTREAM_NODE = %MF_TOPOLOGY_OUTPUT_NODE + 1
%EQUATE `MF_TOPOLOGY_TRANSFORM_NODE = %MF_TOPOLOGY_SOURCESTREAM_NODE + 1
%EQUATE `MF_TOPOLOGY_TEE_NODE = %MF_TOPOLOGY_TRANSFORM_NODE + 1
%EQUATE `MF_TOPOLOGY_MAX = &Hffffffff
' ########################################################################################
' Interface name = IMFTopologyNode
' IID = 83CF873A-F6DA-4BC8-823F-BACFD55DC430
' Inherited interface = IMFAttributes
' ########################################################################################
#IF NOT %DEF(%IMFTopologyNode_INTERFACE_DEFINED)
 %IMFTopologyNode_INTERFACE_DEFINED = 1
$IID_IMFTopologyNode = GUID$("{83CF873A-F6DA-4BC8-823F-BACFD55DC430}")
INTERFACE IMFTopologyNode $IID_IMFTopologyNode
 INHERIT IUnknown
 ' =====================================================================================
 ' IMFAttributes methods
 ' =====================================================================================
 METHOD GetItem ( ' VTable offset = 12
 BYREF guidKey AS GUID
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD GetItemType ( ' VTable offset = 16
 BYREF guidKey AS GUID
 , BYREF pType AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD CompareItem ( ' VTable offset = 20
 BYREF guidKey AS GUID
 , BYREF Value AS PROPVARIANT
 , BYREF pbResult AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD Compare ( ' VTable offset = 24
 BYVAL pTheirs AS IMFAttributes
 , BYVAL MatchType AS LONG
 , BYREF pbResult AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetUINT32 ( ' VTable offset = 28
 BYREF guidKey AS GUID
 , BYREF punValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetUINT64 ( ' VTable offset = 32
 BYREF guidKey AS GUID
 , BYREF punValue AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD GetDouble ( ' VTable offset = 36
 BYREF guidKey AS GUID
 , BYREF pfValue AS DOUBLE
 ) AS LONG
 ' =====================================================================================
 METHOD GetGUID ( ' VTable offset = 40
 BYREF guidKey AS GUID
 , BYREF pguidValue AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD GetStringLength ( ' VTable offset = 44
 BYREF guidKey AS GUID
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetString ( ' VTable offset = 48
 BYREF guidKey AS GUID
 , BYREF pwszValue AS WSTRINGZ
 , BYVAL cchBufSize AS DWORD
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAllocatedString ( ' VTable offset = 52
 BYREF guidKey AS GUID
 , BYREF ppwszValue AS DWORD
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetBlobSize ( ' VTable offset = 56
 BYREF guidKey AS GUID
 , BYREF pcbBlobSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetBlob ( ' VTable offset = 60
 BYREF guidKey AS GUID
 , BYVAL pBuf AS DWORD
 , BYVAL cbBufSize AS DWORD
 , BYREF pcbBlobSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAllocatedBlob ( ' VTable offset = 64
 BYREF guidKey AS GUID
 , BYVAL ppBuf AS DWORD
 , BYREF pcbSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetUnknown ( ' VTable offset = 68
 BYREF guidKey AS GUID
 , BYREF riid AS GUID
 , BYREF ppv AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD SetItem ( ' VTable offset = 72
 BYREF guidKey AS GUID
 , BYREF Value AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteItem ( ' VTable offset = 76
 BYREF guidKey AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteAllItems ( ' VTable offset = 80
 ) AS LONG
 ' =====================================================================================
 METHOD SetUINT32 ( ' VTable offset = 84
 BYREF guidKey AS GUID
 , BYVAL unValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetUINT64 ( ' VTable offset = 88
 BYREF guidKey AS GUID
 , BYVAL unValue AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD SetDouble ( ' VTable offset = 92
 BYREF guidKey AS GUID
 , BYVAL fValue AS DOUBLE
 ) AS LONG
 ' =====================================================================================
 METHOD SetGUID ( ' VTable offset = 96
 BYREF guidKey AS GUID
 , BYREF guidValue AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD SetString ( ' VTable offset = 100
 BYREF guidKey AS GUID
 , BYREF wszValue AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetBlob ( ' VTable offset = 104
 BYREF guidKey AS GUID
 , BYVAL pBuf AS DWORD
 , BYVAL cbBufSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetUnknown ( ' VTable offset = 108
 BYREF guidKey AS GUID
 , BYVAL pUnknown AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD LockStore ( ' VTable offset = 112
 ) AS LONG
 ' =====================================================================================
 METHOD UnlockStore ( ' VTable offset = 116
 ) AS LONG
 ' =====================================================================================
 METHOD GetCount ( ' VTable offset = 120
 BYREF pcItems AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetItemByIndex ( ' VTable offset = 124
 BYVAL unIndex AS DWORD
 , BYREF pguidKey AS GUID
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD CopyAllItems ( ' VTable offset = 128
 BYVAL pDest AS LONG
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMFTopologyNode methods
 ' =====================================================================================
 METHOD SetObject ( ' VTable offset = 132
 BYVAL pObject AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD GetObject ( ' VTable offset = 136
 BYREF ppObject AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD GetNodeType ( ' VTable offset = 140
 BYREF pType AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetTopoNodeID ( ' VTable offset = 144
 BYREF pID AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD SetTopoNodeID ( ' VTable offset = 148
 BYVAL ullTopoID AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD GetInputCount ( ' VTable offset = 152
 BYREF pcInputs AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetOutputCount ( ' VTable offset = 156
 BYREF pcOutputs AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ConnectOutput ( ' VTable offset = 160
 BYVAL dwOutputIndex AS DWORD
 , BYVAL pDownstreamNode AS IMFTopologyNode
 , BYVAL dwInputIndexOnDownstreamNode AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD DisconnectOutput ( ' VTable offset = 164
 BYVAL dwOutputIndex AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetInput ( ' VTable offset = 168
 BYVAL dwInputIndex AS DWORD
 , BYREF ppUpstreamNode AS IMFTopologyNode
 , BYREF pdwOutputIndexOnUpstreamNode AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetOutput ( ' VTable offset = 172
 BYVAL dwOutputIndex AS DWORD
 , BYREF ppDownstreamNode AS IMFTopologyNode
 , BYREF pdwInputIndexOnDownstreamNode AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetOutputPrefType ( ' VTable offset = 176
 BYVAL dwOutputIndex AS DWORD
 , BYVAL pType AS IMFMediaType
 ) AS LONG
 ' =====================================================================================
 METHOD GetOutputPrefType ( ' VTable offset = 180
 BYVAL dwOutputIndex AS DWORD
 , BYREF ppType AS IMFMediaType
 ) AS LONG
 ' =====================================================================================
 METHOD SetInputPrefType ( ' VTable offset = 184
 BYVAL dwInputIndex AS DWORD
 , BYVAL pType AS IMFMediaType
 ) AS LONG
 ' =====================================================================================
 METHOD GetInputPrefType ( ' VTable offset = 188
 BYVAL dwInputIndex AS DWORD
 , BYREF ppType AS IMFMediaType
 ) AS LONG
 ' =====================================================================================
 METHOD CloneFrom ( ' VTable offset = 192
 BYVAL pNode AS IMFTopologyNode
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFTopologyNode_INTERFACE_DEFINED__ */
' enum MF_TOPONODE_FLUSH_MODE
%EQUATE `MF_TOPONODE_FLUSH_ALWAYS = 0
%EQUATE `MF_TOPONODE_FLUSH_SEEK = %MF_TOPONODE_FLUSH_ALWAYS + 1
%EQUATE `MF_TOPONODE_FLUSH_NEVER = %MF_TOPONODE_FLUSH_SEEK + 1
$MF_TOPONODE_FLUSH = GUID$("{494BBCE8-B031-4E38-97C4-D5422DD618DC}")
' enum MF_TOPONODE_DRAIN_MODE
%EQUATE `MF_TOPONODE_DRAIN_DEFAULT = 0
%EQUATE `MF_TOPONODE_DRAIN_ALWAYS = %MF_TOPONODE_DRAIN_DEFAULT + 1
%EQUATE `MF_TOPONODE_DRAIN_NEVER = %MF_TOPONODE_DRAIN_ALWAYS + 1
$MF_TOPONODE_DRAIN = GUID$("{494BBCE9-B031-4E38-97C4-D5422DD618DC}")
$MF_TOPONODE_D3DAWARE = GUID$("{494BBCED-B031-4E38-97C4-D5422DD618DC}")
$MF_TOPOLOGY_RESOLUTION_STATUS = GUID$("{494BBCDE-B031-4E38-97C4-D5422DD618DC}")
$MF_TOPONODE_ERRORCODE = GUID$("{494BBCEE-B031-4E38-97C4-D5422DD618DC}")
$MF_TOPONODE_CONNECT_METHOD = GUID$("{494BBCF1-B031-4E38-97C4-D5422DD618DC}")
$MF_TOPONODE_LOCKED = GUID$("{494BBCF7-B031-4E38-97C4-D5422DD618DC}")
$MF_TOPONODE_WORKQUEUE_ID = GUID$("{494BBCF8-B031-4E38-97C4-D5422DD618DC}")
$MF_TOPONODE_WORKQUEUE_MMCSS_CLASS = GUID$("{494BBCF9-B031-4E38-97C4-D5422DD618DC}")
$MF_TOPONODE_DECRYPTOR = GUID$("{494BBCFA-B031-4E38-97C4-D5422DD618DC}")
$MF_TOPONODE_DISCARDABLE = GUID$("{494BBCFB-B031-4E38-97C4-D5422DD618DC}")
$MF_TOPONODE_ERROR_MAJORTYPE = GUID$("{494BBCFD-B031-4E38-97C4-D5422DD618DC}")
$MF_TOPONODE_ERROR_SUBTYPE = GUID$("{494BBCFE-B031-4E38-97C4-D5422DD618DC}")
$MF_TOPONODE_WORKQUEUE_MMCSS_TASKID = GUID$("{494BBCFF-B031-4E38-97C4-D5422DD618DC}")
$MF_TOPONODE_MARKIN_HERE = GUID$("{494BBD00-B031-4E38-97C4-D5422DD618DC}")
$MF_TOPONODE_MARKOUT_HERE = GUID$("{494BBD01-B031-4E38-97C4-D5422DD618DC}")
$MF_TOPONODE_DECODER = GUID$("{494BBD02-B031-4E38-97C4-D5422DD618DC}")
$MF_TOPONODE_MEDIASTART = GUID$("{835C58EA-E075-4BC7-BCBA-4DE000DF9AE6}")
$MF_TOPONODE_MEDIASTOP = GUID$("{835C58EB-E075-4BC7-BCBA-4DE000DF9AE6}")
$MF_TOPONODE_SOURCE = GUID$("{835C58EC-E075-4BC7-BCBA-4DE000DF9AE6}")
$MF_TOPONODE_PRESENTATION_DESCRIPTOR = GUID$("{835C58ED-E075-4BC7-BCBA-4DE000DF9AE6}")
$MF_TOPONODE_STREAM_DESCRIPTOR = GUID$("{835C58EE-E075-4BC7-BCBA-4DE000DF9AE6}")
$MF_TOPONODE_SEQUENCE_ELEMENTID = GUID$("{835C58EF-E075-4BC7-BCBA-4DE000DF9AE6}")
$MF_TOPONODE_TRANSFORM_OBJECTID = GUID$("{88DCC0C9-293E-4E8B-9AEB-0AD64CC016B0}")
$MF_TOPONODE_STREAMID = GUID$("{14932F9B-9087-4BB4-8412-5167145CBE04}")
$MF_TOPONODE_NOSHUTDOWN_ON_REMOVE = GUID$("{14932F9C-9087-4BB4-8412-5167145CBE04}")
$MF_TOPONODE_RATELESS = GUID$("{14932F9D-9087-4BB4-8412-5167145CBE04}")
$MF_TOPONODE_DISABLE_PREROLL = GUID$("{14932F9E-9087-4BB4-8412-5167145CBE04}")
$MF_TOPONODE_PRIMARYOUTPUT = GUID$("{6304EF99-16B2-4EBE-9D67-E4C539B3A259}")
DECLARE FUNCTION MFCreateTopologyNode LIB "mf.dll" ALIAS "MFCreateTopologyNode" ( BYVAL NodeType AS LONG , BYREF ppNode AS IMFTopologyNode ) AS LONG
'#if (WINVER >= _WIN32_WINNT_WIN7)
DECLARE FUNCTION MFGetTopoNodeCurrentType LIB "mf.dll" ALIAS "MFGetTopoNodeCurrentType" ( BYVAL pNode AS IMFTopologyNode , BYVAL dwStreamIndex AS QUAD , BYVAL fOutput AS LONG , BYREF ppType AS IMFMediaType ) AS LONG
'#endif // (WINVER >= _WIN32_WINNT_WIN7)
' ########################################################################################
' Interface name = IMFGetService
' IID = FA993888-4383-415A-A930-DD472A8CF6F7
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFGetService_INTERFACE_DEFINED)
 %IMFGetService_INTERFACE_DEFINED = 1
$IID_IMFGetService = GUID$("{FA993888-4383-415A-A930-DD472A8CF6F7}")
INTERFACE IMFGetService $IID_IMFGetService
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetItem ( ' VTable offset = 12
 BYREF guidService AS GUID
 , BYREF riid AS GUID
 , BYREF ppvObject AS IUnknown
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFGetService_INTERFACE_DEFINED__ */
DECLARE FUNCTION MFGetService LIB "mf.dll" ALIAS "MFGetService" ( BYVAL punkObject AS IUnknown , BYREF guidService AS GUID , BYREF riid AS GUID , BYREF ppvObject AS IUnknown ) AS LONG
'typedef LONGLONG MFTIME;
' enum MFCLOCK_CHARACTERISTICS_FLAGS
%EQUATE `MFCLOCK_CHARACTERISTICS_FLAG_FREQUENCY_10MHZ = &H2
%EQUATE `MFCLOCK_CHARACTERISTICS_FLAG_ALWAYS_RUNNING = &H4
%EQUATE `MFCLOCK_CHARACTERISTICS_FLAG_IS_SYSTEM_CLOCK = &H8
' enum MFCLOCK_STATE
%EQUATE `MFCLOCK_STATE_INVALID = 0
%EQUATE `MFCLOCK_STATE_RUNNING = %MFCLOCK_STATE_INVALID + 1
%EQUATE `MFCLOCK_STATE_STOPPED = %MFCLOCK_STATE_RUNNING + 1
%EQUATE `MFCLOCK_STATE_PAUSED = %MFCLOCK_STATE_STOPPED + 1
' enum MFCLOCK_RELATIONAL_FLAGS
%EQUATE `MFCLOCK_RELATIONAL_FLAG_JITTER_NEVER_AHEAD = &H1
' // Size = 48 bytes
TYPE MFCLOCK_PROPERTIES QWORD FILL
 qwCorrelationRate AS QUAD ' unsigned __int64
 guidClockId AS GUID ' GUID
 dwClockFlags AS DWORD
 qwClockFrequency AS QUAD ' unsigned __int64
 dwClockTolerance AS DWORD
 dwClockJitter AS DWORD
END TYPE
%EQUATE `MFCLOCK_FREQUENCY_HNS = 10000000
%EQUATE `MFCLOCK_TOLERANCE_UNKNOWN = 50000
%EQUATE `MFCLOCK_JITTER_ISR = 1000
%EQUATE `MFCLOCK_JITTER_DPC = 4000
%EQUATE `MFCLOCK_JITTER_PASSIVE = 10000
' ########################################################################################
' Interface name = IMFClock
' IID = 2EB1E945-18B8-4139-9B1A-D5D584818530
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFClock_INTERFACE_DEFINED)
 %IMFClock_INTERFACE_DEFINED = 1
$IID_IMFClock = GUID$("{2EB1E945-18B8-4139-9B1A-D5D584818530}")
INTERFACE IMFClock $IID_IMFClock
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetClockCharacteristics ( ' VTable offset = 12
 BYREF pdwCharacteristics AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetCorrelatedTime ( ' VTable offset = 16
 BYVAL dwReserved AS DWORD
 , BYREF pllClockTime AS QUAD
 , BYREF phnsSystemTime AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD GetContinuityKey ( ' VTable offset = 20
 BYREF pdwContinuityKey AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetState ( ' VTable offset = 24
 BYVAL dwReserved AS DWORD
 , BYREF peClockState AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetProperties ( ' VTable offset = 28
 BYREF pClockProperties AS MFCLOCK_PROPERTIES
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFClock_INTERFACE_DEFINED__ */
DECLARE FUNCTION MFGetSystemTime LIB "mfplat.dll" ALIAS "MFGetSystemTime" ( ) AS QUAD ' MFTIME
%EQUATE `PRESENTATION_CURRENT_POSITION = &H7fffffffffffffff&&
' ########################################################################################
' Interface name = IMFPresentationClock
' IID = 868CE85C-8EA9-4F55-AB82-B009A910A805
' Inherited interface = IMFClock
' ########################################################################################
#IF NOT %DEF(%IMFPresentationClock_INTERFACE_DEFINED)
 %IMFPresentationClock_INTERFACE_DEFINED = 1
$IID_IMFPresentationClock = GUID$("{868CE85C-8EA9-4F55-AB82-B009A910A805}")
INTERFACE IMFPresentationClock $IID_IMFPresentationClock
 INHERIT IUnknown
 ' =====================================================================================
 ' IMFClock methods
 ' =====================================================================================
 METHOD GetClockCharacteristics ( ' VTable offset = 12
 BYREF pdwCharacteristics AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetCorrelatedTime ( ' VTable offset = 16
 BYVAL dwReserved AS DWORD
 , BYREF pllClockTime AS QUAD
 , BYREF phnsSystemTime AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD GetContinuityKey ( ' VTable offset = 20
 BYREF pdwContinuityKey AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetState ( ' VTable offset = 24
 BYVAL dwReserved AS DWORD
 , BYREF peClockState AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetProperties ( ' VTable offset = 28
 BYREF pClockProperties AS MFCLOCK_PROPERTIES
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMFPresentationClock methods
 ' =====================================================================================
 METHOD SetTimeSource ( ' VTable offset = 32
 BYVAL pTimeSource AS IMFPresentationTimeSource
 ) AS LONG
 ' =====================================================================================
 METHOD GetTimeSource ( ' VTable offset = 36
 BYREF ppTimeSource AS IMFPresentationTimeSource
 ) AS LONG
 ' =====================================================================================
 METHOD GetTime ( ' VTable offset = 40
 BYREF phnsClockTime AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD AddClockStateSink ( ' VTable offset = 44
 BYVAL pStateSink AS IMFClockStateSink
 ) AS LONG
 ' =====================================================================================
 METHOD RemoveClockStateSink ( ' VTable offset = 48
 BYVAL pStateSink AS IMFClockStateSink
 ) AS LONG
 ' =====================================================================================
 METHOD Start ( ' VTable offset = 52
 BYVAL llClockStartOffset AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD Stop ( ' VTable offset = 56
 ) AS LONG
 ' =====================================================================================
 METHOD Pause ( ' VTable offset = 60
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFPresentationClock_INTERFACE_DEFINED__ */
DECLARE FUNCTION MFCreatePresentationClock LIB "mf.dll" ALIAS "MFCreatePresentationClock" ( BYREF ppPresentationClock AS IMFPresentationClock ) AS LONG
' ########################################################################################
' Interface name = IMFPresentationTimeSource
' IID = 7FF12CCE-F76F-41C2-863B-1666C8E5E139
' Inherited interface = IMFClock
' ########################################################################################
#IF NOT %DEF(%IMFPresentationTimeSource_INTERFACE_DEFINED)
 %IMFPresentationTimeSource_INTERFACE_DEFINED = 1
$IID_IMFPresentationTimeSource = GUID$("{7FF12CCE-F76F-41C2-863B-1666C8E5E139}")
INTERFACE IMFPresentationTimeSource $IID_IMFPresentationTimeSource
 INHERIT IUnknown
 ' =====================================================================================
 ' IMFClock methods
 ' =====================================================================================
 METHOD GetClockCharacteristics ( ' VTable offset = 12
 BYREF pdwCharacteristics AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetCorrelatedTime ( ' VTable offset = 16
 BYVAL dwReserved AS DWORD
 , BYREF pllClockTime AS QUAD
 , BYREF phnsSystemTime AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD GetContinuityKey ( ' VTable offset = 20
 BYREF pdwContinuityKey AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetState ( ' VTable offset = 24
 BYVAL dwReserved AS DWORD
 , BYREF peClockState AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetProperties ( ' VTable offset = 28
 BYREF pClockProperties AS MFCLOCK_PROPERTIES
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMFPresentationClock methods
 ' =====================================================================================
 METHOD GetUnderlyingClock ( ' VTable offset = 32
 BYREF ppClock AS IMFClock
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFPresentationTimeSource_INTERFACE_DEFINED__ */
DECLARE FUNCTION MFCreateSystemTimeSource LIB "mfplat.dll" ALIAS "MFCreateSystemTimeSource" ( BYREF ppSystemTimeSource AS IMFPresentationTimeSource ) AS LONG
' ########################################################################################
' Interface name = IMFClockStateSink
' IID = F6696E82-74F7-4F3D-A178-8A5E09C3659F
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFClockStateSink_INTERFACE_DEFINED)
 %IMFClockStateSink_INTERFACE_DEFINED = 1
$IID_IMFClockStateSink = GUID$("{F6696E82-74F7-4F3D-A178-8A5E09C3659F}")
INTERFACE IMFClockStateSink $IID_IMFClockStateSink
 INHERIT IUnknown
 ' =====================================================================================
 METHOD OnClockStart ( ' VTable offset = 12
 BYVAL hnsSystemTime AS QUAD
 , BYVAL llClockStartOffset AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD OnClockStop ( ' VTable offset = 16
 BYVAL hnsSystemTime AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD OnClockPause ( ' VTable offset = 20
 BYVAL hnsSystemTime AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD OnClockRestart ( ' VTable offset = 24
 BYVAL hnsSystemTime AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD OnClockSetRate ( ' VTable offset = 28
 BYVAL hnsSystemTime AS QUAD
 , BYVAL flRate AS SINGLE
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFClockStateSink_INTERFACE_DEFINED__ */
$MF_PD_PMPHOST_CONTEXT = GUID$("{6C990D31-BB8E-477A-8598-0D5D96FCD88A}")
$MF_PD_APP_CONTEXT = GUID$("{6C990D32-BB8E-477A-8598-0D5D96FCD88A}")
$MF_PD_DURATION = GUID$("{6C990D33-BB8E-477A-8598-0D5D96FCD88A}")
$MF_PD_TOTAL_FILE_SIZE = GUID$("{6C990D34-BB8E-477A-8598-0D5D96FCD88A}")
$MF_PD_AUDIO_ENCODING_BITRATE = GUID$("{6C990D35-BB8E-477A-8598-0D5D96FCD88A}")
$MF_PD_VIDEO_ENCODING_BITRATE = GUID$("{6C990D36-BB8E-477A-8598-0D5D96FCD88A}")
$MF_PD_MIME_TYPE = GUID$("{6C990D37-BB8E-477A-8598-0D5D96FCD88A}")
$MF_PD_LAST_MODIFIED_TIME = GUID$("{6C990D38-BB8E-477A-8598-0D5D96FCD88A}")
'#if (WINVER >= _WIN32_WINNT_WIN7)
$MF_PD_PLAYBACK_ELEMENT_ID = GUID$("{6c990d39-bb8e-477a-8598-0d5d96fcd88a}")
$MF_PD_PREFERRED_LANGUAGE = GUID$("{6c990d3A-bb8e-477a-8598-0d5d96fcd88a}")
$MF_PD_PLAYBACK_BOUNDARY_TIME = GUID$("{6c990d3b-bb8e-477a-8598-0d5d96fcd88a}")
$MF_PD_AUDIO_ISVARIABLEBITRATE = GUID$("{33026ee0-e387-4582-ae0a-34a2ad3baa18}")
'#endif // (WINVER >= _WIN32_WINNT_WIN7)
' ########################################################################################
' Interface name = IMFPresentationDescriptor
' IID = 03CB2711-24D7-4DB6-A17F-F3A7A479A536
' Inherited interface = IMFAttributes
' ########################################################################################
#IF NOT %DEF(%IMFPresentationDescriptor_INTERFACE_DEFINED)
 %IMFPresentationDescriptor_INTERFACE_DEFINED = 1
$IID_IMFPresentationDescriptor = GUID$("{03CB2711-24D7-4DB6-A17F-F3A7A479A536}")
INTERFACE IMFPresentationDescriptor $IID_IMFPresentationDescriptor
 INHERIT IUnknown
 ' =====================================================================================
 ' IMFAttributes methods
 ' =====================================================================================
 METHOD GetItem ( ' VTable offset = 12
 BYREF guidKey AS GUID
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD GetItemType ( ' VTable offset = 16
 BYREF guidKey AS GUID
 , BYREF pType AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD CompareItem ( ' VTable offset = 20
 BYREF guidKey AS GUID
 , BYREF Value AS PROPVARIANT
 , BYREF pbResult AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD Compare ( ' VTable offset = 24
 BYVAL pTheirs AS IMFAttributes
 , BYVAL MatchType AS LONG
 , BYREF pbResult AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetUINT32 ( ' VTable offset = 28
 BYREF guidKey AS GUID
 , BYREF punValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetUINT64 ( ' VTable offset = 32
 BYREF guidKey AS GUID
 , BYREF punValue AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD GetDouble ( ' VTable offset = 36
 BYREF guidKey AS GUID
 , BYREF pfValue AS DOUBLE
 ) AS LONG
 ' =====================================================================================
 METHOD GetGUID ( ' VTable offset = 40
 BYREF guidKey AS GUID
 , BYREF pguidValue AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD GetStringLength ( ' VTable offset = 44
 BYREF guidKey AS GUID
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetString ( ' VTable offset = 48
 BYREF guidKey AS GUID
 , BYREF pwszValue AS WSTRINGZ
 , BYVAL cchBufSize AS DWORD
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAllocatedString ( ' VTable offset = 52
 BYREF guidKey AS GUID
 , BYREF ppwszValue AS DWORD
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetBlobSize ( ' VTable offset = 56
 BYREF guidKey AS GUID
 , BYREF pcbBlobSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetBlob ( ' VTable offset = 60
 BYREF guidKey AS GUID
 , BYVAL pBuf AS DWORD
 , BYVAL cbBufSize AS DWORD
 , BYREF pcbBlobSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAllocatedBlob ( ' VTable offset = 64
 BYREF guidKey AS GUID
 , BYVAL ppBuf AS DWORD
 , BYREF pcbSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetUnknown ( ' VTable offset = 68
 BYREF guidKey AS GUID
 , BYREF riid AS GUID
 , BYREF ppv AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD SetItem ( ' VTable offset = 72
 BYREF guidKey AS GUID
 , BYREF Value AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteItem ( ' VTable offset = 76
 BYREF guidKey AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteAllItems ( ' VTable offset = 80
 ) AS LONG
 ' =====================================================================================
 METHOD SetUINT32 ( ' VTable offset = 84
 BYREF guidKey AS GUID
 , BYVAL unValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetUINT64 ( ' VTable offset = 88
 BYREF guidKey AS GUID
 , BYVAL unValue AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD SetDouble ( ' VTable offset = 92
 BYREF guidKey AS GUID
 , BYVAL fValue AS DOUBLE
 ) AS LONG
 ' =====================================================================================
 METHOD SetGUID ( ' VTable offset = 96
 BYREF guidKey AS GUID
 , BYREF guidValue AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD SetString ( ' VTable offset = 100
 BYREF guidKey AS GUID
 , BYREF wszValue AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetBlob ( ' VTable offset = 104
 BYREF guidKey AS GUID
 , BYVAL pBuf AS DWORD
 , BYVAL cbBufSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetUnknown ( ' VTable offset = 108
 BYREF guidKey AS GUID
 , BYVAL pUnknown AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD LockStore ( ' VTable offset = 112
 ) AS LONG
 ' =====================================================================================
 METHOD UnlockStore ( ' VTable offset = 116
 ) AS LONG
 ' =====================================================================================
 METHOD GetCount ( ' VTable offset = 120
 BYREF pcItems AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetItemByIndex ( ' VTable offset = 124
 BYVAL unIndex AS DWORD
 , BYREF pguidKey AS GUID
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD CopyAllItems ( ' VTable offset = 128
 BYVAL pDest AS LONG
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMFPresentationDescriptor methods
 ' =====================================================================================
 METHOD GetStreamDescriptorCount ( ' VTable offset = 132
 BYREF pdwDescriptorCount AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetStreamDescriptorByIndex ( ' VTable offset = 136
 BYVAL dwIndex AS DWORD
 , BYREF pfSelected AS LONG
 , BYREF ppDescriptor AS IMFStreamDescriptor
 ) AS LONG
 ' =====================================================================================
 METHOD SelectStream ( ' VTable offset = 140
 BYVAL dwDescriptorIndex AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD DeselectStream ( ' VTable offset = 144
 BYVAL dwDescriptorIndex AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Clone ( ' VTable offset = 148
 BYREF ppPresentationDescriptor AS IMFPresentationDescriptor
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFPresentationDescriptor_INTERFACE_DEFINED__ */
DECLARE FUNCTION MFCreatePresentationDescriptor LIB "mfplat.dll" ALIAS "MFCreatePresentationDescriptor" ( BYVAL cStreamDescriptors AS QUAD , BYREF apStreamDescriptors AS IMFStreamDescriptor , BYREF ppPresentationDescriptor AS IMFPresentationDescriptor ) AS LONG
DECLARE FUNCTION MFRequireProtectedEnvironment LIB "mf.dll" ALIAS "MFRequireProtectedEnvironment" ( BYVAL pPresentationDescriptor AS IMFPresentationDescriptor
 ) AS LONG
DECLARE FUNCTION MFSerializePresentationDescriptor LIB "mfplat.dll" ALIAS "MFSerializePresentationDescriptor" ( BYVAL pPD AS IMFPresentationDescriptor
 , BYREF pcbData AS DWORD
 , BYREF ppbData AS DWORD
 ) AS LONG
DECLARE FUNCTION MFDeserializePresentationDescriptor LIB "mfplat.dll" ALIAS "MFDeserializePresentationDescriptor" ( BYVAL cbData AS DWORD
 , BYVAL pbData AS BYTE PTR
 , BYREF ppPD AS IMFPresentationDescriptor
 ) AS LONG
$MF_SD_LANGUAGE = GUID$("{00AF2180-BDC2-423C-ABCA-F503593BC121}")
$MF_SD_PROTECTED = GUID$("{00AF2181-BDC2-423C-ABCA-F503593BC121}")
$MF_SD_STREAM_NAME = GUID$("{4f1b099d-d314-41e5-a781-7fefaa4c501f}")
$MF_SD_MUTUALLY_EXCLUSIVE = GUID$("{023ef79c-388d-487f-ac17-696cd6e3c6f5}")
' ########################################################################################
' Interface name = IMFStreamDescriptor
' IID = 56C03D9C-9DBB-45F5-AB4B-D80F47C05938
' Inherited interface = IMFAttributes
' ########################################################################################
#IF NOT %DEF(%IMFStreamDescriptor_INTERFACE_DEFINED)
 %IMFStreamDescriptor_INTERFACE_DEFINED = 1
$IID_IMFStreamDescriptor = GUID$("{56C03D9C-9DBB-45F5-AB4B-D80F47C05938}")
INTERFACE IMFStreamDescriptor $IID_IMFStreamDescriptor
 INHERIT IUnknown
 ' =====================================================================================
 ' IMFAttributes methods
 ' =====================================================================================
 METHOD GetItem ( ' VTable offset = 12
 BYREF guidKey AS GUID
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD GetItemType ( ' VTable offset = 16
 BYREF guidKey AS GUID
 , BYREF pType AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD CompareItem ( ' VTable offset = 20
 BYREF guidKey AS GUID
 , BYREF Value AS PROPVARIANT
 , BYREF pbResult AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD Compare ( ' VTable offset = 24
 BYVAL pTheirs AS IMFAttributes
 , BYVAL MatchType AS LONG
 , BYREF pbResult AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetUINT32 ( ' VTable offset = 28
 BYREF guidKey AS GUID
 , BYREF punValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetUINT64 ( ' VTable offset = 32
 BYREF guidKey AS GUID
 , BYREF punValue AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD GetDouble ( ' VTable offset = 36
 BYREF guidKey AS GUID
 , BYREF pfValue AS DOUBLE
 ) AS LONG
 ' =====================================================================================
 METHOD GetGUID ( ' VTable offset = 40
 BYREF guidKey AS GUID
 , BYREF pguidValue AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD GetStringLength ( ' VTable offset = 44
 BYREF guidKey AS GUID
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetString ( ' VTable offset = 48
 BYREF guidKey AS GUID
 , BYREF pwszValue AS WSTRINGZ
 , BYVAL cchBufSize AS DWORD
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAllocatedString ( ' VTable offset = 52
 BYREF guidKey AS GUID
 , BYREF ppwszValue AS DWORD
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetBlobSize ( ' VTable offset = 56
 BYREF guidKey AS GUID
 , BYREF pcbBlobSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetBlob ( ' VTable offset = 60
 BYREF guidKey AS GUID
 , BYVAL pBuf AS DWORD
 , BYVAL cbBufSize AS DWORD
 , BYREF pcbBlobSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAllocatedBlob ( ' VTable offset = 64
 BYREF guidKey AS GUID
 , BYVAL ppBuf AS DWORD
 , BYREF pcbSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetUnknown ( ' VTable offset = 68
 BYREF guidKey AS GUID
 , BYREF riid AS GUID
 , BYREF ppv AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD SetItem ( ' VTable offset = 72
 BYREF guidKey AS GUID
 , BYREF Value AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteItem ( ' VTable offset = 76
 BYREF guidKey AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteAllItems ( ' VTable offset = 80
 ) AS LONG
 ' =====================================================================================
 METHOD SetUINT32 ( ' VTable offset = 84
 BYREF guidKey AS GUID
 , BYVAL unValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetUINT64 ( ' VTable offset = 88
 BYREF guidKey AS GUID
 , BYVAL unValue AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD SetDouble ( ' VTable offset = 92
 BYREF guidKey AS GUID
 , BYVAL fValue AS DOUBLE
 ) AS LONG
 ' =====================================================================================
 METHOD SetGUID ( ' VTable offset = 96
 BYREF guidKey AS GUID
 , BYREF guidValue AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD SetString ( ' VTable offset = 100
 BYREF guidKey AS GUID
 , BYREF wszValue AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetBlob ( ' VTable offset = 104
 BYREF guidKey AS GUID
 , BYVAL pBuf AS DWORD
 , BYVAL cbBufSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetUnknown ( ' VTable offset = 108
 BYREF guidKey AS GUID
 , BYVAL pUnknown AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD LockStore ( ' VTable offset = 112
 ) AS LONG
 ' =====================================================================================
 METHOD UnlockStore ( ' VTable offset = 116
 ) AS LONG
 ' =====================================================================================
 METHOD GetCount ( ' VTable offset = 120
 BYREF pcItems AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetItemByIndex ( ' VTable offset = 124
 BYVAL unIndex AS DWORD
 , BYREF pguidKey AS GUID
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD CopyAllItems ( ' VTable offset = 128
 BYVAL pDest AS LONG
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMFStreamDescriptor methods
 ' =====================================================================================
 METHOD GetStreamIdentifier ( ' VTable offset = 132
 BYREF pdwStreamIdentifier AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetMediaTypeHandler ( ' VTable offset = 136
 BYREF ppMediaTypeHandler AS IMFMediaTypeHandler
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFStreamDescriptor_INTERFACE_DEFINED__ */
DECLARE FUNCTION MFCreateStreamDescriptor LIB "mfplat.dll" ALIAS "MFCreateStreamDescriptor" ( BYVAL dwStreamIdentifier AS QUAD , BYVAL cMediaTypes AS QUAD , BYREF apMediaTypes AS IMFMediaType , BYREF ppDescriptor AS IMFStreamDescriptor ) AS LONG
' ########################################################################################
' Interface name = IMFMediaTypeHandler
' IID = E93DCF6C-4B07-4E1E-8123-AA16ED6EADF5
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFMediaTypeHandler_INTERFACE_DEFINED)
 %IMFMediaTypeHandler_INTERFACE_DEFINED = 1
$IID_IMFMediaTypeHandler = GUID$("{E93DCF6C-4B07-4E1E-8123-AA16ED6EADF5}")
INTERFACE IMFMediaTypeHandler $IID_IMFMediaTypeHandler
 INHERIT IUnknown
 ' =====================================================================================
 METHOD IsMediaTypeSupported ( ' VTable offset = 12
 BYVAL pMediaType AS IMFMediaType
 , BYREF ppMediaType AS IMFMediaType
 ) AS LONG
 ' =====================================================================================
 METHOD GetMediaTypeCount ( ' VTable offset = 16
 BYREF pdwTypeCount AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetMediaTypeByIndex ( ' VTable offset = 20
 BYVAL dwIndex AS DWORD
 , BYREF ppType AS IMFMediaType
 ) AS LONG
 ' =====================================================================================
 METHOD SetCurrentMediaType ( ' VTable offset = 24
 BYVAL pMediaType AS IMFMediaType
 ) AS LONG
 ' =====================================================================================
 METHOD GetCurrentMediaType ( ' VTable offset = 28
 BYREF pMediaType AS IMFMediaType
 ) AS LONG
 ' =====================================================================================
 METHOD GetMajorType ( ' VTable offset = 32
 BYREF pguidMajorType AS GUID
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFMediaTypeHandler_INTERFACE_DEFINED__ */
DECLARE FUNCTION MFCreateSimpleTypeHandler LIB "mf.dll" ALIAS "MFCreateSimpleTypeHandler" ( BYREF ppHandler AS IMFMediaTypeHandler ) AS LONG
' enum MFTIMER_FLAGS
%EQUATE `MFTIMER_RELATIVE = &H1
' ########################################################################################
' Interface name = IMFTimer
' IID = E56E4CBD-8F70-49D8-A0F8-EDB3D6AB9BF2
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFTimer_INTERFACE_DEFINED)
 %IMFTimer_INTERFACE_DEFINED = 1
$IID_IMFTimer = GUID$("{E56E4CBD-8F70-49D8-A0F8-EDB3D6AB9BF2}")
INTERFACE IMFTimer $IID_IMFTimer
 INHERIT IUnknown
 ' =====================================================================================
 METHOD SetTimer ( ' VTable offset = 12
 BYVAL dwFlags AS DWORD
 , BYVAL llClockTime AS QUAD
 , BYVAL pCallback AS IMFAsyncCallback
 , BYVAL punkState AS IUnknown
 , BYREF ppunkKey AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD CancelTimer ( ' VTable offset = 16
 BYVAL punkKey AS IUnknown
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFTimer_INTERFACE_DEFINED__ */
$MF_ACTIVATE_CUSTOM_VIDEO_MIXER_CLSID = GUID$("{BA491360-BE50-451E-95AB-6D4ACCC7DAD8}")
$MF_ACTIVATE_CUSTOM_VIDEO_MIXER_ACTIVATE = GUID$("{BA491361-BE50-451E-95AB-6D4ACCC7DAD8}")
$MF_ACTIVATE_CUSTOM_VIDEO_MIXER_FLAGS = GUID$("{BA491362-BE50-451E-95AB-6D4ACCC7DAD8}")
$MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_CLSID = GUID$("{BA491364-BE50-451E-95AB-6D4ACCC7DAD8}")
$MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_ACTIVATE = GUID$("{BA491365-BE50-451E-95AB-6D4ACCC7DAD8}")
$MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_FLAGS = GUID$("{BA491366-BE50-451E-95AB-6D4ACCC7DAD8}")
' enum __MIDL___MIDL_itf_mfidl_0000_0019_0001
%EQUATE `MF_ACTIVATE_CUSTOM_MIXER_ALLOWFAIL = &H1
' enum __MIDL___MIDL_itf_mfidl_0000_0019_0002
%EQUATE `MF_ACTIVATE_CUSTOM_PRESENTER_ALLOWFAIL = &H1
$MF_ACTIVATE_MFT_LOCKED = GUID$("{C1F6093C-7F65-4FBD-9E39-5FAEC3C4FBD7}")
$MF_ACTIVATE_VIDEO_WINDOW = GUID$("{9A2DBBDD-F57E-4162-82B9-6831377682D3}")
' enum MFSHUTDOWN_STATUS
%EQUATE `MFSHUTDOWN_INITIATED = 0
%EQUATE `MFSHUTDOWN_COMPLETED = %MFSHUTDOWN_INITIATED + 1
' ########################################################################################
' Interface name = IMFShutdown
' IID = 97EC2EA4-0E42-4937-97AC-9D6D328824E1
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFShutdown_INTERFACE_DEFINED)
 %IMFShutdown_INTERFACE_DEFINED = 1
$IID_IMFShutdown = GUID$("{97EC2EA4-0E42-4937-97AC-9D6D328824E1}")
INTERFACE IMFShutdown $IID_IMFShutdown
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Shutdown ( ' VTable offset = 12
 ) AS LONG
 ' =====================================================================================
 METHOD GetShutdownStatus ( ' VTable offset = 16
 BYREF pStatus AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFShutdown_INTERFACE_DEFINED__ */
DECLARE FUNCTION MFShutdownObject LIB "mf.dll" ALIAS "MFShutdownObject" ( BYVAL pUnk AS IUnknown ) AS LONG
DECLARE FUNCTION MFCreateAudioRenderer LIB "mf.dll" ALIAS "MFCreateAudioRenderer" ( BYVAL pAudioAttributes AS IMFAttributes
 , BYREF ppSink AS IMFMediaSink
 ) AS LONG
DECLARE FUNCTION MFCreateAudioRendererActivate LIB "mf.dll" ALIAS "MFCreateAudioRendererActivate" ( BYREF ppActivate AS IMFActivate
 ) AS LONG
$MF_AUDIO_RENDERER_ATTRIBUTE_FLAGS = GUID$("{EDE4B5E0-F805-4D6C-99B3-DB01BF95DFAB}")
%EQUATE `MF_AUDIO_RENDERER_ATTRIBUTE_FLAGS_CROSSPROCESS = &H00000001
%EQUATE `MF_AUDIO_RENDERER_ATTRIBUTE_FLAGS_NOPERSIST = &H00000002
$MF_AUDIO_RENDERER_ATTRIBUTE_SESSION_ID = GUID$("{EDE4B5E3-F805-4D6C-99B3-DB01BF95DFAB}")
$MF_AUDIO_RENDERER_ATTRIBUTE_ENDPOINT_ID = GUID$("{B10AAEC3-EF71-4CC3-B873-05A9-A08B9F8E}")
$MF_AUDIO_RENDERER_ATTRIBUTE_ENDPOINT_ROLE = GUID$("{6BA644FF-27C5-4D02-9887-C28619FDB91B}")
DECLARE FUNCTION MFCreateVideoRendererActivate LIB "mf.dll" ALIAS "MFCreateVideoRendererActivate" ( BYVAL hwndVideo AS QUAD , BYREF ppActivate AS IMFActivate ) AS LONG
'#if (WINVER >= _WIN32_WINNT_WIN7)
DECLARE FUNCTION MFCreateMPEG4MediaSink LIB "mf.dll" ALIAS "MFCreateMPEG4MediaSink" ( BYVAL pIByteStream AS IMFByteStream , BYVAL pVideoMediaType AS IMFMediaType , BYVAL pAudioMediaType AS IMFMediaType , BYREF ppIMediaSink AS IMFMediaSink ) AS LONG
DECLARE FUNCTION MFCreate3GPMediaSink LIB "mf.dll" ALIAS "MFCreate3GPMediaSink" ( BYVAL pIByteStream AS IMFByteStream
 , BYVAL pVideoMediaType AS IMFMediaType
 , pAudioMediaType AS IMFMediaType
 , BYREF ppIMediaSink AS IMFMediaSink
 ) AS LONG
DECLARE FUNCTION MFCreateMP3MediaSink LIB "mf.dll" ALIAS "MFCreateMP3MediaSink" ( BYVAL pTargetByteStream AS IMFByteStream
 , BYREF ppMediaSink AS IMFMediaSink
 ) AS LONG
'#endif // (WINVER >= _WIN32_WINNT_WIN7)
' ########################################################################################
' Interface name = IMFTopoLoader
' IID = DE9A6157-F660-4643-B56A-DF9F7998C7CD
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFTopoLoader_INTERFACE_DEFINED)
 %IMFTopoLoader_INTERFACE_DEFINED = 1
$IID_IMFTopoLoader = GUID$("{DE9A6157-F660-4643-B56A-DF9F7998C7CD}")
INTERFACE IMFTopoLoader $IID_IMFTopoLoader
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Load ( ' VTable offset = 12
 BYVAL pInputTopo AS IMFTopology
 , BYREF ppOutputTopo AS IMFTopology
 , BYVAL pCurrentTopo AS IMFTopology
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFTopoLoader_INTERFACE_DEFINED__ */
DECLARE FUNCTION MFCreateTopoLoader LIB "mf.dll" ALIAS "MFCreateTopoLoader" ( BYREF ppObj AS IMFTopoLoader ) AS LONG
' ########################################################################################
' Interface name = IMFContentProtectionManager
' IID = ACF92459-6A61-42BD-B57C-B43E51203CB0"
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFContentProtectionManager_INTERFACE_DEFINED)
 %IMFContentProtectionManager_INTERFACE_DEFINED = 1
$IID_IMFContentProtectionManager = GUID$("{ACF92459-6A61-42BD-B57C-B43E51203CB0}")
INTERFACE IMFContentProtectionManager $IID_IMFContentProtectionManager
 INHERIT IUnknown
 ' =====================================================================================
 METHOD BeginEnableContent ( ' VTable offset = 12
 BYVAL pEnablerActivate AS IMFActivate
 , BYVAL pTopo AS IMFTopology
 , BYVAL pCallback AS IMFAsyncCallback
 , BYVAL punkState AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD EndEnableContent ( ' VTable offset = 16
 BYVAL pResult AS IMFAsyncResult
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFContentProtectionManager_INTERFACE_DEFINED__ */
' enum MF_URL_TRUST_STATUS
%EQUATE `MF_LICENSE_URL_UNTRUSTED = 0
%EQUATE `MF_LICENSE_URL_TRUSTED = %MF_LICENSE_URL_UNTRUSTED + 1
%EQUATE `MF_LICENSE_URL_TAMPERED = %MF_LICENSE_URL_TRUSTED + 1
' ########################################################################################
' Interface name = IMFContentEnabler
' IID = D3C4EF59-49CE-4381-9071-D5BCD044C770
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFContentEnabler_INTERFACE_DEFINED)
 %IMFContentEnabler_INTERFACE_DEFINED = 1
$IID_IMFContentEnabler = GUID$("{D3C4EF59-49CE-4381-9071-D5BCD044C770}")
INTERFACE IMFContentEnabler $IID_IMFContentEnabler
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetEnableType ( ' VTable offset = 12
 BYREF pType AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD GetEnableURL ( ' VTable offset = 16
 BYREF ppwszURL AS DWORD
 , BYREF pcchURL AS DWORD
 , BYREF pTrustStatus AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetEnableData ( ' VTable offset = 20
 BYREF ppbData AS DWORD
 , BYREF pcbData AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD IsAutomaticSupported ( ' VTable offset = 24
 BYREF pfAutomatic AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD AutomaticEnable ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 METHOD MonitorEnable ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 METHOD Cancel ( ' VTable offset = 32
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFContentEnabler_INTERFACE_DEFINED__ */
$MFENABLETYPE_WMDRMV1_LicenseAcquisition = GUID$("{4FF6EEAF-0B43-4797-9B85-ABF31815E7B0}")
$MFENABLETYPE_WMDRMV7_LicenseAcquisition = GUID$("{030306DF-4A06-4884-A097-EF6D22EC84A3}")
$MFENABLETYPE_WMDRMV7_Individualization = GUID$("{ACD2C84A-B303-4F65-BC2C-2C848D01A989}")
$MFENABLETYPE_MF_UpdateRevocationInformation = GUID$("{E558B0B5-B3C4-44A0-924C-50D178932385}")
$MFENABLETYPE_MF_UpdateUntrustedComponent = GUID$("{9879F3D6-CEE2-48E6-B573-9767AB172F16}")
$MFENABLETYPE_MF_RebootRequired = GUID$("{6D4D3D4B-0ECE-4652-8B3A-F2D24260D887}")
'//
'// Structs that contain information about revoked or unsigned binaries,
'// returned by the IMFContentEnabler::GetEnableData() method of
'// the Revocation content enabler
'//
#IF NOT %DEF(%MFRR_INFO_VERSION)
%EQUATE `MFRR_INFO_VERSION = 0
#ENDIF
'//
'// The values for MFRR_COMPONENT_HASH_INFO.ulReason
'//
%EQUATE `MF_USER_MODE_COMPONENT_LOAD = &H00000001
%EQUATE `MF_KERNEL_MODE_COMPONENT_LOAD = &H00000002
%EQUATE `MF_GRL_LOAD_FAILED = &H00000010
%EQUATE `MF_INVALID_GRL_SIGNATURE = &H00000020
%EQUATE `MF_GRL_ABSENT = &H00001000
%EQUATE `MF_COMPONENT_REVOKED = &H00002000
%EQUATE `MF_COMPONENT_INVALID_EKU = &H00004000
%EQUATE `MF_COMPONENT_CERT_REVOKED = &H00008000
%EQUATE `MF_COMPONENT_INVALID_ROOT = &H00010000
%EQUATE `MF_COMPONENT_HS_CERT_REVOKED = &H00020000
%EQUATE `MF_COMPONENT_LS_CERT_REVOKED = &H00040000
%EQUATE `MF_BOOT_DRIVER_VERIFICATION_FAILED = &H00100000
%EQUATE `MF_TEST_SIGNED_COMPONENT_LOADING = &H01000000
%EQUATE `MF_MINCRYPT_FAILURE = &H10000000
'//
'// STR_HASH_LEN: Number of characters required to represent a SHA-1 hash
'// as a string of the form "0x5a3b53463b672a4f..."
'// Each byte of a SHA-1 hash takes two characters to represent, and
'// we add in two leading characters "0x" as well as the NULL terminator
'//
%EQUATE `SHA_HASH_LEN = 20
%EQUATE `STR_HASH_LEN = %SHA_HASH_LEN * 2 + 3
' // Size = 696 bytes
TYPE MFRR_COMPONENT_HASH_INFO BYTE
 ' // Reason for failure (revoked or unsigned or badly signed).
 ulReason AS DWORD
 ' // Header hash of the component
 rgHeaderHash AS WSTRINGZ * %STR_HASH_LEN ' WCHAR
 ' // Hash of public key if one of the certificates
 ' // in the signing certificate chain is revoked
 rgPublicKeyHash AS WSTRINGZ * %STR_HASH_LEN ' WCHAR
 ' // Component name (full path name)
 wszName AS WSTRINGZ * %MAX_PATH ' WCHAR
END TYPE
' // Size = 12 bytes
TYPE MFRR_COMPONENTS DWORD
 ' // Version number
 dwRRInfoVersion AS DWORD
 ' // Number of components in list
 dwRRComponents AS DWORD
 ' // points to the end of this structure that has
 ' // allocated memory for the array of component info structures
 pRRComponents AS MFRR_COMPONENT_HASH_INFO PTR ' PMFRR_COMPONENT_HASH_INFO
END TYPE
'#pragma pack ( push )
'#pragma pack ( 1 )
' // Size = 5 bytes
TYPE ASF_FLAT_PICTURE BYTE
 ' // Direct mapped fields
 bPictureType AS BYTE ' BYTE
 dwDataLen AS DWORD
END TYPE
MACRO ASFFlatPicture = ASF_FLAT_PICTURE
'#pragma pack ( pop )
'#pragma pack ( push )
'#pragma pack ( 1 )
' // size = 6 bytes
TYPE ASF_FLAT_SYNCHRONISED_LYRICS BYTE
 ' // Direct mapped fields
 bTimeStampFormat AS BYTE ' BYTE
 bContentType AS BYTE ' BYTE
 dwLyricsLen AS DWORD
END TYPE
MACRO ASFFlatSynchronisedLyrics = ASF_FLAT_SYNCHRONISED_LYRICS
'#pragma pack ( pop )
' ########################################################################################
' Interface name = IMFMetadata
' IID = F88CFB8C-EF16-4991-B450-CB8C69E51704
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFMetadata_INTERFACE_DEFINED)
 %IMFMetadata_INTERFACE_DEFINED = 1
$IID_IMFMetadata = GUID$("{F88CFB8C-EF16-4991-B450-CB8C69E51704}")
INTERFACE IMFMetadata $IID_IMFMetadata
 INHERIT IUnknown
 ' =====================================================================================
 METHOD SetLanguage ( ' VTable offset = 12
 BYREF pwszRFC1766 AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD GetLanguage ( ' VTable offset = 16
 BYREF ppwszRFC1766 AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAllLanguages ( ' VTable offset = 20
 BYREF ppvLanguages AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD SetProperty ( ' VTable offset = 24
 BYREF pwszName AS WSTRINGZ
 , BYREF ppvValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD GetProperty ( ' VTable offset = 28
 BYREF pwszName AS WSTRINGZ
 , BYREF ppvValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteProperty ( ' VTable offset = 32
 BYREF pwszName AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD GetAllPropertyNames ( ' VTable offset = 36
 BYREF ppvNames AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFMetadata_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMFMetadataProvider
' IID = 56181D2D-E221-4ADB-B1C8-3CEE6A53F76F
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFMetadataProvider_INTERFACE_DEFINED)
 %IMFMetadataProvider_INTERFACE_DEFINED = 1
$IID_IMFMetadataProvider = GUID$("{56181D2D-E221-4ADB-B1C8-3CEE6A53F76F}")
INTERFACE IMFMetadataProvider $IID_IMFMetadataProvider
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetMFMetadata ( ' VTable offset = 12
 BYVAL pPresentationDescriptor AS IMFPresentationDescriptor
 , BYVAL dwStreamIdentifier AS DWORD
 , BYVAL dwFlags AS DWORD
 , BYREF ppMFMetadata AS IMFMetadata
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFMetadataProvider_INTERFACE_DEFINED__ */
$MF_METADATA_PROVIDER_SERVICE = GUID$("{DB214084-58A4-4D2E-B84F-6F755B2F7A0D}")
' enum MFRATE_DIRECTION
%EQUATE `MFRATE_FORWARD = 0
%EQUATE `MFRATE_REVERSE = %MFRATE_FORWARD + 1
' ########################################################################################
' Interface name = IMFRateSupport
' IID = 0A9CCDBC-D797-4563-9667-94EC5D79292D
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFRateSupport_INTERFACE_DEFINED)
 %IMFRateSupport_INTERFACE_DEFINED = 1
$IID_IMFRateSupport = GUID$("{0A9CCDBC-D797-4563-9667-94EC5D79292D}")
INTERFACE IMFRateSupport $IID_IMFRateSupport
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetSlowestRate ( ' VTable offset = 12
 BYVAL eDirection AS LONG
 , BYVAL fThin AS LONG
 , BYREF pflRate AS SINGLE
 ) AS LONG
 ' =====================================================================================
 METHOD GetFastestRate ( ' VTable offset = 16
 BYVAL eDirection AS LONG
 , BYVAL fThin AS LONG
 , BYREF pflRate AS SINGLE
 ) AS LONG
 ' =====================================================================================
 METHOD IsRateSupported ( ' VTable offset = 20
 BYVAL fThin AS LONG
 , BYVAL flRate AS SINGLE
 , BYREF pflNearestSupportedRate AS SINGLE
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFRateSupport_INTERFACE_DEFINED__ */
$MF_RATE_CONTROL_SERVICE = GUID$("{866FA297-B802-4BF8-9DC9-5E3B6A9F53C9}")
' ########################################################################################
' Interface name = IMFRateControl
' IID = 88DDCD21-03C3-4275-91ED-55EE3929328F
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFRateControl_INTERFACE_DEFINED)
 %IMFRateControl_INTERFACE_DEFINED = 1
$IID_IMFRateControl = GUID$("{88DDCD21-03C3-4275-91ED-55EE3929328F}")
INTERFACE IMFRateControl $IID_IMFRateControl
 INHERIT IUnknown
 ' =====================================================================================
 METHOD SetRate ( ' VTable offset = 12
 BYVAL fThin AS LONG
 , BYVAL flRate AS SINGLE
 ) AS LONG
 ' =====================================================================================
 METHOD GetRate ( ' VTable offset = 16
 BYREF pfThin AS LONG
 , BYREF pflRate AS SINGLE
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFRateControl_INTERFACE_DEFINED__ */
'#if (WINVER >= _WIN32_WINNT_WIN7)
' ########################################################################################
' Interface name = IMFTimecodeTranslate
' IID = ab9d8661-f7e8-4ef4-9861-89f334f94e74
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFTimecodeTranslate_INTERFACE_DEFINED)
 %IMFTimecodeTranslate_INTERFACE_DEFINED = 1
$IID_IMFTimecodeTranslate = GUID$("{ab9d8661-f7e8-4ef4-9861-89f334f94e74}")
INTERFACE IMFTimecodeTranslate $IID_IMFTimecodeTranslate
 INHERIT IUnknown
 ' =====================================================================================
 METHOD BeginConvertTimecodeToHNS ( ' VTable offset = 12
 BYREF pPropVarTimecode AS PROPVARIANT
 , BYVAL pCallback AS IMFAsyncCallback
 , BYVAL punkState AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD EndConvertTimecodeToHNS ( ' VTable offset = 16
 BYVAL pResult AS IMFAsyncResult
 , BYREF phnsTime AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD BeginConvertHNSToTimecode ( ' VTable offset = 20
 BYVAL hnsTime AS QUAD
 , BYVAL pCallback AS IMFAsyncCallback
 , BYREF punkState AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD EndConvertHNSToTimecode ( ' VTable offset = 24
 BYVAL pResult AS IMFAsyncResult
 , BYREF pPropVarTimecode AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFTimecodeTranslate_INTERFACE_DEFINED__ */
$MF_TIMECODE_SERVICE = GUID$("{a0d502a7-0eb3-4885-b1b9-9feb0d083454}")
'#endif // (WINVER >= _WIN32_WINNT_WIN7)
' ########################################################################################
' Interface name = IMFSimpleAudioVolume
' IID = 089EDF13-CF71-4338-8D13-9E569DBDC319
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFSimpleAudioVolume_INTERFACE_DEFINED)
 %IMFSimpleAudioVolume_INTERFACE_DEFINED = 1
$IID_IMFSimpleAudioVolume = GUID$("{089EDF13-CF71-4338-8D13-9E569DBDC319}")
INTERFACE IMFSimpleAudioVolume $IID_IMFSimpleAudioVolume
 INHERIT IUnknown
 ' =====================================================================================
 METHOD SetMasterVolume ( ' VTable offset = 12
 BYVAL fLevel AS SINGLE
 ) AS LONG
 ' =====================================================================================
 METHOD GetMasterVolume ( ' VTable offset = 16
 BYREF pfLevel AS SINGLE
 ) AS LONG
 ' =====================================================================================
 METHOD SetMute ( ' VTable offset = 20
 BYVAL bMute AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetMute ( ' VTable offset = 24
 BYREF pbMute AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFSimpleAudioVolume_INTERFACE_DEFINED__ */
$MR_POLICY_VOLUME_SERVICE = GUID$("{1ABAA2AC-9D3B-47C6-AB48-C59506DE784D}")
' ########################################################################################
' Interface name = IMFAudioStreamVolume
' IID = 76B1BBDB-4EC8-4F36-B106-70A9316DF593
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFAudioStreamVolume_INTERFACE_DEFINED)
 %IMFAudioStreamVolume_INTERFACE_DEFINED = 1
$IID_IMFAudioStreamVolume = GUID$("{76B1BBDB-4EC8-4F36-B106-70A9316DF593}")
INTERFACE IMFAudioStreamVolume $IID_IMFAudioStreamVolume
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetChannelCount ( ' VTable offset = 12
 BYREF pdwCount AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetChannelVolume ( ' VTable offset = 16
 BYVAL dwIndex AS DWORD
 , BYVAL fLevel AS SINGLE
 ) AS LONG
 ' =====================================================================================
 METHOD GetChannelVolume ( ' VTable offset = 20
 BYVAL dwIndex AS DWORD
 , BYREF pfLevel AS SINGLE
 ) AS LONG
 ' =====================================================================================
 METHOD SetAllVolumes ( ' VTable offset = 24
 BYVAL dwCount AS DWORD
 , BYREF pfVolumes AS SINGLE
 ) AS LONG
 ' =====================================================================================
 METHOD GetAllVolumes ( ' VTable offset = 28
 BYVAL dwCount AS DWORD
 , BYREF pfVolumes AS SINGLE
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFAudioStreamVolume_INTERFACE_DEFINED__ */
$MR_STREAM_VOLUME_SERVICE = GUID$("{F8B5FA2F-32EF-46F5-B172-1321212FB2C4}")
' ########################################################################################
' Interface name = IMFAudioPolicy
' IID = A0638C2B-6465-4395-9AE7-A321A9FD2856
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFAudioPolicy_INTERFACE_DEFINED)
 %IMFAudioPolicy_INTERFACE_DEFINED = 1
$IID_IMFAudioPolicy = GUID$("{A0638C2B-6465-4395-9AE7-A321A9FD2856}")
INTERFACE IMFAudioPolicy $IID_IMFAudioPolicy
 INHERIT IUnknown
 ' =====================================================================================
 METHOD SetGroupingParam ( ' VTable offset = 12
 BYREF rguidClass AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD GetGroupingParam ( ' VTable offset = 16
 BYREF pguidClass AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD SetDisplayName ( ' VTable offset = 20
 BYREF pszName AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD GetDisplayName ( ' VTable offset = 24
 BYREF pszName AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetIconPath ( ' VTable offset = 28
 BYREF pszPath AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD GetIconPath ( ' VTable offset = 32
 BYREF pszPath AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFAudioPolicy_INTERFACE_DEFINED__ */
$MR_AUDIO_POLICY_SERVICE = GUID$("{911FD737-6775-4AB0-A614-297862FDAC88}")
' ########################################################################################
' Interface name = IMFSampleGrabberSinkCallback
' IID = 8C7B80BF-EE42-4B59-B1DF-55668E1BDCA8
' Inherited interface = IMFClockStateSink
' ########################################################################################
#IF NOT %DEF(%IMFSampleGrabberSinkCallback_INTERFACE_DEFINED)
 %IMFSampleGrabberSinkCallback_INTERFACE_DEFINED = 1
$IID_IMFSampleGrabberSinkCallback = GUID$("{8C7B80BF-EE42-4B59-B1DF-55668E1BDCA8}")
INTERFACE IMFSampleGrabberSinkCallback $IID_IMFSampleGrabberSinkCallback
 INHERIT IUnknown
 ' =====================================================================================
 ' IMFClockStateSink methods
 ' =====================================================================================
 METHOD OnClockStart ( ' VTable offset = 12
 BYVAL hnsSystemTime AS QUAD
 , BYVAL llClockStartOffset AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD OnClockStop ( ' VTable offset = 16
 BYVAL hnsSystemTime AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD OnClockPause ( ' VTable offset = 20
 BYVAL hnsSystemTime AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD OnClockRestart ( ' VTable offset = 24
 BYVAL hnsSystemTime AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD OnClockSetRate ( ' VTable offset = 28
 BYVAL hnsSystemTime AS QUAD
 , BYVAL flRate AS SINGLE
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMFSampleGrabberSinkCallback methods
 ' =====================================================================================
 METHOD OnSetPresentationClock ( ' VTable offset = 32
 BYVAL pPresentationClock AS IMFPresentationClock
 ) AS LONG
 ' =====================================================================================
 METHOD OnProcessSample ( ' VTable offset = 36
 BYREF guidMajorMediaType AS GUID
 , BYVAL dwSampleFlags AS DWORD
 , BYVAL llSampleTime AS QUAD
 , BYVAL llSampleDuration AS QUAD
 , BYVAL pSampleBuffer AS BYTE PTR
 , BYVAL dwSampleSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD OnShutdown ( ' VTable offset = 42
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFSampleGrabberSinkCallback_INTERFACE_DEFINED__ */
DECLARE FUNCTION MFCreateSampleGrabberSinkActivate LIB "mf.dll" ALIAS "MFCreateSampleGrabberSinkActivate" ( BYVAL pIMFMediaType AS IMFMediaType , BYVAL pIMFSampleGrabberSinkCallback AS IMFSampleGrabberSinkCallback , BYREF ppIActivate AS IMFActivate ) AS LONG
$MF_SAMPLEGRABBERSINK_SAMPLE_TIME_OFFSET = GUID$("{62E3D776-8100-4E03-A6E8-BD3857AC9C47}")
'#if (WINVER >= _WIN32_WINNT_WIN7)
$MF_SAMPLEGRABBERSINK_IGNORE_CLOCK = GUID$("{0efda2c0-2b69-4e2e-ab8d-46dcbff7d25d}")
' ########################################################################################
' Interface name = IMFSampleGrabberSinkCallback2
' IID = ca86aa50-c46e-429e-ab27-16d6ac6844cb
' Inherited interface = IMFSampleGrabberSinkCallback
' ########################################################################################
#IF NOT %DEF(%IMFSampleGrabberSinkCallback2_INTERFACE_DEFINED)
 %IMFSampleGrabberSinkCallback2_INTERFACE_DEFINED = 1
$IID_IMFSampleGrabberSinkCallback2 = GUID$("{ca86aa50-c46e-429e-ab27-16d6ac6844cb}")
INTERFACE IMFSampleGrabberSinkCallback2 $IID_IMFSampleGrabberSinkCallback2
 INHERIT IUnknown
 ' =====================================================================================
 ' IMFClockStateSink methods
 ' =====================================================================================
 METHOD OnClockStart ( ' VTable offset = 12
 BYVAL hnsSystemTime AS QUAD
 , BYVAL llClockStartOffset AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD OnClockStop ( ' VTable offset = 16
 BYVAL hnsSystemTime AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD OnClockPause ( ' VTable offset = 20
 BYVAL hnsSystemTime AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD OnClockRestart ( ' VTable offset = 24
 BYVAL hnsSystemTime AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD OnClockSetRate ( ' VTable offset = 28
 BYVAL hnsSystemTime AS QUAD
 , BYVAL flRate AS SINGLE
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMFSampleGrabberSinkCallback methods
 ' =====================================================================================
 METHOD OnSetPresentationClock ( ' VTable offset = 32
 BYVAL pPresentationClock AS IMFPresentationClock
 ) AS LONG
 ' =====================================================================================
 METHOD OnProcessSample ( ' VTable offset = 36
 BYREF guidMajorMediaType AS GUID
 , BYVAL dwSampleFlags AS DWORD
 , BYVAL llSampleTime AS QUAD
 , BYVAL llSampleDuration AS QUAD
 , BYVAL pSampleBuffer AS BYTE PTR
 , BYVAL dwSampleSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD OnShutdown ( ' VTable offset = 42
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMFSampleGrabberSinkCallback2 methods
 ' =====================================================================================
 METHOD OnProcessSampleEx ( ' VTable offset = 46
 BYREF guidMajorMediaType AS GUID
 , BYVAL dwSampleFlags AS DWORD
 , BYVAL llSampleTime AS QUAD
 , BYVAL llSampleDuration AS QUAD
 , BYVAL pSampleBuffer AS BYTE PTR
 , BYVAL dwSampleSize AS DWORD
 , BYVAL pAttributes AS IMFAttributes
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFSampleGrabberSinkCallback2_INTERFACE_DEFINED__ */
$MF_QUALITY_SERVICES = GUID$("{B7E2BE11-2F96-4640-B52C-282365BDF16C}")
' ########################################################################################
' Interface name = IMFWorkQueueServices
' IID = 35FE1BB8-A3A9-40FE-BBEC-EB569C9CCCA3
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFWorkQueueServices_INTERFACE_DEFINED)
 %IMFWorkQueueServices_INTERFACE_DEFINED = 1
$IID_IMFWorkQueueServices = GUID$("{35FE1BB8-A3A9-40FE-BBEC-EB569C9CCCA3}")
INTERFACE IMFWorkQueueServices $IID_IMFWorkQueueServices
 INHERIT IUnknown
 ' =====================================================================================
 METHOD BeginRegisterTopologyWorkQueuesWithMMCSS ( ' VTable offset = 12
 BYVAL pCallback AS IMFAsyncCallback
 , BYVAL pState AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD EndRegisterTopologyWorkQueuesWithMMCSS ( ' VTable offset = 16
 BYVAL pResult AS IMFAsyncResult
 ) AS LONG
 ' =====================================================================================
 METHOD BeginUnregisterTopologyWorkQueuesWithMMCSS ( ' VTable offset = 20
 BYVAL pCallback AS IMFAsyncCallback
 , BYVAL pState AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD EndUnregisterTopologyWorkQueuesWithMMCSS ( ' VTable offset = 24
 BYVAL pResult AS IMFAsyncResult
 ) AS LONG
 ' =====================================================================================
 METHOD GetTopologyWorkQueueMMCSSClass ( ' VTable offset = 28
 BYVAL dwTopologyWorkQueueId AS DWORD
 , BYREF pwszClass AS WSTRINGZ
 , BYREF pcchClass AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetTopologyWorkQueueMMCSSTaskId ( ' VTable offset = 32
 BYVAL dwTopologyWorkQueueId AS DWORD
 , BYREF pdwTaskId AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD BeginRegisterPlatformWorkQueueWithMMCSS ( ' VTable offset = 36
 BYVAL dwPlatformWorkQueue AS DWORD
 , BYREF wszClass AS WSTRINGZ
 , BYVAL dwTaskId AS DWORD
 , BYVAL pCallback AS IMFAsyncCallback
 , BYVAL pState AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD EndRegisterPlatformWorkQueueWithMMCSS ( ' VTable offset = 40
 BYVAL pResult AS IMFAsyncResult
 , BYREF pdwTaskId AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD BeginUnregisterPlatformWorkQueueWithMMCSS ( ' VTable offset = 44
 BYVAL dwPlatformWorkQueue AS DWORD
 , BYVAL pCallback AS IMFAsyncCallback
 , BYVAL pState AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD EndUnregisterPlatformWorkQueueWithMMCSS ( ' VTable offset = 48
 BYVAL pResult AS IMFAsyncResult
 ) AS LONG
 ' =====================================================================================
 METHOD GetPlaftormWorkQueueMMCSSClass ( ' VTable offset = 52
 BYVAL dwPlatformWorkQueueId AS DWORD
 , BYREF pwszClass AS WSTRINGZ
 , BYVAL pcchClass AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetPlatformWorkQueueMMCSSTaskId ( ' VTable offset = 56
 BYVAL dwPlatformWorkQueueId AS DWORD
 , BYREF pdwTaskId AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFWorkQueueServices_INTERFACE_DEFINED__ */
$MF_WORKQUEUE_SERVICES = GUID$("{8E37D489-41E0-413A-9068-287C886D8DDA}")
' enum MF_QUALITY_DROP_MODE
%EQUATE `MF_DROP_MODE_NONE = 0
%EQUATE `MF_DROP_MODE_1 = &H1
%EQUATE `MF_DROP_MODE_2 = &H2
%EQUATE `MF_DROP_MODE_3 = &H3
%EQUATE `MF_DROP_MODE_4 = &H4
%EQUATE `MF_DROP_MODE_5 = &H5
%EQUATE `MF_NUM_DROP_MODES = &H6
' enum MF_QUALITY_LEVEL
%EQUATE `MF_QUALITY_NORMAL = 0
%EQUATE `MF_QUALITY_NORMAL_MINUS_1 = &H1
%EQUATE `MF_QUALITY_NORMAL_MINUS_2 = &H2
%EQUATE `MF_QUALITY_NORMAL_MINUS_3 = &H3
%EQUATE `MF_QUALITY_NORMAL_MINUS_4 = &H4
%EQUATE `MF_QUALITY_NORMAL_MINUS_5 = &H5
%EQUATE `MF_NUM_QUALITY_LEVELS = &H6
'#if (WINVER >= _WIN32_WINNT_WIN7)
' enum MF_QUALITY_ADVISE_FLAGS
%EQUATE `MF_QUALITY_CANNOT_KEEP_UP = &H1
'#endif // (WINVER >= _WIN32_WINNT_WIN7)
' ########################################################################################
' Interface name = IMFQualityManager
' IID = 8D009D86-5B9F-4115-B1FC-9F80D52AB8AB
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFQualityManager_INTERFACE_DEFINED)
 %IMFQualityManager_INTERFACE_DEFINED = 1
$IID_IMFQualityManager = GUID$("{8D009D86-5B9F-4115-B1FC-9F80D52AB8AB}")
INTERFACE IMFQualityManager $IID_IMFQualityManager
 INHERIT IUnknown
 ' =====================================================================================
 METHOD NotifyTopology ( ' VTable offset = 12
 BYVAL pTopology AS IMFTopology
 ) AS LONG
 ' =====================================================================================
 METHOD NotifyPresentationClock ( ' VTable offset = 16
 BYVAL pClock AS IMFPresentationClock
 ) AS LONG
 ' =====================================================================================
 METHOD NotifyProcessInput ( ' VTable offset = 20
 BYVAL pNode AS IMFTopologyNode
 , BYVAL lInputIndex AS LONG
 , BYVAL pSample AS IMFSample
 ) AS LONG
 ' =====================================================================================
 METHOD NotifyProcessOutput ( ' VTable offset = 24
 BYVAL pNode AS IMFTopologyNode
 , BYVAL lOutputIndex AS LONG
 , BYVAL pSample AS IMFSample
 ) AS LONG
 ' =====================================================================================
 METHOD NotifyQualityEvent ( ' VTable offset = 28
 BYVAL pObject AS IUnknown
 , BYVAL pEvent AS IMFMediaEvent
 ) AS LONG
 ' =====================================================================================
 METHOD Shutdown ( ' VTable offset = 32
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFQualityManager_INTERFACE_DEFINED__ */
DECLARE FUNCTION MFCreateStandardQualityManager LIB "mf.dll" ALIAS "MFCreateStandardQualityManager" ( BYREF ppQualityManager AS IMFQualityManager ) AS LONG
$MF_QUALITY_NOTIFY_PROCESSING_LATENCY = GUID$("{F6B44AF8-604D-46FE-A95D-45479B10C9BC}")
$MF_QUALITY_NOTIFY_SAMPLE_LAG = GUID$("{30D15206-ED2A-4760-BE17-EB4A9F12295C}")
' ########################################################################################
' Interface name = IMFQualityAdvise
' IID = EC15E2E9-E36B-4F7C-8758-77D452EF4CE7
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFQualityAdvise_INTERFACE_DEFINED)
 %IMFQualityAdvise_INTERFACE_DEFINED = 1
$IID_IMFQualityAdvise = GUID$("{EC15E2E9-E36B-4F7C-8758-77D452EF4CE7}")
INTERFACE IMFQualityAdvise $IID_IMFQualityAdvise
 INHERIT IUnknown
 ' =====================================================================================
 METHOD SetDropMode ( ' VTable offset = 12
 BYVAL eDropMode AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetQualityLevel ( ' VTable offset = 16
 BYVAL eQualityLevel AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetDropMode ( ' VTable offset = 20
 BYVAL peDropMode AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetQualityLevel ( ' VTable offset = 24
 BYVAL peQualityLevel AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD DropTime ( ' VTable offset = 28
 BYVAL hnsAmountToDrop AS QUAD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFQualityAdvise_INTERFACE_DEFINED__ */
'#if (WINVER >= _WIN32_WINNT_WIN7)
' ########################################################################################
' Interface name = IMFQualityAdvise2
' IID = F3706F0D-8EA2-4886-8000-7155E9EC2EAE
' Inherited interface = IMFQualityAdvise
' ########################################################################################
#IF NOT %DEF(%IMFQualityAdvise2_INTERFACE_DEFINED)
 %IMFQualityAdvise2_INTERFACE_DEFINED = 1
$IID_IMFQualityAdvise2 = GUID$("{F3706F0D-8EA2-4886-8000-7155E9EC2EAE}")
INTERFACE IMFQualityAdvise2 $IID_IMFQualityAdvise2
 INHERIT IUnknown
 ' =====================================================================================
 ' IMFQualityAdvise methods
 ' =====================================================================================
 METHOD SetDropMode ( ' VTable offset = 12
 BYVAL eDropMode AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetQualityLevel ( ' VTable offset = 16
 BYVAL eQualityLevel AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetDropMode ( ' VTable offset = 20
 BYVAL peDropMode AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetQualityLevel ( ' VTable offset = 24
 BYVAL peQualityLevel AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD DropTime ( ' VTable offset = 28
 BYVAL hnsAmountToDrop AS QUAD
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMFQualityAdvise2 methods
 ' =====================================================================================
 METHOD NotifyQualityEvent ( ' VTable offset = 32
 BYVAL pEvent AS IMFMediaEvent
 , BYREF pdwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFQualityAdvise2_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMFQualityAdviseLimits
' IID = dfcd8e4d-30b5-4567-acaa-8eb5b7853dc9
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFQualityAdviseLimits_INTERFACE_DEFINED)
 %IMFQualityAdviseLimits_INTERFACE_DEFINED = 1
$IID_IMFQualityAdviseLimits = GUID$("{dfcd8e4d-30b5-4567-acaa-8eb5b7853dc9}")
INTERFACE IMFQualityAdviseLimits $IID_IMFQualityAdviseLimits
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetMaximumDropMode ( ' VTable offset = 12
 BYREF peDropMode AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetMinimumQualityLevel ( ' VTable offset = 16
 BYREF peQualityLevel AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFQualityAdviseLimits_INTERFACE_DEFINED__ */
'#endif // (WINVER >= _WIN32_WINNT_WIN7)
' ########################################################################################
' Interface name = IMFRealTimeClient
' IID = 2347D60B-3FB5-480C-8803-8DF3ADCD3EF0
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFRealTimeClient_INTERFACE_DEFINED)
 %IMFRealTimeClient_INTERFACE_DEFINED = 1
$IID_IMFRealTimeClient = GUID$("{2347D60B-3FB5-480C-8803-8DF3ADCD3EF0}")
INTERFACE IMFRealTimeClient $IID_IMFRealTimeClient
 INHERIT IUnknown
 ' =====================================================================================
 METHOD RegisterThreads ( ' VTable offset = 12
 BYVAL dwTaskIndex AS DWORD
 , BYREF wszClass AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD UnregisterThreads ( ' VTable offset = 16
 ) AS LONG
 ' =====================================================================================
 METHOD SetWorkQueue ( ' VTable offset = 20
 BYVAL dwWorkQueueId AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFRealTimeClient_INTERFACE_DEFINED__ */
'typedef DWORD MFSequencerElementId;
%EQUATE `MFSEQUENCER_INVALID_ELEMENT_ID = &Hffffffff
' enum _MFSequencerTopologyFlags
%EQUATE `SequencerTopologyFlags_Last = &H1
' ########################################################################################
' Interface name = IMFSequencerSource
' IID = 197CD219-19CB-4DE1-A64C-ACF2EDCBE59E
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFSequencerSource_INTERFACE_DEFINED)
 %IMFSequencerSource_INTERFACE_DEFINED = 1
$IID_IMFSequencerSource = GUID$("{197CD219-19CB-4DE1-A64C-ACF2EDCBE59E}")
INTERFACE IMFSequencerSource $IID_IMFSequencerSource
 INHERIT IUnknown
 ' =====================================================================================
 METHOD AppendTopology ( ' VTable offset = 12
 BYVAL pTopology AS IMFTopology
 , BYVAL dwFlags AS DWORD
 , BYREF pdwId AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteTopology ( ' VTable offset = 16
 BYVAL dwId AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetPresentationContext ( ' VTable offset = 20
 BYVAL pPD AS IMFPresentationDescriptor
 , BYREF pId AS DWORD
 , BYVAL ppTopology AS IMFTopology
 ) AS LONG
 ' =====================================================================================
 METHOD UpdateTopology ( ' VTable offset = 24
 BYVAL dwId AS DWORD
 , BYVAL pTopology AS IMFTopology
 ) AS LONG
 ' =====================================================================================
 METHOD UpdateTopologyFlags ( ' VTable offset = 28
 BYVAL dwId AS DWORD
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFSequencerSource_INTERFACE_DEFINED__ */
$MF_TIME_FORMAT_SEGMENT_OFFSET = GUID$("{C8B8BE77-869C-431D-812E-169693F65A39}")
DECLARE FUNCTION MFCreateSequencerSource LIB "mf.dll" ALIAS "MFCreateSequencerSource" ( BYVAL pReserved AS IUnknown , BYREF ppSequencerSource AS IMFSequencerSource ) AS LONG
DECLARE FUNCTION MFCreateSequencerSegmentOffset LIB "mf.dll" ALIAS "MFCreateSequencerSegmentOffset" ( BYVAL dwId AS QUAD
 , BYVAL hnsOffset AS QUAD
 , BYREF pvarSegmentOffset AS PROPVARIANT
 ) AS LONG
'#if (WINVER >= _WIN32_WINNT_WIN7)
DECLARE FUNCTION MFCreateAggregateSource LIB "mf.dll" ALIAS "MFCreateAggregateSource" ( BYVAL pSourceCollection AS IMFCollection , BYREF ppAggSource AS IMFMediaSource ) AS LONG
'#endif // (WINVER >= _WIN32_WINNT_WIN7)
' ########################################################################################
' Interface name = IMFMediaSourceTopologyProvider
' IID = 0E1D6009-C9F3-442D-8C51-A42D2D49452F
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFMediaSourceTopologyProvider_INTERFACE_DEFINED)
 %IMFMediaSourceTopologyProvider_INTERFACE_DEFINED = 1
$IID_IMFMediaSourceTopologyProvider = GUID$("{0E1D6009-C9F3-442D-8C51-A42D2D49452F}")
INTERFACE IMFMediaSourceTopologyProvider $IID_IMFMediaSourceTopologyProvider
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetMediaSourceTopology ( ' VTable offset = 12
 BYVAL pPresentationDescriptor AS IMFPresentationDescriptor
 , BYREF ppTopology AS IMFTopology
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFMediaSourceTopologyProvider_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMFMediaSourcePresentationProvider
' IID = 0E1D600A-C9F3-442D-8C51-A42D2D49452F
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFMediaSourcePresentationProvider_INTERFACE_DEFINED)
 %IMFMediaSourcePresentationProvider_INTERFACE_DEFINED = 1
$IID_IMFMediaSourcePresentationProvider = GUID$("{0E1D600A-C9F3-442D-8C51-A42D2D49452F}")
INTERFACE IMFMediaSourcePresentationProvider $IID_IMFMediaSourcePresentationProvider
 INHERIT IUnknown
 ' =====================================================================================
 METHOD ForceEndOfPresentation ( ' VTable offset = 12
 BYVAL pPresentationDescriptor AS IMFPresentationDescriptor
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFMediaSourcePresentationProvider_INTERFACE_DEFINED__ */
$MF_SOURCE_PRESENTATION_PROVIDER_SERVICE = GUID$("{E002AADC-F4AF-4EE5-9847-053EDF840426}")
' // Size = 8 bytes
UNION MFTOPONODE_ATTRIBUTE_UPDATE_UNION
 u32 AS DWORD ' UINT32
 u64 AS QUAD ' UINT64
 d AS DOUBLE ' double
END UNION
' // Size = 40 bytes
TYPE MFTOPONODE_ATTRIBUTE_UPDATE QWORD FILL
 NodeId AS QUAD ' TOPOID
 guidAttributeKey AS GUID ' GUID
 attrType AS LONG ' MF_ATTRIBUTE_TYPE
 MFTOPONODE_ATTRIBUTE_UPDATE_UNION
END TYPE
' ########################################################################################
' Interface name = IMFTopologyNodeAttributeEditor
' IID = 676AA6DD-238A-410D-BB99-65668D01605A
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFTopologyNodeAttributeEditor_INTERFACE_DEFINED)
 %IMFTopologyNodeAttributeEditor_INTERFACE_DEFINED = 1
$IID_IMFTopologyNodeAttributeEditor = GUID$("{676AA6DD-238A-410D-BB99-65668D01605A}")
INTERFACE IMFTopologyNodeAttributeEditor $IID_IMFTopologyNodeAttributeEditor
 INHERIT IUnknown
 ' =====================================================================================
 METHOD UpdateNodeAttributes ( ' VTable offset = 12
 BYVAL TopoId AS QUAD
 , BYVAL cUpdates AS DWORD
 , BYREF pUpdates AS MFTOPONODE_ATTRIBUTE_UPDATE
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFTopologyNodeAttributeEditor_INTERFACE_DEFINED__ */
$MF_TOPONODE_ATTRIBUTE_EDITOR_SERVICE = GUID$("{65656E1A-077F-4472-83EF-316F11D5087A}")
' // Size = 8 bytes
TYPE MF_LEAKY_BUCKET_PAIR DWORD
 dwBitrate AS DWORD
 msBufferWindow AS DWORD
END TYPE
' // Size = 56 bytes
TYPE MFBYTESTREAM_BUFFERING_PARAMS ' Must be 8 byte aligned
 cbTotalFileSize AS QUAD ' QWORD
 cbPlayableDataSize AS QUAD ' QWORD
 prgBuckets AS MF_LEAKY_BUCKET_PAIR PTR ' MF_LEAKY_BUCKET_PAIR*
 cBuckets AS DWORD
 qwNetBufferingTime AS QUAD ' QWORD
 qwExtraBufferingTimeDuringSeek AS QUAD ' QWORD
 qwPlayDuration AS QUAD ' QWORD
 dRate AS SINGLE ' float
 alignment__ AS DWORD
END TYPE
' ########################################################################################
' Interface name = IMFByteStreamBuffering
' IID = 6D66D782-1D4F-4DB7-8C63-CB8C77F1EF5E
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFByteStreamBuffering_INTERFACE_DEFINED)
 %IMFByteStreamBuffering_INTERFACE_DEFINED = 1
$IID_IMFByteStreamBuffering = GUID$("{6D66D782-1D4F-4DB7-8C63-CB8C77F1EF5E}")
INTERFACE IMFByteStreamBuffering $IID_IMFByteStreamBuffering
 INHERIT IUnknown
 ' =====================================================================================
 METHOD SetBufferingParams ( ' VTable offset = 12
 BYREF pParams AS MFBYTESTREAM_BUFFERING_PARAMS
 ) AS LONG
 ' =====================================================================================
 METHOD EnableBuffering ( ' VTable offset = 16
 BYVAL fEnable AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD StopBuffering ( ' VTable offset = 20
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFByteStreamBuffering_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMFByteStreamCacheControl
' IID = F5042EA4-7A96-4a75-AA7B-2BE1EF7F88D5
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFByteStreamCacheControl_INTERFACE_DEFINED)
 %IMFByteStreamCacheControl_INTERFACE_DEFINED = 1
$IID_IMFByteStreamCacheControl = GUID$("{F5042EA4-7A96-4a75-AA7B-2BE1EF7F88D5}")
INTERFACE IMFByteStreamCacheControl $IID_IMFByteStreamCacheControl
 INHERIT IUnknown
 ' =====================================================================================
 METHOD StopBackgroundTransfer ( ' VTable offset = 12
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFByteStreamCacheControl_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMFNetCredential
' IID = 5B87EF6A-7ED8-434F-BA0E-184FAC1628D1
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFNetCredential_INTERFACE_DEFINED)
 %IMFNetCredential_INTERFACE_DEFINED = 1
$IID_IMFNetCredential = GUID$("{5B87EF6A-7ED8-434F-BA0E-184FAC1628D1}")
INTERFACE IMFNetCredential $IID_IMFNetCredential
 INHERIT IUnknown
 ' =====================================================================================
 METHOD SetUser ( ' VTable offset = 12
 BYVAL pbData AS BYTE PTR
 , BYVAL cbData AS DWORD
 , BYVAL fDataIsEncrypted AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetPassword ( ' VTable offset = 16
 BYVAL pbData AS BYTE PTR
 , BYVAL cbData AS DWORD
 , BYVAL fDataIsEncrypted AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetUser ( ' VTable offset = 20
 BYVAL pbData AS BYTE PTR
 , BYREF pcbData AS DWORD
 , BYVAL fEncryptData AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetPassword ( ' VTable offset = 24
 BYVAL pbData AS BYTE PTR
 , BYREF pcbData AS DWORD
 , BYVAL fEncryptData AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD LoggedOnUser ( ' VTable offset = 28
 BYVAL pfLoggedOnUser AS LONG ' BOOL *pfLoggedOnUser
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFNetCredential_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMFNetCredentialManager
' IID = 5B87EF6B-7ED8-434F-BA0E-184FAC1628D1
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFNetCredentialManager_INTERFACE_DEFINED)
 %IMFNetCredentialManager_INTERFACE_DEFINED = 1
' // Size = 32 bytes
TYPE MFNetCredentialManagerGetParam DWORD
 hrOp AS LONG
 fAllowLoggedOnUser AS LONG
 fClearTextPackage AS LONG
 pszUrl AS WSTRINGZ PTR
 pszSite AS WSTRINGZ PTR
 pszRealm AS WSTRINGZ PTR
 pszPackage AS WSTRINGZ PTR
 nRetries AS LONG
END TYPE
$IID_IMFNetCredentialManager = GUID$("{5B87EF6B-7ED8-434F-BA0E-184FAC1628D1}")
INTERFACE IMFNetCredentialManager $IID_IMFNetCredentialManager
 INHERIT IUnknown
 ' =====================================================================================
 METHOD BeginGetCredentials ( ' VTable offset = 12
 BYREF pParam AS MFNetCredentialManagerGetParam
 , BYVAL pCallback AS IMFAsyncCallback
 , BYVAL pState AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD EndGetCredentials ( ' VTable offset = 16
 BYVAL pResult AS IMFAsyncResult
 , BYREF ppCred AS IMFNetCredential
 ) AS LONG
 ' =====================================================================================
 METHOD SetGood ( ' VTable offset = 16
 BYVAL pCred AS IMFNetCredential
 , BYVAL fGood AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFNetCredentialManager_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMFNetCredentialCache
' IID = 5B87EF6C-7ED8-434F-BA0E-184FAC1628D1
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFNetCredentialCache_INTERFACE_DEFINED)
 %IMFNetCredentialCache_INTERFACE_DEFINED = 1
' enum MFNetCredentialRequirements
%EQUATE `REQUIRE_PROMPT = &H1
' enum MFNetCredentialOptions
%EQUATE `MFNET_CREDENTIAL_SAVE = &H1
%EQUATE `MFNET_CREDENTIAL_DONT_CACHE = &H2
%EQUATE `MFNET_CREDENTIAL_ALLOW_CLEAR_TEXT = &H4
' enum MFNetAuthenticationFlags
%EQUATE `MFNET_AUTHENTICATION_PROXY = &H1
%EQUATE `MFNET_AUTHENTICATION_CLEAR_TEXT = &H2
%EQUATE `MFNET_AUTHENTICATION_LOGGED_ON_USER = &H4
$IID_IMFNetCredentialCache = GUID$("{5B87EF6C-7ED8-434F-BA0E-184FAC1628D1}")
INTERFACE IMFNetCredentialCache $IID_IMFNetCredentialCache
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetCredential ( ' VTable offset = 12
 BYREF pszUrl AS WSTRINGZ
 , BYREF pszRealm AS WSTRINGZ
 , BYVAL dwAuthenticationFlags AS DWORD
 , BYREF ppCred AS IMFNetCredential
 , BYREF pdwRequirementsFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetGood ( ' VTable offset = 16
 BYVAL pCred AS IMFNetCredential
 , BYVAL fGood AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetUserOptions ( ' VTable offset = 20
 BYVAL pCred AS IMFNetCredential
 , BYVAL dwOptionsFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFNetCredentialCache_INTERFACE_DEFINED__ */
DECLARE FUNCTION MFCreateCredentialCache LIB "mf.dll" ALIAS "MFCreateCredentialCache" ( BYREF ppCache AS IMFNetCredentialCache ) AS LONG
'#if (WINVER >= _WIN32_WINNT_WIN7)
' ########################################################################################
' Interface name = IMFSSLCertificateManager
' IID = 61f7d887-1230-4a8b-aeba-8ad434d1a64d
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFSSLCertificateManager_INTERFACE_DEFINED)
 %IMFSSLCertificateManager_INTERFACE_DEFINED = 1
$IID_IMFSSLCertificateManager = GUID$("{61f7d887-1230-4a8b-aeba-8ad434d1a64d}")
INTERFACE IMFSSLCertificateManager $IID_IMFSSLCertificateManager
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetClientCertificate ( ' VTable offset = 12
 BYREF pszURL AS WSTRINGZ
 , BYREF ppbData AS DWORD
 , BYREF pcbData AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD BeginGetClientCertificate ( ' VTable offset = 16
 BYREF pszURL AS WSTRINGZ
 , BYVAL pCallback AS IMFAsyncCallback
 , BYVAL pState AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD EndGetClientCertificate ( ' VTable offset = 20
 BYVAL pResult AS IMFAsyncResult
 , BYREF ppbData AS DWORD
 , BYREF pcbData AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetCertificatePolicy ( ' VTable offset = 24
 BYREF pszURL AS WSTRINGZ
 , BYREF pfOverrideAutomaticCheck AS LONG
 , BYREF pfClientCertificateAvailable AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD OnServerCertificate ( ' VTable offset = 28
 BYREF pszURL AS WSTRINGZ
 , BYVAL pbData AS BYTE PTR
 , BYVAL cbData AS DWORD
 , BYREF pfIsGood AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFSSLCertificateManager_INTERFACE_DEFINED__ */
$MFNETSOURCE_SSLCERTIFICATE_MANAGER = GUID$("{55e6cb27-e69b-4267-940c-2d7ec5bb8a0f}")
'#endif // (WINVER >= _WIN32_WINNT_WIN7)
' ########################################################################################
' Interface name = IMFSourceOpenMonitor
' IID = 059054B3-027C-494C-A27D-9113291CF87F
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFSourceOpenMonitor_INTERFACE_DEFINED)
 %IMFSourceOpenMonitor_INTERFACE_DEFINED = 1
$IID_IMFSourceOpenMonitor = GUID$("{059054B3-027C-494C-A27D-9113291CF87F}")
INTERFACE IMFSourceOpenMonitor $IID_IMFSourceOpenMonitor
 INHERIT IUnknown
 ' =====================================================================================
 METHOD OnSourceEvent ( ' VTable offset = 12
 BYVAL pEvent AS IMFMediaEvent
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFSourceOpenMonitor_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMFNetProxyLocator
' IID = E9CD0383-A268-4BB4-82DE-658D53574D41
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFNetProxyLocator_INTERFACE_DEFINED)
 %IMFNetProxyLocator_INTERFACE_DEFINED = 1
$IID_IMFNetProxyLocator = GUID$("{E9CD0383-A268-4BB4-82DE-658D53574D41}")
INTERFACE IMFNetProxyLocator $IID_IMFNetProxyLocator
 INHERIT IUnknown
 ' =====================================================================================
 METHOD FindFirstProxy ( ' VTable offset = 12
 BYREF pszHost AS WSTRINGZ
 , BYREF pszUrl AS WSTRINGZ
 , BYVAL fReserved AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD FindNextProxy ( ' VTable offset = 16
 ) AS LONG
 ' =====================================================================================
 METHOD RegisterProxyResult ( ' VTable offset = 20
 BYVAL hrOp AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetCurrentProxy ( ' VTable offset = 24
 BYREF pszStr AS WSTRINGZ
 , BYREF pcchStr AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Clone ( ' VTable offset = 28
 BYREF ppProxyLocator AS IMFNetProxyLocator
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFNetProxyLocator_INTERFACE_DEFINED__ */
DECLARE FUNCTION MFCreateProxyLocator LIB "mf.dll" ALIAS "MFCreateProxyLocator" ( BYREF pszProtocol AS WSTRINGZ , BYVAL pProxyConfig AS IPropertyStore , BYREF ppProxyLocator AS IMFNetProxyLocator ) AS LONG
' ########################################################################################
' Interface name = IMFNetProxyLocatorFactory
' IID = E9CD0384-A268-4BB4-82DE-658D53574D41
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFNetProxyLocatorFactory_INTERFACE_DEFINED)
 %IMFNetProxyLocatorFactory_INTERFACE_DEFINED = 1
$IID_IMFNetProxyLocatorFactory = GUID$("{E9CD0384-A268-4BB4-82DE-658D53574D41}")
INTERFACE IMFNetProxyLocatorFactory $IID_IMFNetProxyLocatorFactory
 INHERIT IUnknown
 ' =====================================================================================
 METHOD CreateProxyLocator ( ' VTable offset = 12
 BYREF pszProtocol AS WSTRINGZ
 , BYREF ppProxyLocator AS IMFNetProxyLocator
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFNetProxyLocatorFactory_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMFSaveJob
' IID = E9931663-80BF-4C6E-98AF-5DCF58747D1F
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFSaveJob_INTERFACE_DEFINED)
 %IMFSaveJob_INTERFACE_DEFINED = 1
$IID_IMFSaveJob = GUID$("{E9931663-80BF-4C6E-98AF-5DCF58747D1F}")
INTERFACE IMFSaveJob $IID_IMFSaveJob
 INHERIT IUnknown
 ' =====================================================================================
 METHOD BeginSave ( ' VTable offset = 12
 BYVAL pStream AS IMFByteStream
 , BYVAL pCallback AS IMFAsyncCallback
 , BYVAL pState AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD EndSave ( ' VTable offset = 16
 BYVAL pResult AS IMFAsyncResult
 ) AS LONG
 ' =====================================================================================
 METHOD CancelSave ( ' VTable offset = 20
 ) AS LONG
 ' =====================================================================================
 METHOD GetProgress ( ' VTable offset = 24
 BYREF pdwPercentComplete AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFSaveJob_INTERFACE_DEFINED__ */
$MFNET_SAVEJOB_SERVICE = GUID$("{B85A587F-3D02-4E52-9565-55D3EC1E7FF7}")
' enum MFNETSOURCE_PROTOCOL_TYPE
%EQUATE `MFNETSOURCE_UNDEFINED = 0
%EQUATE `MFNETSOURCE_HTTP = &H1
%EQUATE `MFNETSOURCE_RTSP = &H2
%EQUATE `MFNETSOURCE_FILE = &H3
%EQUATE `MFNETSOURCE_MULTICAST = &H4
' ########################################################################################
' Interface name = IMFNetSchemeHandlerConfig
' IID = 7BE19E73-C9BF-468A-AC5A-A5E8653BEC87
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFNetSchemeHandlerConfig_INTERFACE_DEFINED)
 %IMFNetSchemeHandlerConfig_INTERFACE_DEFINED = 1
$IID_IMFNetSchemeHandlerConfig = GUID$("{7BE19E73-C9BF-468A-AC5A-A5E8653BEC87}")
INTERFACE IMFNetSchemeHandlerConfig $IID_IMFNetSchemeHandlerConfig
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetNumberOfSupportedProtocols ( ' VTable offset = 12
 BYREF pcProtocols AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetSupportedProtocolType ( ' VTable offset = 16
 BYVAL nProtocolIndex AS DWORD
 , BYREF pnProtocolType AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD ResetProtocolRolloverSettings ( ' VTable offset = 20
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFNetSchemeHandlerConfig_INTERFACE_DEFINED__ */
DECLARE FUNCTION MFCreateNetSchemePlugin LIB "mf.dll" ALIAS "MFCreateNetSchemePlugin" ( BYREF riid AS GUID , BYREF ppvHandler AS IUnknown ) AS LONG
' enum MFNETSOURCE_TRANSPORT_TYPE
%EQUATE `MFNETSOURCE_UDP = 0
%EQUATE `MFNETSOURCE_TCP = %MFNETSOURCE_UDP + 1
' enum MFNETSOURCE_CACHE_STATE
%EQUATE `MFNETSOURCE_CACHE_UNAVAILABLE = 0
%EQUATE `MFNETSOURCE_CACHE_ACTIVE_WRITING = %MFNETSOURCE_CACHE_UNAVAILABLE + 1
%EQUATE `MFNETSOURCE_CACHE_ACTIVE_COMPLETE = %MFNETSOURCE_CACHE_ACTIVE_WRITING + 1
' enum MFNETSOURCE_STATISTICS_IDS
%EQUATE `MFNETSOURCE_RECVPACKETS_ID = 0
%EQUATE `MFNETSOURCE_LOSTPACKETS_ID = %MFNETSOURCE_RECVPACKETS_ID + 1
%EQUATE `MFNETSOURCE_RESENDSREQUESTED_ID = %MFNETSOURCE_LOSTPACKETS_ID + 1
%EQUATE `MFNETSOURCE_RESENDSRECEIVED_ID = %MFNETSOURCE_RESENDSREQUESTED_ID + 1
%EQUATE `MFNETSOURCE_RECOVEREDBYECCPACKETS_ID = %MFNETSOURCE_RESENDSRECEIVED_ID + 1
%EQUATE `MFNETSOURCE_RECOVEREDBYRTXPACKETS_ID = %MFNETSOURCE_RECOVEREDBYECCPACKETS_ID + 1
%EQUATE `MFNETSOURCE_OUTPACKETS_ID = %MFNETSOURCE_RECOVEREDBYRTXPACKETS_ID + 1
%EQUATE `MFNETSOURCE_RECVRATE_ID = %MFNETSOURCE_OUTPACKETS_ID + 1
%EQUATE `MFNETSOURCE_AVGBANDWIDTHBPS_ID = %MFNETSOURCE_RECVRATE_ID + 1
%EQUATE `MFNETSOURCE_BYTESRECEIVED_ID = %MFNETSOURCE_AVGBANDWIDTHBPS_ID + 1
%EQUATE `MFNETSOURCE_PROTOCOL_ID = %MFNETSOURCE_BYTESRECEIVED_ID + 1
%EQUATE `MFNETSOURCE_TRANSPORT_ID = %MFNETSOURCE_PROTOCOL_ID + 1
%EQUATE `MFNETSOURCE_CACHE_STATE_ID = %MFNETSOURCE_TRANSPORT_ID + 1
%EQUATE `MFNETSOURCE_LINKBANDWIDTH_ID = %MFNETSOURCE_CACHE_STATE_ID + 1
%EQUATE `MFNETSOURCE_CONTENTBITRATE_ID = %MFNETSOURCE_LINKBANDWIDTH_ID + 1
%EQUATE `MFNETSOURCE_SPEEDFACTOR_ID = %MFNETSOURCE_CONTENTBITRATE_ID + 1
%EQUATE `MFNETSOURCE_BUFFERSIZE_ID = %MFNETSOURCE_SPEEDFACTOR_ID + 1
%EQUATE `MFNETSOURCE_BUFFERPROGRESS_ID = %MFNETSOURCE_BUFFERSIZE_ID + 1
%EQUATE `MFNETSOURCE_LASTBWSWITCHTS_ID = %MFNETSOURCE_BUFFERPROGRESS_ID + 1
%EQUATE `MFNETSOURCE_SEEKRANGESTART_ID = %MFNETSOURCE_LASTBWSWITCHTS_ID + 1
%EQUATE `MFNETSOURCE_SEEKRANGEEND_ID = %MFNETSOURCE_SEEKRANGESTART_ID + 1
%EQUATE `MFNETSOURCE_BUFFERINGCOUNT_ID = %MFNETSOURCE_SEEKRANGEEND_ID + 1
%EQUATE `MFNETSOURCE_INCORRECTLYSIGNEDPACKETS_ID = %MFNETSOURCE_BUFFERINGCOUNT_ID + 1
%EQUATE `MFNETSOURCE_SIGNEDSESSION_ID = %MFNETSOURCE_INCORRECTLYSIGNEDPACKETS_ID + 1
%EQUATE `MFNETSOURCE_MAXBITRATE_ID = %MFNETSOURCE_SIGNEDSESSION_ID + 1
%EQUATE `MFNETSOURCE_RECEPTION_QUALITY_ID = %MFNETSOURCE_MAXBITRATE_ID + 1
%EQUATE `MFNETSOURCE_RECOVEREDPACKETS_ID = %MFNETSOURCE_RECEPTION_QUALITY_ID + 1
%EQUATE `MFNETSOURCE_VBR_ID = %MFNETSOURCE_RECOVEREDPACKETS_ID + 1
%EQUATE `MFNETSOURCE_DOWNLOADPROGRESS_ID = %MFNETSOURCE_VBR_ID + 1
%EQUATE `MFNETSOURCE_UNPREDEFINEDPROTOCOLNAME_ID = %MFNETSOURCE_DOWNLOADPROGRESS_ID + 1
$MFNETSOURCE_STATISTICS_SERVICE = GUID$("{3CB1F275-0505-4C5D-AE71-0A556344EFA1}")
$MFNETSOURCE_STATISTICS = GUID$("{3CB1F274-0505-4C5D-AE71-0A556344EFA1}")
$MFNETSOURCE_BUFFERINGTIME = GUID$("{3CB1F276-0505-4C5D-AE71-0A556344EFA1}")
$MFNETSOURCE_ACCELERATEDSTREAMINGDURATION = GUID$("{3CB1F277-0505-4C5D-AE71-0A556344EFA1}")
$MFNETSOURCE_MAXUDPACCELERATEDSTREAMINGDURATION = GUID$("{4AAB2879-BBE1-4994-9FF0-5495BD250129}")
$MFNETSOURCE_MAXBUFFERTIMEMS = GUID$("{408B24E6-4038-4401-B5B2-FE701A9EBF10}")
$MFNETSOURCE_CONNECTIONBANDWIDTH = GUID$("{3CB1F278-0505-4C5D-AE71-0A556344EFA1}")
$MFNETSOURCE_CACHEENABLED = GUID$("{3CB1F279-0505-4C5D-AE71-0A556344EFA1}")
$MFNETSOURCE_AUTORECONNECTLIMIT = GUID$("{3CB1F27A-0505-4C5D-AE71-0A556344EFA1}")
$MFNETSOURCE_RESENDSENABLED = GUID$("{3CB1F27B-0505-4C5D-AE71-0A556344EFA1}")
$MFNETSOURCE_THINNINGENABLED = GUID$("{3CB1F27C-0505-4C5D-AE71-0A556344EFA1}")
$MFNETSOURCE_PROTOCOL = GUID$("{3CB1F27D-0505-4C5D-AE71-0A556344EFA1}")
$MFNETSOURCE_TRANSPORT = GUID$("{3CB1F27E-0505-4C5D-AE71-0A556344EFA1}")
'#if (WINVER >= _WIN32_WINNT_WIN7)
$MFNETSOURCE_PREVIEWMODEENABLED = GUID$("{3CB1F27F-0505-4C5D-AE71-0A556344EFA1}")
'#endif // (WINVER >= _WIN32_WINNT_WIN7)
$MFNETSOURCE_CREDENTIAL_MANAGER = GUID$("{3CB1F280-0505-4C5D-AE71-0A556344EFA1}")
$MFNETSOURCE_PPBANDWIDTH = GUID$("{3CB1F281-0505-4C5D-AE71-0A556344EFA1}")
$MFNETSOURCE_AUTORECONNECTPROGRESS = GUID$("{3CB1F282-0505-4C5D-AE71-0A556344EFA1}")
$MFNETSOURCE_PROXYLOCATORFACTORY = GUID$("{3CB1F283-0505-4C5D-AE71-0A556344EFA1}")
$MFNETSOURCE_BROWSERUSERAGENT = GUID$("{3CB1F28B-0505-4C5D-AE71-0A556344EFA1}")
$MFNETSOURCE_BROWSERWEBPAGE = GUID$("{3CB1F28C-0505-4C5D-AE71-0A556344EFA1}")
$MFNETSOURCE_PLAYERVERSION = GUID$("{3CB1F28D-0505-4C5D-AE71-0A556344EFA1}")
$MFNETSOURCE_PLAYERID = GUID$("{3CB1F28E-0505-4C5D-AE71-0A556344EFA1}")
$MFNETSOURCE_HOSTEXE = GUID$("{3CB1F28F-0505-4C5D-AE71-0A556344EFA1}")
$MFNETSOURCE_HOSTVERSION = GUID$("{3CB1F291-0505-4C5D-AE71-0A556344EFA1}")
$MFNETSOURCE_PLAYERUSERAGENT = GUID$("{3CB1F292-0505-4C5D-AE71-0A556344EFA1}")
'#if (WINVER >= _WIN32_WINNT_WIN7)
$MFNETSOURCE_CLIENTGUID = GUID$("{60A2C4A6-F197-4C14-A5BF-88830D2458AF}")
'#endif // (WINVER >= _WIN32_WINNT_WIN7)
$MFNETSOURCE_LOGURL = GUID$("{3CB1F293-0505-4C5D-AE71-0A556344EFA1}")
$MFNETSOURCE_ENABLE_UDP = GUID$("{3CB1F294-0505-4C5D-AE71-0A556344EFA1}")
$MFNETSOURCE_ENABLE_TCP = GUID$("{3CB1F295-0505-4C5D-AE71-0A556344EFA1}")
$MFNETSOURCE_ENABLE_RTSP = GUID$("{3CB1F298-0505-4C5D-AE71-0A556344EFA1}")
$MFNETSOURCE_ENABLE_HTTP = GUID$("{3CB1F299-0505-4C5D-AE71-0A556344EFA1}")
$MFNETSOURCE_ENABLE_STREAMING = GUID$("{3CB1F29C-0505-4C5D-AE71-0A556344EFA1}")
$MFNETSOURCE_ENABLE_DOWNLOAD = GUID$("{3CB1F29D-0505-4C5D-AE71-0A556344EFA1}")
$MFNETSOURCE_UDP_PORT_RANGE = GUID$("{3CB1F29A-0505-4C5D-AE71-0A556344EFA1}")
$MFNETSOURCE_PROXYINFO = GUID$("{3CB1F29B-0505-4C5D-AE71-0A556344EFA1}")
$MFNETSOURCE_DRMNET_LICENSE_REPRESENTATION = GUID$("{47EAE1BD-BDFE-42E2-82F3-54A48C17962D}")
$MFNETSOURCE_PROXYSETTINGS = GUID$("{3CB1F287-0505-4C5D-AE71-0A556344EFA1}")
$MFNETSOURCE_PROXYHOSTNAME = GUID$("{3CB1F284-0505-4C5D-AE71-0A556344EFA1}")
$MFNETSOURCE_PROXYPORT = GUID$("{3CB1F288-0505-4C5D-AE71-0A556344EFA1}")
$MFNETSOURCE_PROXYEXCEPTIONLIST = GUID$("{3CB1F285-0505-4C5D-AE71-0A556344EFA1}")
$MFNETSOURCE_PROXYBYPASSFORLOCAL = GUID$("{3CB1F286-0505-4C5D-AE71-0A556344EFA1}")
$MFNETSOURCE_PROXYRERUNAUTODETECTION = GUID$("{3CB1F289-0505-4C5D-AE71-0A556344EFA1}")
'#if (WINVER >= _WIN32_WINNT_WIN7)
$MFNETSOURCE_STREAM_LANGUAGE = GUID$("{9AB44318-F7CD-4F2D-8D6D-FA35B492CECB}")
$MFNETSOURCE_LOGPARAMS = GUID$("{64936AE8-9418-453A-8CDA-3E0A668B353B}")
'#endif // (WINVER >= _WIN32_WINNT_WIN7)
' enum MFNET_PROXYSETTINGS
%EQUATE `MFNET_PROXYSETTING_NONE = 0
%EQUATE `MFNET_PROXYSETTING_MANUAL = 1
%EQUATE `MFNET_PROXYSETTING_AUTO = 2
%EQUATE `MFNET_PROXYSETTING_BROWSER = 3
' ########################################################################################
' Interface name = IMFSchemeHandler
' IID = 6D4C7B74-52A0-4BB7-B0DB-55F29F47A668
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFSchemeHandler_INTERFACE_DEFINED)
 %IMFSchemeHandler_INTERFACE_DEFINED = 1
$IID_IMFSchemeHandler = GUID$("{6D4C7B74-52A0-4BB7-B0DB-55F29F47A668}")
INTERFACE IMFSchemeHandler $IID_IMFSchemeHandler
 INHERIT IUnknown
 ' =====================================================================================
 METHOD BeginCreateObject ( ' VTable offset = 12
 BYREF pwszURL AS WSTRINGZ
 , BYVAL dwFlags AS DWORD
 , BYVAL pProps AS IPropertyStore
 , BYREF ppIUnknownCancelCookie AS IUnknown
 , BYVAL pCallback AS IMFAsyncCallback
 , BYVAL punkState AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD EndCreateObject ( ' VTable offset = 16
 BYVAL pResult AS IMFAsyncResult
 , BYREF pObjectType AS LONG
 , BYREF ppObject AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD CancelObjectCreation ( ' VTable offset = 20
 BYVAL pIUnknownCancelCookie AS IUnknown
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFSchemeHandler_INTERFACE_DEFINED__ */
'#if (WINVER >= _WIN32_WINNT_WIN7)
$MF_BYTESTREAMHANDLER_ACCEPTS_SHARE_WRITE = GUID$("{A6E1F733-3001-4915-8150-1558A2180EC8}")
'#endif // (WINVER >= _WIN32_WINNT_WIN7)
' ########################################################################################
' Interface name = IMFByteStreamHandler
' IID = BB420AA4-765B-4A1F-91FE-D6A8A143924C
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFByteStreamHandler_INTERFACE_DEFINED)
 %IMFByteStreamHandler_INTERFACE_DEFINED = 1
$IID_IMFByteStreamHandler = GUID$("{BB420AA4-765B-4A1F-91FE-D6A8A143924C}")
INTERFACE IMFByteStreamHandler $IID_IMFByteStreamHandler
 INHERIT IUnknown
 ' =====================================================================================
 METHOD BeginCreateObject ( ' VTable offset = 12
 BYVAL pByteStream AS IMFByteStream
 , BYREF pwszURL AS WSTRINGZ
 , BYVAL dwFlags AS DWORD
 , BYVAL pProps AS IPropertyStore
 , BYREF ppIUnknownCancelCookie AS IUnknown
 , BYVAL pCallback AS IMFAsyncCallback
 , BYVAL punkState AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD EndCreateObject ( ' VTable offset = 16
 BYVAL pResult AS IMFAsyncResult
 , BYREF pObjectType AS LONG
 , BYREF ppObject AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD CancelObjectCreation ( ' VTable offset = 20
 BYVAL pIUnknownCancelCookie AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD GetMaxNumberOfBytesRequiredForResolution ( ' VTable offset = 24
 BYREF pqwBytes AS QUAD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFByteStreamHandler_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMFTrustedInput
' IID = 542612C4-A1B8-4632-B521-DE11EA64A0B0
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFTrustedInput_INTERFACE_DEFINED)
 %IMFTrustedInput_INTERFACE_DEFINED = 1
$IID_IMFTrustedInput = GUID$("{542612C4-A1B8-4632-B521-DE11EA64A0B0}")
INTERFACE IMFTrustedInput $IID_IMFTrustedInput
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetInputTrustAuthority ( ' VTable offset = 12
 BYVAL dwStreamID AS DWORD
 , BYREF riid AS GUID
 , BYREF ppunkObject AS IUnknown
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFTrustedInput_INTERFACE_DEFINED__ */
' enum MFPOLICYMANAGER_ACTION
%EQUATE `PEACTION_NO = 0
%EQUATE `PEACTION_PLAY = 1
%EQUATE `PEACTION_COPY = 2
%EQUATE `PEACTION_EXPORT = 3
%EQUATE `PEACTION_EXTRACT = 4
%EQUATE `PEACTION_RESERVED1 = 5
%EQUATE `PEACTION_RESERVED2 = 6
%EQUATE `PEACTION_RESERVED3 = 7
%EQUATE `PEACTION_LAST = 7
' // Size = 12 bytes
TYPE MFINPUTTRUSTAUTHORITY_ACCESS_ACTION DWORD
 Action AS LONG ' MFPOLICYMANAGER_ACTION
 pbTicket AS BYTE PTR ' BYTE *
 cbTicket AS DWORD
END TYPE
MACRO MFINPUTTRUSTAUTHORITY_ACTION = MFINPUTTRUSTAUTHORITY_ACCESS_ACTION
' // Size = 40 bytes
TYPE MFINPUTTRUSTAUTHORITY_ACCESS_PARAMS DWORD
 dwSize AS DWORD
 dwVer AS DWORD
 cbSignatureOffset AS DWORD
 cbSignatureSize AS DWORD
 cbExtensionOffset AS DWORD
 cbExtensionSize AS DWORD
 cActions AS DWORD
 rgOutputActions(0) AS MFINPUTTRUSTAUTHORITY_ACCESS_ACTION
END TYPE
' ########################################################################################
' Interface name = IMFInputTrustAuthority
' IID = D19F8E98-B126-4446-890C-5DCB7AD71453
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFInputTrustAuthority_INTERFACE_DEFINED)
 %IMFInputTrustAuthority_INTERFACE_DEFINED = 1
$IID_IMFInputTrustAuthority = GUID$("{D19F8E98-B126-4446-890C-5DCB7AD71453}")
INTERFACE IMFInputTrustAuthority $IID_IMFInputTrustAuthority
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetDecrypter ( ' VTable offset = 12
 BYREF riid AS GUID
 , BYREF ppv AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD RequestAccess ( ' VTable offset = 16
 BYVAL Action AS LONG
 , BYREF ppContentEnablerActivate AS IMFActivate
 ) AS LONG
 ' =====================================================================================
 METHOD GetPolicy ( ' VTable offset = 20
 BYVAL Action AS LONG
 , BYREF ppPolicy AS IMFOutputPolicy
 ) AS LONG
 ' =====================================================================================
 METHOD BindAccess ( ' VTable offset = 24
 BYREF pParam AS MFINPUTTRUSTAUTHORITY_ACCESS_PARAMS
 ) AS LONG
 ' =====================================================================================
 METHOD UpdateAccess ( ' VTable offset = 28
 BYREF pParam AS MFINPUTTRUSTAUTHORITY_ACCESS_PARAMS
 ) AS LONG
 ' =====================================================================================
 METHOD Reset ( ' VTable offset = 32
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFInputTrustAuthority_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMFTrustedOutput
' IID = D19F8E95-B126-4446-890C-5DCB7AD71453
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFTrustedOutput_INTERFACE_DEFINED)
 %IMFTrustedOutput_INTERFACE_DEFINED = 1
$IID_IMFTrustedOutput = GUID$("{D19F8E95-B126-4446-890C-5DCB7AD71453}")
INTERFACE IMFTrustedOutput $IID_IMFTrustedOutput
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetOutputTrustAuthorityCount ( ' VTable offset = 12
 BYREF pcOutputTrustAuthorities AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetOutputTrustAuthorityByIndex ( ' VTable offset = 16
 BYVAL dwIndex AS DWORD
 , BYREF ppauthority AS IMFOutputTrustAuthority
 ) AS LONG
 ' =====================================================================================
 METHOD IsFinal ( ' VTable offset = 20
 BYREF pfIsFinal AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFTrustedOutput_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMFOutputTrustAuthority
' IID = D19F8E94-B126-4446-890C-5DCB7AD71453
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFOutputTrustAuthority_INTERFACE_DEFINED)
 %IMFOutputTrustAuthority_INTERFACE_DEFINED = 1
$IID_IMFOutputTrustAuthority = GUID$("{D19F8E94-B126-4446-890C-5DCB7AD71453}")
INTERFACE IMFOutputTrustAuthority $IID_IMFOutputTrustAuthority
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetAction ( ' VTable offset = 12
 BYREF pAction AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetPolicy ( ' VTable offset = 16
 BYVAL ppPolicy AS IMFOutputPolicy
 , BYVAL nPolicy AS DWORD
 , BYREF ppbTicket AS DWORD
 , BYREF pcbTicket AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFOutputTrustAuthority_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMFOutputPolicy
' IID = 7F00F10A-DAED-41AF-AB26-5FDFA4DFBA3C
' Inherited interface = IMFAttributes
' ########################################################################################
#IF NOT %DEF(%IMFOutputPolicy_INTERFACE_DEFINED)
 %IMFOutputPolicy_INTERFACE_DEFINED = 1
$IID_IMFOutputPolicy = GUID$("{7F00F10A-DAED-41AF-AB26-5FDFA4DFBA3C}")
INTERFACE IMFOutputPolicy $IID_IMFOutputPolicy
 INHERIT IUnknown
 ' =====================================================================================
 ' IMFAttributes methods
 ' =====================================================================================
 METHOD GetItem ( ' VTable offset = 12
 BYREF guidKey AS GUID
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD GetItemType ( ' VTable offset = 16
 BYREF guidKey AS GUID
 , BYREF pType AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD CompareItem ( ' VTable offset = 20
 BYREF guidKey AS GUID
 , BYREF Value AS PROPVARIANT
 , BYREF pbResult AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD Compare ( ' VTable offset = 24
 BYVAL pTheirs AS IMFAttributes
 , BYVAL MatchType AS LONG
 , BYREF pbResult AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetUINT32 ( ' VTable offset = 28
 BYREF guidKey AS GUID
 , BYREF punValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetUINT64 ( ' VTable offset = 32
 BYREF guidKey AS GUID
 , BYREF punValue AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD GetDouble ( ' VTable offset = 36
 BYREF guidKey AS GUID
 , BYREF pfValue AS DOUBLE
 ) AS LONG
 ' =====================================================================================
 METHOD GetGUID ( ' VTable offset = 40
 BYREF guidKey AS GUID
 , BYREF pguidValue AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD GetStringLength ( ' VTable offset = 44
 BYREF guidKey AS GUID
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetString ( ' VTable offset = 48
 BYREF guidKey AS GUID
 , BYREF pwszValue AS WSTRINGZ
 , BYVAL cchBufSize AS DWORD
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAllocatedString ( ' VTable offset = 52
 BYREF guidKey AS GUID
 , BYREF ppwszValue AS DWORD
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetBlobSize ( ' VTable offset = 56
 BYREF guidKey AS GUID
 , BYREF pcbBlobSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetBlob ( ' VTable offset = 60
 BYREF guidKey AS GUID
 , BYVAL pBuf AS DWORD
 , BYVAL cbBufSize AS DWORD
 , BYREF pcbBlobSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAllocatedBlob ( ' VTable offset = 64
 BYREF guidKey AS GUID
 , BYVAL ppBuf AS DWORD
 , BYREF pcbSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetUnknown ( ' VTable offset = 68
 BYREF guidKey AS GUID
 , BYREF riid AS GUID
 , BYREF ppv AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD SetItem ( ' VTable offset = 72
 BYREF guidKey AS GUID
 , BYREF Value AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteItem ( ' VTable offset = 76
 BYREF guidKey AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteAllItems ( ' VTable offset = 80
 ) AS LONG
 ' =====================================================================================
 METHOD SetUINT32 ( ' VTable offset = 84
 BYREF guidKey AS GUID
 , BYVAL unValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetUINT64 ( ' VTable offset = 88
 BYREF guidKey AS GUID
 , BYVAL unValue AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD SetDouble ( ' VTable offset = 92
 BYREF guidKey AS GUID
 , BYVAL fValue AS DOUBLE
 ) AS LONG
 ' =====================================================================================
 METHOD SetGUID ( ' VTable offset = 96
 BYREF guidKey AS GUID
 , BYREF guidValue AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD SetString ( ' VTable offset = 100
 BYREF guidKey AS GUID
 , BYREF wszValue AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetBlob ( ' VTable offset = 104
 BYREF guidKey AS GUID
 , BYVAL pBuf AS DWORD
 , BYVAL cbBufSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetUnknown ( ' VTable offset = 108
 BYREF guidKey AS GUID
 , BYVAL pUnknown AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD LockStore ( ' VTable offset = 112
 ) AS LONG
 ' =====================================================================================
 METHOD UnlockStore ( ' VTable offset = 116
 ) AS LONG
 ' =====================================================================================
 METHOD GetCount ( ' VTable offset = 120
 BYREF pcItems AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetItemByIndex ( ' VTable offset = 124
 BYVAL unIndex AS DWORD
 , BYREF pguidKey AS GUID
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD CopyAllItems ( ' VTable offset = 128
 BYVAL pDest AS LONG
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMFOutputPolicy methods
 ' =====================================================================================
 METHOD GenerateRequiredSchemas ( ' VTable offset = 132
 BYVAL dwAttributes AS DWORD
 , BYREF guidOutputSubType AS GUID
 , BYREF rgGuidProtectionSchemasSupported AS GUID
 , BYVAL cProtectionSchemasSupported AS DWORD
 , BYREF ppRequiredProtectionSchemas AS IMFCollection
 ) AS LONG
 ' =====================================================================================
 METHOD GetOriginatorID ( ' VTable offset = 136
 BYREF pguidOriginatorID AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD GetMinimumGRLVersion ( ' VTable offset = 140
 BYREF pdwMinimumGRLVersion AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFOutputPolicy_INTERFACE_DEFINED__ */
%EQUATE `MFOUTPUTATTRIBUTE_DIGITAL = &H00000001
%EQUATE `MFOUTPUTATTRIBUTE_NONSTANDARDIMPLEMENTATION = &H00000002
%EQUATE `MFOUTPUTATTRIBUTE_VIDEO = &H00000004
%EQUATE `MFOUTPUTATTRIBUTE_COMPRESSED = &H00000008
%EQUATE `MFOUTPUTATTRIBUTE_SOFTWARE = &H00000010
%EQUATE `MFOUTPUTATTRIBUTE_BUS = &H00000020
%EQUATE `MFOUTPUTATTRIBUTE_BUSIMPLEMENTATION = &H0000FF00
$MFCONNECTOR_SPDIF = GUID$("{0B94A712-AD3E-4CEE-83CE-CE32E3DB6522}")
$MFCONNECTOR_UNKNOWN = GUID$("{AC3AEF5C-CE43-11D9-92DB-000BDB28FF98}")
$MFCONNECTOR_PCI = GUID$("{AC3AEF5D-CE43-11D9-92DB-000BDB28FF98}")
$MFCONNECTOR_PCIX = GUID$("{AC3AEF5E-CE43-11D9-92DB-000BDB28FF98}")
$MFCONNECTOR_PCI_Express = GUID$("{AC3AEF5F-CE43-11D9-92DB-000BDB28FF98}")
$MFCONNECTOR_AGP = GUID$("{AC3AEF60-CE43-11D9-92DB-000BDB28FF98}")
$MFCONNECTOR_VGA = GUID$("{57CD5968-CE47-11D9-92DB-000BDB28FF98}")
$MFCONNECTOR_SVIDEO = GUID$("{57CD5969-CE47-11D9-92DB-000BDB28FF98}")
$MFCONNECTOR_COMPOSITE = GUID$("{57CD596A-CE47-11D9-92DB-000BDB28FF98}")
$MFCONNECTOR_COMPONENT = GUID$("{57CD596B-CE47-11D9-92DB-000BDB28FF98}")
$MFCONNECTOR_DVI = GUID$("{57CD596C-CE47-11D9-92DB-000BDB28FF98}")
$MFCONNECTOR_HDMI = GUID$("{57CD596D-CE47-11D9-92DB-000BDB28FF98}")
$MFCONNECTOR_LVDS = GUID$("{57CD596E-CE47-11D9-92DB-000BDB28FF98}")
$MFCONNECTOR_D_JPN = GUID$("{57CD5970-CE47-11D9-92DB-000BDB28FF98}")
$MFCONNECTOR_SDI = GUID$("{57CD5971-CE47-11D9-92DB-000BDB28FF98}")
$MFCONNECTOR_DISPLAYPORT_EXTERNAL = GUID$("{57CD5972-CE47-11D9-92DB-000BDB28FF98}")
$MFCONNECTOR_DISPLAYPORT_EMBEDDED = GUID$("{57CD5973-CE47-11D9-92DB-000BDB28FF98}")
$MFCONNECTOR_UDI_EXTERNAL = GUID$("{57CD5974-CE47-11D9-92DB-000BDB28FF98}")
$MFCONNECTOR_UDI_EMBEDDED = GUID$("{57CD5975-CE47-11D9-92DB-000BDB28FF98}")
' ########################################################################################
' Interface name = IMFOutputSchema
' IID = 7BE0FC5B-ABD9-44FB-A5C8-F50136E71599
' Inherited interface = IMFAttributes
' ########################################################################################
#IF NOT %DEF(%IMFOutputSchema_INTERFACE_DEFINED)
 %IMFOutputSchema_INTERFACE_DEFINED = 1
$IID_IMFOutputSchema = GUID$("{7BE0FC5B-ABD9-44FB-A5C8-F50136E71599}")
INTERFACE IMFOutputSchema $IID_IMFOutputSchema
 INHERIT IUnknown
 ' =====================================================================================
 ' IMFAttributes methods
 ' =====================================================================================
 METHOD GetItem ( ' VTable offset = 12
 BYREF guidKey AS GUID
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD GetItemType ( ' VTable offset = 16
 BYREF guidKey AS GUID
 , BYREF pType AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD CompareItem ( ' VTable offset = 20
 BYREF guidKey AS GUID
 , BYREF Value AS PROPVARIANT
 , BYREF pbResult AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD Compare ( ' VTable offset = 24
 BYVAL pTheirs AS IMFAttributes
 , BYVAL MatchType AS LONG
 , BYREF pbResult AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetUINT32 ( ' VTable offset = 28
 BYREF guidKey AS GUID
 , BYREF punValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetUINT64 ( ' VTable offset = 32
 BYREF guidKey AS GUID
 , BYREF punValue AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD GetDouble ( ' VTable offset = 36
 BYREF guidKey AS GUID
 , BYREF pfValue AS DOUBLE
 ) AS LONG
 ' =====================================================================================
 METHOD GetGUID ( ' VTable offset = 40
 BYREF guidKey AS GUID
 , BYREF pguidValue AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD GetStringLength ( ' VTable offset = 44
 BYREF guidKey AS GUID
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetString ( ' VTable offset = 48
 BYREF guidKey AS GUID
 , BYREF pwszValue AS WSTRINGZ
 , BYVAL cchBufSize AS DWORD
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAllocatedString ( ' VTable offset = 52
 BYREF guidKey AS GUID
 , BYREF ppwszValue AS DWORD
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetBlobSize ( ' VTable offset = 56
 BYREF guidKey AS GUID
 , BYREF pcbBlobSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetBlob ( ' VTable offset = 60
 BYREF guidKey AS GUID
 , BYVAL pBuf AS DWORD
 , BYVAL cbBufSize AS DWORD
 , BYREF pcbBlobSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAllocatedBlob ( ' VTable offset = 64
 BYREF guidKey AS GUID
 , BYVAL ppBuf AS DWORD
 , BYREF pcbSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetUnknown ( ' VTable offset = 68
 BYREF guidKey AS GUID
 , BYREF riid AS GUID
 , BYREF ppv AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD SetItem ( ' VTable offset = 72
 BYREF guidKey AS GUID
 , BYREF Value AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteItem ( ' VTable offset = 76
 BYREF guidKey AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteAllItems ( ' VTable offset = 80
 ) AS LONG
 ' =====================================================================================
 METHOD SetUINT32 ( ' VTable offset = 84
 BYREF guidKey AS GUID
 , BYVAL unValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetUINT64 ( ' VTable offset = 88
 BYREF guidKey AS GUID
 , BYVAL unValue AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD SetDouble ( ' VTable offset = 92
 BYREF guidKey AS GUID
 , BYVAL fValue AS DOUBLE
 ) AS LONG
 ' =====================================================================================
 METHOD SetGUID ( ' VTable offset = 96
 BYREF guidKey AS GUID
 , BYREF guidValue AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD SetString ( ' VTable offset = 100
 BYREF guidKey AS GUID
 , BYREF wszValue AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetBlob ( ' VTable offset = 104
 BYREF guidKey AS GUID
 , BYVAL pBuf AS DWORD
 , BYVAL cbBufSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetUnknown ( ' VTable offset = 108
 BYREF guidKey AS GUID
 , BYVAL pUnknown AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD LockStore ( ' VTable offset = 112
 ) AS LONG
 ' =====================================================================================
 METHOD UnlockStore ( ' VTable offset = 116
 ) AS LONG
 ' =====================================================================================
 METHOD GetCount ( ' VTable offset = 120
 BYREF pcItems AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetItemByIndex ( ' VTable offset = 124
 BYVAL unIndex AS DWORD
 , BYREF pguidKey AS GUID
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD CopyAllItems ( ' VTable offset = 128
 BYVAL pDest AS LONG
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMFOutputSchema methods
 ' =====================================================================================
 METHOD GetSchemaType ( ' VTable offset = 132
 BYREF pguidSchemaType AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD GetConfigurationData ( ' VTable offset = 136
 BYREF pdwVal AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetOriginatorID ( ' VTable offset = 140
 BYREF pguidOriginatorID AS GUID
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFOutputSchema_INTERFACE_DEFINED__ */
$MFPROTECTION_DISABLE = GUID$("{8CC6D81B-FEC6-4D8F-964B-CFBA0B0DAD0D}")
$MFPROTECTION_CONSTRICTVIDEO = GUID$("{193370CE-C5E4-4C3A-8A66-6959B4DA4442}")
$MFPROTECTION_CONSTRICTAUDIO = GUID$("{FFC99B44-DF48-4E16-8E66-096892C1578A}")
$MFPROTECTION_TRUSTEDAUDIODRIVERS = GUID$("{65BDF3D2-0168-4816-A533-55D47B027101}")
$MFPROTECTION_HDCP = GUID$("{AE7CC03D-C828-4021-ACB7-D578D27AAF13}")
$MFPROTECTION_CGMSA = GUID$("{E57E69E9-226B-4D31-B4E3-D3DB008736DD}")
$MFPROTECTION_ACP = GUID$("{C3FD11C6-F8B7-4D20-B008-1DB17D61F2DA}")
$MFPROTECTION_WMDRMOTA = GUID$("{A267A6A1-362E-47D0-8805-4628598A23E4}")
$MFPROTECTION_FFT = GUID$("{462A56B2-2866-4BB6-980D-6D8D9EDB1A8C}")
$MFPROTECTIONATTRIBUTE_CONSTRICTVIDEO_IMAGESIZE = GUID$("{080476FC-4B58-4D80-A790-E7297673161D}")
$MFPROTECTIONATTRIBUTE_HDCP_SRM = GUID$("{6F302107-3477-4468-8A08-EEF9DB10E20F}")
'#define MAKE_MFPROTECTIONDATA_DISABLE(Disable) \
' ((DWORD)(Disable ? 0x00000001 : 0))
MACRO MAKE_MFPROTECTIONDATA_DISABLE(nDisable) = IIF(nDisable = %TRUE, &H00000001, 0)
'#define EXTRACT_MFPROTECTIONDATA_DISABLE_ON(Data) \
' (0 != ((Data) & 0x00000001))
MACRO EXTRACT_MFPROTECTIONDATA_DISABLE_ON(nData) = (nData AND &H00000001) <> 0
'#define EXTRACT_MFPROTECTIONDATA_DISABLE_RESERVED(Data) \
' (((DWORD)((Data) & 0xFFFFFFFE)) >> 1)
MACRO FUNCTION EXTRACT_MFPROTECTIONDATA_DISABLE_RESERVED(nData)
 MACROTEMP dwData
 LOCAL dwData AS DWORD
 dwData = nData AND &HFFFFFFFE
 RIGHT SHIFT dwData, 1
END MACRO = dwData
'#define MAKE_MFPROTECTIONDATA_CONSTRICTAUDIO(Level) \
' ((DWORD)(Level))
MACRO MAKE_MFPROTECTIONDATA_CONSTRICTAUDIO (nLevel) = CDWD(nLevel)
'#define EXTRACT_MFPROTECTIONDATA_CONSTRICTAUDIO_LEVEL(Data) \
' ((DWORD)((Data) & 0x000000FF))
MACRO EXTRACT_MFPROTECTIONDATA_CONSTRICTAUDIO_LEVEL(nData) = nData AND &H000000FF
'#define EXTRACT_MFPROTECTIONDATA_CONSTRICTAUDIO_RESERVED(Data) \
' (((DWORD)((Data) & 0xFFFFFF00)) >> 8)
MACRO FUNCTION EXTRACT_MFPROTECTIONDATA_CONSTRICTAUDIO_RESERVED(nData)
 MACROTEMP dwData
 LOCAL dwData AS DWORD
 dwData = nData AND &HFFFFFF00
 RIGHT SHIFT dwData, 8
END MACRO = dwData
'#define MAKE_MFPROTECTIONDATA_TRUSTEDAUDIODRIVERS(TestCertificateEnable, DigitalOutputDisable, DrmLevel) \
' (((DWORD)((TestCertificateEnable) ? 0x00020000 : 0)) | \
' ((DWORD)((DigitalOutputDisable) ? 0x00010000 : 0)) | \
' ((DWORD)(DrmLevel)))
MACRO FUNCTION MAKE_MFPROTECTIONDATA_TRUSTEDAUDIODRIVERS(TestCertificateEnable, DigitalOutputDisable, DrmLevel)
 MACROTEMP dwTestCertificateEnable, dwDigitalOutputDisable, dwDrmLevel
 dwTestCertificateEnable = IIF(TestCertificateEnable = %TRUE, &H00020000, 0)
 dwTestCertificateEnable = IIF(DigitalOutputDisable = %TRUE, &H00010000, 0)
 dwDrmLevel = DrmLevel
END MACRO = dwTestCertificateEnable OR dwTestCertificateEnable OR dwDrmLevel
'#define EXTRACT_MFPROTECTIONDATA_TRUSTEDAUDIODRIVERS_DRMLEVEL(Data) \
' ((DWORD)((Data) & 0x0000FFFF))
MACRO EXTRACT_MFPROTECTIONDATA_TRUSTEDAUDIODRIVERS_DRMLEVEL(nData) = nData AND &H0000FFFF
'#define EXTRACT_MFPROTECTIONDATA_TRUSTEDAUDIODRIVERS_DIGITALOUTPUTDISABLE(Data) \
' (0 != ((Data) & 0x00010000))
MACRO EXTRACT_MFPROTECTIONDATA_TRUSTEDAUDIODRIVERS_DIGITALOUTPUTDISABLE(nData) = (nData AND &H00010000) <> 0
'#define EXTRACT_MFPROTECTIONDATA_TRUSTEDAUDIODRIVERS_TESTCERTIFICATEENABLE(Data) \
' (0 != ((Data) & 0x00020000))
MACRO EXTRACT_MFPROTECTIONDATA_TRUSTEDAUDIODRIVERS_TESTCERTIFICATEENABLE(nData) = (nData AND &H00020000) <> 0
'#if (WINVER >= _WIN32_WINNT_WIN7)
#IF %WINVER >= &H0601
'#define EXTRACT_MFPROTECTIONDATA_TRUSTEDAUDIODRIVERS_COPYOK(Data) \
' (0 != ((Data) & 0x00040000))
MACRO EXTRACT_MFPROTECTIONDATA_TRUSTEDAUDIODRIVERS_COPYOK(nData) = (nData AND &H00040000) <> 0
'#define EXTRACT_MFPROTECTIONDATA_TRUSTEDAUDIODRIVERS_RESERVED(Data) \
' (((DWORD)((Data) & 0xFFF80000)) >> 19)
MACRO FUNCTION EXTRACT_MFPROTECTIONDATA_TRUSTEDAUDIODRIVERS_RESERVED(nData)
 MACROTEMP dwData
 dwData = nData AND &HFFF80000
 RIGHT SHIFT dwData, 19
END MACRO = dwData
#ELSE
'#define EXTRACT_MFPROTECTIONDATA_TRUSTEDAUDIODRIVERS_RESERVED(Data) \
' (((DWORD)((Data) & 0xFFF80000)) >> 18)
MACRO FUNCTION EXTRACT_MFPROTECTIONDATA_TRUSTEDAUDIODRIVERS_RESERVED(nData)
 MACROTEMP dwData
 dwData = nData AND &HFFF80000
 RIGHT SHIFT dwData, 18
END MACRO = dwData
#ENDIF ' // (WINVER >= _WIN32_WINNT_WIN7)
' ########################################################################################
' Interface name = IMFSecureChannel
' IID = D0AE555D-3B12-4D97-B060-0990BC5AEB67
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFSecureChannel_INTERFACE_DEFINED)
 %IMFSecureChannel_INTERFACE_DEFINED = 1
$IID_IMFSecureChannel = GUID$("{D0AE555D-3B12-4D97-B060-0990BC5AEB67}")
INTERFACE IMFSecureChannel $IID_IMFSecureChannel
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetCertificate ( ' VTable offset = 12
 BYREF ppCert AS DWORD
 , BYREF pcbCert AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetupSession ( ' VTable offset = 16
 BYVAL pbEncryptedSessionKey AS BYTE PTR
 , BYVAL cbSessionKey AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFSecureChannel_INTERFACE_DEFINED__ */
' enum SAMPLE_PROTECTION_VERSION
%EQUATE `SAMPLE_PROTECTION_VERSION_NO = 0
%EQUATE `SAMPLE_PROTECTION_VERSION_BASIC_LOKI = 1
%EQUATE `SAMPLE_PROTECTION_VERSION_SCATTER = 2
%EQUATE `SAMPLE_PROTECTION_VERSION_RC4 = 3
$MF_SampleProtectionSalt = GUID$("{5403DEEE-B9EE-438F-AA83-3804997E569D}")
' ########################################################################################
' Interface name = IMFSampleProtection
' IID = 8E36395F-C7B9-43C4-A54D-512B4AF63C95
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFSampleProtection_INTERFACE_DEFINED)
 %IMFSampleProtection_INTERFACE_DEFINED = 1
$IID_IMFSampleProtection = GUID$("{8E36395F-C7B9-43C4-A54D-512B4AF63C95}")
INTERFACE IMFSampleProtection $IID_IMFSampleProtection
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetInputProtectionVersion ( ' VTable offset = 12
 BYREF pdwVersion AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetOutputProtectionVersion ( ' VTable offset = 16
 BYREF pdwVersion AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetProtectionCertificate ( ' VTable offset = 20
 BYVAL dwVersion AS DWORD
 , BYREF ppCert AS DWORD
 , BYREF pcbCert AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD InitOutputProtection ( ' VTable offset = 24
 BYVAL dwVersion AS DWORD
 , BYVAL dwOutputId AS DWORD
 , BYVAL pbCert AS BYTE PTR
 , BYVAL cbCert AS DWORD
 , BYREF ppbSeed AS DWORD
 , BYREF pcbSeed AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD InitInputProtection ( ' VTable offset = 28
 BYVAL dwVersion AS DWORD
 , BYVAL dwInputId AS DWORD
 , BYVAL pbSeed AS BYTE PTR
 , BYVAL cbSeed AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFSampleProtection_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMFMediaSinkPreroll
' IID = 5DFD4B2A-7674-4110-A4E6-8A68FD5F3688
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFMediaSinkPreroll_INTERFACE_DEFINED)
 %IMFMediaSinkPreroll_INTERFACE_DEFINED = 1
$IID_IMFMediaSinkPreroll = GUID$("{5DFD4B2A-7674-4110-A4E6-8A68FD5F3688}")
INTERFACE IMFMediaSinkPreroll $IID_IMFMediaSinkPreroll
 INHERIT IUnknown
 ' =====================================================================================
 METHOD NotifyPreroll ( ' VTable offset = 12
 BYVAL hnsUpcomingStartTime AS QUAD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFMediaSinkPreroll_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMFFinalizableMediaSink
' IID = EAECB74A-9A50-42CE-9541-6A7F57AA4AD7
' Inherited interface = IMFMediaSink
' ########################################################################################
#IF NOT %DEF(%IMFFinalizableMediaSink_INTERFACE_DEFINED)
 %IMFFinalizableMediaSink_INTERFACE_DEFINED = 1
$IID_IMFFinalizableMediaSink = GUID$("{EAECB74A-9A50-42CE-9541-6A7F57AA4AD7}")
INTERFACE IMFFinalizableMediaSink $IID_IMFFinalizableMediaSink
 INHERIT IUnknown
 ' =====================================================================================
 ' IMFMediaSink methods
 ' =====================================================================================
 METHOD GetCharacteristics ( ' VTable offset = 12
 BYREF pdwCharacteristics AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD AddStreamSink ( ' VTable offset = 16
 BYVAL dwStreamSinkIdentifier AS DWORD
 , BYVAL pMediaType AS IMFMediaType
 , BYREF ppStreamSink AS IMFStreamSink
 ) AS LONG
 ' =====================================================================================
 METHOD RemoveStreamSink ( ' VTable offset = 20
 BYVAL dwStreamSinkIdentifier AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetStreamSinkCount ( ' VTable offset = 24
 BYREF pcStreamSinkCount AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetStreamSinkByIndex ( ' VTable offset = 28
 BYVAL dwIndex AS DWORD
 , BYREF ppStreamSink AS IMFStreamSink
 ) AS LONG
 ' =====================================================================================
 METHOD GetStreamSinkById ( ' VTable offset = 32
 BYVAL dwStreamSinkIdentifier AS DWORD
 , BYREF ppStreamSink AS IMFStreamSink
 ) AS LONG
 ' =====================================================================================
 METHOD SetPresentationClock ( ' VTable offset = 36
 BYVAL pPresentationClock AS IMFPresentationClock
 ) AS LONG
 ' =====================================================================================
 METHOD GetPresentationClock ( ' VTable offset = 40
 BYREF ppPresentationClock AS IMFPresentationClock
 ) AS LONG
 ' =====================================================================================
 METHOD Shutdown ( ' VTable offset = 44
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMFFinalizableMediaSink methods
 ' =====================================================================================
 METHOD BeginFinalize ( ' VTable offset = 48
 BYVAL pCallback AS IMFAsyncCallback
 , BYVAL punkState AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD EndFinalize ( ' VTable offset = 52
 BYVAL pResult AS IMFAsyncResult
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFFinalizableMediaSink_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMFStreamingSinkConfig
' IID = 9DB7AA41-3CC5-40D4-8509-555804AD34CC
' Inherited interface = IUnknown
' ########################################################################################
'#if (WINVER >= _WIN32_WINNT_WIN7)
#IF NOT %DEF(%IMFStreamingSinkConfig_INTERFACE_DEFINED)
 %IMFStreamingSinkConfig_INTERFACE_DEFINED = 1
$IID_IMFStreamingSinkConfig = GUID$("{9DB7AA41-3CC5-40D4-8509-555804AD34CC}")
INTERFACE IMFStreamingSinkConfig $IID_IMFStreamingSinkConfig
 INHERIT IUnknown
 ' =====================================================================================
 METHOD StartStreaming ( ' VTable offset = 12
 BYVAL fSeekOffsetIsByteOffset AS LONG
 , BYVAL qwSeekOffset AS QUAD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFStreamingSinkConfig_INTERFACE_DEFINED__ */
'#endif // (WINVER >= _WIN32_WINNT_WIN7)
' ########################################################################################
' Interface name = IMFRemoteProxy
' IID = 994E23AD-1CC2-493C-B9FA-46F1CB040FA4
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFRemoteProxy_INTERFACE_DEFINED)
 %IMFRemoteProxy_INTERFACE_DEFINED = 1
$IID_IMFRemoteProxy = GUID$("{994E23AD-1CC2-493C-B9FA-46F1CB040FA4}")
INTERFACE IMFRemoteProxy $IID_IMFRemoteProxy
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetRemoteObject ( ' VTable offset = 12
 BYREF riid AS GUID
 , BYREF ppv AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD GetRemoteHost ( ' VTable offset = 16
 BYREF riid AS GUID
 , BYREF ppv AS IUnknown
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFRemoteProxy_INTERFACE_DEFINED__ */
$MF_REMOTE_PROXY = GUID$("{2F00C90E-D2CF-4278-8B6A-D077FAC3A25F}")
' ########################################################################################
' Interface name = IMFObjectReferenceStream
' IID = 09EF5BE3-C8A7-469E-8B70-73BF25BB193F
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFObjectReferenceStream_INTERFACE_DEFINED)
 %IMFObjectReferenceStream_INTERFACE_DEFINED = 1
$IID_IMFObjectReferenceStream = GUID$("{09EF5BE3-C8A7-469E-8B70-73BF25BB193F}")
INTERFACE IMFObjectReferenceStream $IID_IMFObjectReferenceStream
 INHERIT IUnknown
 ' =====================================================================================
 METHOD SaveReference ( ' VTable offset = 12
 BYREF riid AS GUID
 , BYVAL pUnk AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD LoadReference ( ' VTable offset = 16
 BYREF riid AS GUID
 , BYREF ppv AS IUnknown
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFObjectReferenceStream_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMFPMPHost
' IID = 2CD2D921-C447-44A7-A13C-4ADABFC247E3
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFPMPHost_INTERFACE_DEFINED)
 %IMFPMPHost_INTERFACE_DEFINED = 1
$IID_IMFPMPHost = GUID$("{2CD2D921-C447-44A7-A13C-4ADABFC247E3}")
INTERFACE IMFPMPHost $IID_IMFPMPHost
 INHERIT IUnknown
 ' =====================================================================================
 METHOD LockProcess ( ' VTable offset = 12
 ) AS LONG
 ' =====================================================================================
 METHOD UnlockProcess ( ' VTable offset = 16
 ) AS LONG
 ' =====================================================================================
 METHOD CreateObjectByCLSID ( ' VTable offset = 20
 BYREF clsid AS GUID
 , BYVAL pStream AS IStream
 , BYREF riid AS GUID
 , BYREF ppv AS IUnknown
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFPMPHost_INTERFACE_DEFINED__ */
'#if (WINVER >= _WIN32_WINNT_WIN7)
'EXTERN_C const GUID MF_PMP_SERVICE;
'#endif // (WINVER >= _WIN32_WINNT_WIN7)
' ########################################################################################
' Interface name = IMFPMPClient
' IID = 6C4E655D-EAD8-4421-B6B9-54DCDBBDF820
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFPMPClient_INTERFACE_DEFINED)
 %IMFPMPClient_INTERFACE_DEFINED = 1
$IID_IMFPMPClient = GUID$("{6C4E655D-EAD8-4421-B6B9-54DCDBBDF820}")
INTERFACE IMFPMPClient $IID_IMFPMPClient
 INHERIT IUnknown
 ' =====================================================================================
 METHOD SetPMPHost ( ' VTable offset = 12
 BYVAL pPMPHost AS IMFPMPHost
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFPMPClient_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMFPMPServer
' IID = 994E23AF-1CC2-493C-B9FA-46F1CB040FA4
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFPMPServer_INTERFACE_DEFINED)
 %IMFPMPServer_INTERFACE_DEFINED = 1
$IID_IMFPMPServer = GUID$("{994E23AF-1CC2-493C-B9FA-46F1CB040FA4}")
INTERFACE IMFPMPServer $IID_IMFPMPServer
 INHERIT IUnknown
 ' =====================================================================================
 METHOD LockProcess ( ' VTable offset = 12
 ) AS LONG
 ' =====================================================================================
 METHOD UnlockProcess ( ' VTable offset = 16
 ) AS LONG
 ' =====================================================================================
 METHOD CreateObjectByCLSID ( ' VTable offset = 20
 BYREF clsid AS GUID
 , BYREF riid AS GUID
 , BYREF ppObject AS IUnknown
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFPMPServer_INTERFACE_DEFINED__ */
DECLARE FUNCTION MFCreatePMPServer LIB "mf.dll" ALIAS "MFCreatePMPServer" ( BYVAL dwCreationFlags AS QUAD , BYVAL ppPMPServer AS IMFPMPServer ) AS LONG
' ########################################################################################
' Interface name = IMFRemoteDesktopPlugin
' IID = 1CDE6309-CAE0-4940-907E-C1EC9C3D1D4A
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFRemoteDesktopPlugin_INTERFACE_DEFINED)
 %IMFRemoteDesktopPlugin_INTERFACE_DEFINED = 1
$IID_IMFRemoteDesktopPlugin = GUID$("{1CDE6309-CAE0-4940-907E-C1EC9C3D1D4A}")
INTERFACE IMFRemoteDesktopPlugin $IID_IMFRemoteDesktopPlugin
 INHERIT IUnknown
 ' =====================================================================================
 METHOD UpdateTopology ( ' VTable offset = 12
 BYREF pTopology AS IMFTopology
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFRemoteDesktopPlugin_INTERFACE_DEFINED__ */
DECLARE FUNCTION MFCreateRemoteDesktopPlugin LIB "mf.dll" ALIAS "MFCreateRemoteDesktopPlugin" ( BYREF ppPlugin AS IMFRemoteDesktopPlugin ) AS LONG
DECLARE FUNCTION CreateNamedPropertyStore LIB "mf.dll" ALIAS "CreateNamedPropertyStore" ( BYREF ppStore AS INamedPropertyStore
 ) AS LONG
' ########################################################################################
' Interface name = IMFSAMIStyle
' IID = A7E025DD-5303-4A62-89D6-E747E1EFAC73
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFSAMIStyle_INTERFACE_DEFINED)
 %IMFSAMIStyle_INTERFACE_DEFINED = 1
$IID_IMFSAMIStyle = GUID$("{A7E025DD-5303-4A62-89D6-E747E1EFAC73}")
INTERFACE IMFSAMIStyle $IID_IMFSAMIStyle
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetStyleCount ( ' VTable offset = 12
 BYREF pdwCount AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetStyles ( ' VTable offset = 16
 BYREF pPropVarStyleArray AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD SetSelectedStyle ( ' VTable offset = 20
 BYREF pwszStyle AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD GetSelectedStyle ( ' VTable offset = 20
 BYREF ppwszStyle AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFSAMIStyle_INTERFACE_DEFINED__ */
$MF_SAMI_SERVICE = GUID$("{49A89AE7-B4D9-4EF2-AA5C-F65A3E05AE4E}")
$MF_PD_SAMI_STYLELIST = GUID$("{E0B73C7F-486D-484E-9872-4DE5192A7BF8}")
$MF_SD_SAMI_LANGUAGE = GUID$("{36FCB98A-6CD0-44CB-ACB9-A8F5600DD0BB}")
'#if (WINVER >= _WIN32_WINNT_WIN7)
DECLARE FUNCTION MFCreateSampleCopierMFT LIB "mf.dll" ALIAS "MFCreateSampleCopierMFT" ( BYREF ppCopierMFT AS IMFTransform ) AS LONG
' ########################################################################################
' Interface name = IMFTranscodeProfile
' IID = 4ADFDBA3-7AB0-4953-A62B-461E7FF3DA1E
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFTranscodeProfile_INTERFACE_DEFINED)
 %IMFTranscodeProfile_INTERFACE_DEFINED = 1
$IID_IMFTranscodeProfile = GUID$("{4ADFDBA3-7AB0-4953-A62B-461E7FF3DA1E}")
INTERFACE IMFTranscodeProfile $IID_IMFTranscodeProfile
 INHERIT IUnknown
 ' =====================================================================================
 METHOD SetAudioAttributes ( ' VTable offset = 12
 BYVAL pAttrs AS IMFAttributes
 ) AS LONG
 ' =====================================================================================
 METHOD GetAudioAttributes ( ' VTable offset = 16
 BYREF ppAttrs AS IMFAttributes
 ) AS LONG
 ' =====================================================================================
 METHOD SetVideoAttributes ( ' VTable offset = 20
 BYVAL pAttrs AS IMFAttributes
 ) AS LONG
 ' =====================================================================================
 METHOD GetVideoAttributes ( ' VTable offset = 24
 BYREF ppAttrs AS IMFAttributes
 ) AS LONG
 ' =====================================================================================
 METHOD SetContainerAttributes ( ' VTable offset = 28
 BYVAL pAttrs AS IMFAttributes
 ) AS LONG
 ' =====================================================================================
 METHOD GetContainerAttributes ( ' VTable offset = 32
 BYREF ppAttrs AS IMFAttributes
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFTranscodeProfile_INTERFACE_DEFINED__ */
$MF_TRANSCODE_CONTAINERTYPE = GUID$("{150ff23f-4abc-478b-ac4f-e1916fba1cca}")
$MFTranscodeContainerType_ASF = GUID$("{430f6f6e-b6bf-4fc1-a0bd-9ee46eee2afb}")
$MFTranscodeContainerType_MPEG4 = GUID$("{dc6cd05d-b9d0-40ef-bd35-fa622c1ab28a}")
$MFTranscodeContainerType_MP3 = GUID$("{e438b912-83f1-4de6-9e3a-9ffbc6dd24d1}")
$MFTranscodeContainerType_3GP = GUID$("{34c50167-4472-4f34-9ea0-c49fbacf037d}")
$MF_TRANSCODE_SKIP_METADATA_TRANSFER = GUID$("{4e4469ef-b571-4959-8f83-3dcfba33a393}")
$MF_TRANSCODE_TOPOLOGYMODE = GUID$("{3e3df610-394a-40b2-9dea-3bab650bebf2}")
' enum _MF_TRANSCODE_TOPOLOGYMODE_FLAGS
%EQUATE `MF_TRANSCODE_TOPOLOGYMODE_SOFTWARE_ONLY = 0
%EQUATE `MF_TRANSCODE_TOPOLOGYMODE_HARDWARE_ALLOWED = 1
$MF_TRANSCODE_ADJUST_PROFILE = GUID$("{9c37c21b-060f-487c-a690-80d7f50d1c72}")
' enum _MF_TRANSCODE_ADJUST_PROFILE_FLAGS
%EQUATE `MF_TRANSCODE_ADJUST_PROFILE_DEFAULT = 0
%EQUATE `MF_TRANSCODE_ADJUST_PROFILE_USE_SOURCE_ATTRIBUTES = 1
$MF_TRANSCODE_ENCODINGPROFILE = GUID$("{6947787c-f508-4ea9-b1e9-a1fe3a49fbc9}")
$MF_TRANSCODE_QUALITYVSSPEED = GUID$("{98332df8-03cd-476b-89fa-3f9e442dec9f}")
$MF_TRANSCODE_DONOT_INSERT_ENCODER = GUID$("{f45aa7ce-ab24-4012-a11b-dc8220201410}")
DECLARE FUNCTION MFCreateTranscodeProfile LIB "mf.dll" ALIAS "MFCreateTranscodeProfile" ( BYREF ppTranscodeProfile AS IMFTranscodeProfile ) AS LONG
DECLARE FUNCTION MFCreateTranscodeTopology LIB "mf.dll" ALIAS "MFCreateTranscodeTopology" ( BYVAL pSrc AS IMFMediaSource
 , BYREF pwszOutputFilePath AS WSTRINGZ
 , BYVAL pProfile AS IMFTranscodeProfile
 , BYREF ppTranscodeTopo AS IMFTopology
 ) AS LONG
DECLARE FUNCTION MFTranscodeGetAudioOutputAvailableTypes LIB "mf.dll" ALIAS "MFTranscodeGetAudioOutputAvailableTypes" ( BYREF guidSubType AS GUID
 , BYVAL dwMFTFlags AS DWORD
 , BYVAL pCodecConfig AS IMFAttributes
 , BYREF ppAvailableTypes AS IMFCollection
 ) AS LONG
' // Size = 16 bytes
TYPE MF_TRANSCODE_SINK_INFO DWORD
 dwVideoStreamID AS DWORD
 pVideoMediaType AS DWORD PTR ' IMFMediaType *
 dwAudioStreamID AS DWORD
 pAudioMediaType AS DWORD PTR ' IMFMediaType *
END TYPE
' ########################################################################################
' Interface name = IMFTranscodeSinkInfoProvider
' IID = 8CFFCD2E-5A03-4A3A-AFF7-EDCD107C620E
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFTranscodeSinkInfoProvider_INTERFACE_DEFINED)
 %IMFTranscodeSinkInfoProvider_INTERFACE_DEFINED = 1
$IID_IMFTranscodeSinkInfoProvider = GUID$("{8CFFCD2E-5A03-4A3A-AFF7-EDCD107C620E}")
INTERFACE IMFTranscodeSinkInfoProvider $IID_IMFTranscodeSinkInfoProvider
 INHERIT IUnknown
 ' =====================================================================================
 METHOD SetOutputFile ( ' VTable offset = 12
 BYREF pwszFileName AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetOutputByteStream ( ' VTable offset = 16
 BYVAL pByteStreamActivate AS IMFActivate
 ) AS LONG
 ' =====================================================================================
 METHOD SetProfile ( ' VTable offset = 20
 BYVAL pProfile AS IMFTranscodeProfile
 ) AS LONG
 ' =====================================================================================
 METHOD GetSinkInfo ( ' VTable offset = 24
 BYREF pSinkInfo AS MF_TRANSCODE_SINK_INFO
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFTranscodeSinkInfoProvider_INTERFACE_DEFINED__ */
DECLARE FUNCTION MFCreateTranscodeSinkActivate LIB "mf.dll" ALIAS "MFCreateTranscodeSinkActivate" ( BYREF ppActivate AS IMFActivate ) AS LONG
' ########################################################################################
' Interface name = IMFFieldOfUseMFTUnlock
' IID = 508E71D3-EC66-4FC3-8775-B4B9ED6BA847
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFFieldOfUseMFTUnlock_INTERFACE_DEFINED)
 %IMFFieldOfUseMFTUnlock_INTERFACE_DEFINED = 1
$IID_IMFFieldOfUseMFTUnlock = GUID$("{508E71D3-EC66-4FC3-8775-B4B9ED6BA847}")
INTERFACE IMFFieldOfUseMFTUnlock $IID_IMFFieldOfUseMFTUnlock
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Unlock ( ' VTable offset = 12
 BYVAL pUnkMFT AS IUnknown
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFFieldOfUseMFTUnlock_INTERFACE_DEFINED__ */
' // Size = 56 bytes
TYPE MFT_REGISTRATION_INFO DWORD
 clsid AS GUID ' CLSID
 guidCategory AS GUID ' GUID
 uiFlags AS DWORD ' UINT32
 pszName AS WSTRINGZ PTR
 cInTypes AS DWORD
 pInTypes AS MFT_REGISTER_TYPE_INFO PTR ' MFT_REGISTER_TYPE_INFO *
 cOutTypes AS DWORD
 pOutTypes AS MFT_REGISTER_TYPE_INFO PTR ' MFT_REGISTER_TYPE_INFO *
END TYPE
$MF_LOCAL_MFT_REGISTRATION_SERVICE = GUID$("{ddf5cf9c-4506-45aa-abf0-6d5d94dd1b4a}")
' ########################################################################################
' Interface name = IMFLocalMFTRegistration
' IID = 149C4D73-B4BE-4F8D-8B87-079E926B6ADD
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFLocalMFTRegistration_INTERFACE_DEFINED)
 %IMFLocalMFTRegistration_INTERFACE_DEFINED = 1
$IID_IMFLocalMFTRegistration = GUID$("{149C4D73-B4BE-4F8D-8B87-079E926B6ADD}")
INTERFACE IMFLocalMFTRegistration $IID_IMFLocalMFTRegistration
 INHERIT IUnknown
 ' =====================================================================================
 METHOD RegisterMFTs ( ' VTable offset = 12
 BYREF pMFTs AS MFT_REGISTRATION_INFO
 , BYVAL cMFTs AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFLocalMFTRegistration_INTERFACE_DEFINED__ */
DECLARE FUNCTION MFCreateMFByteStreamOnStream LIB "mf.dll" ALIAS "MFCreateMFByteStreamOnStream" ( BYVAL pStream AS IStream , BYREF ppByteStream AS IMFByteStream ) AS LONG
$CLSID_UrlmonSchemePlugin = GUID$("{9ec4b4f9-3029-45ad-947b-344de2a249e2}")
DECLARE FUNCTION MFEnumDeviceSources LIB "mf.dll" ALIAS "MFEnumDeviceSources" ( BYVAL pAttributes AS IMFAttributes , BYREF pppSourceActivate AS IMFActivate , BYREF pcSourceActivate AS QUAD ) AS LONG
DECLARE FUNCTION MFCreateDeviceSource LIB "mf.dll" ALIAS "MFCreateDeviceSource" ( BYVAL pAttributes AS IMFAttributes
 , BYREF ppSource AS IMFMediaSource
 ) AS LONG
DECLARE FUNCTION MFCreateDeviceSourceActivate LIB "mf.dll" ALIAS "MFCreateDeviceSourceActivate" ( BYVAL pAttributes AS IMFAttributes
 , BYREF ppActivate AS IMFActivate
 ) AS LONG
$MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE = GUID$("{c60ac5fe-252a-478f-a0ef-bc8fa5f7cad3}")
$MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_HW_SOURCE = GUID$("{de7046ba-54d6-4487-a2a4-ec7c0d1bd163}")
$MF_DEVSOURCE_ATTRIBUTE_FRIENDLY_NAME = GUID$("{60d0e559-52f8-4fa2-bbce-acdb34a8ec01}")
$MF_DEVSOURCE_ATTRIBUTE_MEDIA_TYPE = GUID$("{56a819ca-0c78-4de4-a0a7-3ddaba0f24d4}")
$MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_CATEGORY = GUID$("{77f0ae69-c3bd-4509-941d-467e4d24899e}")
$MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_SYMBOLIC_LINK = GUID$("{58f0aad8-22bf-4f8a-bb3d-d2c4978c6e2f}")
$MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_MAX_BUFFERS = GUID$("{7dd9b730-4f2d-41d5-8f95-0cc9a912ba26}")
$MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_ENDPOINT_ID = GUID$("{30da9258-feb9-47a7-a453-763a7a8e1c5f}")
$MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_ROLE = GUID$("{bc9d118e-8c67-4a18-85d4-12d300400552}")
$MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_GUID = GUID$("{14dd9a1c-7cff-41be-b1b9-ba1ac6ecb571}")
$MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_GUID = GUID$("{8ac3587a-4ae7-42d8-99e0-0a6013eef90f}")
$MFSampleExtension_DeviceTimestamp = GUID$("{8f3e35e7-2dcd-4887-8622-2a58baa652b0}")
'#endif // (WINVER >= _WIN32_WINNT_WIN7)
#ENDIF
