mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 12:55:43 +00:00
[MSVCRT:APITEST]
Modify the test for GetModuleFileName, should work better now. svn path=/trunk/; revision=57534
This commit is contained in:
parent
a25199df2a
commit
833bace73a
1 changed files with 4 additions and 5 deletions
|
@ -286,17 +286,16 @@ START_TEST(CommandLine)
|
||||||
{
|
{
|
||||||
ULONG i;
|
ULONG i;
|
||||||
|
|
||||||
DWORD dwError;
|
DWORD dwRet;
|
||||||
LPWSTR p = NULL;
|
LPWSTR p = NULL;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize the UtilityProgramDirectory variable.
|
* Initialize the UtilityProgramDirectory variable.
|
||||||
*/
|
*/
|
||||||
GetModuleFileNameW(NULL, UtilityProgramDirectory, COUNT_OF(UtilityProgramDirectory));
|
dwRet = GetModuleFileNameW(NULL, UtilityProgramDirectory, COUNT_OF(UtilityProgramDirectory));
|
||||||
dwError = GetLastError();
|
ok(dwRet != 0, "ERROR: Cannot retrieve the path to the current running process, last error %lu\n", GetLastError());
|
||||||
ok(dwError == ERROR_SUCCESS, "ERROR: Cannot retrieve the path to the current running process, last error %lu\n", dwError);
|
if (dwRet == 0) return;
|
||||||
if (dwError != ERROR_SUCCESS) return;
|
|
||||||
|
|
||||||
/* Path : executable.exe or "executable.exe" or C:\path\executable.exe or "C:\path\executable.exe" */
|
/* Path : executable.exe or "executable.exe" or C:\path\executable.exe or "C:\path\executable.exe" */
|
||||||
p = wcsrchr(UtilityProgramDirectory, L'\\');
|
p = wcsrchr(UtilityProgramDirectory, L'\\');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue