I'm currently writing a program in WDM18 for a Windows CE 6.0 device.
I ran into some problems using the built in WDM camera control, so I
have to use the API's provided on the device to take pictures.
I can successfully call the necessary API's using the API Description
variable type without any problems.
However I'm a little confused on how to access one of the provided APIs
to set the path for the image it saves.
Here is the API as described in the device documentation:
SetStillCaptureState:
Purpose: Sets how to take pictures.
Syntax: DWORD SetStillCaptureState (PICSTATE *picInfo);
Parameters: picInfo
[in] Pointer to structure PICSTATE where the
settings are stored.
Return Value: If successful, it returns 0. Otherwise it returns a
non-zero value to indicate a specific error:
The PICSTATE structure is described as follows:
typedef struct
{
INT AutoExposure;
INT AutoWhiteBalance;
INT ImageFormat;
WCHAR lpPathName[500];
INT PathSize;
WCHAR lpFileName[500];
INT FileSize;
} PICSTATE, *PPICSTATE;
I'm unsure how to access this in WinDev Mobile. Any suggestions would be
greatly appreciated.
As a reference, here is one of the other functions I am able to call
successfully.
StartStillCapture:
Purpose: Starts taking pictures.
Syntax: DWORD StartStillCapture (INT playSound);
Parameters: playSound
[in] Integer variable
0 = No sound
1 = Sound to notice of a picture taken.
Return Value: If successful, it returns 0. Otherwise, it returns a
non-zero value to indicate a specific error.
And the code I use to call StartStillCapture:
CapturePic is API Description
CapturePic..DLLName = "SystemCE"
CapturePic..FunctionName = "StartStillCapture"
CapturePic..ReturnType = apiSystemInt
CapturePic..Parameter[1]..Type = apiSystemInt
ResCapturePic is int
PlaySound is bool
PlaySound = True
CapturePic(PlaySound)
I can also provide the PDF documentation for the unit if it would help.
Many thanks for any assistance.