How to Display the Property Pages of a Camera
Posted by Stefan Geißler on October 2, 2007
Users of IC Imaging Control Professional often inquire how to show the property dialog box that ships with the driver of their video capture device. Typically, this dialog box allows access to certain special properties that are not accessible through IC Imaging Control. The IC Imaging Control Grabber object exports an IUnknown COM pointer that can be used to access the driver's dialog box.
The following C++ code shows the driver's dialog box.
smart_com<IUnknown> pksps = 0; m_cGrabber.getDev().getInternalInterface( pksps ); if( pksps != NULL ) { HRESULT hr; smart_com<ISpecifyPropertyPages> pSpec; hr = pksps->QueryInterface(IID_ISpecifyPropertyPages, (void **)&pSpec.get()); if (hr == S_OK) { CAUUID cauuid; hr = pSpec->GetPages(&cauuid); if( SUCCEEDED( hr ) && cauuid.cElems > 0 && cauuid.pElems != 0 ) { hr = OleCreatePropertyFrame( this->m_hWnd, 30, 30, 0, 1, &pksps.getImpl(), cauuid.cElems, (GUID *)cauuid.pElems, 0, 0, 0); CoTaskMemFree(cauuid.pElems); } } }
Tagged with C++property pagedriverprofessional.


