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;
}
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;
}