📄 imgupd.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.
//
//------------------------------------------------------------------------------
//
// File: imgupd.c
//
// This file implements the IOCTL_HAL_UPDATE_MODE handler.
//
#include <windows.h>
#include <oal.h>
//------------------------------------------------------------------------------
//
// Function: OALIoCtlHalUpdateMode
//
// Implements the IOCTL_HAL_UPDATE_MODE handler.
// This function gets/sets the RAM-based update mode flag.
//
BOOL OALIoCtlHalUpdateMode (
UINT32 code, VOID *pInpBuffer, UINT32 inpSize, VOID *pOutBuffer,
UINT32 outSize, UINT32 *pOutSize
) {
BOOL rc = FALSE;
BOOL *pfUpdateMode = NULL;
// verify the input
if (!pInpBuffer || inpSize != sizeof(BOOL))
{
NKSetLastError(ERROR_INVALID_PARAMETER);
OALMSG(OAL_WARN, (L"ERROR: OALIoCtlHalUpdateMode: Invalid input buffer\r\n"));
goto cleanUp;
}
// Get Update Mode flag from BSP Args
pfUpdateMode = (BOOL *) OALArgsQuery(OAL_ARGS_QUERY_UPDATEMODE);
// if there is no update mode flag, fail
if (pfUpdateMode == NULL)
{
NKSetLastError(ERROR_NOT_SUPPORTED);
OALMSG(OAL_WARN, (L"ERROR: OALIoCtlHalUpdateMode: Device doesn't support Update Mode\r\n"));
goto cleanUp;
}
// update the flag
*pfUpdateMode = *((BOOL *) pInpBuffer);
// Done
rc = TRUE;
cleanUp:
return rc;
}
//------------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -