本文整理汇总了C++中RETAILMSG函数的典型用法代码示例。如果您正苦于以下问题:C++ RETAILMSG函数的具体用法?C++ RETAILMSG怎么用?C++ RETAILMSG使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了RETAILMSG函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TrayIconThread
DWORD TrayIconThread(LPVOID pvarg)
{
LPCTSTR szClassName = _T("ZTrayIcon");
WNDCLASS wc;
/*while(!IsAPIReady(SH_SHELL))
{}*/
WaitForAPIReady(SH_SHELL, INFINITE);
if(hTrayIcon == NULL)
{
ZeroMemory(&wc, sizeof(wc));
wc.lpfnWndProc = IconProc;
wc.hInstance = GetModuleHandle(NULL);
wc.lpszClassName = szClassName;
wc.hCursor = NULL;
wc.hbrBackground = NULL;
RegisterClass(&wc);
hTrayIcon = CreateWindow(szClassName, _T(""), WS_POPUP | WS_CLIPCHILDREN, 0, 0, 0, 0, NULL, NULL, wc.hInstance, NULL);
MSG msg;
while(GetMessage(&msg, NULL, 0, 0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
hTrayIcon = NULL;
}
RETAILMSG(1, (TEXT("\n\rExitIconProc -> TrayIconThread\n\r")));
return 0;
}
示例2: CHR
RESULT
LayerManager::Draw()
{
RESULT rval = S_OK;
ResourceListIterator ppLayer;
//
// Render the Layer and any children.
//
// CHR(Renderer.EnableDepthTest ( true ));
CHR(Renderer.EnableDepthTest ( false ));
CHR(Renderer.EnableLighting ( false ));
// CHR(Renderer.EnableAlphaBlend( true ));
CHR(Renderer.EnableAlphaTest ( false )); // Alpha Test on iPhone (3G) is not any faster than Alpha Blend.
CHR(Renderer.EnableTexturing ( true ));
for (ppLayer = m_resourceList.begin(); ppLayer != m_resourceList.end(); ++ppLayer)
{
Layer* pLayer = *ppLayer;
DEBUGCHK(pLayer);
// Only draw root layers in this method.
// They in turn draw their children.
// We can have multiple roots (e.g. the game world and the UI).
if (pLayer->IsRootLayer())
{
CHR(Draw( pLayer, GameCamera.GetViewMatrix() ));
}
}
Exit:
if (FAILED(rval))
{
RETAILMSG(ZONE_ERROR, "ERROR: LayerManager::Draw(): rval = 0x%x", rval);
DEBUGCHK(0);
}
return rval;
}
示例3: PwrCon_get_reset_status
/**
* @fn PwrCon_get_reset_statys(void)
* @note This funciton read the reset status which means what trigger reset the system in the last time
*/
RESET_STATUS PwrCon_get_reset_status(void)
{
RESET_STATUS RstStatus = RST_UNKNOWN;
assert(g_pSysConReg->NORMAL_CFG);
RstStatus = g_pSysConReg->RST_STAT;
switch(RstStatus)
{
case RST_HW_RESET:
RETAILMSG(PWC_ZONE_TEMP, (_T("[PWRCON:INF] %s() : H/W Reset [0x%08x]\n"), _T(__FUNCTION__), g_pSysConReg->RST_STAT));
break;
case RST_WARM_RESET:
RETAILMSG(PWC_ZONE_TEMP, (_T("[PWRCON:INF] %s() : Warm Reset [0x%08x]\n"), _T(__FUNCTION__), g_pSysConReg->RST_STAT));
break;
case RST_WDT_RESET:
RETAILMSG(PWC_ZONE_TEMP, (_T("[PWRCON:INF] %s() : Watch Dog Timer Reset [0x%08x]\n"), _T(__FUNCTION__), g_pSysConReg->RST_STAT));
break;
case RST_SLEEP_WAKEUP:
RETAILMSG(PWC_ZONE_TEMP, (_T("[PWRCON:INF] %s() : Sleep/Wakeup Reset [0x%08x]\n"), _T(__FUNCTION__), g_pSysConReg->RST_STAT));
break;
case RST_ESLEEP_WAKEUP:
RETAILMSG(PWC_ZONE_TEMP, (_T("[PWRCON:INF] %s() : eSleep/Wakeup Reset [0x%08x]\n"), _T(__FUNCTION__), g_pSysConReg->RST_STAT));
break;
case RST_SW_RESET:
RETAILMSG(PWC_ZONE_TEMP, (_T("[PWRCON:INF] %s() : S/W Reset [0x%08x]\n"), _T(__FUNCTION__), g_pSysConReg->RST_STAT));
break;
default:
RETAILMSG(PWC_ZONE_TEMP, (_T("[PWRCON:ERR] %s() : Unknown RST_STAT [0x%08x]\n"), _T(__FUNCTION__), g_pSysConReg->RST_STAT));
break;
}
RETAILMSG(PWC_ZONE_ENTER, (_T("[PWRCON] %s() = %d\n"), _T(__FUNCTION__), RstStatus));
return RstStatus;
}
示例4: RETAILMSG
/**
* @fn DWORD FIMGSE2D::CalculateXYIncrFormat(DWORD uDividend, DWORD uDivisor)
* @brief This function returns x_incr or y_incr vaule in register format
* @input this function accept real pixel coordinate, ex) (0,0)~(9,9) means that 10pixel by pixel image
* @return Result value
*/
DWORD FIMGSE2D::CalculateXYIncrFormat(DWORD uDividend, DWORD uDivisor)
{
int i;
DWORD uQuotient;
DWORD uUnderPoint=0;
if(uDivisor == 0)
{
uDivisor = 1; //< this will prevent data abort. but result is incorrect.
}
uQuotient = (DWORD)(uDividend/uDivisor);
// Quotient should be less than MAX_XCOORD or MAX_YCOORD.
if(uQuotient > MAX_2DHW_XCOORD)
{
RETAILMSG(DISP_ZONE_WARNING, (TEXT("Increment value to stretch can not exceed %d, Value will be set as 1.0\n"), MAX_2DHW_XCOORD));
return ((1<<11) | 0 );
}
uDividend-=(uQuotient*uDivisor);
/// Now under point is calculated.
for (i=0; i<12; i++)
{
uDividend <<= 1;
uUnderPoint <<= 1;
if (uDividend >= uDivisor)
{
uUnderPoint = uUnderPoint | 1;
uDividend -= uDivisor;
}
DEBUGMSG(DISP_ZONE_2D, (TEXT("uDivend:%x(%d), uDivisor:%x(%d), uUnderPoint:%x(%d)\n"), uDividend, uDividend, uDivisor, uDivisor,uUnderPoint, uUnderPoint));
}
uUnderPoint = (uUnderPoint + 1) >> 1;
return ( uUnderPoint|(uQuotient<<11) );
}
示例5: DetectFSCUIReadyThread
static DWORD WINAPI
DetectFSCUIReadyThread(
VOID *pPddContext
)
{
HANDLE hUIReady;
DWORD code;
hUIReady = OpenEvent(EVENT_ALL_ACCESS, FALSE, TEXT("SYSTEM/BackCarUIReady"));
if(NULL == hUIReady)
{
RETAILMSG(TRUE, (TEXT("Open SYSTEM/BackCarUIReady Failed\r\n")));
return -1;
}
code = WaitForSingleObject(hUIReady, INFINITE);
CloseHandle(hUIReady);
return 0;
}
示例6: while
/**
* @fn FIMGSE2D::GetCompensatedOffset(PRECTL prclSrc, PRECTL prclDst, ROT_TYPE m_iRotate)
* @param prclSrc Source Rectangle
* @param prclDst Destination Rectangle
* @param m_iRotate Rotatation Degree. See also ROT_TYPE type
* @note This funciton performs getting offset for stretchblt algorithm compensation
* @sa ROT_TYPE
*
**/
LONG FIMGSE2D::GetCompensatedOffset(DWORD usSrcValue, DWORD usDstValue)
{
/// Calculate X,Y Offset
float fIncrement;
float fStretchRatio;
float fReferPoint = 0.5;
LONG i =0;
fIncrement = (float)usSrcValue / (float)usDstValue;
fStretchRatio = (float)usDstValue / (float)usSrcValue;
do
{
if(fReferPoint > 1) break;
fReferPoint += fIncrement;
i++;
} while(1);
RETAILMSG(DISP_ZONE_2D,(TEXT("\n fIncr : %5.6f, fSR: %5.6f, i : %d, Offset : %d"), fIncrement, fStretchRatio, i, (LONG)(fStretchRatio - i)));
return (fStretchRatio < 1) ? 0 : (LONG)(fStretchRatio - i);
}
示例7: RETAILMSG
int Cat9555::GetCAT9555(int channel,unsigned char port,unsigned char *level)
{
if(channel==0) h= CreateFile(TEXT("CAT1:"), (GENERIC_READ|GENERIC_WRITE), (FILE_SHARE_READ|FILE_SHARE_WRITE), 0, OPEN_EXISTING, 0, 0);
if(channel==1) h= CreateFile(TEXT("CTA1:"), (GENERIC_READ|GENERIC_WRITE), (FILE_SHARE_READ|FILE_SHARE_WRITE), 0, OPEN_EXISTING, 0, 0);
if(channel==2) h= CreateFile(TEXT("ACT1:"), (GENERIC_READ|GENERIC_WRITE), (FILE_SHARE_READ|FILE_SHARE_WRITE), 0, OPEN_EXISTING, 0, 0);
if(h == INVALID_HANDLE_VALUE)
{
RETAILMSG(1, (L"open gpio device failed\r\n"));
exit(-1);
}
if(channel==0) DeviceIoControl(h, IOCTL_CAT9555_READ, &port, sizeof(unsigned char), level, sizeof(unsigned char), NULL, NULL);
if(channel==1) DeviceIoControl(h, IOCTL_CAT95552_READ, &port, sizeof(unsigned char), level, sizeof(unsigned char), NULL, NULL);
if(channel==2) DeviceIoControl(h, IOCTL_CAT95553_READ, &port, sizeof(unsigned char), level, sizeof(unsigned char), NULL, NULL);
CloseHandle(h);
return 1;
}
示例8: RegOpenCreateStr
static BOOL RegOpenCreateStr(LPCTSTR lpSubKey, LPCTSTR lpName, LPTSTR lpData, DWORD dwCnt, BOOL bCreate)
{
HKEY hKey;
DWORD dwValue, dwType = REG_MULTI_SZ;
BOOL bRet = TRUE;
if (ERROR_SUCCESS != RegCreateKeyEx(HKEY_LOCAL_MACHINE,
lpSubKey,
0,
NULL,
0, // REG_OPTION_NON_VOLATILE
0,
0,
&hKey,
&dwValue))
{
return FALSE;
}
if (FALSE == bCreate && REG_CREATED_NEW_KEY == dwValue)
{
bRet = FALSE;
}
else if (REG_OPENED_EXISTING_KEY == dwValue)
{
if (ERROR_SUCCESS == RegQueryValueEx(hKey, lpName, 0, &dwType, (BYTE *)lpData, &dwCnt))
RETAILMSG(0, (_T("%s\r\n"), lpData));
else
bRet = FALSE;
}
else
{
bRet = FALSE;
}
RegCloseKey(hKey);
return bRet;
}
示例9: RETAILMSG
RESULT
Animation::CallbackOnFinished( ICallback& callback )
{
RESULT rval = S_OK;
if (callback.IsNull())
{
RETAILMSG(ZONE_ERROR, "ERROR: Animation::CallbackOnFinished( \"%s\", 0x%x ): Callback is NULL",
m_name.c_str(), (UINT32)&callback);
SAFE_DELETE(m_pCallbackOnFinished);
rval = E_INVALID_ARG;
goto Exit;
}
SAFE_DELETE(m_pCallbackOnFinished);
m_pCallbackOnFinished = callback.Clone();
Exit:
return rval;
}
示例10: RETAILMSG
RESULT
GradientEffect::Init()
{
RETAILMSG(ZONE_SHADER, "GradientEffect::Init()");
RESULT rval = S_OK;
if (s_GradientShadersLoaded)
{
return S_OK;
}
CHR(OpenGLESEffect::Init());
CHR(ShaderMan.CreateShader( "GradientEffect", s_GradientVertexShaderName, s_GradientFragmentShaderName, &s_hGradientShader ));
// Save uniform handles.
s_GradientShaderProgram = ShaderMan.GetShaderProgramID( s_hGradientShader );
VERIFYGL(glUseProgram(s_GradientShaderProgram));
VERIFYGL(s_uModelViewMatrix = glGetUniformLocation(s_GradientShaderProgram, "uMatModelView"));
VERIFYGL(s_uProjectionMatrix = glGetUniformLocation(s_GradientShaderProgram, "uMatProjection"));
VERIFYGL(s_uTexture = glGetUniformLocation(s_GradientShaderProgram, "uTexture"));
VERIFYGL(s_uStartColor = glGetUniformLocation(s_GradientShaderProgram, "uStartColor"));
VERIFYGL(s_uStartPoint = glGetUniformLocation(s_GradientShaderProgram, "uStartPoint"));
VERIFYGL(s_uEndColor = glGetUniformLocation(s_GradientShaderProgram, "uEndColor"));
VERIFYGL(s_uEndPoint = glGetUniformLocation(s_GradientShaderProgram, "uEndPoint"));
VERIFYGL(s_uGlobalColor = glGetUniformLocation(s_GradientShaderProgram, "uGlobalColor"));
VERIFYGL(s_uWidth = glGetUniformLocation(s_GradientShaderProgram, "uWidth"));
VERIFYGL(s_uHeight = glGetUniformLocation(s_GradientShaderProgram, "uHeight"));
// VERIFYGL(s_uTexCoordOffset = glGetUniformLocation(s_GradientShaderProgram, "uTexCoordOffset"));
s_GradientShadersLoaded = true;
Exit:
return rval;
}
示例11: BspGetBatteryFlag_old
/*************************************************************************************
// Function: BspGetBatteryFlag
// Purpose: Give a AC status to upper layer
// Returns: TRUE--ACOnline FALSE--ACOff
//***********************************************************************************/
UCHAR
BspGetBatteryFlag_old (void)
{
// return PDD_BATTERY_ON;
if(BspBatteryDetect())
{
if(BspChargerDetect())
return PDD_BATTERY_CHARGING;
else if(BspAdapterDetect()||BspUSBChargerDetect())
{
RETAILMSG(0, (TEXT("++PDD_BATTERY_EOC \r\n")));
BspCorrectVoltageGauge();
return PDD_BATTERY_EOC;
}
else
return PDD_BATTERY_ON;
}
else
{
return PDD_NO_BATTERY;
}
}//endof BspGetBatteryStatus
示例12: LED_Deinit
BOOL LED_Deinit(DWORD dwContext)
{
PDRVCONTEXT pDrv = (PDRVCONTEXT)dwContext;
RETAILMSG(RETAIL_ON, (DTAG TEXT("LED_Deinit++ dwContext: %x\r\n"), dwContext));
// Verify that the context handle is valid
if(pDrv && (pDrv->dwSize != sizeof(DRVCONTEXT))){
return 0;
}
// terminate thread
KillFlag = true;
SetEvent(pDrv->hEvent);
FreeIntChainHandler(pDrv->hIsrHandle);
InterruptDisable(pDrv->dwSysIntr);
KernelIoControl(IOCTL_HAL_RELEASE_SYSINTR, &pDrv->dwSysIntr, sizeof(DWORD), NULL, 0, NULL);
CloseHandle(pDrv->hEvent);
DeleteStaticMapping((LPVOID)isr_info.pGPIORegs, sizeof(GPIOREG));
return true;
}
示例13: GetARM2BackCarStatus
BOOL GetARM2BackCarStatus(UCHAR *pOutBuffer,DWORD outSize,DWORD *pOutSize)
{
UINT32 g_u4Param1,g_u4Param2,g_u4Param3;
DWORD dwRet;
UINT32 u4ModuleID,u4MessageID;
HWSendMessage(MSG_COMBINE(MODULE_BCAR, MSG_WINCE_APP_READY),0, 0, 0);
dwRet = WaitForSingleObject(g_hBackCarIntrEvt, INFINITE);
HWGetMessage(MODULE_BCAR, &u4ModuleID, &g_u4Param1, &g_u4Param2, &g_u4Param3);
u4MessageID = GETMESSAGEID(u4ModuleID);
if(u4MessageID == MSG_ARM2_RESPONSE)
RETAILMSG(TRUE, (TEXT("[FSC][INFO]Rev ARM2 Responese\r\n")));
memcpy(pOutBuffer,(UCHAR *)&g_u4Param1,4);
memcpy(pOutBuffer+4,(UCHAR *)&g_u4Param2,4);
*pOutSize = 8;
InterruptDone(g_dwBackCarSysIntr);
return TRUE;
}
示例14: mfc_demo_thread
static DWORD WINAPI mfc_demo_thread(LPVOID pPARAM)
{
MFCDEC_DEMO_THREAD_PARAM *p_mfc_demo_param;
int idx;
if (pPARAM == NULL) {
return 0x0FFFF;
}
p_mfc_demo_param = (MFCDEC_DEMO_THREAD_PARAM *) pPARAM;
idx = p_mfc_demo_param->demofile_idx;
RETAILMSG(1, (L"\n[MFC_DEMO] Playing \'%s\' file", array_pszFileNames[idx][0]));
#define NUM_PIP_VIDEOS 1
mfcdec_demo(p_mfc_demo_param->hWnd,
array_pszFileNames[idx],
array_codec_modes[idx],
NUM_PIP_VIDEOS,
&(p_mfc_demo_param->fForceExit));
return 0;
}
示例15: WSM_AddLogData
BOOL WSM_AddLogData(LPTSTR strBuf)
{
int nlen = 0;
int nGlbBufferLen = 0;
int nspare = 0;
EnterCriticalSection(&g_csLock);
// 버퍼 사이즈 할당이 되지 않았다면, 기본사이즈로 할당
if(g_pBuffer == NULL)
{
if( WSM_SetLogBufSize(DEFAULT_LOGBUF_SIZE) == FALSE )
{
return FALSE;
}
}
nlen = _tcslen(strBuf) * sizeof(TCHAR);
nGlbBufferLen =_tcslen(g_pBuffer) * sizeof(TCHAR);
nspare = g_dwBufSize - nGlbBufferLen;
RETAILMSG(1, (TEXT("[WSM] g_dwBufSize(%d), nlen(%d), nspare(%d), nGlbBufferLen(%d) \r\n"), g_dwBufSize, nlen, nspare, nGlbBufferLen ));
if( nspare < nlen)
{
wcscpy(&g_pBuffer[0], &g_pBuffer[nlen - nspare]);
}
wcscat(g_pBuffer, strBuf);
LeaveCriticalSection(&g_csLock);
return TRUE;
}