May 17th, 2013, 11:58 AM
Help request: QuickTime ActiveX Control Heap Corruption the second time I open a dial
I need to write a piece of code that opens a QuickTime VR image into an MFC Dialog.
I drew a Dialog and put an "Apple QuickTime Control 2.0" into it.
Then I created a Control variable in my Dialog class, called QtControl.
In the OnInitDialog I set the file to open, calling the put_FileName of the control.
I tested it by:
- opening a dialog --> worked
- closing it --> worked
- opening again --> crashed. The error was:
"Windows has triggered a breakpoint in TestOcx.exe.
This may be due to a corruption of the heap, which indicates a bug in TestOcx.exe or any of the DLLs it has loaded.
This may also be due to the user pressing F12 while TestOcx.exe has focus.
The output window may have more diagnostic information."
I tried many things and googled a lot, but the only way that I found to avoid this crash was hardcoding a valid URL in the QtControl resources at compile time.
In other words, if I write a valid absolute path to a .mov into the URL property of the QtControl from Visual Studio and compile it, then it works.
Obviously, I can't do this because the absolute Path is valid only on my PC.
What I'm asking you is:
- suggestion to solve this, or
- any website where I can read or,
- at worst, another implementation that is not based on the activeX and takes me 2 days of coding
You may want to download a test application with the problem at this link
Feel free to ask me any other detail, and any hint would be appreciated.
Thanks in advance,
Tags for this Thread
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!