A MFC dialog based App calls a Batch script. This batch script again calls a SSH tool to login to a remote PC. This is to enable FTP service on WinNT remote PC. This is done multiple times in my MFC app.
SSH login take approximately 30 seconds and somehow I can not make the control waut there until the SSL login goes thru.
I have used the following code to run the Sample BAT file:
At one point in time, batch files were processed one line at a time, with an open and close each time. So technically, the batch file did complete, but there was no distinction between the first line completing vs. the whole thing being complete. One other thing to try is CreateProcess() instead of ShellExecuteEx().
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
I have created a Directshow filter for video playback. It runs fine in GraphEdit or by double clicking the video file but when I select the thumbnail view for the video file in explorer, explorer crashes giving the ASSERT error
Executable: explorer.exe Pid 328 Tid fc8. Module myFilter.ax, 5 objects left active! At line 317 of C:\DXSDK\Samples\C++\DirectShow\BaseClasses\dllentry.cpp
Continue? (Cancel to debug)
explorer.exe Pid 328 Tid fc8. Module myFilter.ax, 5 objects left active! At line 317 of
It occurs if you acquired any interface and not releasing it, when the filter is about to destruct. The interface acquired in your filter may be other filters which might acquired other interfaces and your assert message shows 5 interfaces not released.
I think you must be able to get this error in graphedit also, stress test for different scenarios, like pause the graph and close the graphedit, insert and remove filters, close graphedit while running graph. The thumbnail might be in different state which you never tried in graphedit.
log the reference count of the interfaces while you acquire and release and check whether it matches. for all your pins and filters override the
"STDMETHODIMP_(ULONG) NonDelegatingRelease();" so that you can log easily.
Have a look at CreateDIBSection documentation [^]. It states the 5th parameter (a pointer to a pointer) is an [out] one. It means you have to pass the address of a pointer and, on return, that pointer will contain the address of the allocated DIB section buffer, then you have to change the bit values of such buffer, according to disp_frame values, before selecting it into device context.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
This was the piece of code which was posted previously. But the CreateDIBSection code
CreateDIBSection(MemDC,bm,DIB_RGB_COLORS,disp_frame,NULL,0); was having MemDC is a CDC type. But actually it should be HDC type. So I have rewritten the code as
But CreateDIBSection is creating exception. What could be the reason. Basically I could not get the difference between CDC and HDC. Could anyone give a clear solution to my problem. I am actually trying to display a grayscale image which exists as R=G=B values in memory.
Last Visit: 31-Dec-99 19:00 Last Update: 19-Jan-22 23:14