Unregistered
August 6, 2002, 11:05:32
Hello
I'm using the 1.3 version.
I tried to use the DShowLib::Grabber::tVidFmtListPtr but I get an error in the destructor, and gets the following error in the debug window :
HEAP[dig.exe]: Invalid Address specified to RtlValidateHeap( 1130000, 337bc8 )
This is the code I'm using:
BOOL CConacs_digDlg::OnInitDialog()
{
CDialog::OnInitDialog();
.
.
.
//Frame grabber software Init
DShowLib::InitLibrary( 0 );
// use this call if you have a license key:
// DShowLib::InitLibrary( "INSERT LICENSE KEY HERE" );
if( !DShowLib::InitLibrary( 0 ) )
{
MessageBox("The library could not be initialized (invalid license key?).");
exit( 1 );
}
grabber=new DShowLib::Grabber();
if (!grabber->openDev("Sony 1394 Camera"))
{
MessageBox("Error open camera device");
exit(1);
}
DShowLib::Grabber::tVidFmtListPtr pVidFmtList ;
CString text="RGB8 (1280x960)";
pVidFmtList = grabber->getAvailableVideoFormats();
if ( pVidFmtList!=0 )
{
DShowLib::Grabber::tVidFmtListPtr::value_type::ite rator itfmt =
std::find( pVidFmtList->begin(), pVidFmtList->end(), text );
if ( !(itfmt==pVidFmtList->end()) ) grabber->setVideoFormat( *itfmt );
}
return TRUE; // return TRUE unless you set the focus to a control
} // End of OnInitDialog()
This message was originally posted by Hagai Karp in the old IC Imaging Control Support Forum.
I'm using the 1.3 version.
I tried to use the DShowLib::Grabber::tVidFmtListPtr but I get an error in the destructor, and gets the following error in the debug window :
HEAP[dig.exe]: Invalid Address specified to RtlValidateHeap( 1130000, 337bc8 )
This is the code I'm using:
BOOL CConacs_digDlg::OnInitDialog()
{
CDialog::OnInitDialog();
.
.
.
//Frame grabber software Init
DShowLib::InitLibrary( 0 );
// use this call if you have a license key:
// DShowLib::InitLibrary( "INSERT LICENSE KEY HERE" );
if( !DShowLib::InitLibrary( 0 ) )
{
MessageBox("The library could not be initialized (invalid license key?).");
exit( 1 );
}
grabber=new DShowLib::Grabber();
if (!grabber->openDev("Sony 1394 Camera"))
{
MessageBox("Error open camera device");
exit(1);
}
DShowLib::Grabber::tVidFmtListPtr pVidFmtList ;
CString text="RGB8 (1280x960)";
pVidFmtList = grabber->getAvailableVideoFormats();
if ( pVidFmtList!=0 )
{
DShowLib::Grabber::tVidFmtListPtr::value_type::ite rator itfmt =
std::find( pVidFmtList->begin(), pVidFmtList->end(), text );
if ( !(itfmt==pVidFmtList->end()) ) grabber->setVideoFormat( *itfmt );
}
return TRUE; // return TRUE unless you set the focus to a control
} // End of OnInitDialog()
This message was originally posted by Hagai Karp in the old IC Imaging Control Support Forum.