Click to See Complete Forum and Search --> : AVI / VFW - Unable to use debugger ?!


cnstrnd
June 16th, 2004, 12:46 PM
Running the app I code with VC debugger, the video for windows API pops me this dialog box when I execute the AVIStreamGetFrameOpen function :

Protection Error

Debugger detected - please close it down and restart.

Windows NT users : Please note that having the
WinIce/SoftIce service installed means that you are
running a debugger !

[OK]

I don't have SoftIce installed and YES I use a debugger ! I don't get it, why on earth shouln't this particular function be debugged ??? How can I get rid of this protection ?

Thanks

HRESULT LoadAvi( const char* filename )
{
HRESULT hr;
BITMAPINFOHEADER bih;
PAVISTREAM pStream;
PGETFRAME pFrame;
void* ptr;

// Open first video stream in file

hr = AVIStreamOpenFromFile( &pStream, filename, streamtypeVIDEO, 0, OF_SHARE_DENY_WRITE, NULL );
if( hr != S_OK )
{
return hr;
}

// Prepare to grab samples

ZeroMemory( &bih, sizeof(BITMAPINFOHEADER) );
bih.biSize = sizeof(BITMAPINFOHEADER);
bih.biWidth = 320;
bih.biHeight = 240;
bih.biPlanes = 1;
bih.biBitCount = 24;
bih.biCompression = BI_RGB;

pFrame = AVIStreamGetFrameOpen( pStream, &bih );
if( pFrame == NULL )
{
AVIStreamRelease( pStream );
return S_FALSE;
}

// Load samples

ptr = AVIStreamGetFrame( pFrame, 100 );

// Cleanup

AVIStreamGetFrameClose( pFrame );
AVIStreamRelease( pStream );

return S_OK;
}

jrsosa
December 16th, 2004, 01:29 AM
Hello
It happens that I have the same problem, did you find
the solution?

any hints highly appreciated
Jonathan

jrsosa
December 16th, 2004, 01:38 AM
Just to let you know I found the solution.

The origin of the problem was Nero, by uninstalling it the problem
went away.

cnstrnd
December 20th, 2004, 02:27 PM
Mine was DivX blitter which got higher priority than microsoft ones ... Commercial codec manufacturers don't want us to step in their code I suppose.

NoHero
December 20th, 2004, 02:30 PM
Mine was DivX blitter which got higher priority than microsoft ones ... Commercial codec manufacturers don't want us to step in their code I suppose.

That's very likely, because a debugger is able to read the code and the data segment of a running module. So they just want to protect their hard peace of work from being spied by a debugger.