On Mon, Apr 27, 2020 at 12:13 PM Alon Barzilai <alon@skylinesoft.com> wrote:

I can use the current implementation if the RtlQueryEnvironmentVariable_U.

should I submit it as incremental patch or a new patch?


Sure, single patch for implementation together with tests is fine.��
��


Alon.



On 4/27/2020 10:20 AM, Nikolay Sivov wrote:


On Mon, Apr 27, 2020 at 9:55 AM Alon Barzilai <alon@skylinesoft.com> wrote:


+
+/******************************************************************
+ *�� �� �� �� �� �� ��RtlQueryEnvironmentVariable�� ��[NTDLL.@]
+ *
+ */
+NTSTATUS WINAPI RtlQueryEnvironmentVariable(PWSTR env,
+�� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� PWSTR name,
+�� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� size_t name_length,
+�� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� PWSTR value,
+�� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� size_t value_length,
+�� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� PSIZE_T return_length)
+{
+�� �� FIXME("RtlQueryEnvironmentVariable not implemented\n");
+�� �� return STATUS_VARIABLE_NOT_FOUND;
+}

Hi,

This could be a wrapper over _U function of the same name, you'll need to pack buffers as UNICODE_STRINGs, and handle returned length.

We have some tests for _U function, additional test could go there as well.��