PDD_Init (Windows Embedded CE 6.0)
1/6/2010
The PDD_Init function is called when the driver is first loaded.
In this function, you should initialize the general capabilities of the driver, such as the number of sensor modes, the formats supported by each mode, and device power management.
Syntax
PVOID PDD_Init(
PVOID MDDContext,
PPDDFUNCTBL pPDDFuncTbl
);
Parameters
MDDContext
[in], [out]MDDContext is what the MDD layer receives in its XXX_Init call.
pPDDFuncTbl
[in], [out]Your code should populate the table pointed to by pPDDFuncTbl with a list of entry points that the PDD layer implements.
The above structure is defined in %_WINCERROOT%\ public\COMMON\oak\drivers\Capture\camera\layered\inc\dstruct.h
typedef struct __PDD_FuncTbl { DWORD dwSize; PVOID (*PDD_Init)( PVOID MDDContext, __PDD_FuncTbl * pPDDFuncTbl ); DWORD (*PDD_DeInit)( LPVOID PDDContext ); DWORD (*PDD_GetAdapterInfo)( LPVOID PDDContext, PADAPTERINFO pAdapterInfo ); DWORD (*PDD_HandleVidProcAmpChanges)( LPVOID PDDContext, DWORD dwPropId, LONG lFlags, LONG lValue); DWORD (*PDD_HandleCamControlChanges)( LPVOID PDDContext, DWORD dwPropId, LONG lFlags, LONG lValue ); DWORD (*PDD_HandleVideoControlCapsChanges)( LPVOID PDDContext, LONG lModeType ,ULONG ulCaps ); DWORD (*PDD_SetPowerState)( LPVOID PDDContext, CEDEVICE_POWER_STATE PowerState ); DWORD (*PDD_HandleAdapterCustomProperties)( LPVOID PDDContext, PUCHAR pInBuf, DWORD InBufLen, PUCHAR pOutBuf, DWORD OutBufLen, PDWORD pdwBytesTransferred ); DWORD (*PDD_InitSensorMode)( LPVOID PDDContext, ULONG ulModeType, LPVOID ModeContext ); DWORD (*PDD_DeInitSensorMode)( LPVOID PDDContext, ULONG ulModeType ); DWORD (*PDD_SetSensorState)( LPVOID PDDContext, ULONG ulModeType, CSSTATE CsState ); DWORD (*PDD_TakeStillPicture)( LPVOID PDDContext, LPVOID pBurstModeInfo ); DWORD (*PDD_GetSensorModeInfo)( LPVOID PDDContext, ULONG ulModeType, PSENSORMODEINFO pSensorModeInfo ); DWORD (*PDD_SetSensorModeFormat)( LPVOID PDDContext, ULONG ulModeType, PCS_DATARANGE_VIDEO pCsDataRangeVideo ); PVOID (*PDD_AllocateBuffer)( LPVOID PDDContext, ULONG ulModeType ); DWORD (*PDD_DeAllocateBuffer)( LPVOID PDDContext, ULONG ulModeType, PVOID pBuffer ); DWORD (*PDD_RegisterClientBuffer)( LPVOID PDDContext, ULONG ulModeType, PVOID pBuffer ); DWORD (*PDD_UnRegisterClientBuffer)( LPVOID PDDContext, ULONG ulModeType, PVOID pBuffer ); DWORD (*PDD_FillBuffer)( LPVOID PDDContext, ULONG ulModeType, PUCHAR pImage ); DWORD (*PDD_HandleModeCustomProperties)( LPVOID PDDContext, ULONG ulModeType, PUCHAR pInBuf, DWORD InBufLen, PUCHAR pOutBuf, DWORD OutBufLen, PDWORD pdwBytesTransferred ); } PDDFUNCTBL, *PPDDFUNCTBL;
Return Value
Your PDD layer needs to return a pointer to the context which the MDD layer will later send back to the rest of the PDD layer functions.
Requirements
Header | Developer Implemented |
Library | Developer Implemented |
Windows Embedded CE | Windows Embedded CE 6.0 and later |