* @brief Implementation of eq function * * @param Address * @param Value * @param HasError * @return BOOLEAN */
| 45 | * @return BOOLEAN |
| 46 | */ |
| 47 | BOOLEAN |
| 48 | ScriptEngineFunctionEq(UINT64 Address, QWORD Value, BOOL * HasError) |
| 49 | { |
| 50 | UNREFERENCED_PARAMETER(HasError); |
| 51 | |
| 52 | #ifdef SCRIPT_ENGINE_KERNEL_MODE |
| 53 | |
| 54 | if (!CheckAccessValidityAndSafety(Address, sizeof(QWORD))) |
| 55 | { |
| 56 | // |
| 57 | // Instead of indicating an error, just return false |
| 58 | // to assign it as a return result to a variable |
| 59 | // |
| 60 | // *HasError = TRUE; |
| 61 | |
| 62 | return FALSE; |
| 63 | } |
| 64 | |
| 65 | #endif // SCRIPT_ENGINE_KERNEL_MODE |
| 66 | |
| 67 | #ifdef SCRIPT_ENGINE_USER_MODE |
| 68 | *(UINT64 *)Address = Value; |
| 69 | #endif // SCRIPT_ENGINE_USER_MODE |
| 70 | |
| 71 | #ifdef SCRIPT_ENGINE_KERNEL_MODE |
| 72 | MemoryMapperWriteMemorySafeOnTargetProcess(Address, &Value, sizeof(QWORD)); |
| 73 | #endif // SCRIPT_ENGINE_KERNEL_MODE |
| 74 | |
| 75 | return TRUE; |
| 76 | } |
| 77 | |
| 78 | /** |
| 79 | * @brief Implementation of ed function |
no test coverage detected