📄 query.c
字号:
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
// -----------------------------------------------------------------------------
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//
// -----------------------------------------------------------------------------
#include <windows.h>
#include <x86boot.h>
#include <kitl.h>
#include <oal_nkxp.h>
BOOL x86IoCtlQueryDispSettings (
UINT32 code, VOID *lpInBuf, UINT32 nInBufSize, VOID *lpOutBuf,
UINT32 nOutBufSize, UINT32 *lpBytesReturned
) {
DWORD dwErr = 0;
if (lpBytesReturned) {
*lpBytesReturned = 0;
}
if (!lpOutBuf) {
dwErr = ERROR_INVALID_PARAMETER;
} else if (sizeof(DWORD)*3 > nOutBufSize) {
dwErr = ERROR_INSUFFICIENT_BUFFER;
} else {
// Check the boot arg structure for the default display settings.
__try {
((PDWORD)lpOutBuf)[0] = (DWORD)g_pX86Info->cxDisplayScreen;
((PDWORD)lpOutBuf)[1] = (DWORD)g_pX86Info->cyDisplayScreen;
((PDWORD)lpOutBuf)[2] = (DWORD)g_pX86Info->bppScreen;
if (lpBytesReturned) {
*lpBytesReturned = sizeof (DWORD) * 3;
}
} __except (EXCEPTION_EXECUTE_HANDLER) {
dwErr = ERROR_INVALID_PARAMETER;
}
}
if (dwErr) {
NKSetLastError (dwErr);
}
return !dwErr;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -