* PROGRAMMER: Hermès BÉLUSCA - MAÏTO <hermes.belusca@sfr.fr>
*/
+#include <apitest.h>
+
#define WIN32_NO_STATUS
-#define UNICODE
#include <stdio.h>
-#include <wine/test.h>
-#include <ndk/ntndk.h>
+#include <ndk/umtypes.h>
#include "./CmdLineUtil/CmdLineUtil.h"
if (TestCase->bEncloseProgramNameInQuotes && bWasntInQuotes)
wcscat(CmdLine, L"\"");
+ /* Add a separating space and copy the tested command line parameters. */
wcscat(CmdLine, L" ");
wcscat(CmdLine, TestCase->CmdLine);
{
ULONG i;
- DWORD dwError;
+ DWORD dwRet;
LPWSTR p = NULL;
/*
* Initialize the UtilityProgramDirectory variable.
*/
- GetModuleFileNameW(NULL, UtilityProgramDirectory, COUNT_OF(UtilityProgramDirectory));
- dwError = GetLastError();
- ok(dwError == ERROR_SUCCESS, "ERROR: Cannot retrieve the path to the current running process, last error %lu\n", dwError);
- if (dwError != ERROR_SUCCESS) return;
+ dwRet = GetModuleFileNameW(NULL, UtilityProgramDirectory, COUNT_OF(UtilityProgramDirectory));
+ ok(dwRet != 0, "ERROR: Cannot retrieve the path to the current running process, last error %lu\n", GetLastError());
+ if (dwRet == 0) return;
/* Path : executable.exe or "executable.exe" or C:\path\executable.exe or "C:\path\executable.exe" */
p = wcsrchr(UtilityProgramDirectory, L'\\');
else
UtilityProgramDirectory[0] = 0; /* Suppress the executable.exe name */
- wcscat(UtilityProgramDirectory, L"data\\CmdLineUtil.exe");
+ wcscat(UtilityProgramDirectory, L"testdata\\CmdLineUtil.exe");
- /* Close the opened quote if needed, and add a separating space */
+ /* Close the opened quote if needed. */
if (UtilityProgramDirectory[0] == L'"') wcscat(UtilityProgramDirectory, L"\"");