* @brief Implementation of eb function * * @param Address * @param Value * @param HasError * @return BOOLEAN */
| 123 | * @return BOOLEAN |
| 124 | */ |
| 125 | BOOLEAN |
| 126 | ScriptEngineFunctionEb(UINT64 Address, BYTE Value, BOOL * HasError) |
| 127 | { |
| 128 | UNREFERENCED_PARAMETER(HasError); |
| 129 | |
| 130 | #ifdef SCRIPT_ENGINE_KERNEL_MODE |
| 131 | |
| 132 | if (!CheckAccessValidityAndSafety(Address, sizeof(BYTE))) |
| 133 | { |
| 134 | // |
| 135 | // Instead of indicating an error, just return false |
| 136 | // to assign it as a return result to a variable |
| 137 | // |
| 138 | // *HasError = TRUE; |
| 139 | |
| 140 | return FALSE; |
| 141 | } |
| 142 | |
| 143 | #endif // SCRIPT_ENGINE_KERNEL_MODE |
| 144 | |
| 145 | #ifdef SCRIPT_ENGINE_USER_MODE |
| 146 | *(BYTE *)Address = Value; |
| 147 | #endif // SCRIPT_ENGINE_USER_MODE |
| 148 | |
| 149 | #ifdef SCRIPT_ENGINE_KERNEL_MODE |
| 150 | MemoryMapperWriteMemorySafeOnTargetProcess(Address, &Value, sizeof(BYTE)); |
| 151 | #endif // SCRIPT_ENGINE_KERNEL_MODE |
| 152 | |
| 153 | return TRUE; |
| 154 | } |
| 155 | |
| 156 | /** |
| 157 | * @brief Implementation of eq function (Physical Memory) |
no test coverage detected