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


C++ Console::WriteString方法代码示例

本文整理汇总了C++中Console::WriteString方法的典型用法代码示例。如果您正苦于以下问题:C++ Console::WriteString方法的具体用法?C++ Console::WriteString怎么用?C++ Console::WriteString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Console的用法示例。


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

示例1: kernel_panic

//! something is wrong--bail out
void _cdecl kernel_panic (const char* fmt, ...) {

	_asm cli

	va_list		args;
	static char buf[1024];

	va_start (args, fmt);
	va_end (args);

	char* disclamer="We apologize, MOS has encountered a problem and has been shut down\n\
to prevent damage to your computer. Any unsaved work might be lost.\n\
We are sorry for the inconvenience this might have caused.\n\n\
Please report the following information and restart your computer.\n\
The system has been halted.\n\n";

	console.Clear();	
	//console.WriteString(sickpc, White, Black);
	//console.WriteString(disclamer, White, Black);	
	//sprintf(buf, "*** STOP: %s", fmt);	
	console.WriteString((char *)fmt, White, Black);
	//DebugPuts (sickpc);
	//DebugPuts (disclamer);

	//DebugPrintf ("*** STOP: %s", fmt);

	for (;;);
}
开发者ID:pdpdds,项目名称:OrangeOS,代码行数:29,代码来源:Exception.cpp

示例2: WelComeMessage

void WelComeMessage()
{
    console.Clear();
    char* szWelcome = "Welcome to Orange OS!!";

    char szBuf[256];
    strcpy(szBuf, szWelcome);

    console.WriteString(szBuf, White, Black);
    console.WriteString("This is a C++ OS.", White, Black);

    SYSTEMTIME sysTime;
    GetLocalTime(&sysTime);
    memset(szBuf, 0, 256);

    sprintf(szBuf, "LocalTime : %d/%d %d:%d", (int)sysTime.wMonth, (int)sysTime.wDay, (int)sysTime.wHour, (int)sysTime.wMinute);
    console.WriteString(szBuf, White, Black);

    sprintf(szBuf, "Address : %x", &g_var);

    console.WriteString(szBuf, White, Black);
}
开发者ID:pdpdds,项目名称:OrangeOS,代码行数:22,代码来源:main.cpp

示例3: CrtPrintf

KERNELAPI int CrtPrintf(const char *fmt, ...)
{
	va_list arg;
	int ret;

	char buf[256];

	va_start(arg, fmt);
	ret = vsprintf(buf, fmt, arg);
	va_end(arg);
	console.WriteString(buf, White, Black);

	return ret;
}
开发者ID:pdpdds,项目名称:OrangeOS,代码行数:14,代码来源:Hardware.cpp

示例4: DoHandleMessage

void ConsoleFrame::DoHandleMessage(const wnd_message_t *msg)
{
	wchar_t *str;
	size_t length;

	switch (msg->code)
	{
	case NEW_STRING:
		str = (wchar_t*) msg->params.generic[0];
		length = msg->params.generic[1];
		m_console.WriteString(str, length);
		free(str);
		break;

	default:
		WindowImpl::DoHandleMessage(msg);
		break;
	}
}
开发者ID:1tgr,项目名称:mobius,代码行数:19,代码来源:server.cpp

示例5: DbgError

void DbgError(char* pMsg)
{
    console.WriteString(pMsg, White, Black);
    while (1);
}
开发者ID:pdpdds,项目名称:OrangeOS,代码行数:5,代码来源:main.cpp


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