Download Pelles C here: http://www.pellesc.se
OS_DOMAINMEMBER equ 28
ExitProcess PROTO :QWORD
IsOS PROTO :QWORD
printf PROTO :QWORD,:VARARG
.data
m1 db 'The computer is not joined to a domain.',0
m2 db 'The computer is joined to a domain.',0
tbl dq OFFSET m1,OFFSET m2
.data?
rv dq ?
.code
start:
sub rsp,4*8+8
invoke IsOS,OS_DOMAINMEMBER
xor rdx,rdx
test rax,rax
setne dl
mov rv,rdx
shl rdx,3
lea rax,[tbl+rdx]
invoke printf,QWORD PTR [rax]
invoke ExitProcess,rv
END start
BOOL SetConsoleFontToConsolas(void)
{
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
if (hConsole == INVALID_HANDLE_VALUE) return FALSE;
CONSOLE_FONT_INFOEX cfi;
cfi.cbSize = sizeof(CONSOLE_FONT_INFOEX);
// Get the current font info first to preserve defaults
if (!GetCurrentConsoleFontEx(hConsole, FALSE, &cfi))
{
return FALSE;
}
// Set font properties
cfi.dwFontSize.X = 0; // Width (0 lets Windows calculate based on height)
cfi.dwFontSize.Y = 16; // Height (Font size in points/pixels)
cfi.FontFamily = FF_DONTCARE;
cfi.FontWeight = FW_NORMAL;
// Specify a TrueType font that supports UTF-8 Unicode characters
// Common choices: L"Cascadia Code", L"Consolas", L"Lucida Console"
wcscpy_s(cfi.FaceName, LF_FACESIZE, L"Consolas");
// Apply the new font
return SetCurrentConsoleFontEx(hConsole, FALSE, &cfi);
}Page created in 0.049 seconds with 15 queries.