本文整理汇总了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 (;;);
}
示例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);
}
示例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;
}
示例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;
}
}
示例5: DbgError
void DbgError(char* pMsg)
{
console.WriteString(pMsg, White, Black);
while (1);
}