Wine-Devel
By thread
wine-devel@list.winehq.org
By month
Messages by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
November 2021
- 83 participants
- 2620 messages
[PATCH 3/5] winegstreamer: Implement IWMReader::SetOutputProps().
by Zebediah Figura
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/winegstreamer/wm_asyncreader.c | 10 ++++++----
dlls/wmvcore/tests/wmvcore.c | 11 ++---------
2 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/dlls/winegstreamer/wm_asyncreader.c b/dlls/winegstreamer/wm_asyncreader.c
index e7bf667bf90..860ec1cdd5e 100644
--- a/dlls/winegstreamer/wm_asyncreader.c
+++ b/dlls/winegstreamer/wm_asyncreader.c
@@ -123,11 +123,13 @@ static HRESULT WINAPI WMReader_GetOutputProps(IWMReader *iface, DWORD output, IW
return wm_reader_get_output_props(&reader->reader, output, props);
}
-static HRESULT WINAPI WMReader_SetOutputProps(IWMReader *iface, DWORD output_num, IWMOutputMediaProps *output)
+static HRESULT WINAPI WMReader_SetOutputProps(IWMReader *iface, DWORD output, IWMOutputMediaProps *props)
{
- struct async_reader *This = impl_from_IWMReader(iface);
- FIXME("(%p)->(%u %p)\n", This, output_num, output);
- return E_NOTIMPL;
+ struct async_reader *reader = impl_from_IWMReader(iface);
+
+ TRACE("reader %p, output %u, props %p.\n", reader, output, props);
+
+ return wm_reader_set_output_props(&reader->reader, output, props);
}
static HRESULT WINAPI WMReader_GetOutputFormatCount(IWMReader *iface, DWORD output, DWORD *count)
diff --git a/dlls/wmvcore/tests/wmvcore.c b/dlls/wmvcore/tests/wmvcore.c
index 666cf65a462..c1972b29eb9 100644
--- a/dlls/wmvcore/tests/wmvcore.c
+++ b/dlls/wmvcore/tests/wmvcore.c
@@ -1483,14 +1483,7 @@ static void test_async_reader_types(void)
check_video_type(mt);
hr = IWMReader_SetOutputProps(reader, output_number, output_props);
- todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
- if (hr != S_OK)
- {
- ref = IWMOutputMediaProps_Release(output_props);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
- winetest_pop_context();
- continue;
- }
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IWMReader_SetOutputProps(reader, 1 - output_number, output_props);
if (!i)
ok(hr == NS_E_INCOMPATIBLE_FORMAT /* win < 8, win10 1507-1809 */
@@ -1498,7 +1491,7 @@ static void test_async_reader_types(void)
else
todo_wine ok(hr == NS_E_INVALID_REQUEST, "Got hr %#x.\n", hr);
hr = IWMReader_SetOutputProps(reader, 2, output_props);
- todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
hr = IWMReader_GetOutputProps(reader, output_number, &output_props2);
ok(hr == S_OK, "Got hr %#x.\n", hr);
--
2.33.0
Nov. 4, 2021
[PATCH 2/5] winegstreamer: Implement IWMReader::GetOutputFormatCount().
by Zebediah Figura
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/winegstreamer/wm_asyncreader.c | 10 ++++++----
dlls/wmvcore/tests/wmvcore.c | 8 ++++----
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/dlls/winegstreamer/wm_asyncreader.c b/dlls/winegstreamer/wm_asyncreader.c
index dd5b01b3e5c..e7bf667bf90 100644
--- a/dlls/winegstreamer/wm_asyncreader.c
+++ b/dlls/winegstreamer/wm_asyncreader.c
@@ -130,11 +130,13 @@ static HRESULT WINAPI WMReader_SetOutputProps(IWMReader *iface, DWORD output_num
return E_NOTIMPL;
}
-static HRESULT WINAPI WMReader_GetOutputFormatCount(IWMReader *iface, DWORD output_num, DWORD *formats)
+static HRESULT WINAPI WMReader_GetOutputFormatCount(IWMReader *iface, DWORD output, DWORD *count)
{
- struct async_reader *This = impl_from_IWMReader(iface);
- FIXME("(%p)->(%u %p)\n", This, output_num, formats);
- return E_NOTIMPL;
+ struct async_reader *reader = impl_from_IWMReader(iface);
+
+ TRACE("reader %p, output %u, count %p.\n", reader, output, count);
+
+ return wm_reader_get_output_format_count(&reader->reader, output, count);
}
static HRESULT WINAPI WMReader_GetOutputFormat(IWMReader *iface, DWORD output,
diff --git a/dlls/wmvcore/tests/wmvcore.c b/dlls/wmvcore/tests/wmvcore.c
index 6fbc2ed6a3e..666cf65a462 100644
--- a/dlls/wmvcore/tests/wmvcore.c
+++ b/dlls/wmvcore/tests/wmvcore.c
@@ -1441,8 +1441,8 @@ static void test_async_reader_types(void)
count = 0;
hr = IWMReader_GetOutputFormatCount(reader, output_number, &count);
- todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
- todo_wine ok(count > 0, "Got count %u.\n", count);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(count > 0, "Got count %u.\n", count);
for (j = 0; j < count; ++j)
{
@@ -1518,7 +1518,7 @@ static void test_async_reader_types(void)
}
hr = IWMReader_GetOutputFormat(reader, output_number, count, &output_props);
- todo_wine ok(hr == NS_E_INVALID_OUTPUT_FORMAT, "Got hr %#x.\n", hr);
+ ok(hr == NS_E_INVALID_OUTPUT_FORMAT, "Got hr %#x.\n", hr);
hr = IWMReader_GetOutputProps(reader, output_number, &output_props);
ok(hr == S_OK, "Got hr %#x.\n", hr);
@@ -1540,7 +1540,7 @@ static void test_async_reader_types(void)
count = 0xdeadbeef;
hr = IWMReader_GetOutputFormatCount(reader, 2, &count);
- todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
ok(count == 0xdeadbeef, "Got count %#x.\n", count);
output_props = (void *)0xdeadbeef;
--
2.33.0
Nov. 4, 2021
[PATCH 1/5] winegstreamer: Implement IWMReader::GetOutputFormat().
by Zebediah Figura
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/winegstreamer/wm_asyncreader.c | 11 +++++++----
dlls/wmvcore/tests/wmvcore.c | 23 ++++++++++-------------
2 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/dlls/winegstreamer/wm_asyncreader.c b/dlls/winegstreamer/wm_asyncreader.c
index 6771b590a71..dd5b01b3e5c 100644
--- a/dlls/winegstreamer/wm_asyncreader.c
+++ b/dlls/winegstreamer/wm_asyncreader.c
@@ -137,11 +137,14 @@ static HRESULT WINAPI WMReader_GetOutputFormatCount(IWMReader *iface, DWORD outp
return E_NOTIMPL;
}
-static HRESULT WINAPI WMReader_GetOutputFormat(IWMReader *iface, DWORD output_num, DWORD format_num, IWMOutputMediaProps **props)
+static HRESULT WINAPI WMReader_GetOutputFormat(IWMReader *iface, DWORD output,
+ DWORD index, IWMOutputMediaProps **props)
{
- struct async_reader *This = impl_from_IWMReader(iface);
- FIXME("(%p)->(%u %u %p)\n", This, output_num, format_num, props);
- return E_NOTIMPL;
+ struct async_reader *reader = impl_from_IWMReader(iface);
+
+ TRACE("reader %p, output %u, index %u, props %p.\n", reader, output, index, props);
+
+ return wm_reader_get_output_format(&reader->reader, output, index, props);
}
static HRESULT WINAPI WMReader_Start(IWMReader *iface, QWORD start, QWORD duration, float rate, void *context)
diff --git a/dlls/wmvcore/tests/wmvcore.c b/dlls/wmvcore/tests/wmvcore.c
index 148b4f5f373..6fbc2ed6a3e 100644
--- a/dlls/wmvcore/tests/wmvcore.c
+++ b/dlls/wmvcore/tests/wmvcore.c
@@ -1419,21 +1419,18 @@ static void test_async_reader_types(void)
* with. In particular it has to be PCM. */
hr = IWMReader_GetOutputFormat(reader, output_number, 0, &output_props);
- todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
- if (hr == S_OK)
- {
- ret_size = sizeof(mt2_buffer);
- hr = IWMOutputMediaProps_GetMediaType(output_props, mt2, &ret_size);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ret_size = sizeof(mt2_buffer);
+ hr = IWMOutputMediaProps_GetMediaType(output_props, mt2, &ret_size);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
- ref = IWMOutputMediaProps_Release(output_props);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ref = IWMOutputMediaProps_Release(output_props);
+ ok(!ref, "Got outstanding refcount %d.\n", ref);
- /* The sample size might differ. */
- mt2->lSampleSize = mt->lSampleSize;
- ok(compare_media_types(mt, mt2), "Media types didn't match.\n");
- }
+ /* The sample size might differ. */
+ mt2->lSampleSize = mt->lSampleSize;
+ ok(compare_media_types(mt, mt2), "Media types didn't match.\n");
}
else
{
@@ -1553,7 +1550,7 @@ static void test_async_reader_types(void)
output_props = (void *)0xdeadbeef;
hr = IWMReader_GetOutputFormat(reader, 2, 0, &output_props);
- todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
ok(output_props == (void *)0xdeadbeef, "Got output props %p.\n", output_props);
IWMReaderAdvanced2_Release(advanced);
--
2.33.0
Nov. 4, 2021
Re: [PATCH v2 1/3] include: Rename LDR_WINE_INTERNAL to LDR_WINE_BUILTIN.
by Zebediah Figura
On 11/4/21 2:28 PM, Alexandre Julliard wrote:
> Zebediah Figura <zfigura(a)codeweavers.com> writes:
>
>> On 11/4/21 4:31 AM, Alexandre Julliard wrote:
>>> Zebediah Figura <zfigura(a)codeweavers.com> writes:
>>>
>>>> @@ -3394,7 +3394,7 @@ typedef void (CALLBACK *PLDR_DLL_NOTIFICATION_FUNCTION)(ULONG, LDR_DLL_NOTIFICAT
>>>> /* these ones is Wine specific */
>>>> #define LDR_DONT_RESOLVE_REFS 0x40000000
>>>> -#define LDR_WINE_INTERNAL 0x80000000
>>>> +#define LDR_WINE_BUILTIN 0x80000000
>>> That doesn't seem necessary.
>>>
>>
>> No, it's not necessary. The idea is that LDR_WINE_INTERNAL is somewhat
>> ambiguous, especially if we're introducing a second sense in which a
>> module can be internally marked, and I wanted to clarify it.
>
> Actually I'm not convinced we need a second name here. It seems to me
> that the "system" flag can be a purely ntdll-internal thing that doesn't
> have to be exposed in the LDR data.
>
> Arguably the system modules themselves should not be exposed in the
> process module list, but that may be more complicated...
>
Indeed, it could be made a separate field in WINE_MODREF. I assumed that
the best thing to do would be to stash it in the flags field, alongside
LDR_DONT_RESOLVE_REFS which also isn't used outside of ntdll, but maybe
that one deserves to be changed too.
Nov. 4, 2021
AppDB: Bug #49999 - It should be possible to submit results for all versions of the current stable branch
by Joerg Schiermeier
Hi list!
According to Austins recommendation to discuss the following bug in
Wine-devel I want to do exactly this:
it's about:
https://bugs.winehq.org/show_bug.cgi?id=49999
The original bug reporter (elk_aide(a)e-mail-address-shortened) wrotes:
---cite---
Lots of Linux Distributions and FreeBSD only ship the stable releases
of wine in their repositories. They often stick to the first minor
release (In Debian and FreeBSD this currently is 5.0 for example).
I think it should be possible to submit tests with the distribution's
own most recent wine package, as that probably is the main way wine is
aquired.
Therefore the AppDB list should include the "outdated" minor releases
of the current stable branch for selection aswell. This is currently
not the case (only 5.0.2 is available for selection currently).
---/cite---
In my point of view this is not the problem of the wine authors. The
maintainer of a distro will have to maintain the (stable) wine packages
he/she supervises and should always provide the latest stable version
of wine.
So there is no need to open this door in the AppDB formula.
Consequently I recommended to flag this bug as "wont fix".
Austin (English) disagrees and reopens the bug and suggest this
discussion thread.
So please, write, what you think about this point!
(And please excuse also my bad English ...:).
--
Kind regards
Joerg Schiermeier
Bielefeld/Germany
Nov. 4, 2021
[PATCH 2/2] scrrun: Use wide string literals.
by Nikolay Sivov
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/scrrun/filesystem.c | 66 +++++++++++++---------------------------
1 file changed, 21 insertions(+), 45 deletions(-)
diff --git a/dlls/scrrun/filesystem.c b/dlls/scrrun/filesystem.c
index c42096ae1f6..68ef1786af9 100644
--- a/dlls/scrrun/filesystem.c
+++ b/dlls/scrrun/filesystem.c
@@ -37,9 +37,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(scrrun);
-static const WCHAR bsW[] = {'\\',0};
-static const WCHAR utf16bom = 0xfeff;
-
struct filesystem {
struct provideclassinfo classinfo;
IFileSystem3 IFileSystem3_iface;
@@ -204,12 +201,9 @@ static HRESULT create_drivecoll_enum(struct drivecollection*, IUnknown**);
static inline BOOL is_dir_data(const WIN32_FIND_DATAW *data)
{
- static const WCHAR dotdotW[] = {'.','.',0};
- static const WCHAR dotW[] = {'.',0};
-
return (data->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) &&
- wcscmp(data->cFileName, dotdotW) &&
- wcscmp(data->cFileName, dotW);
+ wcscmp(data->cFileName, L"..") &&
+ wcscmp(data->cFileName, L".");
}
static inline BOOL is_file_data(const WIN32_FIND_DATAW *data)
@@ -223,8 +217,7 @@ static BSTR get_full_path(BSTR path, const WIN32_FIND_DATAW *data)
WCHAR buffW[MAX_PATH];
lstrcpyW(buffW, path);
- if (path[len-1] != '\\')
- lstrcatW(buffW, bsW);
+ if (path[len-1] != '\\') wcscat(buffW, L"\\");
lstrcatW(buffW, data->cFileName);
return SysAllocString(buffW);
@@ -698,6 +691,7 @@ static const ITextStreamVtbl textstreamvtbl = {
static HRESULT create_textstream(const WCHAR *filename, DWORD disposition, IOMode mode, Tristate format, ITextStream **ret)
{
+ static const unsigned short utf16bom = 0xfeff;
struct textstream *stream;
DWORD access = 0;
HRESULT hr;
@@ -1196,16 +1190,14 @@ static ULONG WINAPI foldercoll_enumvariant_Release(IEnumVARIANT *iface)
static HANDLE start_enumeration(const WCHAR *path, WIN32_FIND_DATAW *data, BOOL file)
{
- static const WCHAR allW[] = {'*',0};
WCHAR pathW[MAX_PATH];
int len;
HANDLE handle;
lstrcpyW(pathW, path);
len = lstrlenW(pathW);
- if (len && pathW[len-1] != '\\')
- lstrcatW(pathW, bsW);
- lstrcatW(pathW, allW);
+ if (len && pathW[len-1] != '\\') wcscat(pathW, L"\\");
+ wcscat(pathW, L"*");
handle = FindFirstFileW(pathW, data);
if (handle == INVALID_HANDLE_VALUE) return 0;
@@ -1762,7 +1754,6 @@ static HRESULT WINAPI foldercoll_get__NewEnum(IFolderCollection *iface, IUnknown
static HRESULT WINAPI foldercoll_get_Count(IFolderCollection *iface, LONG *count)
{
struct foldercollection *This = impl_from_IFolderCollection(iface);
- static const WCHAR allW[] = {'\\','*',0};
WIN32_FIND_DATAW data;
WCHAR pathW[MAX_PATH];
HANDLE handle;
@@ -1774,8 +1765,8 @@ static HRESULT WINAPI foldercoll_get_Count(IFolderCollection *iface, LONG *count
*count = 0;
- lstrcpyW(pathW, This->path);
- lstrcatW(pathW, allW);
+ wcscpy(pathW, This->path);
+ wcscat(pathW, L"\\*");
handle = FindFirstFileW(pathW, &data);
if (handle == INVALID_HANDLE_VALUE)
return HRESULT_FROM_WIN32(GetLastError());
@@ -1957,7 +1948,6 @@ static HRESULT WINAPI filecoll_get__NewEnum(IFileCollection *iface, IUnknown **p
static HRESULT WINAPI filecoll_get_Count(IFileCollection *iface, LONG *count)
{
struct filecollection *This = impl_from_IFileCollection(iface);
- static const WCHAR allW[] = {'\\','*',0};
WIN32_FIND_DATAW data;
WCHAR pathW[MAX_PATH];
HANDLE handle;
@@ -1969,8 +1959,8 @@ static HRESULT WINAPI filecoll_get_Count(IFileCollection *iface, LONG *count)
*count = 0;
- lstrcpyW(pathW, This->path);
- lstrcatW(pathW, allW);
+ wcscpy(pathW, This->path);
+ wcscat(pathW, L"\\*");
handle = FindFirstFileW(pathW, &data);
if (handle == INVALID_HANDLE_VALUE)
return HRESULT_FROM_WIN32(GetLastError());
@@ -3074,7 +3064,7 @@ static HRESULT WINAPI filesys_BuildPath(IFileSystem3 *iface, BSTR Path,
{
lstrcpyW(ret, Path);
if (Path[path_len-1] != ':')
- lstrcatW(ret, bsW);
+ wcscat(ret, L"\\");
lstrcatW(ret, Name);
}
}
@@ -3258,28 +3248,19 @@ static HRESULT WINAPI filesys_GetExtensionName(IFileSystem3 *iface, BSTR path,
return S_OK;
}
-static HRESULT WINAPI filesys_GetAbsolutePathName(IFileSystem3 *iface, BSTR Path,
- BSTR *pbstrResult)
+static HRESULT WINAPI filesys_GetAbsolutePathName(IFileSystem3 *iface, BSTR path, BSTR *pbstrResult)
{
- static const WCHAR cur_path[] = {'.',0};
-
WCHAR buf[MAX_PATH], ch;
- const WCHAR *path;
DWORD i, beg, len, exp_len;
WIN32_FIND_DATAW fdata;
HANDLE fh;
- TRACE("%p %s %p\n", iface, debugstr_w(Path), pbstrResult);
+ TRACE("%p, %s, %p.\n", iface, debugstr_w(path), pbstrResult);
if(!pbstrResult)
return E_POINTER;
- if(!Path)
- path = cur_path;
- else
- path = Path;
-
- len = GetFullPathNameW(path, MAX_PATH, buf, NULL);
+ len = GetFullPathNameW(path ? path : L".", MAX_PATH, buf, NULL);
if(!len)
return E_FAIL;
@@ -3311,24 +3292,21 @@ static HRESULT WINAPI filesys_GetAbsolutePathName(IFileSystem3 *iface, BSTR Path
return S_OK;
}
-static HRESULT WINAPI filesys_GetTempName(IFileSystem3 *iface, BSTR *pbstrResult)
+static HRESULT WINAPI filesys_GetTempName(IFileSystem3 *iface, BSTR *result)
{
- static const WCHAR fmt[] = {'r','a','d','%','0','5','X','.','t','x','t',0};
-
DWORD random;
- TRACE("%p %p\n", iface, pbstrResult);
+ TRACE("%p, %p.\n", iface, result);
- if(!pbstrResult)
+ if (!result)
return E_POINTER;
- *pbstrResult = SysAllocStringLen(NULL, 12);
- if(!*pbstrResult)
+ if (!(*result = SysAllocStringLen(NULL, 12)))
return E_OUTOFMEMORY;
if(!RtlGenRandom(&random, sizeof(random)))
return E_FAIL;
- swprintf(*pbstrResult, 12, fmt, random & 0xfffff);
+ swprintf(*result, 12, L"rad%05X.txt", random & 0xfffff);
return S_OK;
}
@@ -3910,7 +3888,6 @@ static HRESULT WINAPI filesys_GetStandardStream(IFileSystem3 *iface,
static void get_versionstring(VS_FIXEDFILEINFO *info, WCHAR *ver)
{
- static const WCHAR fmtW[] = {'%','d','.','%','d','.','%','d','.','%','d',0};
DWORDLONG version;
WORD a, b, c, d;
@@ -3920,12 +3897,11 @@ static void get_versionstring(VS_FIXEDFILEINFO *info, WCHAR *ver)
c = (WORD)((version >> 16) & 0xffff);
d = (WORD)( version & 0xffff);
- swprintf(ver, 30, fmtW, a, b, c, d);
+ swprintf(ver, 30, L"%d.%d.%d.%d", a, b, c, d);
}
static HRESULT WINAPI filesys_GetFileVersion(IFileSystem3 *iface, BSTR name, BSTR *version)
{
- static const WCHAR rootW[] = {'\\',0};
VS_FIXEDFILEINFO *info;
WCHAR ver[30];
void *ptr;
@@ -3945,7 +3921,7 @@ static HRESULT WINAPI filesys_GetFileVersion(IFileSystem3 *iface, BSTR name, BST
return HRESULT_FROM_WIN32(GetLastError());
}
- ret = VerQueryValueW(ptr, rootW, (void**)&info, &len);
+ ret = VerQueryValueW(ptr, L"\\", (void **)&info, &len);
if (!ret)
{
heap_free(ptr);
--
2.33.0
Nov. 4, 2021
[PATCH 1/2] scrrun: Use static sized buffer for drive root.
by Nikolay Sivov
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/scrrun/filesystem.c | 32 +++++++++++---------------------
1 file changed, 11 insertions(+), 21 deletions(-)
diff --git a/dlls/scrrun/filesystem.c b/dlls/scrrun/filesystem.c
index d537239b3a1..c42096ae1f6 100644
--- a/dlls/scrrun/filesystem.c
+++ b/dlls/scrrun/filesystem.c
@@ -99,7 +99,7 @@ struct drive {
struct provideclassinfo classinfo;
IDrive IDrive_iface;
LONG ref;
- BSTR root;
+ WCHAR root[4];
};
struct folder {
@@ -835,10 +835,7 @@ static ULONG WINAPI drive_Release(IDrive *iface)
TRACE("(%p)->(%d)\n", This, ref);
if (!ref)
- {
- SysFreeString(This->root);
heap_free(This);
- }
return ref;
}
@@ -1134,28 +1131,21 @@ static const IDriveVtbl drivevtbl = {
static HRESULT create_drive(WCHAR letter, IDrive **drive)
{
- struct drive *This;
+ struct drive *object;
*drive = NULL;
- This = heap_alloc(sizeof(*This));
- if (!This) return E_OUTOFMEMORY;
+ object = heap_alloc(sizeof(*object));
+ if (!object) return E_OUTOFMEMORY;
- This->IDrive_iface.lpVtbl = &drivevtbl;
- This->ref = 1;
- This->root = SysAllocStringLen(NULL, 3);
- if (!This->root)
- {
- heap_free(This);
- return E_OUTOFMEMORY;
- }
- This->root[0] = letter;
- This->root[1] = ':';
- This->root[2] = '\\';
- This->root[3] = 0;
+ object->IDrive_iface.lpVtbl = &drivevtbl;
+ object->ref = 1;
+ wcscpy(object->root, L"A:\\");
+ *object->root = letter;
+
+ init_classinfo(&CLSID_Drive, (IUnknown *)&object->IDrive_iface, &object->classinfo);
+ *drive = &object->IDrive_iface;
- init_classinfo(&CLSID_Drive, (IUnknown *)&This->IDrive_iface, &This->classinfo);
- *drive = &This->IDrive_iface;
return S_OK;
}
--
2.33.0
Nov. 4, 2021
Re: [PATCH v2 1/3] include: Rename LDR_WINE_INTERNAL to LDR_WINE_BUILTIN.
by Alexandre Julliard
Zebediah Figura <zfigura(a)codeweavers.com> writes:
> On 11/4/21 4:31 AM, Alexandre Julliard wrote:
>> Zebediah Figura <zfigura(a)codeweavers.com> writes:
>>
>>> @@ -3394,7 +3394,7 @@ typedef void (CALLBACK *PLDR_DLL_NOTIFICATION_FUNCTION)(ULONG, LDR_DLL_NOTIFICAT
>>> /* these ones is Wine specific */
>>> #define LDR_DONT_RESOLVE_REFS 0x40000000
>>> -#define LDR_WINE_INTERNAL 0x80000000
>>> +#define LDR_WINE_BUILTIN 0x80000000
>> That doesn't seem necessary.
>>
>
> No, it's not necessary. The idea is that LDR_WINE_INTERNAL is somewhat
> ambiguous, especially if we're introducing a second sense in which a
> module can be internally marked, and I wanted to clarify it.
Actually I'm not convinced we need a second name here. It seems to me
that the "system" flag can be a purely ntdll-internal thing that doesn't
have to be exposed in the LDR data.
Arguably the system modules themselves should not be exposed in the
process module list, but that may be more complicated...
--
Alexandre Julliard
julliard(a)winehq.org
Nov. 4, 2021
[PATCH v5 3/3] uiautomationcore/tests: Add tests for ReservedValue COM interfaces.
by Connor McAdams
Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com>
---
dlls/uiautomationcore/tests/Makefile.in | 2 +-
dlls/uiautomationcore/tests/uiautomation.c | 133 +++++++++++++++++++++
2 files changed, 134 insertions(+), 1 deletion(-)
diff --git a/dlls/uiautomationcore/tests/Makefile.in b/dlls/uiautomationcore/tests/Makefile.in
index c39b062b6fd..1d08e19093f 100644
--- a/dlls/uiautomationcore/tests/Makefile.in
+++ b/dlls/uiautomationcore/tests/Makefile.in
@@ -1,5 +1,5 @@
TESTDLL = uiautomationcore.dll
-IMPORTS = uiautomationcore user32
+IMPORTS = uiautomationcore user32 ole32
C_SRCS = \
uiautomation.c
diff --git a/dlls/uiautomationcore/tests/uiautomation.c b/dlls/uiautomationcore/tests/uiautomation.c
index cbcba1af294..52a6648dad2 100644
--- a/dlls/uiautomationcore/tests/uiautomation.c
+++ b/dlls/uiautomationcore/tests/uiautomation.c
@@ -86,7 +86,140 @@ if (hr == S_OK)
UnregisterClassA("HostProviderFromHwnd class", NULL);
}
+static DWORD WINAPI uia_reserved_val_iface_marshal_thread(LPVOID param)
+{
+ IStream **stream = param;
+ IUnknown *unk_ns, *unk_ns2, *unk_ma, *unk_ma2;
+ HRESULT hr;
+
+ CoInitializeEx(NULL, COINIT_MULTITHREADED);
+
+ hr = CoGetInterfaceAndReleaseStream(stream[0], &IID_IUnknown, (void **)&unk_ns);
+ ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+
+ hr = CoGetInterfaceAndReleaseStream(stream[1], &IID_IUnknown, (void **)&unk_ma);
+ ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+
+ hr = UiaGetReservedNotSupportedValue(&unk_ns2);
+ ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+
+ hr = UiaGetReservedMixedAttributeValue(&unk_ma2);
+ ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+
+ ok(unk_ns2 == unk_ns, "UiaGetReservedNotSupported pointer mismatch, unk_ns2 %p, unk_ns %p\n", unk_ns2, unk_ns);
+ ok(unk_ma2 == unk_ma, "UiaGetReservedMixedAttribute pointer mismatch, unk_ma2 %p, unk_ma %p\n", unk_ma2, unk_ma);
+
+ CoUninitialize();
+
+ return 0;
+}
+
+static void test_uia_reserved_value_ifaces(void)
+{
+ IUnknown *unk_ns, *unk_ns2, *unk_ma, *unk_ma2;
+ IStream *stream[2];
+ IMarshal *marshal;
+ HANDLE thread;
+ ULONG refcnt;
+ HRESULT hr;
+
+ /* ReservedNotSupportedValue. */
+ hr = UiaGetReservedNotSupportedValue(NULL);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+
+ hr = UiaGetReservedNotSupportedValue(&unk_ns);
+ ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(unk_ns != NULL, "UiaGetReservedNotSupportedValue returned NULL interface.\n");
+
+ refcnt = IUnknown_AddRef(unk_ns);
+ ok(refcnt == 1, "Expected refcnt %d, got %d\n", 1, refcnt);
+
+ refcnt = IUnknown_AddRef(unk_ns);
+ ok(refcnt == 1, "Expected refcnt %d, got %d\n", 1, refcnt);
+
+ refcnt = IUnknown_Release(unk_ns);
+ ok(refcnt == 1, "Expected refcnt %d, got %d\n", 1, refcnt);
+
+ hr = UiaGetReservedNotSupportedValue(&unk_ns2);
+ ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(unk_ns2 != NULL, "UiaGetReservedNotSupportedValue returned NULL interface.");
+ ok(unk_ns2 == unk_ns, "UiaGetReservedNotSupported pointer mismatch, unk_ns2 %p, unk_ns %p\n", unk_ns2, unk_ns);
+
+ marshal = NULL;
+ hr = IUnknown_QueryInterface(unk_ns, &IID_IMarshal, (void **)&marshal);
+ ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(marshal != NULL, "Failed to get IMarshal interface.\n");
+
+ refcnt = IMarshal_AddRef(marshal);
+ ok(refcnt == 2, "Expected refcnt %d, got %d\n", 2, refcnt);
+
+ refcnt = IMarshal_Release(marshal);
+ ok(refcnt == 1, "Expected refcnt %d, got %d\n", 1, refcnt);
+
+ refcnt = IMarshal_Release(marshal);
+ ok(refcnt == 0, "Expected refcnt %d, got %d\n", 0, refcnt);
+
+ /* ReservedMixedAttributeValue. */
+ hr = UiaGetReservedMixedAttributeValue(NULL);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+
+ hr = UiaGetReservedMixedAttributeValue(&unk_ma);
+ ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(unk_ma != NULL, "UiaGetReservedMixedAttributeValue returned NULL interface.");
+
+ refcnt = IUnknown_AddRef(unk_ma);
+ ok(refcnt == 1, "Expected refcnt %d, got %d\n", 1, refcnt);
+
+ refcnt = IUnknown_AddRef(unk_ma);
+ ok(refcnt == 1, "Expected refcnt %d, got %d\n", 1, refcnt);
+
+ refcnt = IUnknown_Release(unk_ma);
+ ok(refcnt == 1, "Expected refcnt %d, got %d\n", 1, refcnt);
+
+ hr = UiaGetReservedMixedAttributeValue(&unk_ma2);
+ ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(unk_ma2 != NULL, "UiaGetReservedMixedAttributeValue returned NULL interface.");
+ ok(unk_ma2 == unk_ma, "UiaGetReservedMixedAttribute pointer mismatch, unk_ma2 %p, unk_ma %p\n", unk_ma2, unk_ma);
+
+ marshal = NULL;
+ hr = IUnknown_QueryInterface(unk_ma, &IID_IMarshal, (void **)&marshal);
+ ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(marshal != NULL, "Failed to get IMarshal interface.\n");
+
+ refcnt = IMarshal_AddRef(marshal);
+ ok(refcnt == 2, "Expected refcnt %d, got %d\n", 2, refcnt);
+
+ refcnt = IMarshal_Release(marshal);
+ ok(refcnt == 1, "Expected refcnt %d, got %d\n", 1, refcnt);
+
+ refcnt = IMarshal_Release(marshal);
+ ok(refcnt == 0, "Expected refcnt %d, got %d\n", 0, refcnt);
+
+ /* Test cross-thread marshaling behavior. */
+ CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
+
+ hr = CoMarshalInterThreadInterfaceInStream(&IID_IUnknown, unk_ns, &stream[0]);
+ ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ hr = CoMarshalInterThreadInterfaceInStream(&IID_IUnknown, unk_ma, &stream[1]);
+ ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+
+ thread = CreateThread(NULL, 0, uia_reserved_val_iface_marshal_thread, (void *)stream, 0, NULL);
+ while (MsgWaitForMultipleObjects(1, &thread, FALSE, INFINITE, QS_ALLINPUT) != WAIT_OBJECT_0)
+ {
+ MSG msg;
+ while(PeekMessageW(&msg, 0, 0, 0, PM_REMOVE))
+ {
+ TranslateMessage(&msg);
+ DispatchMessageW(&msg);
+ }
+ }
+ CloseHandle(thread);
+
+ CoUninitialize();
+}
+
START_TEST(uiautomation)
{
test_UiaHostProviderFromHwnd();
+ test_uia_reserved_value_ifaces();
}
--
2.25.1
Nov. 4, 2021
[PATCH v5 2/3] uiautomationcore: Implement UiaGetReservedMixedAttributeValue.
by Connor McAdams
Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com>
---
dlls/uiautomationcore/uia_main.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/dlls/uiautomationcore/uia_main.c b/dlls/uiautomationcore/uia_main.c
index 77cacb7c4a4..174e4756920 100644
--- a/dlls/uiautomationcore/uia_main.c
+++ b/dlls/uiautomationcore/uia_main.c
@@ -110,7 +110,7 @@ static HRESULT create_uia_object_wrapper(IUnknown *reserved, void **ppv)
}
/*
- * UiaReservedNotSupportedValue object.
+ * UiaReservedNotSupportedValue/UiaReservedMixedAttributeValue object.
*/
static HRESULT WINAPI uia_reserved_obj_QueryInterface(IUnknown *iface,
REFIID riid, void **ppv)
@@ -143,6 +143,7 @@ static const IUnknownVtbl uia_reserved_obj_vtbl = {
};
static IUnknown uia_reserved_ns_iface = {&uia_reserved_obj_vtbl};
+static IUnknown uia_reserved_ma_iface = {&uia_reserved_obj_vtbl};
/***********************************************************************
* UiaClientsAreListening (uiautomationcore.@)
@@ -158,8 +159,13 @@ BOOL WINAPI UiaClientsAreListening(void)
*/
HRESULT WINAPI UiaGetReservedMixedAttributeValue(IUnknown **value)
{
- FIXME("(%p) stub!\n", value);
- *value = NULL;
+ TRACE("(%p)\n", value);
+
+ if (!value)
+ return E_INVALIDARG;
+
+ *value = &uia_reserved_ma_iface;
+
return S_OK;
}
--
2.25.1
Nov. 4, 2021