[NTOS:SE] Annotate the function parameters of SepRegQueryHelper with SAL

And add a documentation comment header
This commit is contained in:
George Bișoc
2021-03-25 13:05:49 +01:00
parent d28d2eb5f8
commit b68216e503

View File

@@ -74,14 +74,38 @@ PSEP_LOGON_SESSION_TERMINATED_NOTIFICATION SepLogonNotifications = NULL;
/* PRIVATE FUNCTIONS **********************************************************/
/**
* @brief
* A private registry helper that returns the desired value
* data based on the specifics requested by the caller.
*
* @param[in] KeyName
* Name of the key.
*
* @param[in] ValueName
* Name of the registry value.
*
* @param[in] ValueType
* The type of the registry value.
*
* @param[in] DataLength
* The data length, in bytes, representing the size of the registry value.
*
* @param[out] ValueData
* The requested value data provided by the function.
*
* @return
* Returns STATUS_SUCCESS if the operations have completed successfully,
* otherwise a failure NTSTATUS code is returned.
*/
NTSTATUS
NTAPI
SepRegQueryHelper(
PCWSTR KeyName,
PCWSTR ValueName,
ULONG ValueType,
ULONG DataLength,
PVOID ValueData)
_In_ PCWSTR KeyName,
_In_ PCWSTR ValueName,
_In_ ULONG ValueType,
_In_ ULONG DataLength,
_Out_ PVOID ValueData)
{
UNICODE_STRING ValueNameString;
UNICODE_STRING KeyNameString;
@@ -128,7 +152,6 @@ SepRegQueryHelper(
goto Cleanup;
}
if (ValueType == REG_BINARY)
{
RtlCopyMemory(ValueData, KeyValueInformation.Partial.Data, DataLength);