To all
I Am linking Camera Source With Fwpp Not Any Error .
But He is Not Shooting Any Picture
please From all Testing This code And View Problem In Shooting Picture
------ This is Full Source "hathal.prg" ------
#include "FWCE.ch"
//----------------------------------------------------------------------------//
function Main()
local oWnd
DEFINE WINDOW oWnd TITLE "TEST Cam "
@5, 10 BUTTON "TEST 1" SIZE 80, 25 ACTION;
CAM_CE(Ownd)
ACTIVATE WINDOW oWnd
return nil
********************************************************
#pragma BEGINDUMP
#include "hbapi.h"
#define UNDER_CE
#include "windows.h"
//////////////////////////////////////////////////////////////////////////////
//
// Flags for camera capture UI
typedef enum {
CAMERACAPTURE_MODE_STILL = 0,
CAMERACAPTURE_MODE_VIDEOONLY,
CAMERACAPTURE_MODE_VIDEOWITHAUDIO,
} CAMERACAPTURE_MODE;
typedef enum {
CAMERACAPTURE_STILLQUALITY_DEFAULT = 0,
CAMERACAPTURE_STILLQUALITY_LOW,
CAMERACAPTURE_STILLQUALITY_NORMAL,
CAMERACAPTURE_STILLQUALITY_HIGH,
} CAMERACAPTURE_STILLQUALITY;
typedef enum {
CAMERACAPTURE_VIDEOTYPE_ALL = 0xFFFF,
CAMERACAPTURE_VIDEOTYPE_STANDARD = 1,
CAMERACAPTURE_VIDEOTYPE_MESSAGING = 2,
} CAMERACAPTURE_VIDEOTYPES;
typedef struct tagSHCAMERACAPTURE
{
DWORD cbSize;
HWND hwndOwner;
TCHAR szFile[MAX_PATH];
LPCTSTR pszInitialDir;
LPCTSTR pszDefaultFileName;
LPCTSTR pszTitle;
CAMERACAPTURE_STILLQUALITY StillQuality;
CAMERACAPTURE_VIDEOTYPES VideoTypes;
DWORD nResolutionWidth;
DWORD nResolutionHeight;
DWORD nVideoTimeLimit;
CAMERACAPTURE_MODE Mode;
}SHCAMERACAPTURE, *PSHCAMERACAPTURE;
//
// end of flags for camera capture UI
//
//////////////////////////////////////////////////////////////////////////////
LPWSTR AnsiToWide( LPSTR );
typedef DWORD ( FAR PASCAL * _XSHCameraCapture ) ( PSHCAMERACAPTURE );
static far _XSHCameraCapture XSHCameraCapture = 0;
HB_FUNC( CAM_CE )
{
SHCAMERACAPTURE shcc;
HRESULT hResult;
LPWSTR CE_LIB = AnsiToWide( "AYGSHELL.DLL" );
LPWSTR CE_FUNC = AnsiToWide( "SHCameraCapture" );
HINSTANCE hDLL = LoadLibrary( CE_LIB );
// Set the SHCAMERACAPTURE structure.
ZeroMemory(&shcc, sizeof(shcc));
shcc.cbSize = sizeof(shcc);
// shcc.hwndOwner = hwndOwner;
shcc.hwndOwner = ( HWND ) hb_parnl( 1 );
shcc.pszInitialDir = TEXT("\\My Documents");
shcc.pszDefaultFileName = TEXT("test.3gp");
shcc.pszTitle = TEXT("Camera Demo");
shcc.VideoTypes = CAMERACAPTURE_VIDEOTYPE_MESSAGING;
shcc.nResolutionWidth = 176;
shcc.nResolutionHeight = 144;
shcc.nVideoTimeLimit = 15;
shcc.Mode = CAMERACAPTURE_MODE_VIDEOWITHAUDIO;
XSHCameraCapture = ( _XSHCameraCapture ) GetProcAddress( hDLL,CE_FUNC );
hResult = XSHCameraCapture(&shcc);
// StringCchCopy(pszFilename, MAX_PATH, shcc.szFile);
// StringCchCopy(AnsiToWide(hb_parc( 2 )), MAX_PATH, shcc.szFile);
hb_xfree( CE_LIB );
hb_xfree( CE_FUNC );
FreeLibrary( hDLL );
}
#pragma ENDDUMP
-----------------------------------------
regards,
hathal