1 /* 2 * PROJECT: ReactOS api tests 3 * LICENSE: GPLv2+ - See COPYING in the top level directory 4 * PURPOSE: Test spoiling of StaticUnicodeString by CreateProcessA 5 * PROGRAMMERS: Mark Jansen 6 */ 7 8 #include "precomp.h" 9 10 #include <ndk/rtlfuncs.h> 11 12 START_TEST(CreateProcess) 13 { 14 PUNICODE_STRING StaticString; 15 UNICODE_STRING CompareString; 16 BOOL Process; 17 STARTUPINFO si = {0}; 18 PROCESS_INFORMATION pi = {0}; 19 LONG Result; 20 21 StaticString = &NtCurrentTeb()->StaticUnicodeString; 22 RtlInitUnicodeString(&CompareString, L"--sentinel--"); 23 RtlCopyUnicodeString(StaticString, &CompareString); 24 25 si.cb = sizeof(si); 26 Process = CreateProcessA("ApplicationName", "CommandLine", NULL, NULL, FALSE, 0, NULL, "CurrentDir", &si, &pi); 27 ok_int(Process, 0); 28 29 Result = RtlCompareUnicodeString(StaticString, &CompareString, TRUE); 30 ok(!Result, "Expected %s to equal %s\n", 31 wine_dbgstr_wn(StaticString->Buffer, StaticString->Length / sizeof(WCHAR)), 32 wine_dbgstr_wn(CompareString.Buffer, CompareString.Length / sizeof(WCHAR))); 33 } 34