当前位置: 首页>>代码示例>>C++>>正文


C++ LogOut函数代码示例

本文整理汇总了C++中LogOut函数的典型用法代码示例。如果您正苦于以下问题:C++ LogOut函数的具体用法?C++ LogOut怎么用?C++ LogOut使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了LogOut函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: _wpopen

bool BrainUtil::RunSystemCommand(const CString& cmd)
{
    CString tempCmd = cmd;
    //int ret = _wsystem(tempCmd.GetBuffer());
    //DATA_ASSERT(0 == ret); // Don't aseert the failure is accepted.

	// Get the output from the pipe
	FILE* pipe = _wpopen(tempCmd.GetBuffer(), _T("r"));
	if (!pipe) 
	{
		return false;
		LogOut(_T("Error: failed to create the piple."));
	}

	TCHAR buffer[256];
	while(!feof(pipe)) {
		if(fgetws(buffer, 256, pipe) != NULL)
		{
			LogOut(buffer);
		}
	}
	int ret = _pclose(pipe);

    return 0 == ret;
}
开发者ID:JeffreyZksun,项目名称:pcassist,代码行数:25,代码来源:BrainUtil.cpp

示例2: DealSettleTask

/**
* @brief 处理结算中断
* @param 无
* @return 
* @li APP_SUCC
* @li APP_FAIL
* @li APP_QUIT
*/
int DealSettleTask(void)
{
	if (YES == GetVarBatchHaltFlag() 
		|| YES == GetVarPrintSettleHalt()
		|| YES == GetVarPrintDetialHalt()
		|| YES == GetVarClrSettleDataFlag()
		)
	{
		if(PubConfirmDlg("上次结算未完成", "是否继续执行结算", 0, 30)!=APP_SUCC)
			return APP_FAIL;
		if (APP_SUCC == Settle(1))
		{
			if (YES == GetVarIsAutoLogOut())
			{
				LogOut();
			}

		#if defined(USE_TMS)
			DoTmsTask(TMS_POS_CHKUPDATA);
		#endif
			return APP_QUIT;
		}
		else
		{
			if (PubGetKeyCode(1) == KEY_ESC)
			{
				return APP_QUIT;
			}
			return APP_FAIL;
		}
	}
	return APP_SUCC;
}
开发者ID:chengzhang-90,项目名称:miteno_c,代码行数:41,代码来源:settle.c

示例3: zEnumObjects

int far pascal zEnumObjects( HDC pp1, int pp2, FARPROC pp3, LPSTR pp4 )
{
    int r;
    FARPROC fp ;

    SaveRegs();
    /*
    ** Log IN Parameters (No Create/Destroy Checking Yet!)
    */
    LogIn( (LPSTR)"APICALL:EnumObjects HDC+int+FARPROC+LPSTR+",
        pp1, pp2, pp3, pp4 );

    if( pp2 == OBJ_PEN )
      fp = (FARPROC)HookAdd( (void far *)EnumPens, (void far *)pp3 ) ;
    else
      fp = (FARPROC)HookAdd( (void far *)EnumBrushes, (void far *)pp3 ) ;

    /*
    ** Call the API!
    */
    RestoreRegs();
    GrovelDS();
    r = EnumObjects(pp1,pp2,fp,pp4);
    UnGrovelDS();
    SaveRegs();
    /*
    ** Log Return Code & OUT Parameters (No Create/Destroy Checking Yet!)
    */
    LogOut( (LPSTR)"APIRET:EnumObjects int+++++",
        r, (short)0, (short)0, (short)0, (short)0 );

    RestoreRegs();
    return( r );
}
开发者ID:mingpen,项目名称:OpenNT,代码行数:34,代码来源:trace.c

示例4: zUnhookWindowsHook

BOOL far pascal zUnhookWindowsHook( int pp1, FARPROC pp2 )
{
    BOOL r;
    FARPROC fp ;

    SaveRegs();
    /*
    ** Log IN Parameters (No Create/Destroy Checking Yet!)
    */
    LogIn( (LPSTR)"APICALL:UnhookWindowsHook int+FARPROC+",
        pp1, pp2 );

    fp = (FARPROC)HookFind( (void far *)pp2 ) ;
    if ( fp == NULL ) {     /* Unhooking an unknown hook type */
        fp = pp2;
    }

    /*
    ** Call the API!
    */
    RestoreRegs();
    GrovelDS();
    r = UnhookWindowsHook(pp1,fp);
    UnGrovelDS();
    SaveRegs();
    /*
    ** Log Return Code & OUT Parameters (No Create/Destroy Checking Yet!)
    */
    LogOut( (LPSTR)"APIRET:UnhookWindowsHook BOOL+++",
        r, (short)0, (short)0 );

    RestoreRegs();
    return( r );
}
开发者ID:mingpen,项目名称:OpenNT,代码行数:34,代码来源:trace.c

示例5: DlgMesgProc

int FAR PASCAL DlgMesgProc(
    HWND    hWnd,
    WORD    wMsg,
    WORD    wParam,
    LONG    lParam,
    FARPROC fp,
    WORD    AX
) {
    int     i;

    SaveRegs() ;
    LogIn( (LPSTR)"MSGCALL:FARPROC+HWND+MSGNUM+WORD+LONG+",
        fp, hWnd, wMsg, wParam, lParam );

    RestoreRegs() ;
    GrovelDS();
    i = HookCall( hWnd, wMsg, wParam, lParam, fp, AX );
    UnGrovelDS();
    SaveRegs() ;

    LogOut( (LPSTR)"MSGRET:LONG+FARPROC+MSGNUM+WORD+LONG+",
        (LONG)i, fp, hWnd, wMsg, wParam, lParam );

    RestoreRegs() ;
    return( i );
}
开发者ID:mingpen,项目名称:OpenNT,代码行数:26,代码来源:trace.c

示例6: zExtTextOut

BOOL far pascal zExtTextOut( HDC pp1, int pp2, int pp3, WORD pp4, LPRECT pp5, LPSTR pp6, WORD pp7, LPINT pp8 )
{
    BOOL r;

    SaveRegs();
    /*
    ** Log IN Parameters (No Create/Destroy Checking Yet!)
    */
    LogIn( (LPSTR)"APICALL:ExtTextOut HDC+int+int+WORD+LPRECT+LPSTR+WORD+ARRAYINT+",
        pp1, pp2, pp3, pp4, pp5, pp6, pp7, pp8, pp7 );

    /*
    ** Call the API!
    */
    RestoreRegs();
    GrovelDS();
    r = ExtTextOut(pp1,pp2,pp3,pp4,pp5,pp6,pp7,pp8);
    UnGrovelDS();
    SaveRegs();
    /*
    ** Log Return Code & OUT Parameters (No Create/Destroy Checking Yet!)
    */
    LogOut( (LPSTR)"APIRET:ExtTextOut BOOL+++++++++",
        r, (short)0, (short)0, (short)0, (short)0, (short)0, (short)0, (short)0, (short)0 );

    RestoreRegs();
    return( r );
}
开发者ID:mingpen,项目名称:OpenNT,代码行数:28,代码来源:trace.c

示例7: zSetKeyboardState

void far pascal zSetKeyboardState( BYTE far* pp1 )
{

    SaveRegs();
    /*
    ** Log IN Parameters (No Create/Destroy Checking Yet!)
    */
    LogIn( (LPSTR)"APICALL:SetKeyboardState FixedString+",
        pp1, (DWORD) 256 );

    /*
    ** Call the API!
    */
    RestoreRegs();
    GrovelDS();
    SetKeyboardState(pp1);
    UnGrovelDS();
    SaveRegs();
    /*
    ** Log Return Code & OUT Parameters (No Create/Destroy Checking Yet!)
    */
    LogOut( (LPSTR)"APIRET:SetKeyboardState +",
        (short)0 );

    RestoreRegs();
    return;
}
开发者ID:mingpen,项目名称:OpenNT,代码行数:27,代码来源:trace.c

示例8: zSetTimer

WORD far pascal zSetTimer( HWND pp1, int pp2, WORD pp3, FARPROC pp4 )
{
    WORD r;

    SaveRegs();
    /*
    ** Log IN Parameters (No Create/Destroy Checking Yet!)
    */
    LogIn( (LPSTR)"APICALL:SetTimer HWND+int+WORD+FARPROC+",
        pp1, pp2, pp3, pp4 );

    if ( pp4 != NULL ) {
        pp4 = (FARPROC) HookAdd( (void far *)TimerRtn, (void far *)pp4 );
    }

    /*
    ** Call the API!
    */
    RestoreRegs();
    GrovelDS();
    r = SetTimer(pp1,pp2,pp3,pp4);
    UnGrovelDS();
    SaveRegs();
    /*
    ** Log Return Code & OUT Parameters (No Create/Destroy Checking Yet!)
    */
    LogOut( (LPSTR)"APIRET:SetTimer WORD+++++",
        r, (short)0, (short)0, (short)0, (short)0 );

    RestoreRegs();
    return( r );
}
开发者ID:mingpen,项目名称:OpenNT,代码行数:32,代码来源:trace.c

示例9: zSetCommState

int far pascal zSetCommState( DCB far* pp1 )
{
    int r;

    SaveRegs();
    /*
    ** Log IN Parameters (No Create/Destroy Checking Yet!)
    */
    LogIn( (LPSTR)"APICALL:SetCommState DCB far*+",
        pp1 );

    /*
    ** Call the API!
    */
    RestoreRegs();
    GrovelDS();
    r = SetCommState(pp1);
    UnGrovelDS();
    SaveRegs();
    /*
    ** Log Return Code & OUT Parameters (No Create/Destroy Checking Yet!)
    */
    LogOut( (LPSTR)"APIRET:SetCommState int++",
        r, (short)0 );

    RestoreRegs();
    return( r );
}
开发者ID:mingpen,项目名称:OpenNT,代码行数:28,代码来源:tucomm.c

示例10: zSetCommEventMask

UINT far* far pascal zSetCommEventMask( int pp1, UINT pp2 )
{
    UINT far* r;

    SaveRegs();
    /*
    ** Log IN Parameters (No Create/Destroy Checking Yet!)
    */
    LogIn( (LPSTR)"APICALL:SetCommEventMask int+UINT+",
        pp1, pp2 );

    /*
    ** Call the API!
    */
    RestoreRegs();
    GrovelDS();
    r = SetCommEventMask(pp1,pp2);
    UnGrovelDS();
    SaveRegs();
    /*
    ** Log Return Code & OUT Parameters (No Create/Destroy Checking Yet!)
    */
    LogOut( (LPSTR)"APIRET:SetCommEventMask UINT far*+++",
        r, (short)0, (short)0 );

    RestoreRegs();
    return( r );
}
开发者ID:mingpen,项目名称:OpenNT,代码行数:28,代码来源:tucomm.c

示例11: zOpenComm

int far pascal zOpenComm( LPCSTR pp1, UINT pp2, UINT pp3 )
{
    int r;

    SaveRegs();
    /*
    ** Log IN Parameters (No Create/Destroy Checking Yet!)
    */
    LogIn( (LPSTR)"APICALL:OpenComm LPCSTR+UINT+UINT+",
        pp1, pp2, pp3 );

    /*
    ** Call the API!
    */
    RestoreRegs();
    GrovelDS();
    r = OpenComm(pp1,pp2,pp3);
    UnGrovelDS();
    SaveRegs();
    /*
    ** Log Return Code & OUT Parameters (No Create/Destroy Checking Yet!)
    */
    LogOut( (LPSTR)"APIRET:OpenComm int++++",
        r, (short)0, (short)0, (short)0 );

    RestoreRegs();
    return( r );
}
开发者ID:mingpen,项目名称:OpenNT,代码行数:28,代码来源:tucomm.c

示例12: DoLogOut

/**
* @brief 进行签退处理(有判断操作员的权限)
* @param 无
* @return
* @li APP_SUCC
* @li APP_FAIL
*/
static int DoLogOut(void)
{
	int nWaterSum = 0;
	int nRet = 0;

	if (APP_SUCC != ChkOperRole())
	{
		return APP_FAIL;
	}

	GetWaterNum(&nWaterSum);
	if (nWaterSum > 0)
	{
		PubMsgDlg("签退", "有交易流水先结算", 3, 10);
		return APP_FAIL;
	}
	if (YES == GetVarIsLogin())
	{
		nRet =  LogOut();
	}
	else
	{
		PubMsgDlg("签退", "POS已经签退", 0, 3);
		nRet = APP_FAIL;
	}

#if defined(USE_TMS)
	DoTmsTask(TMS_POS_CHKUPDATA);
#endif
	return nRet;
}
开发者ID:chengzhang-90,项目名称:miteno_c,代码行数:38,代码来源:main.c

示例13: DoSettle

/**
* @brief 进行结帐处理(有判断操作员的权限)
* @param 无
* @return
* @li APP_SUCC
* @li APP_FAIL
*/
int DoSettle(void)
{
	int nWaterSum = 0;
	int nRet = 0;

	if (APP_SUCC != ChkOperRole())
	{
		return APP_FAIL;
	}

	GetWaterNum(&nWaterSum);
	if (nWaterSum == 0)
	{
		PubMsgDlg("批结算", "无流水不允许结算\n\n按任意键退出!", 1, 30);
		return APP_FAIL;
	}
	//ASSERT_QUIT(DispTotal());
	if (Settle(0) != APP_SUCC)
	{
		PubMsgDlg("结算失败", "请重新结算", 3, 10);
		return APP_FAIL;
	}
	if (YES == GetVarIsAutoLogOut())
	{
		nRet = LogOut();
	}

#if defined(USE_TMS)
	DoTmsTask(TMS_POS_CHKUPDATA);
#endif
	return nRet;
}
开发者ID:chengzhang-90,项目名称:miteno_c,代码行数:39,代码来源:main.c

示例14: GetLastError

void BrainUtil::LogOutLastError(const CString& lpszFunction)
{
	// Retrieve the system error message for the last-error code

	LPVOID lpMsgBuf;
	LPVOID lpDisplayBuf;
	DWORD dw = GetLastError(); 

	if(0 == dw)
		return; // Don't need to log out the success information.

	FormatMessage(
		FORMAT_MESSAGE_ALLOCATE_BUFFER | 
		FORMAT_MESSAGE_FROM_SYSTEM |
		FORMAT_MESSAGE_IGNORE_INSERTS,
		NULL,
		dw,
		MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
		(LPTSTR) &lpMsgBuf,
		0, NULL );

	// Display the error message and exit the process

	lpDisplayBuf = (LPVOID)LocalAlloc(LMEM_ZEROINIT, 
		(lstrlen((LPCTSTR)lpMsgBuf) + lstrlen((LPCTSTR)lpszFunction) + 40) * sizeof(TCHAR)); 
	StringCchPrintf((LPTSTR)lpDisplayBuf, 
		LocalSize(lpDisplayBuf) / sizeof(TCHAR),
		TEXT("%s failed with error %d: %s"), 
		(LPCTSTR)lpszFunction, dw, lpMsgBuf); 
	LogOut((LPTSTR)lpDisplayBuf, COLOR_RED);

	LocalFree(lpMsgBuf);
	LocalFree(lpDisplayBuf);
	//ExitProcess(dw); 
}
开发者ID:JeffreyZksun,项目名称:pcassist,代码行数:35,代码来源:BrainUtil.cpp

示例15: zSetWindowLong

long far pascal zSetWindowLong( HWND pp1, int pp2, long pp3 )
{
    long r;
    long l;
    FARPROC fp ;

    SaveRegs();
    /*
    ** Log IN Parameters (No Create/Destroy Checking Yet!)
    */
    LogIn( (LPSTR)"APICALL:SetWindowLong HWND+int+long+",
        pp1, pp2, pp3 );

    if( pp2 == GWL_WNDPROC ) {
        pp3 = (long)((FARPROC)HookAdd( (void far *)MesgProc, (void far *)pp3 ));
    }
    /*
    ** Call the API!
    */
    RestoreRegs();
    GrovelDS();
    r = SetWindowLong(pp1,pp2,pp3);
    UnGrovelDS();
    SaveRegs();
    /*
    ** Log Return Code & OUT Parameters (No Create/Destroy Checking Yet!)
    */
    LogOut( (LPSTR)"APIRET:SetWindowLong long++++",
        r, (short)0, (short)0, (short)0 );

    RestoreRegs();
    return( r );
}
开发者ID:mingpen,项目名称:OpenNT,代码行数:33,代码来源:trace.c


注:本文中的LogOut函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。