7CF72BF8 pIGraphBuilder->lpVtbl
00000000 7CF87539 QueryInterface
00000004 7CF86F73 AddRef
00000008 7CF86F8D Release
0000000C 7CFA253D AddFilter
00000010 7CFCE88F RemoveFilter
00000014 7CF8A5E8 EnumFilters
00000018 7CF9429A FindFilterByName
0000001C 7CFA2248 ConnectDirect
00000020 7CFADA09 Reconnect
00000024 7CFA244E Disconnect
00000028 7CFA436D SetDefaultSyncSource
0000002C 7CFD1E4B Connect
00000030 7CFD1E6B Render
00000034 7CF9483B RenderFile
00000038 7CFCE8AA AddSourceFilter
0000003C 7CFCE69B SetLogFile
00000040 7CFCC68D Abort
00000044 7CFCC6AA ShouldOperationContinue
7CF746C8 pIMediaControl->lpVtbl
0000001C 7CFA449C Run
00000020 7CFA79B1 Pause
00000024 7CFA8455 Stop
00000028 7CF8C3AD GetState
0000002C 7CFD4571 RenderFile
00000030 7CFD4592 AddSourceFilter
00000034 7CFD464B get_FilterCollection
00000038 7CFD46D6 get_RegFilterCollection
0000003C 7CFA8320 StopWhenReady
7CF74990 pIMediaEvent->lpVtbl
00000000 7CF8A3A3 QueryInterface
00000004 7CF86E73 AddRef
00000008 7CF86E59 Release
0000000C 7CFCA9B2 GetTypeInfoCount
00000010 7CFC9BF8 GetTypeInfo
00000014 7CFC9C20 GetIDsOfNames
00000018 7CFC9CD6 Invoke
0000001C 7CFD4C92 GetEventHandle
00000020 7CF9331E GetEvent
00000024 7CFD4CAD WaitForCompletion
00000028 7CFD476D CancelDefaultHandling
0000002C 7CFD47B9 RestoreDefaultHandling
00000030 7CF933F2 FreeEventParams
7CF72DB8 pIVideoWindow->lpVtbl
0000001C 7CFD9E8E put_Caption
00000020 7CFD9EEB get_Caption
00000024 7CFD9F84 put_WindowStyle
00000028 7CFD9FA2 get_WindowStyle
0000002C 7CFD9FC0 put_WindowStyleEx
00000030 7CFD9FDE get_WindowStyleEx
00000034 7CFD9F48 put_AutoShow
00000038 7CFD9F66 get_AutoShow
0000003C 7CFD9FFC put_WindowState
00000040 7CFDA01A get_WindowState
00000044 7CFDA038 put_BackgroundPalette
00000048 7CFDA056 get_BackgroundPalette
0000004C 7CFDA074 put_Visible
00000050 7CFDA092 get_Visible
00000054 7CFDA0B0 put_Left
00000058 7CFDA0CE get_Left
0000005C 7CFDA0EC put_Width
00000060 7CFDA10A get_Width
00000064 7CFDA128 put_Top
00000068 7CFDA146 get_Top
0000006C 7CFDA164 put_Height
00000070 7CFDA182 get_Height
00000074 7CFDA1DC put_Owner
00000078 7CFD8FF2 get_Owner
0000007C 7CFA9B79 put_MessageDrain
00000080 7CFD9043 get_MessageDrain
00000084 7CFDA1A0 get_BorderColor
00000088 7CFDA1BE put_BorderColor
0000008C 7CFD9094 get_FullScreenMode
00000090 7CFDACF7 put_FullScreenMode
00000094 7CFDA6A8 SetWindowForeground
00000098 7CFD9719 NotifyOwnerMessage
0000009C 7CFD96B0 SetWindowPosition
000000A0 7CFD9817 GetWindowPosition
000000A4 7CFD9779 GetMinIdealImageSize
000000A8 7CFD97C8 GetMaxIdealImageSize
000000AC 7CFD986C GetRestorePosition
000000B0 7CFDA6C6 HideCursor
000000B4 7CFDA6E4 IsCursorHidden
代码:
void CComInterfaceDlg::OnTest()
{
#define SHOWINTERFACE(p,name) temp.Format( "/t%8.8X %8.8X " #name "/n", /
((DWORD)&p->lpVtbl->name-(DWORD)p->lpVtbl), p->lpVtbl->name); /
Info+=temp;
CString Info,temp;
Info.Empty();
HRESULT hr = CoInitialize(NULL);
if (FAILED(hr))
{
return;
}
IGraphBuilder *pIGraphBuilder;
hr = CoCreateInstance(CLSID_FilterGraph, NULL,
CLSCTX_INPROC_SERVER, IID_IGraphBuilder, (void **)&pIGraphBuilder);
temp.Format("%8.8X pIGraphBuilder->lpVtbl/n", pIGraphBuilder->lpVtbl);
Info+=temp;
SHOWINTERFACE(pIGraphBuilder,QueryInterface)
SHOWINTERFACE(pIGraphBuilder,AddRef)
SHOWINTERFACE(pIGraphBuilder,Release)
SHOWINTERFACE(pIGraphBuilder,AddFilter)
SHOWINTERFACE(pIGraphBuilder,RemoveFilter)
SHOWINTERFACE(pIGraphBuilder,EnumFilters)
SHOWINTERFACE(pIGraphBuilder,FindFilterByName)
SHOWINTERFACE(pIGraphBuilder,ConnectDirect)
SHOWINTERFACE(pIGraphBuilder,Reconnect)
SHOWINTERFACE(pIGraphBuilder,Disconnect)
SHOWINTERFACE(pIGraphBuilder,SetDefaultSyncSource)
SHOWINTERFACE(pIGraphBuilder,Connect)
SHOWINTERFACE(pIGraphBuilder,Render)
SHOWINTERFACE(pIGraphBuilder,RenderFile)
SHOWINTERFACE(pIGraphBuilder,AddSourceFilter)
SHOWINTERFACE(pIGraphBuilder,SetLogFile)
SHOWINTERFACE(pIGraphBuilder,Abort)
SHOWINTERFACE(pIGraphBuilder,ShouldOperationContinue)
IMediaControl *pIMediaControl;
hr = pIGraphBuilder->lpVtbl->QueryInterface(pIGraphBuilder, IID_IMediaControl, (void **)&pIMediaControl);
temp.Format("%8.8X pIMediaControl->lpVtbl/n", pIMediaControl->lpVtbl);
Info+=temp;
SHOWINTERFACE(pIMediaControl,Run)
SHOWINTERFACE(pIMediaControl,Pause)
SHOWINTERFACE(pIMediaControl,Stop)
SHOWINTERFACE(pIMediaControl,GetState)
SHOWINTERFACE(pIMediaControl,RenderFile)
SHOWINTERFACE(pIMediaControl,AddSourceFilter)
SHOWINTERFACE(pIMediaControl,get_FilterCollection)
SHOWINTERFACE(pIMediaControl,get_RegFilterCollection)
SHOWINTERFACE(pIMediaControl,StopWhenReady)
IMediaEvent *pIMediaEvent;
hr = pIGraphBuilder->lpVtbl->QueryInterface(pIGraphBuilder, IID_IMediaEvent, (void **)&pIMediaEvent);
temp.Format("%8.8X pIMediaEvent->lpVtbl/n", pIMediaEvent->lpVtbl);
Info+=temp;
SHOWINTERFACE(pIMediaEvent,QueryInterface)
SHOWINTERFACE(pIMediaEvent,AddRef)
SHOWINTERFACE(pIMediaEvent,Release)
SHOWINTERFACE(pIMediaEvent,GetTypeInfoCount)
SHOWINTERFACE(pIMediaEvent,GetTypeInfo)
SHOWINTERFACE(pIMediaEvent,GetIDsOfNames)
SHOWINTERFACE(pIMediaEvent,Invoke)
SHOWINTERFACE(pIMediaEvent,GetEventHandle)
SHOWINTERFACE(pIMediaEvent,GetEvent)
SHOWINTERFACE(pIMediaEvent,WaitForCompletion)
SHOWINTERFACE(pIMediaEvent,CancelDefaultHandling)
SHOWINTERFACE(pIMediaEvent,RestoreDefaultHandling)
SHOWINTERFACE(pIMediaEvent,FreeEventParams)
IVideoWindow* pIVideoWindow;
hr = pIGraphBuilder->lpVtbl->QueryInterface(pIGraphBuilder, IID_IVideoWindow, (void **)&pIVideoWindow);
temp.Format("%8.8X pIVideoWindow->lpVtbl/n", pIVideoWindow->lpVtbl);
Info+=temp;
SHOWINTERFACE(pIVideoWindow,put_Caption)
SHOWINTERFACE(pIVideoWindow,get_Caption)
SHOWINTERFACE(pIVideoWindow,put_WindowStyle)
SHOWINTERFACE(pIVideoWindow,get_WindowStyle)
SHOWINTERFACE(pIVideoWindow,put_WindowStyleEx)
SHOWINTERFACE(pIVideoWindow,get_WindowStyleEx)
SHOWINTERFACE(pIVideoWindow,put_AutoShow)
SHOWINTERFACE(pIVideoWindow,get_AutoShow)
SHOWINTERFACE(pIVideoWindow,put_WindowState)
SHOWINTERFACE(pIVideoWindow,get_WindowState)
SHOWINTERFACE(pIVideoWindow,put_BackgroundPalette)
SHOWINTERFACE(pIVideoWindow,get_BackgroundPalette)
SHOWINTERFACE(pIVideoWindow,put_Visible)
SHOWINTERFACE(pIVideoWindow,get_Visible)
SHOWINTERFACE(pIVideoWindow,put_Left)
SHOWINTERFACE(pIVideoWindow,get_Left)
SHOWINTERFACE(pIVideoWindow,put_Width)
SHOWINTERFACE(pIVideoWindow,get_Width)
SHOWINTERFACE(pIVideoWindow,put_Top)
SHOWINTERFACE(pIVideoWindow,get_Top)
SHOWINTERFACE(pIVideoWindow,put_Height)
SHOWINTERFACE(pIVideoWindow,get_Height)
SHOWINTERFACE(pIVideoWindow,put_Owner)
SHOWINTERFACE(pIVideoWindow,get_Owner)
SHOWINTERFACE(pIVideoWindow,put_MessageDrain)
SHOWINTERFACE(pIVideoWindow,get_MessageDrain)
SHOWINTERFACE(pIVideoWindow,get_BorderColor)
SHOWINTERFACE(pIVideoWindow,put_BorderColor)
SHOWINTERFACE(pIVideoWindow,get_FullScreenMode)
SHOWINTERFACE(pIVideoWindow,put_FullScreenMode)
SHOWINTERFACE(pIVideoWindow,SetWindowForeground)
SHOWINTERFACE(pIVideoWindow,NotifyOwnerMessage)
SHOWINTERFACE(pIVideoWindow,SetWindowPosition)
SHOWINTERFACE(pIVideoWindow,GetWindowPosition)
SHOWINTERFACE(pIVideoWindow,GetMinIdealImageSize)
SHOWINTERFACE(pIVideoWindow,GetMaxIdealImageSize)
SHOWINTERFACE(pIVideoWindow,GetRestorePosition)
SHOWINTERFACE(pIVideoWindow,HideCursor)
SHOWINTERFACE(pIVideoWindow,IsCursorHidden)
MessageBox(Info);
CFile fp("C://ComInterface.txt", CFile::modeCreate | CFile::modeWrite);
fp.Write(Info.GetBuffer(0), Info.GetLength());
fp.Close();
pIMediaControl->lpVtbl->Release(pIMediaControl);
pIMediaEvent->lpVtbl->Release(pIMediaEvent);
pIVideoWindow->lpVtbl->Release(pIVideoWindow);
pIGraphBuilder->lpVtbl->Release(pIGraphBuilder);
CoUninitialize();
}
00000000 7CF87539 QueryInterface
00000004 7CF86F73 AddRef
00000008 7CF86F8D Release
0000000C 7CFA253D AddFilter
00000010 7CFCE88F RemoveFilter
00000014 7CF8A5E8 EnumFilters
00000018 7CF9429A FindFilterByName
0000001C 7CFA2248 ConnectDirect
00000020 7CFADA09 Reconnect
00000024 7CFA244E Disconnect
00000028 7CFA436D SetDefaultSyncSource
0000002C 7CFD1E4B Connect
00000030 7CFD1E6B Render
00000034 7CF9483B RenderFile
00000038 7CFCE8AA AddSourceFilter
0000003C 7CFCE69B SetLogFile
00000040 7CFCC68D Abort
00000044 7CFCC6AA ShouldOperationContinue
7CF746C8 pIMediaControl->lpVtbl
0000001C 7CFA449C Run
00000020 7CFA79B1 Pause
00000024 7CFA8455 Stop
00000028 7CF8C3AD GetState
0000002C 7CFD4571 RenderFile
00000030 7CFD4592 AddSourceFilter
00000034 7CFD464B get_FilterCollection
00000038 7CFD46D6 get_RegFilterCollection
0000003C 7CFA8320 StopWhenReady
7CF74990 pIMediaEvent->lpVtbl
00000000 7CF8A3A3 QueryInterface
00000004 7CF86E73 AddRef
00000008 7CF86E59 Release
0000000C 7CFCA9B2 GetTypeInfoCount
00000010 7CFC9BF8 GetTypeInfo
00000014 7CFC9C20 GetIDsOfNames
00000018 7CFC9CD6 Invoke
0000001C 7CFD4C92 GetEventHandle
00000020 7CF9331E GetEvent
00000024 7CFD4CAD WaitForCompletion
00000028 7CFD476D CancelDefaultHandling
0000002C 7CFD47B9 RestoreDefaultHandling
00000030 7CF933F2 FreeEventParams
7CF72DB8 pIVideoWindow->lpVtbl
0000001C 7CFD9E8E put_Caption
00000020 7CFD9EEB get_Caption
00000024 7CFD9F84 put_WindowStyle
00000028 7CFD9FA2 get_WindowStyle
0000002C 7CFD9FC0 put_WindowStyleEx
00000030 7CFD9FDE get_WindowStyleEx
00000034 7CFD9F48 put_AutoShow
00000038 7CFD9F66 get_AutoShow
0000003C 7CFD9FFC put_WindowState
00000040 7CFDA01A get_WindowState
00000044 7CFDA038 put_BackgroundPalette
00000048 7CFDA056 get_BackgroundPalette
0000004C 7CFDA074 put_Visible
00000050 7CFDA092 get_Visible
00000054 7CFDA0B0 put_Left
00000058 7CFDA0CE get_Left
0000005C 7CFDA0EC put_Width
00000060 7CFDA10A get_Width
00000064 7CFDA128 put_Top
00000068 7CFDA146 get_Top
0000006C 7CFDA164 put_Height
00000070 7CFDA182 get_Height
00000074 7CFDA1DC put_Owner
00000078 7CFD8FF2 get_Owner
0000007C 7CFA9B79 put_MessageDrain
00000080 7CFD9043 get_MessageDrain
00000084 7CFDA1A0 get_BorderColor
00000088 7CFDA1BE put_BorderColor
0000008C 7CFD9094 get_FullScreenMode
00000090 7CFDACF7 put_FullScreenMode
00000094 7CFDA6A8 SetWindowForeground
00000098 7CFD9719 NotifyOwnerMessage
0000009C 7CFD96B0 SetWindowPosition
000000A0 7CFD9817 GetWindowPosition
000000A4 7CFD9779 GetMinIdealImageSize
000000A8 7CFD97C8 GetMaxIdealImageSize
000000AC 7CFD986C GetRestorePosition
000000B0 7CFDA6C6 HideCursor
000000B4 7CFDA6E4 IsCursorHidden
代码:
void CComInterfaceDlg::OnTest()
{
#define SHOWINTERFACE(p,name) temp.Format( "/t%8.8X %8.8X " #name "/n", /
((DWORD)&p->lpVtbl->name-(DWORD)p->lpVtbl), p->lpVtbl->name); /
Info+=temp;
CString Info,temp;
Info.Empty();
HRESULT hr = CoInitialize(NULL);
if (FAILED(hr))
{
return;
}
IGraphBuilder *pIGraphBuilder;
hr = CoCreateInstance(CLSID_FilterGraph, NULL,
CLSCTX_INPROC_SERVER, IID_IGraphBuilder, (void **)&pIGraphBuilder);
temp.Format("%8.8X pIGraphBuilder->lpVtbl/n", pIGraphBuilder->lpVtbl);
Info+=temp;
SHOWINTERFACE(pIGraphBuilder,QueryInterface)
SHOWINTERFACE(pIGraphBuilder,AddRef)
SHOWINTERFACE(pIGraphBuilder,Release)
SHOWINTERFACE(pIGraphBuilder,AddFilter)
SHOWINTERFACE(pIGraphBuilder,RemoveFilter)
SHOWINTERFACE(pIGraphBuilder,EnumFilters)
SHOWINTERFACE(pIGraphBuilder,FindFilterByName)
SHOWINTERFACE(pIGraphBuilder,ConnectDirect)
SHOWINTERFACE(pIGraphBuilder,Reconnect)
SHOWINTERFACE(pIGraphBuilder,Disconnect)
SHOWINTERFACE(pIGraphBuilder,SetDefaultSyncSource)
SHOWINTERFACE(pIGraphBuilder,Connect)
SHOWINTERFACE(pIGraphBuilder,Render)
SHOWINTERFACE(pIGraphBuilder,RenderFile)
SHOWINTERFACE(pIGraphBuilder,AddSourceFilter)
SHOWINTERFACE(pIGraphBuilder,SetLogFile)
SHOWINTERFACE(pIGraphBuilder,Abort)
SHOWINTERFACE(pIGraphBuilder,ShouldOperationContinue)
IMediaControl *pIMediaControl;
hr = pIGraphBuilder->lpVtbl->QueryInterface(pIGraphBuilder, IID_IMediaControl, (void **)&pIMediaControl);
temp.Format("%8.8X pIMediaControl->lpVtbl/n", pIMediaControl->lpVtbl);
Info+=temp;
SHOWINTERFACE(pIMediaControl,Run)
SHOWINTERFACE(pIMediaControl,Pause)
SHOWINTERFACE(pIMediaControl,Stop)
SHOWINTERFACE(pIMediaControl,GetState)
SHOWINTERFACE(pIMediaControl,RenderFile)
SHOWINTERFACE(pIMediaControl,AddSourceFilter)
SHOWINTERFACE(pIMediaControl,get_FilterCollection)
SHOWINTERFACE(pIMediaControl,get_RegFilterCollection)
SHOWINTERFACE(pIMediaControl,StopWhenReady)
IMediaEvent *pIMediaEvent;
hr = pIGraphBuilder->lpVtbl->QueryInterface(pIGraphBuilder, IID_IMediaEvent, (void **)&pIMediaEvent);
temp.Format("%8.8X pIMediaEvent->lpVtbl/n", pIMediaEvent->lpVtbl);
Info+=temp;
SHOWINTERFACE(pIMediaEvent,QueryInterface)
SHOWINTERFACE(pIMediaEvent,AddRef)
SHOWINTERFACE(pIMediaEvent,Release)
SHOWINTERFACE(pIMediaEvent,GetTypeInfoCount)
SHOWINTERFACE(pIMediaEvent,GetTypeInfo)
SHOWINTERFACE(pIMediaEvent,GetIDsOfNames)
SHOWINTERFACE(pIMediaEvent,Invoke)
SHOWINTERFACE(pIMediaEvent,GetEventHandle)
SHOWINTERFACE(pIMediaEvent,GetEvent)
SHOWINTERFACE(pIMediaEvent,WaitForCompletion)
SHOWINTERFACE(pIMediaEvent,CancelDefaultHandling)
SHOWINTERFACE(pIMediaEvent,RestoreDefaultHandling)
SHOWINTERFACE(pIMediaEvent,FreeEventParams)
IVideoWindow* pIVideoWindow;
hr = pIGraphBuilder->lpVtbl->QueryInterface(pIGraphBuilder, IID_IVideoWindow, (void **)&pIVideoWindow);
temp.Format("%8.8X pIVideoWindow->lpVtbl/n", pIVideoWindow->lpVtbl);
Info+=temp;
SHOWINTERFACE(pIVideoWindow,put_Caption)
SHOWINTERFACE(pIVideoWindow,get_Caption)
SHOWINTERFACE(pIVideoWindow,put_WindowStyle)
SHOWINTERFACE(pIVideoWindow,get_WindowStyle)
SHOWINTERFACE(pIVideoWindow,put_WindowStyleEx)
SHOWINTERFACE(pIVideoWindow,get_WindowStyleEx)
SHOWINTERFACE(pIVideoWindow,put_AutoShow)
SHOWINTERFACE(pIVideoWindow,get_AutoShow)
SHOWINTERFACE(pIVideoWindow,put_WindowState)
SHOWINTERFACE(pIVideoWindow,get_WindowState)
SHOWINTERFACE(pIVideoWindow,put_BackgroundPalette)
SHOWINTERFACE(pIVideoWindow,get_BackgroundPalette)
SHOWINTERFACE(pIVideoWindow,put_Visible)
SHOWINTERFACE(pIVideoWindow,get_Visible)
SHOWINTERFACE(pIVideoWindow,put_Left)
SHOWINTERFACE(pIVideoWindow,get_Left)
SHOWINTERFACE(pIVideoWindow,put_Width)
SHOWINTERFACE(pIVideoWindow,get_Width)
SHOWINTERFACE(pIVideoWindow,put_Top)
SHOWINTERFACE(pIVideoWindow,get_Top)
SHOWINTERFACE(pIVideoWindow,put_Height)
SHOWINTERFACE(pIVideoWindow,get_Height)
SHOWINTERFACE(pIVideoWindow,put_Owner)
SHOWINTERFACE(pIVideoWindow,get_Owner)
SHOWINTERFACE(pIVideoWindow,put_MessageDrain)
SHOWINTERFACE(pIVideoWindow,get_MessageDrain)
SHOWINTERFACE(pIVideoWindow,get_BorderColor)
SHOWINTERFACE(pIVideoWindow,put_BorderColor)
SHOWINTERFACE(pIVideoWindow,get_FullScreenMode)
SHOWINTERFACE(pIVideoWindow,put_FullScreenMode)
SHOWINTERFACE(pIVideoWindow,SetWindowForeground)
SHOWINTERFACE(pIVideoWindow,NotifyOwnerMessage)
SHOWINTERFACE(pIVideoWindow,SetWindowPosition)
SHOWINTERFACE(pIVideoWindow,GetWindowPosition)
SHOWINTERFACE(pIVideoWindow,GetMinIdealImageSize)
SHOWINTERFACE(pIVideoWindow,GetMaxIdealImageSize)
SHOWINTERFACE(pIVideoWindow,GetRestorePosition)
SHOWINTERFACE(pIVideoWindow,HideCursor)
SHOWINTERFACE(pIVideoWindow,IsCursorHidden)
MessageBox(Info);
CFile fp("C://ComInterface.txt", CFile::modeCreate | CFile::modeWrite);
fp.Write(Info.GetBuffer(0), Info.GetLength());
fp.Close();
pIMediaControl->lpVtbl->Release(pIMediaControl);
pIMediaEvent->lpVtbl->Release(pIMediaEvent);
pIVideoWindow->lpVtbl->Release(pIVideoWindow);
pIGraphBuilder->lpVtbl->Release(pIGraphBuilder);
CoUninitialize();
}