ReactOS 0.4.16-dev-401-g45b008d
CreateProcess.c
Go to the documentation of this file.
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
13{
17 STARTUPINFO si = {0};
20
21 StaticString = &NtCurrentTeb()->StaticUnicodeString;
22 RtlInitUnicodeString(&CompareString, L"--sentinel--");
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
30 ok(!Result, "Expected %s to equal %s\n",
32 wine_dbgstr_wn(CompareString.Buffer, CompareString.Length / sizeof(WCHAR)));
33}
IN PUNICODE_STRING StaticString
#define ok(value,...)
Definition: atltest.h:57
#define START_TEST(x)
Definition: atltest.h:75
#define ok_int(expression, result)
Definition: atltest.h:134
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessA(LPCSTR lpApplicationName, LPSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCSTR lpCurrentDirectory, LPSTARTUPINFOA lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation)
Definition: proc.c:4747
ULONG RtlCompareUnicodeString(PUNICODE_STRING s1, PUNICODE_STRING s2, BOOLEAN UpCase)
Definition: string_lib.cpp:31
unsigned int BOOL
Definition: ntddk_ex.h:94
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:223
#define NtCurrentTeb
static refpint_t pi[]
Definition: server.c:96
NTSYSAPI VOID NTAPI RtlCopyUnicodeString(PUNICODE_STRING DestinationString, PUNICODE_STRING SourceString)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define L(x)
Definition: ntvdm.h:50
long LONG
Definition: pedump.c:60
#define wine_dbgstr_wn
Definition: testlist.c:2
DWORD cb
Definition: winbase.h:856
#define CreateProcess
Definition: winbase.h:3783
#define CompareString
Definition: winnls.h:1230
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:409
__wchar_t WCHAR
Definition: xmlstorage.h:180