PDA

View Full Version : IDVEnc problem continues



e109350
February 4, 2004, 14:30:59
Hello,
I think my problem is related with more basic concepts. I have only following two lines in my application. I did not do anything else to use the put_IFormatResolution(...) method.

IDVEnc *mypointer;
mypointer->put_IFormatResolution(...);

No compilation error. But when I run the application, the program terminates itself at the second line. When I run the debugger, i get the warning dialog box at the second line saying "Unhandle exception in myApplication.exe 0xC000000005: Access Violation". I think the problem is that mypointer should be initialized. I tried "IDVEnc *mypointer=NULL;" and "IDVEnc *mypointer=0;" but nothing has changed. Could you help me? Thank you in advance.

Stefan Geissler
February 5, 2004, 10:17:21
Hello,

I think you have a common DirectX programming problem. You will find some more informations here: http://www.codeguru.com/directx/index.shtml

Yout code


IDVEnc *mypointer;
mypointer->put_IFormatResolution(...);

uses an uninitialized pointer mypointer. Theres is no contents in. You need something like "QueryInterface" on your filtergraph to query a pointer to the DV Encoder. Please refer to the DirectX SDK docu, the learn how to create a filter graph, insert filters like the DV encoder in it and query its interfaces.