7,655
社区成员
发帖
与我相关
我的任务
分享
SHCAMERACAPTURE shcc;
ZeroMemory(&shcc, sizeof(shcc));
shcc.cbSize = sizeof(shcc);
shcc.hwndOwner = NULL;
shcc.pszInitialDir = _T("\\Program Files\\TestQR\\");
shcc.pszDefaultFileName = _T("3.bmp");
shcc.pszTitle = _T("Take");
shcc.StillQuality = CAMERACAPTURE_STILLQUALITY_DEFAULT;
shcc.VideoTypes = CAMERACAPTURE_VIDEOTYPE_ALL;
shcc.nResolutionWidth = 0;
shcc.nResolutionHeight = 0;
shcc.nVideoTimeLimit = 0;
shcc.Mode = CAMERACAPTURE_MODE_STILL;
HRESULT hReturn = SHCameraCapture(&shcc);
if(hReturn==S_OK)
{
MessageBox(_T("\r\nTest:ok"), _T("test window"), MB_YESNO);
}else{
MessageBox(_T("\r\nTest:error"), _T("test window"), MB_YESNO);
}