visual c++ - While creating private pool WinBioOpenSession() is failing and returning WINBIO_E_CONFIGURATION_FAILURE -
i'm creating bio metric project in visual studio 2008 using mfc application in vc++ i'm getting following difficulties. please help
i'm trying create private pool using winbioopensession() method function returning winbio_e_configuration_failure should do?
bool cprivatepoolbiodlg::enrollfingerprint() { winbio_unit_schema *unitschemaarray = null; size_t unitschemacount = 0; winbio_unit_id unitidarray[1]={}; size_t unitidcount = arraysize(unitidarray); winbio_session_handle sessionhandle; hresult hr; // = s_ok; //enumarating devices... hr = winbioenumbiometricunits(winbio_type_fingerprint,&unitschemaarray,&unitschemacount); if(failed(hr)) { cstring m; m.format(_t("unable enumarate device 0x%08x"),hr); afxmessagebox(m); return 0; } //enumaration success... unitidarray[0] = unitschemaarray[0].unitid; //opening session... hr = winbioopensession(winbio_type_fingerprint,winbio_pool_private,winbio_flag_basic, unitidarray,unitidcount,&private_pool_database_id,&sessionhandle); if(failed(hr)) { ///////////////////////here function returning winbio_e_configuration_failure//////////////////// cstring m; m.format(_t("unable start session 0x%08x, %d"),hr, getlasterror()); afxmessagebox(m); return 0; } //session opened... winbioclosesession(sessionhandle); return 1; }
- before opening session should configure guid database registry , configure follow steps on.
- msdn private pool helper function , msdn private pool setup. before opening session call methods oninstall() create configuration , onadd() add sensor private pool privatepoolsetup.cpp.
- you should have following files in project.
- privatepoolcommondefs.h
- privatepoolsetup.cpp
- biohelper.h
- config.cpp
- display.cpp
Comments
Post a Comment