flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
ctl3d32
Well, it works for me. It creates a window and shows what seems to be the very first frame of the .avi file and than this window close. All heappens very fast. It does not play the file. Below is the proof. The active window is fading out.
P.S.: I can only see the very first frame of the .avi when i'm in ollydbg, since the .exe runs slower. Outside olly, it closes before showing the first frame. It is too fast. My OS: win7 pro x64 ![]() |
|||
![]() |
|
dancho
@ctl3d32
thx for trying, well I put extra effort and installed clean xp in virtualbox, avi playing fine in media player but not in program nor in Olly2... This is original code from PSDK if anyone interested : Code: #include <dshow.h> void main(void) { IGraphBuilder *pGraph = NULL; IMediaControl *pControl = NULL; IMediaEvent *pEvent = NULL; // Initialize the COM library. HRESULT hr = CoInitialize(NULL); if (FAILED(hr)) { printf("ERROR - Could not initialize COM library"); return; } // Create the filter graph manager and query for interfaces. hr = CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, IID_IGraphBuilder, (void **)&pGraph); if (FAILED(hr)) { printf("ERROR - Could not create the Filter Graph Manager."); return; } hr = pGraph->QueryInterface(IID_IMediaControl, (void **)&pControl); hr = pGraph->QueryInterface(IID_IMediaEvent, (void **)&pEvent); // Build the graph. IMPORTANT: Change this string to a file on your system. hr = pGraph->RenderFile(L"C:\\Example.avi", NULL); if (SUCCEEDED(hr)) { // Run the graph. hr = pControl->Run(); if (SUCCEEDED(hr)) { // Wait for completion. long evCode; pEvent->WaitForCompletion(INFINITE, &evCode); // Note: Do not use INFINITE in a real application, because it // can block indefinitely. } } pControl->Release(); pEvent->Release(); pGraph->Release(); CoUninitialize(); } thx... |
|||
![]() |
|
SFeLi
The order of methods in at least IMediaEvent is wrong. Probably you should check other interfaces too.
|
|||
![]() |
|
dancho
@SFeLi
yup,true...thx for notice... this is valid IMediaControl and IMediaEvent interface : Code: interface IMediaControl,\ QueryInterface,\ AddRef,\ Release,\ GetTypeInfoCount,\ GetTypeInfo,\ GetIDsOfNames,\ Invoke,\ Run,\ Pause,\ Stop,\ GetState,\ RenderFile,\ AddSourceFilter,\ get_FilterCollection,\ get_RegFilterCollection,\ StopWhenReady interface IMediaEvent,\ QueryInterface,\ AddRef,\ Release,\ GetTypeInfoCount,\ GetTypeInfo,\ GetIDsOfNames,\ Invoke,\ GetEventHandle,\ GetEvent,\ WaitForCompletion,\ CancelDefaultHandling,\ RestoreDefaultHandling,\ FreeEventParams but the problem still remains... thx... |
|||
![]() |
|
dancho
so after reinstalling directx_Jun2010_redist package program is still crashing but
![]() but still stalling at : cominvk pGraphBuilder,RenderFile,buff,NULL ; when debugged step by step... any suggestion for trying something else is appreciated... |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.