c++ - Winbio.h No such file or directory error -
i'm experiencing dificulty in compiling tutorial msdn :http://msdn.microsoft.com/en-us/library/windows/desktop/ee207405(v=vs.85).aspx . mentioned in title, i'm getting no such file or directory @ compile time after linking winbio.lib generated using dumpbin , lib commands in vs 2008, , code :
#include <iostream> #include <windows.h> #include <stdio.h> #include <conio.h> #include <winbio.h> hresult capturesample(); int main(int argc, char** argv) { hresult capturesample(); return 0; } hresult capturesample() { hresult hr = s_ok; winbio_session_handle sessionhandle = null; winbio_unit_id unitid = 0; winbio_reject_detail rejectdetail = 0; pwinbio_bir sample = null; size_t samplesize = 0; // connect system pool. hr = winbioopensession( winbio_type_fingerprint, // service provider winbio_pool_system, // pool type winbio_flag_raw, // access: capture raw data null, // array of biometric unit ids 0, // count of biometric unit ids winbio_db_default, // default database &sessionhandle // [out] session handle ); if (failed(hr)) { wprintf_s(l"\n winbioopensession failed. hr = 0x%x\n", hr); goto e_exit; } // capture biometric sample. wprintf_s(l"\n calling winbiocapturesample - swipe sensor...\n"); hr = winbiocapturesample( sessionhandle, winbio_no_purpose_available, winbio_data_flag_raw, &unitid, &sample, &samplesize, &rejectdetail ); if (failed(hr)) { if (hr == winbio_e_bad_capture) { wprintf_s(l"\n bad capture; reason: %d\n", rejectdetail); } else { wprintf_s(l"\n winbiocapturesample failed. hr = 0x%x\n", hr); } goto e_exit; } wprintf_s(l"\n swipe processed - unit id: %d\n", unitid); wprintf_s(l"\n captured %d bytes.\n", samplesize); e_exit: if (sample != null) { winbiofree(sample); sample = null; } if (sessionhandle != null) { winbioclosesession(sessionhandle); sessionhandle = null; } wprintf_s(l"\n press key exit..."); _getch(); return hr; }
using dumpbin , lib commands in vs 2008
surely using old version of windows sdk. vs2008 shipped version 6.0. api became available windows 7, released in 2009. you'll need update sdk, recommend version 7.1
Comments
Post a Comment