Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
programs/sc/sc.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/programs/sc/sc.c b/programs/sc/sc.c
index bd3064da2d8..4e642874237 100644
--- a/programs/sc/sc.c
+++ b/programs/sc/sc.c
@@ -207,7 +207,7 @@ int __cdecl wmain( int argc, const WCHAR *argv[] )
}
if (!parse_create_params( argc - 3, argv + 3, &cp ))
{
- WINE_WARN("failed to parse create …
[View More]parameters\n");
+ WINE_ERR("failed to parse create parameters\n");
CloseServiceHandle( manager );
return 1;
}
@@ -219,7 +219,7 @@ int __cdecl wmain( int argc, const WCHAR *argv[] )
CloseServiceHandle( service );
ret = TRUE;
}
- else WINE_TRACE("failed to create service %lu\n", GetLastError());
+ else WINE_ERR("failed to create service %lu\n", GetLastError());
}
else if (!wcsicmp( argv[1], L"description" ))
{
@@ -229,10 +229,10 @@ int __cdecl wmain( int argc, const WCHAR *argv[] )
SERVICE_DESCRIPTIONW sd;
sd.lpDescription = argc > 3 ? (WCHAR *)argv[3] : NULL;
ret = ChangeServiceConfig2W( service, SERVICE_CONFIG_DESCRIPTION, &sd );
- if (!ret) WINE_TRACE("failed to set service description %lu\n", GetLastError());
+ if (!ret) WINE_ERR("failed to set service description %lu\n", GetLastError());
CloseServiceHandle( service );
}
- else WINE_TRACE("failed to open service %lu\n", GetLastError());
+ else WINE_ERR("failed to open service %lu\n", GetLastError());
}
else if (!wcsicmp( argv[1], L"failure" ))
{
@@ -247,10 +247,10 @@ int __cdecl wmain( int argc, const WCHAR *argv[] )
HeapFree( GetProcessHeap(), 0, sfa.lpsaActions );
}
else
- WINE_WARN("failed to parse failure parameters\n");
+ WINE_ERR("failed to parse failure parameters\n");
CloseServiceHandle( service );
}
- else WINE_TRACE("failed to open service %lu\n", GetLastError());
+ else WINE_ERR("failed to open service %lu\n", GetLastError());
}
else if (!wcsicmp( argv[1], L"delete" ))
{
@@ -261,7 +261,7 @@ int __cdecl wmain( int argc, const WCHAR *argv[] )
if (!ret) WINE_TRACE("failed to delete service %lu\n", GetLastError());
CloseServiceHandle( service );
}
- else WINE_TRACE("failed to open service %lu\n", GetLastError());
+ else WINE_ERR("failed to open service %lu\n", GetLastError());
}
else if (!wcsicmp( argv[1], L"start" ))
{
@@ -272,7 +272,7 @@ int __cdecl wmain( int argc, const WCHAR *argv[] )
if (!ret) WINE_TRACE("failed to start service %lu\n", GetLastError());
CloseServiceHandle( service );
}
- else WINE_TRACE("failed to open service %lu\n", GetLastError());
+ else WINE_ERR("failed to open service %lu\n", GetLastError());
}
else if (!wcsicmp( argv[1], L"stop" ))
{
@@ -283,7 +283,7 @@ int __cdecl wmain( int argc, const WCHAR *argv[] )
if (!ret) WINE_TRACE("failed to stop service %lu\n", GetLastError());
CloseServiceHandle( service );
}
- else WINE_TRACE("failed to open service %lu\n", GetLastError());
+ else WINE_ERR("failed to open service %lu\n", GetLastError());
}
else if (!wcsicmp( argv[1], L"sdset" ))
{
--
2.35.1
[View Less]
Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com>
---
These patches fix Fall in Labirinth game which is using VX Ace RPG Maker and Enigma2 (not sure if and
how those two are related). The engine introduces a virtual file system by hotpatching a number of functions.
The issues preventing game start are which these patches are fixing:
- Hooked NtQueryInformationFile doesn't understand FileEndOfFileInformation and returns success while leaving
the output data …
[View More]unitialized;
- Hooked NtQueryDirectoryFile gets confused by the access mask given to NtOpenFile for directory file (patch 2).
dlls/kernelbase/file.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c
index 15bfe89df7a..cd6b62409ff 100644
--- a/dlls/kernelbase/file.c
+++ b/dlls/kernelbase/file.c
@@ -3629,7 +3629,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH SetFilePointerEx( HANDLE file, LARGE_INTEGER dista
LONGLONG pos;
IO_STATUS_BLOCK io;
FILE_POSITION_INFORMATION info;
- FILE_END_OF_FILE_INFORMATION eof;
+ FILE_STANDARD_INFORMATION eof;
switch(method)
{
@@ -3642,7 +3642,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH SetFilePointerEx( HANDLE file, LARGE_INTEGER dista
pos = info.CurrentByteOffset.QuadPart + distance.QuadPart;
break;
case FILE_END:
- if (NtQueryInformationFile( file, &io, &eof, sizeof(eof), FileEndOfFileInformation ))
+ if (NtQueryInformationFile( file, &io, &eof, sizeof(eof), FileStandardInformation ))
goto error;
pos = eof.EndOfFile.QuadPart + distance.QuadPart;
break;
--
2.35.1
[View Less]
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/ntdll/tests/atom.c | 187 ++++++++++++++++++++++++-----------------------
1 file changed, 94 insertions(+), 93 deletions(-)
diff --git a/dlls/ntdll/tests/atom.c b/dlls/ntdll/tests/atom.c
index 6bb789867bf..f93194d450f 100644
--- a/dlls/ntdll/tests/atom.c
+++ b/dlls/ntdll/tests/atom.c
@@ -20,6 +20,7 @@
* We use function pointers here as there is no import library for NTDLL on
* windows.
*/
+#undef WINE_NO_LONG_TYPES /* …
[View More]temporary for migration */
#include <stdio.h>
#include <stdarg.h>
@@ -100,30 +101,30 @@ static DWORD WINAPI RtlAtomTestThread(LPVOID Table)
WCHAR Name[64];
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &Atom);
- ok(!res, "Unable to find atom from another thread, retval: %x\n", res);
+ ok(!res, "Unable to find atom from another thread, retval: %lx\n", res);
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom2, &Atom);
- ok(!res, "Unable to lookup pinned atom in table, retval: %x\n", res);
+ ok(!res, "Unable to lookup pinned atom in table, retval: %lx\n", res);
res = pRtlQueryAtomInAtomTable(AtomTable, Atom, &RefCount, &PinCount, Name, &Len);
- ok(res == STATUS_BUFFER_TOO_SMALL, "We got wrong retval: %x\n", res);
+ ok(res == STATUS_BUFFER_TOO_SMALL, "We got wrong retval: %lx\n", res);
Len = 64;
res = pRtlQueryAtomInAtomTable(AtomTable, Atom, &RefCount, &PinCount, Name, &Len);
- ok(!res, "Failed with long enough buffer, retval: %x\n", res);
- ok(RefCount == 1, "Refcount was not 1 but %x\n", RefCount);
- ok(PinCount == 1, "Pincount was not 1 but %x\n", PinCount);
+ ok(!res, "Failed with long enough buffer, retval: %lx\n", res);
+ ok(RefCount == 1, "Refcount was not 1 but %lx\n", RefCount);
+ ok(PinCount == 1, "Pincount was not 1 but %lx\n", PinCount);
ok(!lstrcmpW(Name, testAtom2), "We found wrong atom!!\n");
- ok((lstrlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %d\n", Len);
+ ok((lstrlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %ld\n", Len);
Len = 64;
res = pRtlQueryAtomInAtomTable(AtomTable, Atom, NULL, NULL, Name, &Len);
- ok(!res, "RtlQueryAtomInAtomTable with optional args invalid failed, retval: %x\n", res);
+ ok(!res, "RtlQueryAtomInAtomTable with optional args invalid failed, retval: %lx\n", res);
ok(!lstrcmpW(Name, testAtom2), "Found Wrong atom!\n");
- ok((lstrlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %d\n", Len);
+ ok((lstrlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %ld\n", Len);
res = pRtlPinAtomInAtomTable(AtomTable, Atom);
- ok(!res, "Unable to pin atom in atom table, retval: %x\n", res);
+ ok(!res, "Unable to pin atom in atom table, retval: %lx\n", res);
return 0;
}
@@ -145,39 +146,39 @@ static void test_NtAtom(void)
if (!res)
{
res = pRtlDestroyAtomTable(AtomTable);
- ok(!res, "We could create the atom table, but we couldn't destroy it! retval: %x\n", res);
+ ok(!res, "We could create the atom table, but we couldn't destroy it! retval: %lx\n", res);
}
AtomTable = NULL;
res = pRtlCreateAtomTable(37, &AtomTable);
- ok(!res, "We're unable to create an atom table with a valid table size retval: %x\n", res);
+ ok(!res, "We're unable to create an atom table with a valid table size retval: %lx\n", res);
if (!res)
{
- ok( *(DWORD *)AtomTable == 0x6d6f7441, "wrong signature %x\n", *(DWORD *)AtomTable );
+ ok( *(DWORD *)AtomTable == 0x6d6f7441, "wrong signature %lx\n", *(DWORD *)AtomTable );
res = pRtlAddAtomToAtomTable(AtomTable, testAtom1, &Atom1);
- ok(!res, "We were unable to add a simple atom to the atom table, retval: %x\n", res);
+ ok(!res, "We were unable to add a simple atom to the atom table, retval: %lx\n", res);
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1Cap, &testAtom);
- ok(!res, "We were unable to find capital version of the atom, retval: %x\n", res);
+ ok(!res, "We were unable to find capital version of the atom, retval: %lx\n", res);
ok(Atom1 == testAtom, "Found wrong atom in table when querying capital atom\n");
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1Low, &testAtom);
- ok(!res, "Unable to find lowercase version of the atom, retval: %x\n", res);
+ ok(!res, "Unable to find lowercase version of the atom, retval: %lx\n", res);
ok(testAtom == Atom1, "Found wrong atom when querying lowercase atom\n");
res = pRtlAddAtomToAtomTable(AtomTable, EmptyAtom, &testEAtom);
- ok(res == STATUS_OBJECT_NAME_INVALID, "Got wrong retval, retval: %x\n", res);
+ ok(res == STATUS_OBJECT_NAME_INVALID, "Got wrong retval, retval: %lx\n", res);
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom);
- ok(!res, "Failed to find totally legitimate atom, retval: %x\n", res);
+ ok(!res, "Failed to find totally legitimate atom, retval: %lx\n", res);
ok(testAtom == Atom1, "Found wrong atom!\n");
res = pRtlAddAtomToAtomTable(AtomTable, testAtom2, &Atom2);
- ok(!res, "Unable to add other legitimate atom to table, retval: %x\n", res);
+ ok(!res, "Unable to add other legitimate atom to table, retval: %lx\n", res);
res = pRtlPinAtomInAtomTable(AtomTable, Atom2);
- ok(!res, "Unable to pin atom in atom table, retval: %x\n", res);
+ ok(!res, "Unable to pin atom in atom table, retval: %lx\n", res);
testThread = CreateThread(NULL, 0, RtlAtomTestThread, &AtomTable, 0, NULL);
WaitForSingleObject(testThread, INFINITE);
@@ -185,28 +186,28 @@ static void test_NtAtom(void)
Len = 64;
res = pRtlQueryAtomInAtomTable(AtomTable, Atom2, &RefCount, &PinCount, Name, &Len);
- ok(!res, "Unable to query atom in atom table, retval: %x\n", res);
- ok(RefCount == 1, "RefCount is not 1 but %x\n", RefCount);
- ok(PinCount == 1, "PinCount is not 1 but %x\n", PinCount);
+ ok(!res, "Unable to query atom in atom table, retval: %lx\n", res);
+ ok(RefCount == 1, "RefCount is not 1 but %lx\n", RefCount);
+ ok(PinCount == 1, "PinCount is not 1 but %lx\n", PinCount);
ok(!lstrcmpW(Name, testAtom2), "We found wrong atom\n");
- ok((lstrlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %d\n", Len);
+ ok((lstrlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %ld\n", Len);
res = pRtlEmptyAtomTable(AtomTable, FALSE);
- ok(!res, "Unable to empty atom table, retval %x\n", res);
+ ok(!res, "Unable to empty atom table, retval %lx\n", res);
Len = 64;
res = pRtlQueryAtomInAtomTable(AtomTable, Atom2, &RefCount, &PinCount, Name, &Len);
- ok(!res, "It seems RtlEmptyAtomTable deleted our pinned atom eaven though we asked it not to, retval: %x\n", res);
- ok(RefCount == 1, "RefCount is not 1 but %x\n", RefCount);
- ok(PinCount == 1, "PinCount is not 1 but %x\n", PinCount);
+ ok(!res, "It seems RtlEmptyAtomTable deleted our pinned atom eaven though we asked it not to, retval: %lx\n", res);
+ ok(RefCount == 1, "RefCount is not 1 but %lx\n", RefCount);
+ ok(PinCount == 1, "PinCount is not 1 but %lx\n", PinCount);
ok(!lstrcmpW(Name, testAtom2), "We found wrong atom\n");
- ok((lstrlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %d\n", Len);
+ ok((lstrlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %ld\n", Len);
Len = 8;
Name[0] = Name[1] = Name[2] = Name[3] = Name[4] = 0x1337;
res = pRtlQueryAtomInAtomTable(AtomTable, Atom2, NULL, NULL, Name, &Len);
- ok(!res, "query atom %x\n", res);
- ok(Len == 6, "wrong length %u\n", Len);
+ ok(!res, "query atom %lx\n", res);
+ ok(Len == 6, "wrong length %lu\n", Len);
ok(!memcmp(Name, testAtom2, Len), "wrong atom string\n");
ok(!Name[3], "wrong string termination\n");
ok(Name[4] == 0x1337, "buffer overwrite\n");
@@ -214,75 +215,75 @@ static void test_NtAtom(void)
Len = lstrlenW(testAtom2) * sizeof(WCHAR);
memset(Name, '.', sizeof(Name));
res = pRtlQueryAtomInAtomTable( AtomTable, Atom2, NULL, NULL, Name, &Len );
- ok(!res, "query atom %x\n", res);
- ok(Len == (lstrlenW(testAtom2) - 1) * sizeof(WCHAR), "wrong length %u\n", Len);
+ ok(!res, "query atom %lx\n", res);
+ ok(Len == (lstrlenW(testAtom2) - 1) * sizeof(WCHAR), "wrong length %lu\n", Len);
ok(!memcmp(testAtom2, Name, (lstrlenW(testAtom2) - 1) * sizeof(WCHAR)), "wrong atom name\n");
ok(Name[lstrlenW(testAtom2) - 1] == '\0', "wrong char\n");
ok(Name[lstrlenW(testAtom2)] == ('.' << 8) + '.', "wrong char\n");
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom2, &testAtom);
- ok(!res, "We can't find our pinned atom!! retval: %x\n", res);
+ ok(!res, "We can't find our pinned atom!! retval: %lx\n", res);
ok(testAtom == Atom2, "We found wrong atom!!!\n");
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom);
- ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "We found the atom in our table eaven though we asked RtlEmptyAtomTable to remove it, retval: %x\n", res);
+ ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "We found the atom in our table eaven though we asked RtlEmptyAtomTable to remove it, retval: %lx\n", res);
res = pRtlAddAtomToAtomTable(AtomTable, testAtom3, &Atom3);
- ok(!res, "Unable to add atom to table, retval: %x\n", res);
+ ok(!res, "Unable to add atom to table, retval: %lx\n", res);
res = pRtlEmptyAtomTable(AtomTable, TRUE);
- ok(!res, "Unable to empty atom table, retval: %x\n", res);
+ ok(!res, "Unable to empty atom table, retval: %lx\n", res);
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom2, &testAtom);
- ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "The pinned atom should be removed, retval: %x\n", res);
+ ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "The pinned atom should be removed, retval: %lx\n", res);
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom3, &testAtom);
- ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "Non pinned atom should also be removed, retval: %x\n", res);
+ ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "Non pinned atom should also be removed, retval: %lx\n", res);
res = pRtlDestroyAtomTable(AtomTable);
- ok(!res, "Can't destroy atom table, retval: %x\n", res);
+ ok(!res, "Can't destroy atom table, retval: %lx\n", res);
}
AtomTable = NULL;
res = pRtlCreateAtomTable(37, &AtomTable);
- ok(!res, "Unable to create atom table, retval: %x\n", res);
+ ok(!res, "Unable to create atom table, retval: %lx\n", res);
if (!res)
{
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom);
- ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "Didn't get expected retval with querying an empty atom table, retval: %x\n", res);
+ ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "Didn't get expected retval with querying an empty atom table, retval: %lx\n", res);
res = pRtlAddAtomToAtomTable(AtomTable, testAtom1, &Atom1);
- ok(!res, "Unable to add atom to atom table, retval %x\n", res);
+ ok(!res, "Unable to add atom to atom table, retval %lx\n", res);
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom);
- ok(!res, "Can't find previously added atom in table, retval: %x\n", res);
- ok(testAtom == Atom1, "Found wrong atom! retval: %x\n", res);
+ ok(!res, "Can't find previously added atom in table, retval: %lx\n", res);
+ ok(testAtom == Atom1, "Found wrong atom! retval: %lx\n", res);
res = pRtlDeleteAtomFromAtomTable(AtomTable, Atom1);
- ok(!res, "Unable to delete atom from table, retval: %x\n", res);
+ ok(!res, "Unable to delete atom from table, retval: %lx\n", res);
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom);
- ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "Able to find previously deleted atom in table, retval: %x\n", res);
+ ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "Able to find previously deleted atom in table, retval: %lx\n", res);
res = pRtlAddAtomToAtomTable(AtomTable, testAtom1, &Atom1);
- ok(!res, "Unable to add atom to atom table, retval: %x\n", res);
+ ok(!res, "Unable to add atom to atom table, retval: %lx\n", res);
Len = 0;
res = pRtlQueryAtomInAtomTable(AtomTable, Atom1, NULL, NULL, Name, &Len);
- ok(res == STATUS_BUFFER_TOO_SMALL, "Got wrong retval, retval: %x\n", res);
- ok((lstrlenW(testAtom1) * sizeof(WCHAR)) == Len || broken(!Len) /* nt4 */, "Got wrong length %x\n", Len);
+ ok(res == STATUS_BUFFER_TOO_SMALL, "Got wrong retval, retval: %lx\n", res);
+ ok((lstrlenW(testAtom1) * sizeof(WCHAR)) == Len || broken(!Len) /* nt4 */, "Got wrong length %lx\n", Len);
if (!Len) pNtAddAtomNT4 = (void *)pNtAddAtom;
res = pRtlPinAtomInAtomTable(AtomTable, Atom1);
- ok(!res, "Unable to pin atom in atom table, retval: %x\n", res);
+ ok(!res, "Unable to pin atom in atom table, retval: %lx\n", res);
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom);
- ok(!res, "Unable to find atom in atom table, retval: %x\n", res);
+ ok(!res, "Unable to find atom in atom table, retval: %lx\n", res);
ok(testAtom == Atom1, "Wrong atom found\n");
res = pRtlDeleteAtomFromAtomTable(AtomTable, Atom1);
- ok(res == STATUS_WAS_LOCKED, "Unable to delete atom from table, retval: %x\n", res);
+ ok(res == STATUS_WAS_LOCKED, "Unable to delete atom from table, retval: %lx\n", res);
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom);
ok(!res, "Able to find deleted atom in table\n");
@@ -305,82 +306,82 @@ static void test_NtIntAtom(void)
AtomTable = NULL;
res = pRtlCreateAtomTable(37, &AtomTable);
- ok(!res, "Unable to create atom table, %x\n", res);
+ ok(!res, "Unable to create atom table, %lx\n", res);
if (!res)
{
/* According to the kernel32 functions, integer atoms are only allowed from
* 0x0001 to 0xbfff and not 0xc000 to 0xffff, which is correct */
res = pRtlAddAtomToAtomTable(AtomTable, NULL, &testAtom);
- ok(res == STATUS_INVALID_PARAMETER, "Didn't get expected result from adding 0 int atom, retval: %x\n", res);
+ ok(res == STATUS_INVALID_PARAMETER, "Didn't get expected result from adding 0 int atom, retval: %lx\n", res);
for (i = 1; i <= 0xbfff; i++)
{
res = pRtlAddAtomToAtomTable(AtomTable, (LPWSTR)i, &testAtom);
- ok(!res, "Unable to add valid integer atom %li, retval: %x\n", i, res);
+ ok(!res, "Unable to add valid integer atom %Ii, retval: %lx\n", i, res);
}
for (i = 1; i <= 0xbfff; i++)
{
res = pRtlLookupAtomInAtomTable(AtomTable, (LPWSTR)i, &testAtom);
- ok(!res, "Unable to find int atom %li, retval: %x\n", i, res);
+ ok(!res, "Unable to find int atom %Ii, retval: %lx\n", i, res);
if (!res)
{
res = pRtlPinAtomInAtomTable(AtomTable, testAtom);
- ok(!res, "Unable to pin int atom %li, retval: %x\n", i, res);
+ ok(!res, "Unable to pin int atom %Ii, retval: %lx\n", i, res);
}
}
for (i = 0xc000; i <= 0xffff; i++)
{
res = pRtlAddAtomToAtomTable(AtomTable, (LPWSTR)i, &testAtom);
- ok(res, "Able to illeageal integer atom %li, retval: %x\n", i, res);
+ ok(res, "Able to illeageal integer atom %Ii, retval: %lx\n", i, res);
}
res = pRtlDestroyAtomTable(AtomTable);
- ok(!res, "Unable to destroy atom table, retval: %x\n", res);
+ ok(!res, "Unable to destroy atom table, retval: %lx\n", res);
}
AtomTable = NULL;
res = pRtlCreateAtomTable(37, &AtomTable);
- ok(!res, "Unable to create atom table, %x\n", res);
+ ok(!res, "Unable to create atom table, %lx\n", res);
if (!res)
{
res = pRtlLookupAtomInAtomTable(AtomTable, (PWSTR)123, &testAtom);
- ok(!res, "Unable to query atom in atom table, retval: %x\n", res);
+ ok(!res, "Unable to query atom in atom table, retval: %lx\n", res);
res = pRtlAddAtomToAtomTable(AtomTable, testAtomInt, &testAtom);
- ok(!res, "Unable to add int atom to table, retval: %x\n", res);
+ ok(!res, "Unable to add int atom to table, retval: %lx\n", res);
res = pRtlAddAtomToAtomTable(AtomTable, testAtomIntInv, &testAtom);
- ok(!res, "Unable to add int atom to table, retval: %x\n", res);
+ ok(!res, "Unable to add int atom to table, retval: %lx\n", res);
res = pRtlAddAtomToAtomTable(AtomTable, (PWSTR)123, &testAtom);
- ok(!res, "Unable to add int atom to table, retval: %x\n", res);
+ ok(!res, "Unable to add int atom to table, retval: %lx\n", res);
res = pRtlAddAtomToAtomTable(AtomTable, (PWSTR)123, &testAtom);
- ok(!res, "Unable to re-add int atom to table, retval: %x\n", res);
+ ok(!res, "Unable to re-add int atom to table, retval: %lx\n", res);
Len = 64;
res = pRtlQueryAtomInAtomTable(AtomTable, testAtom, &RefCount, &PinCount, Name, &Len);
- ok(!res, "Unable to query atom in atom table, retval: %x\n", res);
- ok(PinCount == 1, "Expected pincount 1 but got %x\n", PinCount);
- ok(RefCount == 1, "Expected refcount 1 but got %x\n", RefCount);
+ ok(!res, "Unable to query atom in atom table, retval: %lx\n", res);
+ ok(PinCount == 1, "Expected pincount 1 but got %lx\n", PinCount);
+ ok(RefCount == 1, "Expected refcount 1 but got %lx\n", RefCount);
ok(!lstrcmpW(testAtomOTT, Name), "Got wrong atom name\n");
- ok((lstrlenW(testAtomOTT) * sizeof(WCHAR)) == Len, "Got wrong len %d\n", Len);
+ ok((lstrlenW(testAtomOTT) * sizeof(WCHAR)) == Len, "Got wrong len %ld\n", Len);
res = pRtlPinAtomInAtomTable(AtomTable, testAtom);
- ok(!res, "Unable to pin int atom, retval: %x\n", res);
+ ok(!res, "Unable to pin int atom, retval: %lx\n", res);
res = pRtlPinAtomInAtomTable(AtomTable, testAtom);
- ok(!res, "Unable to pin int atom, retval: %x\n", res);
+ ok(!res, "Unable to pin int atom, retval: %lx\n", res);
res = pRtlQueryAtomInAtomTable(AtomTable, testAtom, &RefCount, &PinCount, NULL, NULL);
- ok(!res, "Unable to query atom in atom table, retval: %x\n", res);
- ok(PinCount == 1, "Expected pincount 1 but got %x\n", PinCount);
- ok(RefCount == 1, "Expected refcount 1 but got %x\n", RefCount);
+ ok(!res, "Unable to query atom in atom table, retval: %lx\n", res);
+ ok(PinCount == 1, "Expected pincount 1 but got %lx\n", PinCount);
+ ok(RefCount == 1, "Expected refcount 1 but got %lx\n", RefCount);
res = pRtlDestroyAtomTable(AtomTable);
- ok(!res, "Unable to destroy atom table, retval: %x\n", res);
+ ok(!res, "Unable to destroy atom table, retval: %lx\n", res);
}
}
@@ -394,40 +395,40 @@ static void test_NtRefPinAtom(void)
AtomTable = NULL;
res = pRtlCreateAtomTable(37, &AtomTable);
- ok(!res, "Unable to create atom table, %x\n", res);
+ ok(!res, "Unable to create atom table, %lx\n", res);
if (!res)
{
res = pRtlAddAtomToAtomTable(AtomTable, testAtom1, &Atom);
- ok(!res, "Unable to add our atom to the atom table, retval: %x\n", res);
+ ok(!res, "Unable to add our atom to the atom table, retval: %lx\n", res);
res = pRtlAddAtomToAtomTable(AtomTable, testAtom1, &Atom);
- ok(!res, "Unable to add our atom to the atom table, retval: %x\n", res);
+ ok(!res, "Unable to add our atom to the atom table, retval: %lx\n", res);
res = pRtlAddAtomToAtomTable(AtomTable, testAtom1, &Atom);
- ok(!res, "Unable to add our atom to the atom table, retval: %x\n", res);
+ ok(!res, "Unable to add our atom to the atom table, retval: %lx\n", res);
res = pRtlQueryAtomInAtomTable(AtomTable, Atom, &RefCount, &PinCount, NULL, NULL);
- ok(!res, "Unable to query atom in atom table, retval: %x\n", res);
- ok(PinCount == 0, "Expected pincount 0 but got %x\n", PinCount);
- ok(RefCount == 3, "Expected refcount 3 but got %x\n", RefCount);
+ ok(!res, "Unable to query atom in atom table, retval: %lx\n", res);
+ ok(PinCount == 0, "Expected pincount 0 but got %lx\n", PinCount);
+ ok(RefCount == 3, "Expected refcount 3 but got %lx\n", RefCount);
res = pRtlPinAtomInAtomTable(AtomTable, Atom);
- ok(!res, "Unable to pin atom in atom table, retval: %x\n", res);
+ ok(!res, "Unable to pin atom in atom table, retval: %lx\n", res);
res = pRtlPinAtomInAtomTable(AtomTable, Atom);
- ok(!res, "Unable to pin atom in atom table, retval: %x\n", res);
+ ok(!res, "Unable to pin atom in atom table, retval: %lx\n", res);
res = pRtlPinAtomInAtomTable(AtomTable, Atom);
- ok(!res, "Unable to pin atom in atom table, retval: %x\n", res);
+ ok(!res, "Unable to pin atom in atom table, retval: %lx\n", res);
res = pRtlQueryAtomInAtomTable(AtomTable, Atom, &RefCount, &PinCount, NULL, NULL);
- ok(!res, "Unable to query atom in atom table, retval: %x\n", res);
- ok(PinCount == 1, "Expected pincount 1 but got %x\n", PinCount);
- ok(RefCount == 3, "Expected refcount 3 but got %x\n", RefCount);
+ ok(!res, "Unable to query atom in atom table, retval: %lx\n", res);
+ ok(PinCount == 1, "Expected pincount 1 but got %lx\n", PinCount);
+ ok(RefCount == 3, "Expected refcount 3 but got %lx\n", RefCount);
res = pRtlDestroyAtomTable(AtomTable);
- ok(!res, "Unable to destroy atom table, retval: %x\n", res);
+ ok(!res, "Unable to destroy atom table, retval: %lx\n", res);
}
}
@@ -444,7 +445,7 @@ static void test_Global(void)
else
res = pNtAddAtom(testAtom1, lstrlenW(testAtom1) * sizeof(WCHAR), &atom);
- ok(!res, "Added atom (%x)\n", res);
+ ok(!res, "Added atom (%lx)\n", res);
memset( ptr, 0xcc, sizeof(ptr) );
res = pNtQueryInformationAtom( atom, AtomBasicInformation, (void*)ptr, ptr_size, NULL );
@@ -456,14 +457,14 @@ static void test_Global(void)
ptr_size = sizeof(ATOM_BASIC_INFORMATION);
res = pNtQueryInformationAtom( atom, AtomBasicInformation, (void*)ptr, ptr_size, NULL );
- ok(res == STATUS_BUFFER_TOO_SMALL, "wrong return status (%x)\n", res);
+ ok(res == STATUS_BUFFER_TOO_SMALL, "wrong return status (%lx)\n", res);
ok(abi->NameLength == lstrlenW(testAtom1) * sizeof(WCHAR) || broken(abi->NameLength == sizeof(WCHAR)), /* nt4 */
"string length %u\n",abi->NameLength);
memset( ptr, 0xcc, sizeof(ptr) );
ptr_size = sizeof(ATOM_BASIC_INFORMATION) + lstrlenW(testAtom1) * sizeof(WCHAR);
res = pNtQueryInformationAtom( atom, AtomBasicInformation, (void*)ptr, ptr_size, NULL );
- ok(!res, "atom lookup %x\n", res);
+ ok(!res, "atom lookup %lx\n", res);
ok(!lstrcmpW(abi->Name, testAtom1), "strings don't match\n");
ok(abi->NameLength == lstrlenW(testAtom1) * sizeof(WCHAR), "wrong string length\n");
ok(abi->Name[lstrlenW(testAtom1)] == 0, "buffer overwrite %x\n", abi->Name[lstrlenW(testAtom1)]);
[View Less]
On 3/7/22 09:09, Francisco Casas wrote:
> Hello,
>
> March 4, 2022 10:01 PM, "Zebediah Figura (she/her)" <zfigura(a)codeweavers.com> wrote:
>
>> On 3/2/22 12:31, Francisco Casas wrote:
>>
>>> Signed-off-by: Francisco Casas <fcasas(a)codeweavers.com>
>>> ---
>>> v3:
>>> - This patch is new.
>>> - While we don't use the default writemask for matrices (yet),
>>> I think it is good for consistency, since we …
[View More]are getting rid
>>> of the type_is_single_reg() function.
>>> Signed-off-by: Francisco Casas <fcasas(a)codeweavers.com>
>>> ---
>>> libs/vkd3d-shader/hlsl.c | 12 ++++++++----
>>> 1 file changed, 8 insertions(+), 4 deletions(-)
>>> diff --git a/libs/vkd3d-shader/hlsl.c b/libs/vkd3d-shader/hlsl.c
>>> index 00a374b4..5152aec4 100644
>>> --- a/libs/vkd3d-shader/hlsl.c
>>> +++ b/libs/vkd3d-shader/hlsl.c
>>> @@ -527,9 +527,13 @@ struct hlsl_ir_var *hlsl_new_synthetic_var(struct hlsl_ctx *ctx, const char
>>> *nam
>>> return var;
>>> }
>>>> -static bool type_is_single_reg(const struct hlsl_type *type)
>>> +static unsigned int type_default_writemask(const struct hlsl_type *type)
>>> - return type->type == HLSL_CLASS_SCALAR || type->type == HLSL_CLASS_VECTOR;
>>> + if (type->type == HLSL_CLASS_MATRIX && hlsl_type_is_row_major(type))
>>> + return (1 << type->dimy) - 1;
>>
>> I don't understand the logic here. A nonzero writemask should encompass the whole type, which this
>> does not. Why do we need this?
>>
>
> Well, I am not totally sure this patch is actually necessary, I just
> thought it could be a good default behavior since we are getting rid of
> hlsl_is_single_reg(), but maybe I am overthinking...
FWIW, I don't know that that instance of type_is_single_reg()
necessarily needs to go away. Although given 1/8, we could certainly say
that a zero writemask always means the whole variable, and let
hlsl_reg_from_deref() deal with that even for scalar and vector types.
>
> As you know, if we have a HLSL_IR_STORE with a whole matrix in the rhs,
> we have to split it in up to 4 stores, each one with a writemask that
> matches the result of this type_default_writemask() here.
Well, yeah, but we should be using the result type in that case, i.e.
vectors rather than matrices.
>
> The patch from Giovanni that implements this split_matrix_copies()
> pass (which is many patches ahead), makes sure to do it with only vectors
> in the rhs.
>
> But currently, if I am not mistaken (I could be), a HLSL_IR_STORE with a
> matrix in the rhs is producing a single MOV instruction for the first
> register that the matrix uses. Which maybe could be problematic in sm4
> with matrices with major size =1 and minor size <4.
Currently it's not producing anything, actually; we have a FIXME for
that case in write_sm[14]_instructions().
>
> I added this default behavior thinking on those cases (if they could actually
> happen), and maybe because I thought it could be useful in the future if for
> some reason we wanted to implement split_matrix_copies() in other way, by
> directly copying the store instructions.
>
> But well, maybe I'll just do
> ---
> if (!writemask && (type->type == HLSL_CLASS_SCALAR || type->type == HLSL_CLASS_VECTOR))
> writemask = (1 << rhs->data_type->dimx) - 1;
> ---
> or remove the patch altogether in the next version of the batch.
>
>
> Best regards,
> Francisco
[View Less]
supersedes 227544
As described in bugzilla ticket, when calling CreateProcess:
- with "default" console inheritance (no CREATE_NEW_CONSOLE
nor DETACHED_PROCESS flags),
- when parent is not attached to a console
- and when the child's subsystem is CUI
, native behaves as if CREATE_NEW_CONSOLE was passed.
builtin doesn't...
this serie:
- adds a test case for showing the CUI/GUI discrepancies
- fixes kernelbase accordingly
- but also requires to fix all usage of CreateProcess in Wine Code
…
[View More]that would now generate the creation of a console
+ a couple of programs moved into the GUI subsystem (to avoid console
creation on invocation)
+ when looking to the other usage of CreateProcess, I only convinced
myself to adapt one of them
V1 => V2:
- don't mess up with the number of patches in the serie
- no longer modify makedep for creating cui vs gui test executable, but
copy current *_test.exe executable and adapt its subsystem to the need
V2 => V3:
- removed the hacks in wow64 redirect, and let programs/uninstaller and
programs/wusa belong to the GUI subsystem instead
- force console creation for wine initial process when a) none of the unix
fd are attached to a TTY, b) the initial process is in CUI subsystem
V3 => V4:
- included Jacek's comments:
+ removed unneeded casts
+ move CreateProcess change in programs/services into a separate patch
+ I didn't change programs/start as you suggested. Testing on W10 shows
that 'start /b cui.exe' from a cmd prompt just reuses the current
console.
V4 => V5:
- removed patches applied in V4
- added tweaks in start.exe not so create a console when detached
And Marvin will generate errors for Chinese and Japanese VM in console
testing that are independant of this serie.
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
Eric Pouech (4):
dlls/kernel32/tests: add some console tests about creating cui vs gui processes
programs/services: start services detached from console
programs/start: force no console creation when using start /exec
dlls/kernelbase: handle corner case in CreateProcess
dlls/kernel32/tests/console.c | 85 +++++++++++++++++++++++++++++++++++
dlls/kernelbase/process.c | 6 ++-
programs/services/services.c | 2 +-
programs/start/start.c | 7 ++-
4 files changed, 96 insertions(+), 4 deletions(-)
[View Less]