[Lazarus] Photos in Windows Mobile

Paul van Helden paul at planetgis.co.za
Sat Nov 16 16:23:23 CET 2013


Hi Ricardo,

Use SHCameraCapture in unit aygshell. You have to get it saved as a file
first by the Windows API. I would have preferred to get a pointer to memory.

uses aygshell;

function CameraCapture(Folder, FileName: WideString; Width, Height:
Integer; Video: Boolean): Boolean;
var
  SI: SIPINFO;
  CC: TSHCAMERACAPTURE;
  R: HRESULT;
begin
  FillChar(CC, SizeOf(CC), 0);
  CC.cbSize:=SizeOf(CC);
  CC.hwndOwner:=MainForm.Handle;
  CC.pszInitialDir:=PWideChar(Folder);
  CC.pszDefaultFileName:=PWideChar(FileName);
  CC.pszTitle:='Camera';
  CC.VideoTypes:=CAMERACAPTURE_VIDEOTYPE_ALL;
  if Video then
    CC.Mode:=CAMERACAPTURE_MODE_VIDEOWITHAUDIO
  else
    CC.Mode:=CAMERACAPTURE_MODE_STILL;
  CC.StillQuality:=CAMERACAPTURE_STILLQUALITY_NORMAL;
  CC.nResolutionWidth:=Width;
  CC.nResolutionHeight:=Height;
  CC.nVideoTimeLimit:=60;
  SetLastError(0);
  R:=SHCameraCapture(CC);
  Result:=R=S_OK;
end;

Regards,

Paul.


On Sat, Nov 16, 2013 at 2:54 PM, "ArĂ­ Ricardo Ody" <aro52 at gmx.com> wrote:

> Hi!
>
> I would like to develop the feature of take pictures from windows mobile
> handelds and save them in SQLite databases. May someone tell me how to
> implement this feature in Lazarus?
>
> Greetings from Sao Paulo - Brazil
>
> Ricardo
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20131116/c6f50b6c/attachment-0003.html>


More information about the Lazarus mailing list