SHCameraCapture always E_OUTOFMEMORY
Tony Otto
tony at dyndez.com
Tue Dec 18 08:07:54 CET 2007
I'm trying to use SHCameraCapture to grab still images. On a Symbol
(Motorola) MC35, I always get OutOfMemory when I call SHCameraCapture
from my QMainWindow-based application.
The CECapture sample works. Even after it fails, I check
GlobalMemoryStatus() and it shows dwAvailPhys of more than 17MB. I
modified my parameters in SHCAMERACAPTURE to mimic the initial
conditions in CECamera (commented lines below). Any ideas of where I
can look?
Using:
MS Visual Studio 2005 + SP1
Qt/WinCE 4.4.0 siesta
MS Mobile 6 Smartphone SDK
Code snippet:
HRESULT hResult;
SHCAMERACAPTURE shcc;
ZeroMemory(&shcc, sizeof(shcc));
shcc.cbSize = sizeof(shcc);
shcc.hwndOwner = this->winId();
// shcc.pszInitialDir = filePath.utf16();
// shcc.pszDefaultFileName = fileName.utf16();
// shcc.pszTitle = dlgTitle.utf16();
// shcc.StillQuality = (CAMERACAPTURE_STILLQUALITY)config-
>captureQuality;
shcc.VideoTypes = CAMERACAPTURE_VIDEOTYPE_ALL;
// shcc.nResolutionHeight = config->captureSize.height();
// shcc.nResolutionWidth = config->captureSize.width();
// shcc.nVideoTimeLimit = 1;
shcc.Mode = CAMERACAPTURE_MODE_STILL;
hResult = SHCameraCapture(&shcc);
if (S_OK == hResult)
{
More information about the Qtce-preview-feedback
mailing list