mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 00:45:24 +00:00
[ADVAPI32_APITEST] Unknown field isn't that unknown and should contain "1"
See processhacker source code (as reference)
This commit is contained in:
parent
bcb0d7c6c9
commit
830f2998ab
1 changed files with 4 additions and 2 deletions
|
@ -113,19 +113,20 @@ service_main(DWORD dwArgc, LPWSTR* lpszArgv)
|
||||||
{
|
{
|
||||||
/* IN/OUT parameter structure for I_QueryTagInformation() function
|
/* IN/OUT parameter structure for I_QueryTagInformation() function
|
||||||
* See: https://wj32.org/wp/2010/03/30/howto-use-i_querytaginformation/
|
* See: https://wj32.org/wp/2010/03/30/howto-use-i_querytaginformation/
|
||||||
|
* See: https://github.com/processhacker/processhacker/blob/master/phnt/include/subprocesstag.h
|
||||||
*/
|
*/
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
ULONG ProcessId;
|
ULONG ProcessId;
|
||||||
PVOID ServiceTag;
|
PVOID ServiceTag;
|
||||||
ULONG Unknown;
|
ULONG TagType;
|
||||||
PWSTR Buffer;
|
PWSTR Buffer;
|
||||||
} ServiceQuery;
|
} ServiceQuery;
|
||||||
|
|
||||||
/* Set our input parameters */
|
/* Set our input parameters */
|
||||||
ServiceQuery.ProcessId = GetCurrentProcessId();
|
ServiceQuery.ProcessId = GetCurrentProcessId();
|
||||||
ServiceQuery.ServiceTag = Teb->SubProcessTag;
|
ServiceQuery.ServiceTag = Teb->SubProcessTag;
|
||||||
ServiceQuery.Unknown = 0;
|
ServiceQuery.TagType = 0;
|
||||||
ServiceQuery.Buffer = NULL;
|
ServiceQuery.Buffer = NULL;
|
||||||
/* Call ADVAPI32 to query the correctness of our tag */
|
/* Call ADVAPI32 to query the correctness of our tag */
|
||||||
_I_QueryTagInformation(NULL, 1, &ServiceQuery);
|
_I_QueryTagInformation(NULL, 1, &ServiceQuery);
|
||||||
|
@ -135,6 +136,7 @@ service_main(DWORD dwArgc, LPWSTR* lpszArgv)
|
||||||
{
|
{
|
||||||
/* It should match our service name */
|
/* It should match our service name */
|
||||||
service_ok(wcscmp(lpszArgv[0], ServiceQuery.Buffer) == 0, "Mismatching info: %S - %S\n", lpszArgv[0], ServiceQuery.Buffer);
|
service_ok(wcscmp(lpszArgv[0], ServiceQuery.Buffer) == 0, "Mismatching info: %S - %S\n", lpszArgv[0], ServiceQuery.Buffer);
|
||||||
|
service_ok(ServiceQuery.TagType == 1, "Invalid tag type: %x\n", ServiceQuery.TagType);
|
||||||
LocalFree(ServiceQuery.Buffer);
|
LocalFree(ServiceQuery.Buffer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue