diff options
| author | a1xd <[email protected]> | 2020-12-02 05:25:19 -0500 |
|---|---|---|
| committer | a1xd <[email protected]> | 2020-12-02 05:25:19 -0500 |
| commit | 7d14daf1d5fce4d09471a3abe2aca49cf7680816 (patch) | |
| tree | 43411443aadc79d36ad1da8063208cd51fdb15fe /driver/driver.cpp | |
| parent | merge common-install with common (diff) | |
| download | rawaccel-7d14daf1d5fce4d09471a3abe2aca49cf7680816.tar.xz rawaccel-7d14daf1d5fce4d09471a3abe2aca49cf7680816.zip | |
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
Diffstat (limited to 'driver/driver.cpp')
| -rw-r--r-- | driver/driver.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
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 <rawaccel.hpp> #include <rawaccel-io-def.h> +#include <rawaccel-version.h> #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<ra::version_t*>(buffer) = { RA_VER_MAJOR, RA_VER_MINOR, RA_VER_PATCH }; + } + break; default: status = STATUS_INVALID_DEVICE_REQUEST; break; |