本文整理汇总了C++中PDBGKM_SERVICE_TABLE::pfnSetConnectNotifier方法的典型用法代码示例。如果您正苦于以下问题:C++ PDBGKM_SERVICE_TABLE::pfnSetConnectNotifier方法的具体用法?C++ PDBGKM_SERVICE_TABLE::pfnSetConnectNotifier怎么用?C++ PDBGKM_SERVICE_TABLE::pfnSetConnectNotifier使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PDBGKM_SERVICE_TABLE
的用法示例。
在下文中一共展示了PDBGKM_SERVICE_TABLE::pfnSetConnectNotifier方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PDumpInit
/**************************************************************************
* Function Name : PDumpInit
* Outputs : None
* Returns :
* Description : Reset connection to vldbgdrv
* Then try to connect to PDUMP streams
**************************************************************************/
IMG_VOID PDumpInit(IMG_VOID)
{
IMG_UINT32 i;
DBGKM_CONNECT_NOTIFIER sConnectNotifier;
/* If we tried this earlier, then we might have connected to the driver
* But if pdump.exe was running then the stream connected would fail
*/
if (!gpfnDbgDrv)
{
DBGDrvGetServiceTable(&gpfnDbgDrv);
// If something failed then no point in trying to connect streams
if (gpfnDbgDrv == IMG_NULL)
{
return;
}
/*
* Pass the connection notify callback
*/
sConnectNotifier.pfnConnectNotifier = &PDumpConnectionNotify;
gpfnDbgDrv->pfnSetConnectNotifier(sConnectNotifier);
if(!gsDBGPdumpState.pszFile)
{
if(OSAllocMem(PVRSRV_OS_PAGEABLE_HEAP, SZ_FILENAME_SIZE_MAX, (IMG_PVOID *)&gsDBGPdumpState.pszFile, 0,
"Filename string") != PVRSRV_OK)
{
goto init_failed;
}
}
if(!gsDBGPdumpState.pszMsg)
{
if(OSAllocMem(PVRSRV_OS_PAGEABLE_HEAP, SZ_MSG_SIZE_MAX, (IMG_PVOID *)&gsDBGPdumpState.pszMsg, 0,
"Message string") != PVRSRV_OK)
{
goto init_failed;
}
}
if(!gsDBGPdumpState.pszScript)
{
if(OSAllocMem(PVRSRV_OS_PAGEABLE_HEAP, SZ_SCRIPT_SIZE_MAX, (IMG_PVOID *)&gsDBGPdumpState.pszScript, 0,
"Script string") != PVRSRV_OK)
{
goto init_failed;
}
}
for(i=0; i < PDUMP_NUM_STREAMS; i++)
{
gsDBGPdumpState.psStream[i] = gpfnDbgDrv->pfnCreateStream(pszStreamName[i],
DEBUG_CAPMODE_FRAMED,
DEBUG_OUTMODE_STREAMENABLE,
0,
10);
gpfnDbgDrv->pfnSetCaptureMode(gsDBGPdumpState.psStream[i],DEBUG_CAPMODE_FRAMED,0xFFFFFFFF, 0xFFFFFFFF, 1);
gpfnDbgDrv->pfnSetFrame(gsDBGPdumpState.psStream[i],0);
}
PDUMPCOMMENT("Driver Product Name: %s", VS_PRODUCT_NAME);
PDUMPCOMMENT("Driver Product Version: %s (%s)", PVRVERSION_STRING, PVRVERSION_FAMILY);
PDUMPCOMMENT("Start of Init Phase");
}
return;
init_failed:
if(gsDBGPdumpState.pszFile)
{
OSFreeMem(PVRSRV_OS_PAGEABLE_HEAP, SZ_FILENAME_SIZE_MAX, (IMG_PVOID) gsDBGPdumpState.pszFile, 0);
gsDBGPdumpState.pszFile = IMG_NULL;
}
if(gsDBGPdumpState.pszScript)
{
OSFreeMem(PVRSRV_OS_PAGEABLE_HEAP, SZ_SCRIPT_SIZE_MAX, (IMG_PVOID) gsDBGPdumpState.pszScript, 0);
gsDBGPdumpState.pszScript = IMG_NULL;
}
if(gsDBGPdumpState.pszMsg)
{
OSFreeMem(PVRSRV_OS_PAGEABLE_HEAP, SZ_MSG_SIZE_MAX, (IMG_PVOID) gsDBGPdumpState.pszMsg, 0);
gsDBGPdumpState.pszMsg = IMG_NULL;
}
/*
* Remove the connection notify callback
//.........这里部分代码省略.........