From 7d14daf1d5fce4d09471a3abe2aca49cf7680816 Mon Sep 17 00:00:00 2001 From: a1xd <68629610+a1xd@users.noreply.github.com> Date: Wed, 2 Dec 2020 05:25:19 -0500 Subject: embed version info into assemblies check app versions against lib, lib against driver add an 'about' dialog which displays version details, accessible from menu refactor error handling + add check for negative offset --- driver/driver.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'driver/driver.cpp') diff --git a/driver/driver.cpp b/driver/driver.cpp index a4de824..a99a70b 100644 --- a/driver/driver.cpp +++ b/driver/driver.cpp @@ -1,5 +1,6 @@ #include #include +#include #include "driver.h" @@ -190,6 +191,20 @@ Return Value: global.modifier = { global.args, global.lookups }; } break; + case RA_GET_VERSION: + status = WdfRequestRetrieveOutputBuffer( + Request, + sizeof(ra::version_t), + &buffer, + NULL + ); + if (!NT_SUCCESS(status)) { + DebugPrint(("RetrieveOutputBuffer failed: 0x%x\n", status)); + } + else { + *reinterpret_cast(buffer) = { RA_VER_MAJOR, RA_VER_MINOR, RA_VER_PATCH }; + } + break; default: status = STATUS_INVALID_DEVICE_REQUEST; break; -- cgit v1.2.3