diff options
| author | Cheoljin Lee <[email protected]> | 2018-11-28 11:08:27 -0800 |
|---|---|---|
| committer | Cheoljin Lee <[email protected]> | 2018-11-28 11:08:27 -0800 |
| commit | 964d0d1e461e7a9af0f9045a7f192acd74999843 (patch) | |
| tree | b8169004db5fc67fd4f45b2f7999ea6e70865ab4 /gnss/gnssUmdf/HelperUtility.cpp | |
| parent | 0990b0cbbd460336036dc6ec71cb8e2a8403e287 (diff) | |
Initial version of GPS/GNSS UMDF Sample Driver (UMDF Version 2)
Diffstat (limited to 'gnss/gnssUmdf/HelperUtility.cpp')
| -rw-r--r-- | gnss/gnssUmdf/HelperUtility.cpp | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/gnss/gnssUmdf/HelperUtility.cpp b/gnss/gnssUmdf/HelperUtility.cpp new file mode 100644 index 00000000..28f78c1f --- /dev/null +++ b/gnss/gnssUmdf/HelperUtility.cpp @@ -0,0 +1,43 @@ +/*++ + +Copyright (c) Microsoft Corporation. All rights reserved. + +Module Name: + + HelperUtility.cpp + +Abstract: + + This file contains the helper functions. + +Environment: + + Windows User-Mode Driver Framework + +--*/ + +#include "precomp.h" +#include "Trace.h" +#include "HelperUtility.h" + +#include "HelperUtility.tmh" + + +_Use_decl_annotations_ +BOOL +HelperUtility::GetDataFromCommand( + _In_ PGNSS_DRIVERCOMMAND_PARAM Command, + _In_ size_t DataLen, + _Out_ void* Data +) +{ + ZeroMemory(Data, DataLen); + + if (!Command || (Command->CommandDataSize != DataLen)) + { + return FALSE; + } + + memcpy_s(Data, DataLen, Command->CommandData, DataLen); + return TRUE; +} |
