Wine-devel
Threads by month
- ----- 2026 -----
- 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 2020
- 73 participants
- 650 discussions
[PATCH v2 1/4] d3dx9: Don't release textures when D3DXSPRITE_DO_NOT_ADDREF_TEXTURE is specified.
by Sven Baars 18 Nov '20
by Sven Baars 18 Nov '20
18 Nov '20
Signed-off-by: Sven Baars <sbaars(a)codeweavers.com>
---
v2: Add a missing return value test (thanks Gijs!).
dlls/d3dx9_36/sprite.c | 18 ++++++++++++------
dlls/d3dx9_36/tests/core.c | 14 ++++++++++++++
2 files changed, 26 insertions(+), 6 deletions(-)
diff --git a/dlls/d3dx9_36/sprite.c b/dlls/d3dx9_36/sprite.c
index 9ef7f9c47e0..cd244e657ef 100644
--- a/dlls/d3dx9_36/sprite.c
+++ b/dlls/d3dx9_36/sprite.c
@@ -112,10 +112,13 @@ static ULONG WINAPI d3dx9_sprite_Release(ID3DXSprite *iface)
{
int i;
- for (i = 0; i < sprite->sprite_count; ++i)
+ if (!(sprite->flags & D3DXSPRITE_DO_NOT_ADDREF_TEXTURE))
{
- if (sprite->sprites[i].texture)
- IDirect3DTexture9_Release(sprite->sprites[i].texture);
+ for (i = 0; i < sprite->sprite_count; ++i)
+ {
+ if (sprite->sprites[i].texture)
+ IDirect3DTexture9_Release(sprite->sprites[i].texture);
+ }
}
HeapFree(GetProcessHeap(), 0, sprite->sprites);
@@ -518,10 +521,13 @@ static HRESULT WINAPI d3dx9_sprite_OnResetDevice(ID3DXSprite *iface)
TRACE("iface %p.\n", iface);
- for (i = 0; i < sprite->sprite_count; ++i)
+ if (!(sprite->flags & D3DXSPRITE_DO_NOT_ADDREF_TEXTURE))
{
- if (sprite->sprites[i].texture)
- IDirect3DTexture9_Release(sprite->sprites[i].texture);
+ for (i = 0; i < sprite->sprite_count; ++i)
+ {
+ if (sprite->sprites[i].texture)
+ IDirect3DTexture9_Release(sprite->sprites[i].texture);
+ }
}
sprite->sprite_count = 0;
diff --git a/dlls/d3dx9_36/tests/core.c b/dlls/d3dx9_36/tests/core.c
index 020f18e622c..a8477591e87 100644
--- a/dlls/d3dx9_36/tests/core.c
+++ b/dlls/d3dx9_36/tests/core.c
@@ -306,6 +306,20 @@ static void test_ID3DXSprite(IDirect3DDevice9 *device)
hr = ID3DXSprite_End(sprite);
ok (hr == D3DERR_INVALIDCALL, "End returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL);
+ /* Test D3DXSPRITE_DO_NOT_ADDREF_TEXTURE */
+ hr = ID3DXSprite_Begin(sprite, D3DXSPRITE_DO_NOT_ADDREF_TEXTURE);
+ ok (hr == D3D_OK, "Begin returned %#x, expected %#x\n", hr, D3D_OK);
+ hr = ID3DXSprite_Draw(sprite, tex2, &rect, ¢er, &pos, D3DCOLOR_XRGB(255, 255, 255));
+ ok (hr == D3D_OK, "Draw returned %#x, expected %#x\n", hr, D3D_OK);
+ hr = ID3DXSprite_OnResetDevice(sprite);
+ ok (hr == D3D_OK, "OnResetDevice returned %#x, expected %#x\n", hr, D3D_OK);
+ check_ref((IUnknown*)tex2, 1);
+
+ hr = ID3DXSprite_Begin(sprite, D3DXSPRITE_DO_NOT_ADDREF_TEXTURE);
+ ok (hr == D3D_OK, "Begin returned %#x, expected %#x\n", hr, D3D_OK);
+ hr = ID3DXSprite_Draw(sprite, tex2, &rect, ¢er, &pos, D3DCOLOR_XRGB(255, 255, 255));
+ ok (hr == D3D_OK, "Draw returned %#x, expected %#x\n", hr, D3D_OK);
+
IDirect3DDevice9_EndScene(device);
check_release((IUnknown*)sprite, 0);
check_release((IUnknown*)tex2, 0);
--
2.25.1
2
1
18 Nov '20
Signed-off-by: Ziqing Hui <zhui(a)codeweavers.com>
---
v2: Move 3 assignments to 3 ifs.
dlls/d3dx10_43/tests/d3dx10.c | 7 ++--
dlls/d3dx10_43/texture.c | 66 ++++++++++++++++++++++++++++++++---
2 files changed, 64 insertions(+), 9 deletions(-)
2
1
[PATCH v3] d3dx10/tests: Add tests for D3DX10GetImageInfoFromResource{A, W}().
by Matteo Bruni 18 Nov '20
by Matteo Bruni 18 Nov '20
18 Nov '20
From: Ziqing Hui <zhui(a)codeweavers.com>
Signed-off-by: Ziqing Hui <zhui(a)codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com>
---
v3: Get rid of the if after the CopyFileW() call, the copy is
supposed to succeed.
This supersedes patch 195989.
dlls/d3dx10_43/tests/d3dx10.c | 73 +++++++++++++++++++++++++++++++++++
1 file changed, 73 insertions(+)
diff --git a/dlls/d3dx10_43/tests/d3dx10.c b/dlls/d3dx10_43/tests/d3dx10.c
index 54cb4df3b7b..f9bd40a72cb 100644
--- a/dlls/d3dx10_43/tests/d3dx10.c
+++ b/dlls/d3dx10_43/tests/d3dx10.c
@@ -626,6 +626,43 @@ static ID3D10Device *create_device(void)
return NULL;
}
+static HMODULE create_resource_module(const WCHAR *filename, const void *data, unsigned int size)
+{
+ WCHAR resource_module_path[MAX_PATH], current_module_path[MAX_PATH];
+ HANDLE resource;
+ HMODULE module;
+ BOOL ret;
+
+ if (!temp_dir[0])
+ GetTempPathW(ARRAY_SIZE(temp_dir), temp_dir);
+ lstrcpyW(resource_module_path, temp_dir);
+ lstrcatW(resource_module_path, filename);
+
+ GetModuleFileNameW(NULL, current_module_path, ARRAY_SIZE(current_module_path));
+ ret = CopyFileW(current_module_path, resource_module_path, FALSE);
+ ok(ret, "CopyFileW failed, error %u.\n", GetLastError());
+ SetFileAttributesW(resource_module_path, FILE_ATTRIBUTE_NORMAL);
+
+ resource = BeginUpdateResourceW(resource_module_path, TRUE);
+ UpdateResourceW(resource, (LPCWSTR)RT_RCDATA, filename, MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), (void *)data, size);
+ EndUpdateResourceW(resource, FALSE);
+
+ module = LoadLibraryExW(resource_module_path, NULL, LOAD_LIBRARY_AS_DATAFILE);
+
+ return module;
+}
+
+static void delete_resource_module(const WCHAR *filename, HMODULE module)
+{
+ WCHAR path[MAX_PATH];
+
+ FreeLibrary(module);
+
+ lstrcpyW(path, temp_dir);
+ lstrcatW(path, filename);
+ DeleteFileW(path);
+}
+
static void check_image_info(D3DX10_IMAGE_INFO *image_info, unsigned int i, unsigned int line)
{
ok_(__FILE__, line)(image_info->Width == test_image[i].expected.Width,
@@ -1364,8 +1401,10 @@ static void test_D3DX10CreateAsyncResourceLoader(void)
static void test_get_image_info(void)
{
+ static const WCHAR test_resource_name[] = L"resource.data";
static const WCHAR test_filename[] = L"image.data";
D3DX10_IMAGE_INFO image_info;
+ HMODULE resource_module;
WCHAR path[MAX_PATH];
unsigned int i;
DWORD dword;
@@ -1418,6 +1457,40 @@ static void test_get_image_info(void)
delete_file(test_filename);
}
+
+ /* D3DX10GetImageInfoFromResource tests */
+
+ todo_wine
+ {
+ hr = D3DX10GetImageInfoFromResourceW(NULL, NULL, NULL, &image_info, NULL);
+ ok(hr == D3DX10_ERR_INVALID_DATA, "Got unexpected hr %#x.\n", hr);
+ hr = D3DX10GetImageInfoFromResourceW(NULL, L"deadbeaf", NULL, &image_info, NULL);
+ ok(hr == D3DX10_ERR_INVALID_DATA, "Got unexpected hr %#x.\n", hr);
+ hr = D3DX10GetImageInfoFromResourceA(NULL, NULL, NULL, &image_info, NULL);
+ ok(hr == D3DX10_ERR_INVALID_DATA, "Got unexpected hr %#x.\n", hr);
+ hr = D3DX10GetImageInfoFromResourceA(NULL, "deadbeaf", NULL, &image_info, NULL);
+ ok(hr == D3DX10_ERR_INVALID_DATA, "Got unexpected hr %#x.\n", hr);
+ }
+
+ for (i = 0; i < ARRAY_SIZE(test_image); ++i)
+ {
+ resource_module = create_resource_module(test_resource_name, test_image[i].data, test_image[i].size);
+
+ hr = D3DX10GetImageInfoFromResourceW(resource_module, test_resource_name, NULL, &image_info, NULL);
+ todo_wine
+ ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
+ if (hr == S_OK)
+ check_image_info(&image_info, i, __LINE__);
+
+ hr = D3DX10GetImageInfoFromResourceA(resource_module, get_str_a(test_resource_name), NULL, &image_info, NULL);
+ todo_wine
+ ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
+ if (hr == S_OK)
+ check_image_info(&image_info, i, __LINE__);
+
+ delete_resource_module(test_resource_name, resource_module);
+ }
+
CoUninitialize();
}
--
2.26.2
1
0
Hello,
Since WineConf this year didn't go anywhere due to the pandemic I'd like to suggest a sort of virtual wineconf via any kind of video chat system.
What would it be good for that the mailing list can't do? There are some topics that are easier to discuss in person IMHO, when you know people are listening. One topic of my concern is what to do about GSoC. Having a keynote with a development recap of the past would be a good thing too. Are there other topics of discussion?
What do you think?
Cheers,
Stefan
5
5
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/mf/evr.c | 369 +++++++++++++++++++++++++++++++++++++++++++--
dlls/mf/tests/mf.c | 32 +++-
2 files changed, 386 insertions(+), 15 deletions(-)
diff --git a/dlls/mf/evr.c b/dlls/mf/evr.c
index 8fa4e33f4e3..4be59331b6b 100644
--- a/dlls/mf/evr.c
+++ b/dlls/mf/evr.c
@@ -56,12 +56,14 @@ struct video_stream
IMFStreamSink IMFStreamSink_iface;
IMFMediaTypeHandler IMFMediaTypeHandler_iface;
IMFGetService IMFGetService_iface;
+ IMFAttributes IMFAttributes_iface;
LONG refcount;
unsigned int id;
unsigned int flags;
struct video_renderer *parent;
IMFMediaEventQueue *event_queue;
IMFVideoSampleAllocator *allocator;
+ IMFAttributes *attributes;
CRITICAL_SECTION cs;
};
@@ -162,6 +164,11 @@ static struct video_stream *impl_from_stream_IMFGetService(IMFGetService *iface)
return CONTAINING_RECORD(iface, struct video_stream, IMFGetService_iface);
}
+static struct video_stream *impl_from_stream_IMFAttributes(IMFAttributes *iface)
+{
+ return CONTAINING_RECORD(iface, struct video_stream, IMFAttributes_iface);
+}
+
static void video_renderer_release_services(struct video_renderer *renderer)
{
IMFTopologyServiceLookupClient *lookup_client;
@@ -189,8 +196,6 @@ static HRESULT WINAPI video_stream_sink_QueryInterface(IMFStreamSink *iface, REF
TRACE("%p, %s, %p.\n", iface, debugstr_guid(riid), obj);
- *obj = NULL;
-
if (IsEqualIID(riid, &IID_IMFStreamSink) ||
IsEqualIID(riid, &IID_IMFMediaEventGenerator) ||
IsEqualIID(riid, &IID_IUnknown))
@@ -205,16 +210,20 @@ static HRESULT WINAPI video_stream_sink_QueryInterface(IMFStreamSink *iface, REF
{
*obj = &stream->IMFGetService_iface;
}
-
- if (*obj)
+ else if (IsEqualIID(riid, &IID_IMFAttributes))
{
- IUnknown_AddRef((IUnknown *)*obj);
- return S_OK;
+ *obj = &stream->IMFAttributes_iface;
+ }
+ else
+ {
+ WARN("Unsupported interface %s.\n", debugstr_guid(riid));
+ *obj = NULL;
+ return E_NOINTERFACE;
}
- WARN("Unsupported interface %s.\n", debugstr_guid(riid));
- *obj = NULL;
- return E_NOINTERFACE;
+ IUnknown_AddRef((IUnknown *)*obj);
+
+ return S_OK;
}
static ULONG WINAPI video_stream_sink_AddRef(IMFStreamSink *iface)
@@ -236,6 +245,8 @@ static ULONG WINAPI video_stream_sink_Release(IMFStreamSink *iface)
{
if (stream->event_queue)
IMFMediaEventQueue_Release(stream->event_queue);
+ if (stream->attributes)
+ IMFAttributes_Release(stream->attributes);
if (stream->allocator)
IMFVideoSampleAllocator_Release(stream->allocator);
DeleteCriticalSection(&stream->cs);
@@ -595,6 +606,342 @@ static const IMFGetServiceVtbl video_stream_get_service_vtbl =
video_stream_get_service_GetService,
};
+static HRESULT WINAPI video_stream_attributes_QueryInterface(IMFAttributes *iface, REFIID riid, void **obj)
+{
+ struct video_stream *stream = impl_from_stream_IMFAttributes(iface);
+ return IMFStreamSink_QueryInterface(&stream->IMFStreamSink_iface, riid, obj);
+}
+
+static ULONG WINAPI video_stream_attributes_AddRef(IMFAttributes *iface)
+{
+ struct video_stream *stream = impl_from_stream_IMFAttributes(iface);
+ return IMFStreamSink_AddRef(&stream->IMFStreamSink_iface);
+}
+
+static ULONG WINAPI video_stream_attributes_Release(IMFAttributes *iface)
+{
+ struct video_stream *stream = impl_from_stream_IMFAttributes(iface);
+ return IMFStreamSink_Release(&stream->IMFStreamSink_iface);
+}
+
+static HRESULT WINAPI video_stream_attributes_GetItem(IMFAttributes *iface, REFGUID key, PROPVARIANT *value)
+{
+ struct video_stream *stream = impl_from_stream_IMFAttributes(iface);
+
+ TRACE("%p, %s, %p.\n", iface, debugstr_guid(key), value);
+
+ return IMFAttributes_GetItem(stream->attributes, key, value);
+}
+
+static HRESULT WINAPI video_stream_attributes_GetItemType(IMFAttributes *iface, REFGUID key, MF_ATTRIBUTE_TYPE *type)
+{
+ struct video_stream *stream = impl_from_stream_IMFAttributes(iface);
+
+ TRACE("%p, %s, %p.\n", iface, debugstr_guid(key), type);
+
+ return IMFAttributes_GetItemType(stream->attributes, key, type);
+}
+
+static HRESULT WINAPI video_stream_attributes_CompareItem(IMFAttributes *iface, REFGUID key, REFPROPVARIANT value,
+ BOOL *result)
+{
+ struct video_stream *stream = impl_from_stream_IMFAttributes(iface);
+
+ TRACE("%p, %s, %p, %p.\n", iface, debugstr_guid(key), value, result);
+
+ return IMFAttributes_CompareItem(stream->attributes, key, value, result);
+}
+
+static HRESULT WINAPI video_stream_attributes_Compare(IMFAttributes *iface, IMFAttributes *theirs,
+ MF_ATTRIBUTES_MATCH_TYPE type, BOOL *result)
+{
+ struct video_stream *stream = impl_from_stream_IMFAttributes(iface);
+
+ TRACE("%p, %p, %d, %p.\n", iface, theirs, type, result);
+
+ return IMFAttributes_Compare(stream->attributes, theirs, type, result);
+}
+
+static HRESULT WINAPI video_stream_attributes_GetUINT32(IMFAttributes *iface, REFGUID key, UINT32 *value)
+{
+ struct video_stream *stream = impl_from_stream_IMFAttributes(iface);
+
+ TRACE("%p, %s, %p.\n", iface, debugstr_guid(key), value);
+
+ return IMFAttributes_GetUINT32(stream->attributes, key, value);
+}
+
+static HRESULT WINAPI video_stream_attributes_GetUINT64(IMFAttributes *iface, REFGUID key, UINT64 *value)
+{
+ struct video_stream *stream = impl_from_stream_IMFAttributes(iface);
+
+ TRACE("%p, %s, %p.\n", iface, debugstr_guid(key), value);
+
+ return IMFAttributes_GetUINT64(stream->attributes, key, value);
+}
+
+static HRESULT WINAPI video_stream_attributes_GetDouble(IMFAttributes *iface, REFGUID key, double *value)
+{
+ struct video_stream *stream = impl_from_stream_IMFAttributes(iface);
+
+ TRACE("%p, %s, %p.\n", iface, debugstr_guid(key), value);
+
+ return IMFAttributes_GetDouble(stream->attributes, key, value);
+}
+
+static HRESULT WINAPI video_stream_attributes_GetGUID(IMFAttributes *iface, REFGUID key, GUID *value)
+{
+ struct video_stream *stream = impl_from_stream_IMFAttributes(iface);
+
+ TRACE("%p, %s, %p.\n", iface, debugstr_guid(key), value);
+
+ return IMFAttributes_GetGUID(stream->attributes, key, value);
+}
+
+static HRESULT WINAPI video_stream_attributes_GetStringLength(IMFAttributes *iface, REFGUID key,
+ UINT32 *length)
+{
+ struct video_stream *stream = impl_from_stream_IMFAttributes(iface);
+
+ TRACE("%p, %s, %p.\n", iface, debugstr_guid(key), length);
+
+ return IMFAttributes_GetStringLength(stream->attributes, key, length);
+}
+
+static HRESULT WINAPI video_stream_attributes_GetString(IMFAttributes *iface, REFGUID key, WCHAR *value,
+ UINT32 size, UINT32 *length)
+{
+ struct video_stream *stream = impl_from_stream_IMFAttributes(iface);
+
+ TRACE("%p, %s, %p, %u, %p.\n", iface, debugstr_guid(key), value, size, length);
+
+ return IMFAttributes_GetString(stream->attributes, key, value, size, length);
+}
+
+static HRESULT WINAPI video_stream_attributes_GetAllocatedString(IMFAttributes *iface, REFGUID key,
+ WCHAR **value, UINT32 *length)
+{
+ struct video_stream *stream = impl_from_stream_IMFAttributes(iface);
+
+ TRACE("%p, %s, %p, %p.\n", iface, debugstr_guid(key), value, length);
+
+ return IMFAttributes_GetAllocatedString(stream->attributes, key, value, length);
+}
+
+static HRESULT WINAPI video_stream_attributes_GetBlobSize(IMFAttributes *iface, REFGUID key, UINT32 *size)
+{
+ struct video_stream *stream = impl_from_stream_IMFAttributes(iface);
+
+ TRACE("%p, %s, %p.\n", iface, debugstr_guid(key), size);
+
+ return IMFAttributes_GetBlobSize(stream->attributes, key, size);
+}
+
+static HRESULT WINAPI video_stream_attributes_GetBlob(IMFAttributes *iface, REFGUID key, UINT8 *buf,
+ UINT32 bufsize, UINT32 *blobsize)
+{
+ struct video_stream *stream = impl_from_stream_IMFAttributes(iface);
+
+ TRACE("%p, %s, %p, %u, %p.\n", iface, debugstr_guid(key), buf, bufsize, blobsize);
+
+ return IMFAttributes_GetBlob(stream->attributes, key, buf, bufsize, blobsize);
+}
+
+static HRESULT WINAPI video_stream_attributes_GetAllocatedBlob(IMFAttributes *iface, REFGUID key,
+ UINT8 **buf, UINT32 *size)
+{
+ struct video_stream *stream = impl_from_stream_IMFAttributes(iface);
+
+ TRACE("%p, %s, %p, %p.\n", iface, debugstr_guid(key), buf, size);
+
+ return IMFAttributes_GetAllocatedBlob(stream->attributes, key, buf, size);
+}
+
+static HRESULT WINAPI video_stream_attributes_GetUnknown(IMFAttributes *iface, REFGUID key, REFIID riid, void **out)
+{
+ struct video_stream *stream = impl_from_stream_IMFAttributes(iface);
+
+ TRACE("%p, %s, %s, %p.\n", iface, debugstr_guid(key), debugstr_guid(riid), out);
+
+ return IMFAttributes_GetUnknown(stream->attributes, key, riid, out);
+}
+
+static HRESULT WINAPI video_stream_attributes_SetItem(IMFAttributes *iface, REFGUID key, REFPROPVARIANT value)
+{
+ struct video_stream *stream = impl_from_stream_IMFAttributes(iface);
+
+ TRACE("%p, %s, %p.\n", iface, debugstr_guid(key), value);
+
+ return IMFAttributes_SetItem(stream->attributes, key, value);
+}
+
+static HRESULT WINAPI video_stream_attributes_DeleteItem(IMFAttributes *iface, REFGUID key)
+{
+ struct video_stream *stream = impl_from_stream_IMFAttributes(iface);
+
+ TRACE("%p, %s.\n", iface, debugstr_guid(key));
+
+ return IMFAttributes_DeleteItem(stream->attributes, key);
+}
+
+static HRESULT WINAPI video_stream_attributes_DeleteAllItems(IMFAttributes *iface)
+{
+ struct video_stream *stream = impl_from_stream_IMFAttributes(iface);
+
+ TRACE("%p.\n", iface);
+
+ return IMFAttributes_DeleteAllItems(stream->attributes);
+}
+
+static HRESULT WINAPI video_stream_attributes_SetUINT32(IMFAttributes *iface, REFGUID key, UINT32 value)
+{
+ struct video_stream *stream = impl_from_stream_IMFAttributes(iface);
+
+ TRACE("%p, %s, %u.\n", iface, debugstr_guid(key), value);
+
+ return IMFAttributes_SetUINT32(stream->attributes, key, value);
+}
+
+static HRESULT WINAPI video_stream_attributes_SetUINT64(IMFAttributes *iface, REFGUID key, UINT64 value)
+{
+ struct video_stream *stream = impl_from_stream_IMFAttributes(iface);
+
+ TRACE("%p, %s, %s.\n", iface, debugstr_guid(key), wine_dbgstr_longlong(value));
+
+ return IMFAttributes_SetUINT64(stream->attributes, key, value);
+}
+
+static HRESULT WINAPI video_stream_attributes_SetDouble(IMFAttributes *iface, REFGUID key, double value)
+{
+ struct video_stream *stream = impl_from_stream_IMFAttributes(iface);
+
+ TRACE("%p, %s, %f.\n", iface, debugstr_guid(key), value);
+
+ return IMFAttributes_SetDouble(stream->attributes, key, value);
+}
+
+static HRESULT WINAPI video_stream_attributes_SetGUID(IMFAttributes *iface, REFGUID key, REFGUID value)
+{
+ struct video_stream *stream = impl_from_stream_IMFAttributes(iface);
+
+ TRACE("%p, %s, %s.\n", iface, debugstr_guid(key), debugstr_guid(value));
+
+ return IMFAttributes_SetGUID(stream->attributes, key, value);
+}
+
+static HRESULT WINAPI video_stream_attributes_SetString(IMFAttributes *iface, REFGUID key,
+ const WCHAR *value)
+{
+ struct video_stream *stream = impl_from_stream_IMFAttributes(iface);
+
+ TRACE("%p, %s, %s.\n", iface, debugstr_guid(key), debugstr_w(value));
+
+ return IMFAttributes_SetString(stream->attributes, key, value);
+}
+
+static HRESULT WINAPI video_stream_attributes_SetBlob(IMFAttributes *iface, REFGUID key,
+ const UINT8 *buf, UINT32 size)
+{
+ struct video_stream *stream = impl_from_stream_IMFAttributes(iface);
+
+ TRACE("%p, %s, %p, %u.\n", iface, debugstr_guid(key), buf, size);
+
+ return IMFAttributes_SetBlob(stream->attributes, key, buf, size);
+}
+
+static HRESULT WINAPI video_stream_attributes_SetUnknown(IMFAttributes *iface, REFGUID key,
+ IUnknown *unknown)
+{
+ struct video_stream *stream = impl_from_stream_IMFAttributes(iface);
+
+ TRACE("%p, %s, %p.\n", iface, debugstr_guid(key), unknown);
+
+ return IMFAttributes_SetUnknown(stream->attributes, key, unknown);
+}
+
+static HRESULT WINAPI video_stream_attributes_LockStore(IMFAttributes *iface)
+{
+ struct video_stream *stream = impl_from_stream_IMFAttributes(iface);
+
+ TRACE("%p.\n", iface);
+
+ return IMFAttributes_LockStore(stream->attributes);
+}
+
+static HRESULT WINAPI video_stream_attributes_UnlockStore(IMFAttributes *iface)
+{
+ struct video_stream *stream = impl_from_stream_IMFAttributes(iface);
+
+ TRACE("%p.\n", iface);
+
+ return IMFAttributes_UnlockStore(stream->attributes);
+}
+
+static HRESULT WINAPI video_stream_attributes_GetCount(IMFAttributes *iface, UINT32 *count)
+{
+ struct video_stream *stream = impl_from_stream_IMFAttributes(iface);
+
+ TRACE("%p, %p.\n", iface, count);
+
+ return IMFAttributes_GetCount(stream->attributes, count);
+}
+
+static HRESULT WINAPI video_stream_attributes_GetItemByIndex(IMFAttributes *iface, UINT32 index,
+ GUID *key, PROPVARIANT *value)
+{
+ struct video_stream *stream = impl_from_stream_IMFAttributes(iface);
+
+ TRACE("%p, %u, %p, %p.\n", iface, index, key, value);
+
+ return IMFAttributes_GetItemByIndex(stream->attributes, index, key, value);
+}
+
+static HRESULT WINAPI video_stream_attributes_CopyAllItems(IMFAttributes *iface, IMFAttributes *dest)
+{
+ struct video_stream *stream = impl_from_stream_IMFAttributes(iface);
+
+ TRACE("%p, %p.\n", iface, dest);
+
+ return IMFAttributes_CopyAllItems(stream->attributes, dest);
+}
+
+static const IMFAttributesVtbl video_stream_attributes_vtbl =
+{
+ video_stream_attributes_QueryInterface,
+ video_stream_attributes_AddRef,
+ video_stream_attributes_Release,
+ video_stream_attributes_GetItem,
+ video_stream_attributes_GetItemType,
+ video_stream_attributes_CompareItem,
+ video_stream_attributes_Compare,
+ video_stream_attributes_GetUINT32,
+ video_stream_attributes_GetUINT64,
+ video_stream_attributes_GetDouble,
+ video_stream_attributes_GetGUID,
+ video_stream_attributes_GetStringLength,
+ video_stream_attributes_GetString,
+ video_stream_attributes_GetAllocatedString,
+ video_stream_attributes_GetBlobSize,
+ video_stream_attributes_GetBlob,
+ video_stream_attributes_GetAllocatedBlob,
+ video_stream_attributes_GetUnknown,
+ video_stream_attributes_SetItem,
+ video_stream_attributes_DeleteItem,
+ video_stream_attributes_DeleteAllItems,
+ video_stream_attributes_SetUINT32,
+ video_stream_attributes_SetUINT64,
+ video_stream_attributes_SetDouble,
+ video_stream_attributes_SetGUID,
+ video_stream_attributes_SetString,
+ video_stream_attributes_SetBlob,
+ video_stream_attributes_SetUnknown,
+ video_stream_attributes_LockStore,
+ video_stream_attributes_UnlockStore,
+ video_stream_attributes_GetCount,
+ video_stream_attributes_GetItemByIndex,
+ video_stream_attributes_CopyAllItems,
+};
+
static HRESULT video_renderer_stream_create(struct video_renderer *renderer, unsigned int id,
struct video_stream **ret)
{
@@ -607,12 +954,16 @@ static HRESULT video_renderer_stream_create(struct video_renderer *renderer, uns
stream->IMFStreamSink_iface.lpVtbl = &video_stream_sink_vtbl;
stream->IMFMediaTypeHandler_iface.lpVtbl = &video_stream_type_handler_vtbl;
stream->IMFGetService_iface.lpVtbl = &video_stream_get_service_vtbl;
+ stream->IMFAttributes_iface.lpVtbl = &video_stream_attributes_vtbl;
stream->refcount = 1;
InitializeCriticalSection(&stream->cs);
if (FAILED(hr = MFCreateEventQueue(&stream->event_queue)))
goto failed;
+ if (FAILED(hr = MFCreateAttributes(&stream->attributes, 0)))
+ goto failed;
+
stream->parent = renderer;
IMFMediaSink_AddRef(&stream->parent->IMFMediaSink_iface);
stream->id = id;
diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c
index 43dc9a49ee7..aabdc51e577 100644
--- a/dlls/mf/tests/mf.c
+++ b/dlls/mf/tests/mf.c
@@ -3242,14 +3242,14 @@ static void test_evr(void)
IMFVideoRenderer *video_renderer;
IMFMediaSink *sink, *sink2;
IMFAttributes *attributes;
+ DWORD flags, count, value;
IMFActivate *activate;
HWND window, window2;
- DWORD flags, count;
LONG sample_count;
IMFGetService *gs;
IMFSample *sample;
IUnknown *unk;
- UINT64 value;
+ UINT64 window3;
HRESULT hr;
GUID guid;
@@ -3272,9 +3272,9 @@ static void test_evr(void)
hr = MFCreateVideoRendererActivate(window, &activate);
ok(hr == S_OK, "Failed to create activate object, hr %#x.\n", hr);
- hr = IMFActivate_GetUINT64(activate, &MF_ACTIVATE_VIDEO_WINDOW, &value);
+ hr = IMFActivate_GetUINT64(activate, &MF_ACTIVATE_VIDEO_WINDOW, &window3);
ok(hr == S_OK, "Failed to get attribute, hr %#x.\n", hr);
- ok(UlongToHandle(value) == window, "Unexpected value.\n");
+ ok(UlongToHandle(window3) == window, "Unexpected value.\n");
hr = IMFActivate_ActivateObject(activate, &IID_IMFMediaSink, (void **)&sink);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
@@ -3307,9 +3307,9 @@ static void test_evr(void)
ok(hr == S_OK, "Failed to get attribute count, hr %#x.\n", hr);
ok(count == 1, "Unexpected count %u.\n", count);
- hr = IMFActivate_GetUINT64(activate, &MF_ACTIVATE_VIDEO_WINDOW, &value);
+ hr = IMFActivate_GetUINT64(activate, &MF_ACTIVATE_VIDEO_WINDOW, &window3);
ok(hr == S_OK, "Failed to get attribute, hr %#x.\n", hr);
- ok(!value, "Unexpected value.\n");
+ ok(!window3, "Unexpected value.\n");
hr = IMFActivate_ActivateObject(activate, &IID_IMFMediaSink, (void **)&sink);
ok(hr == S_OK, "Failed to activate, hr %#x.\n", hr);
@@ -3337,6 +3337,26 @@ static void test_evr(void)
hr = IMFMediaSink_GetStreamSinkById(sink, 0, &stream_sink);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ hr = IMFStreamSink_QueryInterface(stream_sink, &IID_IMFAttributes, (void **)&attributes);
+ ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ hr = IMFAttributes_GetCount(attributes, &count);
+ ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+todo_wine {
+ ok(count == 2, "Unexpected count %u.\n", count);
+ value = 0;
+ hr = IMFAttributes_GetUINT32(attributes, &MF_SA_REQUIRED_SAMPLE_COUNT, &value);
+ ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(value == 1, "Unexpected attribute value %u.\n", value);
+ value = 0;
+ hr = IMFAttributes_GetUINT32(attributes, &MF_SA_D3D_AWARE, &value);
+ ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(value == 1, "Unexpected attribute value %u.\n", value);
+}
+ hr = IMFAttributes_QueryInterface(attributes, &IID_IMFStreamSink, (void **)&unk);
+ ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ IUnknown_Release(unk);
+ IMFAttributes_Release(attributes);
+
hr = IMFStreamSink_GetMediaTypeHandler(stream_sink, &type_handler);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
--
2.29.2
1
2
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/mfplat/main.c | 47 ++++++++++++++++------------------------------
1 file changed, 16 insertions(+), 31 deletions(-)
diff --git a/dlls/mfplat/main.c b/dlls/mfplat/main.c
index 44f29522487..6394784593e 100644
--- a/dlls/mfplat/main.c
+++ b/dlls/mfplat/main.c
@@ -624,21 +624,8 @@ HRESULT WINAPI MFCreateTransformActivate(IMFActivate **activate)
return create_transform_activate(NULL, activate);
}
-static const WCHAR transform_keyW[] = {'M','e','d','i','a','F','o','u','n','d','a','t','i','o','n','\\',
- 'T','r','a','n','s','f','o','r','m','s',0};
-static const WCHAR categories_keyW[] = {'M','e','d','i','a','F','o','u','n','d','a','t','i','o','n','\\',
- 'T','r','a','n','s','f','o','r','m','s','\\',
- 'C','a','t','e','g','o','r','i','e','s',0};
-static const WCHAR inputtypesW[] = {'I','n','p','u','t','T','y','p','e','s',0};
-static const WCHAR outputtypesW[] = {'O','u','t','p','u','t','T','y','p','e','s',0};
-static const WCHAR attributesW[] = {'A','t','t','r','i','b','u','t','e','s',0};
-static const WCHAR mftflagsW[] = {'M','F','T','F','l','a','g','s',0};
-static const WCHAR szGUIDFmt[] =
-{
- '%','0','8','x','-','%','0','4','x','-','%','0','4','x','-','%','0',
- '2','x','%','0','2','x','-','%','0','2','x','%','0','2','x','%','0','2',
- 'x','%','0','2','x','%','0','2','x','%','0','2','x',0
-};
+static const WCHAR transform_keyW[] = L"MediaFoundation\\Transforms";
+static const WCHAR categories_keyW[] = L"MediaFoundation\\Transforms\\Categories";
static const BYTE guid_conv_table[256] =
{
@@ -653,10 +640,10 @@ static const BYTE guid_conv_table[256] =
static WCHAR* GUIDToString(WCHAR *str, REFGUID guid)
{
- swprintf(str, 39, szGUIDFmt, guid->Data1, guid->Data2,
- guid->Data3, guid->Data4[0], guid->Data4[1],
- guid->Data4[2], guid->Data4[3], guid->Data4[4],
- guid->Data4[5], guid->Data4[6], guid->Data4[7]);
+ swprintf(str, 39, L"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
+ guid->Data1, guid->Data2, guid->Data3, guid->Data4[0], guid->Data4[1],
+ guid->Data4[2], guid->Data4[3], guid->Data4[4], guid->Data4[5],
+ guid->Data4[6], guid->Data4[7]);
return str;
}
@@ -733,7 +720,6 @@ static HRESULT register_transform(const CLSID *clsid, const WCHAR *name, UINT32
UINT32 cinput, const MFT_REGISTER_TYPE_INFO *input_types, UINT32 coutput,
const MFT_REGISTER_TYPE_INFO *output_types, IMFAttributes *attributes)
{
- static const WCHAR reg_format[] = {'%','s','\\','%','s',0};
HRESULT hr = S_OK;
HKEY hclsid = 0;
WCHAR buffer[64];
@@ -742,7 +728,7 @@ static HRESULT register_transform(const CLSID *clsid, const WCHAR *name, UINT32
UINT8 *blob;
GUIDToString(buffer, clsid);
- swprintf(str, ARRAY_SIZE(str), reg_format, transform_keyW, buffer);
+ swprintf(str, ARRAY_SIZE(str), L"%s\\%s", transform_keyW, buffer);
if ((ret = RegCreateKeyW(HKEY_CLASSES_ROOT, str, &hclsid)))
hr = HRESULT_FROM_WIN32(ret);
@@ -757,14 +743,14 @@ static HRESULT register_transform(const CLSID *clsid, const WCHAR *name, UINT32
if (SUCCEEDED(hr) && cinput && input_types)
{
size = cinput * sizeof(MFT_REGISTER_TYPE_INFO);
- if ((ret = RegSetValueExW(hclsid, inputtypesW, 0, REG_BINARY, (BYTE *)input_types, size)))
+ if ((ret = RegSetValueExW(hclsid, L"InputTypes", 0, REG_BINARY, (BYTE *)input_types, size)))
hr = HRESULT_FROM_WIN32(ret);
}
if (SUCCEEDED(hr) && coutput && output_types)
{
size = coutput * sizeof(MFT_REGISTER_TYPE_INFO);
- if ((ret = RegSetValueExW(hclsid, outputtypesW, 0, REG_BINARY, (BYTE *)output_types, size)))
+ if ((ret = RegSetValueExW(hclsid, L"OutputTypes", 0, REG_BINARY, (BYTE *)output_types, size)))
hr = HRESULT_FROM_WIN32(ret);
}
@@ -776,7 +762,7 @@ static HRESULT register_transform(const CLSID *clsid, const WCHAR *name, UINT32
{
if (SUCCEEDED(hr = MFGetAttributesAsBlob(attributes, blob, size)))
{
- if ((ret = RegSetValueExW(hclsid, attributesW, 0, REG_BINARY, blob, size)))
+ if ((ret = RegSetValueExW(hclsid, L"Attributes", 0, REG_BINARY, blob, size)))
hr = HRESULT_FROM_WIN32(ret);
}
heap_free(blob);
@@ -788,7 +774,7 @@ static HRESULT register_transform(const CLSID *clsid, const WCHAR *name, UINT32
if (SUCCEEDED(hr) && flags)
{
- if ((ret = RegSetValueExW(hclsid, mftflagsW, 0, REG_DWORD, (BYTE *)&flags, sizeof(flags))))
+ if ((ret = RegSetValueExW(hclsid, L"MFTFlags", 0, REG_DWORD, (BYTE *)&flags, sizeof(flags))))
hr = HRESULT_FROM_WIN32(ret);
}
@@ -798,7 +784,6 @@ static HRESULT register_transform(const CLSID *clsid, const WCHAR *name, UINT32
static HRESULT register_category(CLSID *clsid, GUID *category)
{
- static const WCHAR reg_format[] = {'%','s','\\','%','s','\\','%','s',0};
HKEY htmp1;
WCHAR guid1[64], guid2[64];
WCHAR str[350];
@@ -806,7 +791,7 @@ static HRESULT register_category(CLSID *clsid, GUID *category)
GUIDToString(guid1, category);
GUIDToString(guid2, clsid);
- swprintf(str, ARRAY_SIZE(str), reg_format, categories_keyW, guid1, guid2);
+ swprintf(str, ARRAY_SIZE(str), L"%s\\%s\\%s", categories_keyW, guid1, guid2);
if (RegCreateKeyW(HKEY_CLASSES_ROOT, str, &htmp1))
return E_FAIL;
@@ -1157,13 +1142,13 @@ static HRESULT mft_collect_machine_reg(struct list *mfts, const GUID *category,
if (!GUIDFromString(clsidW, &mft.clsid))
goto next;
- mft_get_reg_flags(clsidW, mftflagsW, &mft.flags);
+ mft_get_reg_flags(clsidW, L"MFTFlags", &mft.flags);
if (output_type)
- mft_get_reg_type_info(clsidW, outputtypesW, &mft.output_types, &mft.output_types_count);
+ mft_get_reg_type_info(clsidW, L"OutputTypes", &mft.output_types, &mft.output_types_count);
if (input_type)
- mft_get_reg_type_info(clsidW, inputtypesW, &mft.input_types, &mft.input_types_count);
+ mft_get_reg_type_info(clsidW, L"InputTypes", &mft.input_types, &mft.input_types_count);
if (!mft_is_type_info_match(&mft, category, flags, plugin_control, input_type, output_type))
{
@@ -6139,7 +6124,7 @@ static HRESULT resolver_create_scheme_handler(const WCHAR *scheme, DWORD flags,
static HRESULT resolver_get_scheme_handler(const WCHAR *url, DWORD flags, IMFSchemeHandler **handler)
{
- static const WCHAR fileschemeW[] = {'f','i','l','e',':',0};
+ static const WCHAR fileschemeW[] = L"file:";
const WCHAR *ptr = url;
unsigned int len;
WCHAR *scheme;
--
2.29.2
1
0
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/xmllite/reader.c | 138 ++++++++++++++++--------------------------
1 file changed, 53 insertions(+), 85 deletions(-)
diff --git a/dlls/xmllite/reader.c b/dlls/xmllite/reader.c
index eddc4d8eec0..a463934202a 100644
--- a/dlls/xmllite/reader.c
+++ b/dlls/xmllite/reader.c
@@ -83,17 +83,6 @@ typedef enum
StringValue_Last
} XmlReaderStringValue;
-static const WCHAR usasciiW[] = {'U','S','-','A','S','C','I','I',0};
-static const WCHAR utf16W[] = {'U','T','F','-','1','6',0};
-static const WCHAR utf8W[] = {'U','T','F','-','8',0};
-
-static const WCHAR dblquoteW[] = {'\"',0};
-static const WCHAR quoteW[] = {'\'',0};
-static const WCHAR ltW[] = {'<',0};
-static const WCHAR gtW[] = {'>',0};
-static const WCHAR commentW[] = {'<','!','-','-',0};
-static const WCHAR piW[] = {'<','?',0};
-
BOOL is_namestartchar(WCHAR ch);
static const char *debugstr_nodetype(XmlNodeType nodetype)
@@ -153,10 +142,11 @@ struct xml_encoding_data
UINT cp;
};
-static const struct xml_encoding_data xml_encoding_map[] = {
- { usasciiW, XmlEncoding_USASCII, 20127 },
- { utf16W, XmlEncoding_UTF16, 1200 },
- { utf8W, XmlEncoding_UTF8, CP_UTF8 },
+static const struct xml_encoding_data xml_encoding_map[] =
+{
+ { L"US-ASCII", XmlEncoding_USASCII, 20127 },
+ { L"UTF-16", XmlEncoding_UTF16, 1200 },
+ { L"UTF-8", XmlEncoding_UTF8, CP_UTF8 },
};
const WCHAR *get_encoding_name(xml_encoding encoding)
@@ -221,11 +211,11 @@ typedef struct
} strval;
static WCHAR emptyW[] = {0};
-static WCHAR xmlW[] = {'x','m','l',0};
-static WCHAR xmlnsW[] = {'x','m','l','n','s',0};
-static const strval strval_empty = { emptyW };
-static const strval strval_xml = { xmlW, 3 };
-static const strval strval_xmlns = { xmlnsW, 5 };
+static WCHAR xmlW[] = L"xml";
+static WCHAR xmlnsW[] = L"xmlns";
+static const strval strval_empty = { (WCHAR *)emptyW, 0 };
+static const strval strval_xml = { (WCHAR *)xmlW, 3 };
+static const strval strval_xmlns = { (WCHAR *)xmlnsW, 5 };
struct reader_position
{
@@ -1185,11 +1175,10 @@ static int reader_skipspaces(xmlreader *reader)
/* [26] VersionNum ::= '1.' [0-9]+ */
static HRESULT reader_parse_versionnum(xmlreader *reader, strval *val)
{
- static const WCHAR onedotW[] = {'1','.',0};
WCHAR *ptr, *ptr2;
UINT start;
- if (reader_cmp(reader, onedotW)) return WC_E_XMLDECL;
+ if (reader_cmp(reader, L"1.")) return WC_E_XMLDECL;
start = reader_get_cur(reader);
/* skip "1." */
@@ -1211,19 +1200,22 @@ static HRESULT reader_parse_versionnum(xmlreader *reader, strval *val)
/* [25] Eq ::= S? '=' S? */
static HRESULT reader_parse_eq(xmlreader *reader)
{
- static const WCHAR eqW[] = {'=',0};
reader_skipspaces(reader);
- if (reader_cmp(reader, eqW)) return WC_E_EQUAL;
+ if (reader_cmp(reader, L"=")) return WC_E_EQUAL;
/* skip '=' */
reader_skipn(reader, 1);
reader_skipspaces(reader);
return S_OK;
}
+static BOOL reader_is_quote(xmlreader *reader)
+{
+ return !reader_cmp(reader, L"\'") || !reader_cmp(reader, L"\"");
+}
+
/* [24] VersionInfo ::= S 'version' Eq ("'" VersionNum "'" | '"' VersionNum '"') */
static HRESULT reader_parse_versioninfo(xmlreader *reader)
{
- static const WCHAR versionW[] = {'v','e','r','s','i','o','n',0};
struct reader_position position;
strval val, name;
HRESULT hr;
@@ -1231,7 +1223,7 @@ static HRESULT reader_parse_versioninfo(xmlreader *reader)
if (!reader_skipspaces(reader)) return WC_E_WHITESPACE;
position = reader->position;
- if (reader_cmp(reader, versionW)) return WC_E_XMLDECL;
+ if (reader_cmp(reader, L"version")) return WC_E_XMLDECL;
reader_init_strvalue(reader_get_cur(reader), 7, &name);
/* skip 'version' */
reader_skipn(reader, 7);
@@ -1239,7 +1231,7 @@ static HRESULT reader_parse_versioninfo(xmlreader *reader)
hr = reader_parse_eq(reader);
if (FAILED(hr)) return hr;
- if (reader_cmp(reader, quoteW) && reader_cmp(reader, dblquoteW))
+ if (!reader_is_quote(reader))
return WC_E_QUOTE;
/* skip "'"|'"' */
reader_skipn(reader, 1);
@@ -1247,7 +1239,7 @@ static HRESULT reader_parse_versioninfo(xmlreader *reader)
hr = reader_parse_versionnum(reader, &val);
if (FAILED(hr)) return hr;
- if (reader_cmp(reader, quoteW) && reader_cmp(reader, dblquoteW))
+ if (!reader_is_quote(reader))
return WC_E_QUOTE;
/* skip "'"|'"' */
@@ -1299,7 +1291,6 @@ static HRESULT reader_parse_encname(xmlreader *reader, strval *val)
/* [80] EncodingDecl ::= S 'encoding' Eq ('"' EncName '"' | "'" EncName "'" ) */
static HRESULT reader_parse_encdecl(xmlreader *reader)
{
- static const WCHAR encodingW[] = {'e','n','c','o','d','i','n','g',0};
struct reader_position position;
strval name, val;
HRESULT hr;
@@ -1307,7 +1298,7 @@ static HRESULT reader_parse_encdecl(xmlreader *reader)
if (!reader_skipspaces(reader)) return S_FALSE;
position = reader->position;
- if (reader_cmp(reader, encodingW)) return S_FALSE;
+ if (reader_cmp(reader, L"encoding")) return S_FALSE;
name.str = reader_get_ptr(reader);
name.start = reader_get_cur(reader);
name.len = 8;
@@ -1317,7 +1308,7 @@ static HRESULT reader_parse_encdecl(xmlreader *reader)
hr = reader_parse_eq(reader);
if (FAILED(hr)) return hr;
- if (reader_cmp(reader, quoteW) && reader_cmp(reader, dblquoteW))
+ if (!reader_is_quote(reader))
return WC_E_QUOTE;
/* skip "'"|'"' */
reader_skipn(reader, 1);
@@ -1325,7 +1316,7 @@ static HRESULT reader_parse_encdecl(xmlreader *reader)
hr = reader_parse_encname(reader, &val);
if (FAILED(hr)) return hr;
- if (reader_cmp(reader, quoteW) && reader_cmp(reader, dblquoteW))
+ if (!reader_is_quote(reader))
return WC_E_QUOTE;
/* skip "'"|'"' */
@@ -1337,9 +1328,6 @@ static HRESULT reader_parse_encdecl(xmlreader *reader)
/* [32] SDDecl ::= S 'standalone' Eq (("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no') '"')) */
static HRESULT reader_parse_sddecl(xmlreader *reader)
{
- static const WCHAR standaloneW[] = {'s','t','a','n','d','a','l','o','n','e',0};
- static const WCHAR yesW[] = {'y','e','s',0};
- static const WCHAR noW[] = {'n','o',0};
struct reader_position position;
strval name, val;
UINT start;
@@ -1348,7 +1336,7 @@ static HRESULT reader_parse_sddecl(xmlreader *reader)
if (!reader_skipspaces(reader)) return S_FALSE;
position = reader->position;
- if (reader_cmp(reader, standaloneW)) return S_FALSE;
+ if (reader_cmp(reader, L"standalone")) return S_FALSE;
reader_init_strvalue(reader_get_cur(reader), 10, &name);
/* skip 'standalone' */
reader_skipn(reader, 10);
@@ -1356,21 +1344,21 @@ static HRESULT reader_parse_sddecl(xmlreader *reader)
hr = reader_parse_eq(reader);
if (FAILED(hr)) return hr;
- if (reader_cmp(reader, quoteW) && reader_cmp(reader, dblquoteW))
+ if (!reader_is_quote(reader))
return WC_E_QUOTE;
/* skip "'"|'"' */
reader_skipn(reader, 1);
- if (reader_cmp(reader, yesW) && reader_cmp(reader, noW))
+ if (reader_cmp(reader, L"yes") && reader_cmp(reader, L"no"))
return WC_E_XMLDECL;
start = reader_get_cur(reader);
/* skip 'yes'|'no' */
- reader_skipn(reader, reader_cmp(reader, yesW) ? 2 : 3);
+ reader_skipn(reader, reader_cmp(reader, L"yes") ? 2 : 3);
reader_init_strvalue(start, reader_get_cur(reader)-start, &val);
TRACE("standalone=%s\n", debug_strval(reader, &val));
- if (reader_cmp(reader, quoteW) && reader_cmp(reader, dblquoteW))
+ if (!reader_is_quote(reader))
return WC_E_QUOTE;
/* skip "'"|'"' */
reader_skipn(reader, 1);
@@ -1381,13 +1369,10 @@ static HRESULT reader_parse_sddecl(xmlreader *reader)
/* [23] XMLDecl ::= '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>' */
static HRESULT reader_parse_xmldecl(xmlreader *reader)
{
- static const WCHAR xmldeclW[] = {'<','?','x','m','l',' ',0};
- static const WCHAR declcloseW[] = {'?','>',0};
struct reader_position position;
HRESULT hr;
- /* check if we have "<?xml " */
- if (reader_cmp(reader, xmldeclW))
+ if (reader_cmp(reader, L"<?xml "))
return S_FALSE;
reader_skipn(reader, 2);
@@ -1406,7 +1391,7 @@ static HRESULT reader_parse_xmldecl(xmlreader *reader)
return hr;
reader_skipspaces(reader);
- if (reader_cmp(reader, declcloseW))
+ if (reader_cmp(reader, L"?>"))
return WC_E_XMLDECL;
/* skip '?>' */
@@ -1605,8 +1590,7 @@ static HRESULT reader_parse_name(xmlreader *reader, strval *name)
/* [17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l')) */
static HRESULT reader_parse_pitarget(xmlreader *reader, strval *target)
{
- static const WCHAR xmlW[] = {'x','m','l'};
- static const strval xmlval = { (WCHAR*)xmlW, 3 };
+ static const strval xmlval = { (WCHAR *)L"xml", 3 };
strval name;
WCHAR *ptr;
HRESULT hr;
@@ -1762,9 +1746,9 @@ static HRESULT reader_parse_misc(xmlreader *reader)
if (is_wchar_space(*cur))
hr = reader_parse_whitespace(reader);
- else if (!reader_cmp(reader, commentW))
+ else if (!reader_cmp(reader, L"<!--"))
hr = reader_parse_comment(reader);
- else if (!reader_cmp(reader, piW))
+ else if (!reader_cmp(reader, L"<?"))
hr = reader_parse_pi(reader);
else
break;
@@ -1829,8 +1813,8 @@ static HRESULT reader_parse_pub_literal(xmlreader *reader, strval *literal)
/* [75] ExternalID ::= 'SYSTEM' S SystemLiteral | 'PUBLIC' S PubidLiteral S SystemLiteral */
static HRESULT reader_parse_externalid(xmlreader *reader)
{
- static WCHAR systemW[] = {'S','Y','S','T','E','M',0};
- static WCHAR publicW[] = {'P','U','B','L','I','C',0};
+ static WCHAR systemW[] = L"SYSTEM";
+ static WCHAR publicW[] = L"PUBLIC";
struct reader_position position = reader->position;
strval name, sys;
HRESULT hr;
@@ -1882,13 +1866,11 @@ static HRESULT reader_parse_externalid(xmlreader *reader)
/* [28] doctypedecl ::= '<!DOCTYPE' S Name (S ExternalID)? S? ('[' intSubset ']' S?)? '>' */
static HRESULT reader_parse_dtd(xmlreader *reader)
{
- static const WCHAR doctypeW[] = {'<','!','D','O','C','T','Y','P','E',0};
strval name;
WCHAR *cur;
HRESULT hr;
- /* check if we have "<!DOCTYPE" */
- if (reader_cmp(reader, doctypeW)) return S_FALSE;
+ if (reader_cmp(reader, L"<!DOCTYPE")) return S_FALSE;
reader_shrink(reader);
/* DTD processing is not allowed by default */
@@ -2042,16 +2024,11 @@ static HRESULT reader_parse_qname(xmlreader *reader, strval *prefix, strval *loc
static WCHAR get_predefined_entity(const xmlreader *reader, const strval *name)
{
- static const WCHAR entltW[] = {'l','t'};
- static const WCHAR entgtW[] = {'g','t'};
- static const WCHAR entampW[] = {'a','m','p'};
- static const WCHAR entaposW[] = {'a','p','o','s'};
- static const WCHAR entquotW[] = {'q','u','o','t'};
- static const strval lt = { (WCHAR*)entltW, 2 };
- static const strval gt = { (WCHAR*)entgtW, 2 };
- static const strval amp = { (WCHAR*)entampW, 3 };
- static const strval apos = { (WCHAR*)entaposW, 4 };
- static const strval quot = { (WCHAR*)entquotW, 4 };
+ static const strval lt = { (WCHAR *)L"lt", 2 };
+ static const strval gt = { (WCHAR *)L"gt", 2 };
+ static const strval amp = { (WCHAR *)L"amp", 3 };
+ static const strval apos = { (WCHAR *)L"apos", 4 };
+ static const strval quot = { (WCHAR *)L"quot", 4 };
WCHAR *str = reader_get_strptr(reader, name);
switch (*str)
@@ -2270,12 +2247,10 @@ static HRESULT reader_parse_stag(xmlreader *reader, strval *prefix, strval *loca
for (;;)
{
- static const WCHAR endW[] = {'/','>',0};
-
reader_skipspaces(reader);
/* empty element */
- if ((reader->is_empty_element = !reader_cmp(reader, endW)))
+ if ((reader->is_empty_element = !reader_cmp(reader, L"/>")))
{
struct element *element = &reader->empty_element;
@@ -2294,7 +2269,7 @@ static HRESULT reader_parse_stag(xmlreader *reader, strval *prefix, strval *loca
}
/* got a start tag */
- if (!reader_cmp(reader, gtW))
+ if (!reader_cmp(reader, L">"))
{
/* skip '>' */
reader_skipn(reader, 1);
@@ -2317,7 +2292,7 @@ static HRESULT reader_parse_element(xmlreader *reader)
{
case XmlReadResumeState_Initial:
/* check if we are really on element */
- if (reader_cmp(reader, ltW)) return S_FALSE;
+ if (reader_cmp(reader, L"<")) return S_FALSE;
/* skip '<' */
reader_skipn(reader, 1);
@@ -2371,7 +2346,7 @@ static HRESULT reader_parse_endtag(xmlreader *reader)
reader_skipspaces(reader);
- if (reader_cmp(reader, gtW)) return WC_E_GREATERTHAN;
+ if (reader_cmp(reader, L">")) return WC_E_GREATERTHAN;
/* skip '>' */
reader_skipn(reader, 1);
@@ -2473,8 +2448,6 @@ static HRESULT reader_parse_chardata(xmlreader *reader)
position = reader->position;
while (*ptr)
{
- static const WCHAR ampW[] = {'&',0};
-
/* CDATA closing sequence ']]>' is not allowed */
if (ptr[0] == ']' && ptr[1] == ']' && ptr[2] == '>')
return WC_E_CDSECTEND;
@@ -2495,7 +2468,7 @@ static HRESULT reader_parse_chardata(xmlreader *reader)
/* this covers a case when text has leading whitespace chars */
if (!is_wchar_space(*ptr)) reader->nodetype = XmlNodeType_Text;
- if (!reader_cmp(reader, ampW))
+ if (!reader_cmp(reader, L"&"))
reader_parse_reference(reader);
else
reader_skipn(reader, 1);
@@ -2509,9 +2482,6 @@ static HRESULT reader_parse_chardata(xmlreader *reader)
/* [43] content ::= CharData? ((element | Reference | CDSect | PI | Comment) CharData?)* */
static HRESULT reader_parse_content(xmlreader *reader)
{
- static const WCHAR cdstartW[] = {'<','!','[','C','D','A','T','A','[',0};
- static const WCHAR etagW[] = {'<','/',0};
-
if (reader->resumestate != XmlReadResumeState_Initial)
{
switch (reader->resumestate)
@@ -2533,19 +2503,19 @@ static HRESULT reader_parse_content(xmlreader *reader)
reader_shrink(reader);
/* handle end tag here, it indicates end of content as well */
- if (!reader_cmp(reader, etagW))
+ if (!reader_cmp(reader, L"</"))
return reader_parse_endtag(reader);
- if (!reader_cmp(reader, commentW))
+ if (!reader_cmp(reader, L"<!--"))
return reader_parse_comment(reader);
- if (!reader_cmp(reader, piW))
+ if (!reader_cmp(reader, L"<?"))
return reader_parse_pi(reader);
- if (!reader_cmp(reader, cdstartW))
+ if (!reader_cmp(reader, L"<![CDATA["))
return reader_parse_cdata(reader);
- if (!reader_cmp(reader, ltW))
+ if (!reader_cmp(reader, L"<"))
return reader_parse_element(reader);
/* what's left must be CharData */
@@ -3002,10 +2972,8 @@ static HRESULT WINAPI xmlreader_MoveToNextAttribute(IXmlReader* iface)
static void reader_get_attribute_ns_uri(xmlreader *reader, struct attribute *attr, const WCHAR **uri, UINT *len)
{
- static const WCHAR xmlns_uriW[] = {'h','t','t','p',':','/','/','w','w','w','.','w','3','.','o','r','g','/',
- '2','0','0','0','/','x','m','l','n','s','/',0};
- static const WCHAR xml_uriW[] = {'h','t','t','p',':','/','/','w','w','w','.','w','3','.','o','r','g','/',
- 'X','M','L','/','1','9','9','8','/','n','a','m','e','s','p','a','c','e',0};
+ static const WCHAR xmlns_uriW[] = L"http://www.w3.org/2000/xmlns/";
+ static const WCHAR xml_uriW[] = L"http://www.w3.org/XML/1998/namespace";
/* Check for reserved prefixes first */
if ((strval_eq(reader, &attr->prefix, &strval_empty) && strval_eq(reader, &attr->localname, &strval_xmlns)) ||
--
2.29.2
1
1
Signed-off-by: Kevin Puetz <PuetzKevinA(a)JohnDeere.com>
---
Rebased to follow 92eb5ef5a1ada34853b57626b4e5201010decc21
---
tools/widl/parser.l | 2 +-
tools/widl/parser.y | 15 +++++++++++++++
tools/widl/widltypes.h | 7 +++++++
3 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/tools/widl/parser.l b/tools/widl/parser.l
index b715342ad59..d7d96702322 100644
--- a/tools/widl/parser.l
+++ b/tools/widl/parser.l
@@ -339,6 +339,7 @@ static const struct keyword attr_keywords[] =
{"context_handle_noserialize", tCONTEXTHANDLENOSERIALIZE, 0},
{"context_handle_serialize", tCONTEXTHANDLENOSERIALIZE, 0},
{"control", tCONTROL, 0},
+ {"custom", tCUSTOM, 0},
{"decode", tDECODE, 0},
{"defaultbind", tDEFAULTBIND, 0},
{"defaultcollelem", tDEFAULTCOLLELEM, 0},
@@ -431,7 +432,6 @@ static const struct keyword attr_keywords[] =
};
/* attributes TODO:
- custom
first_is
last_is
max_is
diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index caf4569179b..160e4029a6e 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -58,6 +58,7 @@ static decl_spec_t *make_decl_spec(type_t *type, decl_spec_t *left, decl_spec_t
static attr_t *make_attr(enum attr_type type);
static attr_t *make_attrv(enum attr_type type, unsigned int val);
static attr_t *make_attrp(enum attr_type type, void *val);
+static attr_t *make_custom_attr(UUID *id, expr_t *pval);
static expr_list_t *append_expr(expr_list_t *list, expr_t *expr);
static var_t *declare_var(attr_list_t *attrs, decl_spec_t *decl_spec, declarator_t *decl, int top);
static var_list_t *set_var_types(attr_list_t *attrs, decl_spec_t *decl_spec, declarator_list_t *decls);
@@ -177,6 +178,7 @@ static typelib_t *current_typelib;
%token tCALLAS tCALLBACK tCASE tCDECL tCHAR tCOCLASS tCODE tCOMMSTATUS
%token tCONST tCONTEXTHANDLE tCONTEXTHANDLENOSERIALIZE
%token tCONTEXTHANDLESERIALIZE tCONTROL tCPPQUOTE
+%token tCUSTOM
%token tDECODE tDEFAULT tDEFAULTBIND
%token tDEFAULTCOLLELEM
%token tDEFAULTVALUE
@@ -506,6 +508,7 @@ attribute: { $$ = NULL; }
| tCONTEXTHANDLENOSERIALIZE { $$ = make_attrv(ATTR_CONTEXTHANDLE, 0); /* RPC_CONTEXT_HANDLE_DONT_SERIALIZE */ }
| tCONTEXTHANDLESERIALIZE { $$ = make_attrv(ATTR_CONTEXTHANDLE, 0); /* RPC_CONTEXT_HANDLE_SERIALIZE */ }
| tCONTROL { $$ = make_attr(ATTR_CONTROL); }
+ | tCUSTOM '(' uuid_string ',' expr_const ')' { $$ = make_custom_attr($3, $5); }
| tDECODE { $$ = make_attr(ATTR_DECODE); }
| tDEFAULT { $$ = make_attr(ATTR_DEFAULT); }
| tDEFAULTBIND { $$ = make_attr(ATTR_DEFAULTBIND); }
@@ -1366,6 +1369,17 @@ static attr_t *make_attrp(enum attr_type type, void *val)
return a;
}
+static attr_t *make_custom_attr(UUID *id, expr_t *pval)
+{
+ attr_t *a = xmalloc(sizeof(attr_t));
+ attr_custdata_t *cstdata = xmalloc(sizeof(attr_custdata_t));
+ a->type = ATTR_CUSTOM;
+ cstdata->id = *id;
+ cstdata->pval = pval;
+ a->u.pval = cstdata;
+ return a;
+}
+
static expr_list_t *append_expr(expr_list_t *list, expr_t *expr)
{
if (!expr) return list;
@@ -2142,6 +2156,7 @@ struct allowed_attr allowed_attr[] =
/* ATTR_COMMSTATUS */ { 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "comm_status" },
/* ATTR_CONTEXTHANDLE */ { 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "context_handle" },
/* ATTR_CONTROL */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, "control" },
+ /* ATTR_CUSTOM */ { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, "custom" },
/* ATTR_DECODE */ { 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "decode" },
/* ATTR_DEFAULT */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, "default" },
/* ATTR_DEFAULTBIND */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "defaultbind" },
diff --git a/tools/widl/widltypes.h b/tools/widl/widltypes.h
index 2e2ee7a206b..b02b80e122c 100644
--- a/tools/widl/widltypes.h
+++ b/tools/widl/widltypes.h
@@ -37,6 +37,7 @@ typedef GUID UUID;
typedef struct _loc_info_t loc_info_t;
typedef struct _attr_t attr_t;
+typedef struct _attr_custdata_t attr_custdata_t;
typedef struct _expr_t expr_t;
typedef struct _type_t type_t;
typedef struct _var_t var_t;
@@ -84,6 +85,7 @@ enum attr_type
ATTR_COMMSTATUS,
ATTR_CONTEXTHANDLE,
ATTR_CONTROL,
+ ATTR_CUSTOM,
ATTR_DECODE,
ATTR_DEFAULT,
ATTR_DEFAULTBIND,
@@ -338,6 +340,11 @@ struct _expr_t {
struct list entry;
};
+struct _attr_custdata_t {
+ GUID id;
+ expr_t *pval;
+};
+
struct struct_details
{
var_list_t *fields;
1
5
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/quartz/acmwrapper.c | 7 +++++--
dlls/quartz/avidec.c | 9 +++++++--
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/dlls/quartz/acmwrapper.c b/dlls/quartz/acmwrapper.c
index 6df04595bb5..23ad235327a 100644
--- a/dlls/quartz/acmwrapper.c
+++ b/dlls/quartz/acmwrapper.c
@@ -500,8 +500,10 @@ static void acm_wrapper_destroy(struct strmbase_filter *iface)
static HRESULT acm_wrapper_init_stream(struct strmbase_filter *iface)
{
struct acm_wrapper *filter = impl_from_strmbase_filter(iface);
+ HRESULT hr;
- BaseOutputPinImpl_Active(&filter->source);
+ if (filter->source.pin.peer && FAILED(hr = IMemAllocator_Commit(filter->source.pAllocator)))
+ ERR("Failed to commit allocator, hr %#x.\n", hr);
return S_OK;
}
@@ -509,7 +511,8 @@ static HRESULT acm_wrapper_cleanup_stream(struct strmbase_filter *iface)
{
struct acm_wrapper *filter = impl_from_strmbase_filter(iface);
- BaseOutputPinImpl_Inactive(&filter->source);
+ if (filter->source.pin.peer)
+ IMemAllocator_Decommit(filter->source.pAllocator);
return S_OK;
}
diff --git a/dlls/quartz/avidec.c b/dlls/quartz/avidec.c
index ada3a1c7e62..ef232673e56 100644
--- a/dlls/quartz/avidec.c
+++ b/dlls/quartz/avidec.c
@@ -564,6 +564,7 @@ static HRESULT avi_decompressor_init_stream(struct strmbase_filter *iface)
struct avi_decompressor *filter = impl_from_strmbase_filter(iface);
VIDEOINFOHEADER *source_format;
LRESULT res;
+ HRESULT hr;
filter->late = -1;
@@ -574,7 +575,9 @@ static HRESULT avi_decompressor_init_stream(struct strmbase_filter *iface)
return E_FAIL;
}
- BaseOutputPinImpl_Active(&filter->source);
+ if (filter->source.pin.peer && FAILED(hr = IMemAllocator_Commit(filter->source.pAllocator)))
+ ERR("Failed to commit allocator, hr %#x.\n", hr);
+
return S_OK;
}
@@ -589,7 +592,9 @@ static HRESULT avi_decompressor_cleanup_stream(struct strmbase_filter *iface)
return E_FAIL;
}
- BaseOutputPinImpl_Inactive(&filter->source);
+ if (filter->source.pin.peer)
+ IMemAllocator_Decommit(filter->source.pAllocator);
+
return S_OK;
}
--
2.29.2
2
6
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/dxdiagn/provider.c | 604 ++++++++++++++--------------------------
1 file changed, 208 insertions(+), 396 deletions(-)
diff --git a/dlls/dxdiagn/provider.c b/dlls/dxdiagn/provider.c
index 7515f72002d..f68fa7f243c 100644
--- a/dlls/dxdiagn/provider.c
+++ b/dlls/dxdiagn/provider.c
@@ -42,59 +42,9 @@
WINE_DEFAULT_DEBUG_CHANNEL(dxdiag);
-static const WCHAR szEmpty[] = {0};
-
static HRESULT build_information_tree(IDxDiagContainerImpl_Container **pinfo_root);
static void free_information_tree(IDxDiagContainerImpl_Container *node);
-static const WCHAR szDescription[] = {'s','z','D','e','s','c','r','i','p','t','i','o','n',0};
-static const WCHAR szDeviceName[] = {'s','z','D','e','v','i','c','e','N','a','m','e',0};
-static const WCHAR szKeyDeviceID[] = {'s','z','K','e','y','D','e','v','i','c','e','I','D',0};
-static const WCHAR szKeyDeviceKey[] = {'s','z','K','e','y','D','e','v','i','c','e','K','e','y',0};
-static const WCHAR szVendorId[] = {'s','z','V','e','n','d','o','r','I','d',0};
-static const WCHAR szDeviceId[] = {'s','z','D','e','v','i','c','e','I','d',0};
-static const WCHAR szDeviceIdentifier[] = {'s','z','D','e','v','i','c','e','I','d','e','n','t','i','f','i','e','r',0};
-static const WCHAR dwWidth[] = {'d','w','W','i','d','t','h',0};
-static const WCHAR dwHeight[] = {'d','w','H','e','i','g','h','t',0};
-static const WCHAR dwBpp[] = {'d','w','B','p','p',0};
-static const WCHAR szDisplayMemoryLocalized[] = {'s','z','D','i','s','p','l','a','y','M','e','m','o','r','y','L','o','c','a','l','i','z','e','d',0};
-static const WCHAR szDisplayMemoryEnglish[] = {'s','z','D','i','s','p','l','a','y','M','e','m','o','r','y','E','n','g','l','i','s','h',0};
-static const WCHAR szDisplayModeLocalized[] = {'s','z','D','i','s','p','l','a','y','M','o','d','e','L','o','c','a','l','i','z','e','d',0};
-static const WCHAR szDisplayModeEnglish[] = {'s','z','D','i','s','p','l','a','y','M','o','d','e','E','n','g','l','i','s','h',0};
-static const WCHAR szDriverName[] = {'s','z','D','r','i','v','e','r','N','a','m','e',0};
-static const WCHAR szDriverVersion[] = {'s','z','D','r','i','v','e','r','V','e','r','s','i','o','n',0};
-static const WCHAR szSubSysId[] = {'s','z','S','u','b','S','y','s','I','d',0};
-static const WCHAR szRevisionId[] = {'s','z','R','e','v','i','s','i','o','n','I','d',0};
-static const WCHAR dwRefreshRate[] = {'d','w','R','e','f','r','e','s','h','R','a','t','e',0};
-static const WCHAR szManufacturer[] = {'s','z','M','a','n','u','f','a','c','t','u','r','e','r',0};
-static const WCHAR szChipType[] = {'s','z','C','h','i','p','T','y','p','e',0};
-static const WCHAR szDACType[] = {'s','z','D','A','C','T','y','p','e',0};
-static const WCHAR szRevision[] = {'s','z','R','e','v','i','s','i','o','n',0};
-static const WCHAR szMonitorName[] = {'s','z','M','o','n','i','t','o','r','N','a','m','e',0};
-static const WCHAR szMonitorMaxRes[] = {'s','z','M','o','n','i','t','o','r','M','a','x','R','e','s',0};
-static const WCHAR szDriverAttributes[] = {'s','z','D','r','i','v','e','r','A','t','t','r','i','b','u','t','e','s',0};
-static const WCHAR szDriverLanguageEnglish[] = {'s','z','D','r','i','v','e','r','L','a','n','g','u','a','g','e','E','n','g','l','i','s','h',0};
-static const WCHAR szDriverLanguageLocalized[] = {'s','z','D','r','i','v','e','r','L','a','n','g','u','a','g','e','L','o','c','a','l','i','z','e','d',0};
-static const WCHAR szDriverDateEnglish[] = {'s','z','D','r','i','v','e','r','D','a','t','e','E','n','g','l','i','s','h',0};
-static const WCHAR szDriverDateLocalized[] = {'s','z','D','r','i','v','e','r','D','a','t','e','L','o','c','a','l','i','z','e','d',0};
-static const WCHAR lDriverSize[] = {'l','D','r','i','v','e','r','S','i','z','e',0};
-static const WCHAR szMiniVdd[] = {'s','z','M','i','n','i','V','d','d',0};
-static const WCHAR szMiniVddDateLocalized[] = {'s','z','M','i','n','i','V','d','d','D','a','t','e','L','o','c','a','l','i','z','e','d',0};
-static const WCHAR szMiniVddDateEnglish[] = {'s','z','M','i','n','i','V','d','d','D','a','t','e','E','n','g','l','i','s','h',0};
-static const WCHAR lMiniVddSize[] = {'l','M','i','n','i','V','d','d','S','i','z','e',0};
-static const WCHAR szVdd[] = {'s','z','V','d','d',0};
-static const WCHAR bCanRenderWindow[] = {'b','C','a','n','R','e','n','d','e','r','W','i','n','d','o','w',0};
-static const WCHAR bDriverBeta[] = {'b','D','r','i','v','e','r','B','e','t','a',0};
-static const WCHAR bDriverDebug[] = {'b','D','r','i','v','e','r','D','e','b','u','g',0};
-static const WCHAR bDriverSigned[] = {'b','D','r','i','v','e','r','S','i','g','n','e','d',0};
-static const WCHAR bDriverSignedValid[] = {'b','D','r','i','v','e','r','S','i','g','n','e','d','V','a','l','i','d',0};
-static const WCHAR szDriverSignDate[] = {'s','z','D','r','i','v','e','r','S','i','g','n','D','a','t','e',0};
-static const WCHAR dwDDIVersion[] = {'d','w','D','D','I','V','e','r','s','i','o','n',0};
-static const WCHAR szDDIVersionEnglish[] = {'s','z','D','D','I','V','e','r','s','i','o','n','E','n','g','l','i','s','h',0};
-static const WCHAR szDDIVersionLocalized[] = {'s','z','D','D','I','V','e','r','s','i','o','n','L','o','c','a','l','i','z','e','d',0};
-static const WCHAR iAdapter[] = {'i','A','d','a','p','t','e','r',0};
-static const WCHAR dwWHQLLevel[] = {'d','w','W','H','Q','L','L','e','v','e','l',0};
-
struct IDxDiagProviderImpl
{
IDxDiagProvider IDxDiagProvider_iface;
@@ -481,8 +431,6 @@ static BOOL get_process_name_from_pid(DWORD pid, WCHAR *buf, DWORD chars)
/* dxdiagn's detection scheme is simply to look for a process called conf.exe. */
static BOOL is_netmeeting_running(void)
{
- static const WCHAR conf_exe[] = {'c','o','n','f','.','e','x','e',0};
-
DWORD list_count;
DWORD *pid_list = enumerate_processes(&list_count);
@@ -494,7 +442,7 @@ static BOOL is_netmeeting_running(void)
for (i = 0; i < list_count; i++)
{
if (get_process_name_from_pid(pid_list[i], process_name, ARRAY_SIZE(process_name)) &&
- !lstrcmpW(conf_exe, process_name))
+ !lstrcmpW(L"conf.exe", process_name))
{
HeapFree(GetProcessHeap(), 0, pid_list);
return TRUE;
@@ -508,11 +456,6 @@ static BOOL is_netmeeting_running(void)
static HRESULT fill_language_information(IDxDiagContainerImpl_Container *node)
{
- static const WCHAR regional_setting_engW[] = {'R','e','g','i','o','n','a','l',' ','S','e','t','t','i','n','g',0};
- static const WCHAR languages_fmtW[] = {'%','s',' ','(','%','s',':',' ','%','s',')',0};
- static const WCHAR szLanguagesLocalized[] = {'s','z','L','a','n','g','u','a','g','e','s','L','o','c','a','l','i','z','e','d',0};
- static const WCHAR szLanguagesEnglish[] = {'s','z','L','a','n','g','u','a','g','e','s','E','n','g','l','i','s','h',0};
-
WCHAR system_lang[80], regional_setting[100], user_lang[80], language_str[300];
HRESULT hr;
@@ -521,10 +464,10 @@ static HRESULT fill_language_information(IDxDiagContainerImpl_Container *node)
LoadStringW(dxdiagn_instance, IDS_REGIONAL_SETTING, regional_setting, ARRAY_SIZE(regional_setting));
GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SNATIVELANGNAME, user_lang, ARRAY_SIZE(user_lang));
- swprintf(language_str, ARRAY_SIZE(language_str), languages_fmtW, system_lang, regional_setting,
- user_lang);
+ swprintf(language_str, ARRAY_SIZE(language_str), L"%s (%s: %s)", system_lang, regional_setting,
+ user_lang);
- hr = add_bstr_property(node, szLanguagesLocalized, language_str);
+ hr = add_bstr_property(node, L"szLanguagesLocalized", language_str);
if (FAILED(hr))
return hr;
@@ -532,10 +475,10 @@ static HRESULT fill_language_information(IDxDiagContainerImpl_Container *node)
GetLocaleInfoW(LOCALE_SYSTEM_DEFAULT, LOCALE_SENGLANGUAGE, system_lang, ARRAY_SIZE(system_lang));
GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SENGLANGUAGE, user_lang, ARRAY_SIZE(user_lang));
- swprintf(language_str, ARRAY_SIZE(language_str), languages_fmtW, system_lang,
- regional_setting_engW, user_lang);
+ swprintf(language_str, ARRAY_SIZE(language_str), L"%s (%s: %s)", system_lang,
+ L"Regional Setting", user_lang);
- hr = add_bstr_property(node, szLanguagesEnglish, language_str);
+ hr = add_bstr_property(node, L"szLanguagesEnglish", language_str);
if (FAILED(hr))
return hr;
@@ -544,35 +487,29 @@ static HRESULT fill_language_information(IDxDiagContainerImpl_Container *node)
static HRESULT fill_datetime_information(IDxDiagContainerImpl_Container *node)
{
- static const WCHAR date_fmtW[] = {'M','\'','/','\'','d','\'','/','\'','y','y','y','y',0};
- static const WCHAR time_fmtW[] = {'H','H','\'',':','\'','m','m','\'',':','\'','s','s',0};
- static const WCHAR datetime_fmtW[] = {'%','s',',',' ','%','s',0};
- static const WCHAR szTimeLocalized[] = {'s','z','T','i','m','e','L','o','c','a','l','i','z','e','d',0};
- static const WCHAR szTimeEnglish[] = {'s','z','T','i','m','e','E','n','g','l','i','s','h',0};
-
SYSTEMTIME curtime;
WCHAR date_str[80], time_str[80], datetime_str[200];
HRESULT hr;
GetLocalTime(&curtime);
- GetTimeFormatW(LOCALE_NEUTRAL, 0, &curtime, time_fmtW, time_str, ARRAY_SIZE(time_str));
+ GetTimeFormatW(LOCALE_NEUTRAL, 0, &curtime, L"HH':'mm':'ss", time_str, ARRAY_SIZE(time_str));
/* szTimeLocalized */
GetDateFormatW(LOCALE_USER_DEFAULT, DATE_LONGDATE, &curtime, NULL, date_str, ARRAY_SIZE(date_str));
- swprintf(datetime_str, ARRAY_SIZE(datetime_str), datetime_fmtW, date_str, time_str);
+ swprintf(datetime_str, ARRAY_SIZE(datetime_str), L"%s, %s", date_str, time_str);
- hr = add_bstr_property(node, szTimeLocalized, datetime_str);
+ hr = add_bstr_property(node, L"szTimeLocalized", datetime_str);
if (FAILED(hr))
return hr;
/* szTimeEnglish */
- GetDateFormatW(LOCALE_NEUTRAL, 0, &curtime, date_fmtW, date_str, ARRAY_SIZE(date_str));
+ GetDateFormatW(LOCALE_NEUTRAL, 0, &curtime, L"M'/'d'/'yyyy", date_str, ARRAY_SIZE(date_str));
- swprintf(datetime_str, ARRAY_SIZE(datetime_str), datetime_fmtW, date_str, time_str);
+ swprintf(datetime_str, ARRAY_SIZE(datetime_str), L"%s, %s", date_str, time_str);
- hr = add_bstr_property(node, szTimeEnglish, datetime_str);
+ hr = add_bstr_property(node, L"szTimeEnglish", datetime_str);
if (FAILED(hr))
return hr;
@@ -581,17 +518,11 @@ static HRESULT fill_datetime_information(IDxDiagContainerImpl_Container *node)
static HRESULT fill_os_string_information(IDxDiagContainerImpl_Container *node, OSVERSIONINFOW *info)
{
- static const WCHAR winxpW[] = {'W','i','n','d','o','w','s',' ','X','P',' ','P','r','o','f','e','s','s','i','o','n','a','l',0};
- static const WCHAR szOSLocalized[] = {'s','z','O','S','L','o','c','a','l','i','z','e','d',0};
- static const WCHAR szOSExLocalized[] = {'s','z','O','S','E','x','L','o','c','a','l','i','z','e','d',0};
- static const WCHAR szOSExLongLocalized[] = {'s','z','O','S','E','x','L','o','n','g','L','o','c','a','l','i','z','e','d',0};
- static const WCHAR szOSEnglish[] = {'s','z','O','S','E','n','g','l','i','s','h',0};
- static const WCHAR szOSExEnglish[] = {'s','z','O','S','E','x','E','n','g','l','i','s','h',0};
- static const WCHAR szOSExLongEnglish[] = {'s','z','O','S','E','x','L','o','n','g','E','n','g','l','i','s','h',0};
-
- static const WCHAR *prop_list[] = {szOSLocalized, szOSExLocalized, szOSExLongLocalized,
- szOSEnglish, szOSExEnglish, szOSExLongEnglish};
-
+ static const WCHAR *prop_list[] =
+ {
+ L"szOSLocalized", L"szOSExLocalized", L"szOSExLongLocalized",
+ L"szOSEnglish", L"szOSExEnglish", L"szOSExLongEnglish"
+ };
size_t i;
HRESULT hr;
@@ -599,7 +530,7 @@ static HRESULT fill_os_string_information(IDxDiagContainerImpl_Container *node,
* should contain translated versions of the "build" phrase. */
for (i = 0; i < ARRAY_SIZE(prop_list); i++)
{
- hr = add_bstr_property(node, prop_list[i], winxpW);
+ hr = add_bstr_property(node, prop_list[i], L"Windows XP Professional");
if (FAILED(hr))
return hr;
}
@@ -609,16 +540,6 @@ static HRESULT fill_os_string_information(IDxDiagContainerImpl_Container *node,
static HRESULT fill_processor_information(IDxDiagContainerImpl_Container *node)
{
- static const WCHAR szProcessorEnglish[] = {'s','z','P','r','o','c','e','s','s','o','r','E','n','g','l','i','s','h',0};
-
- static const WCHAR cimv2W[] = {'\\','\\','.','\\','r','o','o','t','\\','c','i','m','v','2',0};
- static const WCHAR proc_classW[] = {'W','i','n','3','2','_','P','r','o','c','e','s','s','o','r',0};
- static const WCHAR nameW[] = {'N','a','m','e',0};
- static const WCHAR max_clock_speedW[] = {'M','a','x','C','l','o','c','k','S','p','e','e','d',0};
- static const WCHAR cpu_noW[] = {'N','u','m','b','e','r','O','f','L','o','g','i','c','a','l','P','r','o','c','e','s','s','o','r','s',0};
-
- static const WCHAR processor_fmtW[] = {'%','s','(','%','d',' ','C','P','U','s',')',',',' ','~','%','d','M','H','z',0};
-
IWbemLocator *wbem_locator;
IWbemServices *wbem_service;
IWbemClassObject *wbem_class;
@@ -633,7 +554,7 @@ static HRESULT fill_processor_information(IDxDiagContainerImpl_Container *node)
if(FAILED(hr))
return hr;
- bstr = SysAllocString(cimv2W);
+ bstr = SysAllocString(L"\\\\.\\root\\cimv2");
if(!bstr) {
IWbemLocator_Release(wbem_locator);
return E_OUTOFMEMORY;
@@ -644,7 +565,7 @@ static HRESULT fill_processor_information(IDxDiagContainerImpl_Container *node)
if(FAILED(hr))
return hr;
- bstr = SysAllocString(proc_classW);
+ bstr = SysAllocString(L"Win32_Processor");
if(!bstr) {
IWbemServices_Release(wbem_service);
return E_OUTOFMEMORY;
@@ -660,68 +581,32 @@ static HRESULT fill_processor_information(IDxDiagContainerImpl_Container *node)
if(FAILED(hr))
return hr;
- hr = IWbemClassObject_Get(wbem_class, cpu_noW, 0, &cpu_no, NULL, NULL);
+ hr = IWbemClassObject_Get(wbem_class, L"NumberOfLogicalProcessors", 0, &cpu_no, NULL, NULL);
if(FAILED(hr)) {
IWbemClassObject_Release(wbem_class);
return hr;
}
- hr = IWbemClassObject_Get(wbem_class, max_clock_speedW, 0, &clock_speed, NULL, NULL);
+ hr = IWbemClassObject_Get(wbem_class, L"MaxClockSpeed", 0, &clock_speed, NULL, NULL);
if(FAILED(hr)) {
IWbemClassObject_Release(wbem_class);
return hr;
}
- hr = IWbemClassObject_Get(wbem_class, nameW, 0, &cpu_name, NULL, NULL);
+ hr = IWbemClassObject_Get(wbem_class, L"Name", 0, &cpu_name, NULL, NULL);
IWbemClassObject_Release(wbem_class);
if(FAILED(hr))
return hr;
- swprintf(print_buf, ARRAY_SIZE(print_buf), processor_fmtW,
+ swprintf(print_buf, ARRAY_SIZE(print_buf), L"%s(%d CPUs), ~%dMHz",
V_BSTR(&cpu_name), V_I4(&cpu_no), V_I4(&clock_speed));
VariantClear(&cpu_name);
VariantClear(&cpu_no);
VariantClear(&clock_speed);
- return add_bstr_property(node, szProcessorEnglish, print_buf);
+ return add_bstr_property(node, L"szProcessorEnglish", print_buf);
}
static HRESULT build_systeminfo_tree(IDxDiagContainerImpl_Container *node)
{
- static const WCHAR dwDirectXVersionMajor[] = {'d','w','D','i','r','e','c','t','X','V','e','r','s','i','o','n','M','a','j','o','r',0};
- static const WCHAR dwDirectXVersionMinor[] = {'d','w','D','i','r','e','c','t','X','V','e','r','s','i','o','n','M','i','n','o','r',0};
- static const WCHAR szDirectXVersionLetter[] = {'s','z','D','i','r','e','c','t','X','V','e','r','s','i','o','n','L','e','t','t','e','r',0};
- static const WCHAR szDirectXVersionLetter_v[] = {'c',0};
- static const WCHAR bDebug[] = {'b','D','e','b','u','g',0};
- static const WCHAR bNECPC98[] = {'b','N','E','C','P','C','9','8',0};
- static const WCHAR szDirectXVersionEnglish[] = {'s','z','D','i','r','e','c','t','X','V','e','r','s','i','o','n','E','n','g','l','i','s','h',0};
- static const WCHAR szDirectXVersionEnglish_v[] = {'4','.','0','9','.','0','0','0','0','.','0','9','0','4',0};
- static const WCHAR szDirectXVersionLongEnglish[] = {'s','z','D','i','r','e','c','t','X','V','e','r','s','i','o','n','L','o','n','g','E','n','g','l','i','s','h',0};
- static const WCHAR szDirectXVersionLongEnglish_v[] = {'=',' ','"','D','i','r','e','c','t','X',' ','9','.','0','c',' ','(','4','.','0','9','.','0','0','0','0','.','0','9','0','4',')',0};
- static const WCHAR ullPhysicalMemory[] = {'u','l','l','P','h','y','s','i','c','a','l','M','e','m','o','r','y',0};
- static const WCHAR ullUsedPageFile[] = {'u','l','l','U','s','e','d','P','a','g','e','F','i','l','e',0};
- static const WCHAR ullAvailPageFile[] = {'u','l','l','A','v','a','i','l','P','a','g','e','F','i','l','e',0};
- static const WCHAR bNetMeetingRunning[] = {'b','N','e','t','M','e','e','t','i','n','g','R','u','n','n','i','n','g',0};
- static const WCHAR szWindowsDir[] = {'s','z','W','i','n','d','o','w','s','D','i','r',0};
- static const WCHAR dwOSMajorVersion[] = {'d','w','O','S','M','a','j','o','r','V','e','r','s','i','o','n',0};
- static const WCHAR dwOSMinorVersion[] = {'d','w','O','S','M','i','n','o','r','V','e','r','s','i','o','n',0};
- static const WCHAR dwOSBuildNumber[] = {'d','w','O','S','B','u','i','l','d','N','u','m','b','e','r',0};
- static const WCHAR dwOSPlatformID[] = {'d','w','O','S','P','l','a','t','f','o','r','m','I','D',0};
- static const WCHAR szCSDVersion[] = {'s','z','C','S','D','V','e','r','s','i','o','n',0};
- static const WCHAR szPhysicalMemoryEnglish[] = {'s','z','P','h','y','s','i','c','a','l','M','e','m','o','r','y','E','n','g','l','i','s','h',0};
- static const WCHAR szPageFileLocalized[] = {'s','z','P','a','g','e','F','i','l','e','L','o','c','a','l','i','z','e','d',0};
- static const WCHAR szPageFileEnglish[] = {'s','z','P','a','g','e','F','i','l','e','E','n','g','l','i','s','h',0};
- static const WCHAR szMachineNameLocalized[] = {'s','z','M','a','c','h','i','n','e','N','a','m','e','L','o','c','a','l','i','z','e','d',0};
- static const WCHAR szMachineNameEnglish[] = {'s','z','M','a','c','h','i','n','e','N','a','m','e','E','n','g','l','i','s','h',0};
- static const WCHAR szSystemManufacturerEnglish[] = {'s','z','S','y','s','t','e','m','M','a','n','u','f','a','c','t','u','r','e','r','E','n','g','l','i','s','h',0};
- static const WCHAR szSystemModelEnglish[] = {'s','z','S','y','s','t','e','m','M','o','d','e','l','E','n','g','l','i','s','h',0};
- static const WCHAR szBIOSEnglish[] = {'s','z','B','I','O','S','E','n','g','l','i','s','h',0};
- static const WCHAR szSetupParamEnglish[] = {'s','z','S','e','t','u','p','P','a','r','a','m','E','n','g','l','i','s','h',0};
- static const WCHAR szDxDiagVersion[] = {'s','z','D','x','D','i','a','g','V','e','r','s','i','o','n',0};
-
- static const WCHAR notpresentW[] = {'N','o','t',' ','p','r','e','s','e','n','t',0};
-
- static const WCHAR pagefile_fmtW[] = {'%','u','M','B',' ','u','s','e','d',',',' ','%','u','M','B',' ','a','v','a','i','l','a','b','l','e',0};
- static const WCHAR physmem_fmtW[] = {'%','u','M','B',' ','R','A','M',0};
-
HRESULT hr;
MEMORYSTATUSEX msex;
OSVERSIONINFOW info;
@@ -729,80 +614,79 @@ static HRESULT build_systeminfo_tree(IDxDiagContainerImpl_Container *node)
WCHAR buffer[MAX_PATH], computer_name[MAX_COMPUTERNAME_LENGTH + 1], print_buf[200], localized_pagefile_fmt[200];
DWORD_PTR args[2];
- hr = add_ui4_property(node, dwDirectXVersionMajor, 9);
+ hr = add_ui4_property(node, L"dwDirectXVersionMajor", 9);
if (FAILED(hr))
return hr;
- hr = add_ui4_property(node, dwDirectXVersionMinor, 0);
+ hr = add_ui4_property(node, L"dwDirectXVersionMinor", 0);
if (FAILED(hr))
return hr;
- hr = add_bstr_property(node, szDirectXVersionLetter, szDirectXVersionLetter_v);
+ hr = add_bstr_property(node, L"szDirectXVersionLetter", L"c");
if (FAILED(hr))
return hr;
- hr = add_bstr_property(node, szDirectXVersionEnglish, szDirectXVersionEnglish_v);
+ hr = add_bstr_property(node, L"szDirectXVersionEnglish", L"4.09.0000.0904");
if (FAILED(hr))
return hr;
- hr = add_bstr_property(node, szDirectXVersionLongEnglish, szDirectXVersionLongEnglish_v);
+ hr = add_bstr_property(node, L"szDirectXVersionLongEnglish", L"= \"DirectX 9.0c (4.09.0000.0904)");
if (FAILED(hr))
return hr;
- hr = add_bool_property(node, bDebug, FALSE);
+ hr = add_bool_property(node, L"bDebug", FALSE);
if (FAILED(hr))
return hr;
- hr = add_bool_property(node, bNECPC98, FALSE);
+ hr = add_bool_property(node, L"bNECPC98", FALSE);
if (FAILED(hr))
return hr;
msex.dwLength = sizeof(msex);
GlobalMemoryStatusEx(&msex);
- hr = add_ull_as_bstr_property(node, ullPhysicalMemory, msex.ullTotalPhys);
+ hr = add_ull_as_bstr_property(node, L"ullPhysicalMemory", msex.ullTotalPhys);
if (FAILED(hr))
return hr;
- hr = add_ull_as_bstr_property(node, ullUsedPageFile, msex.ullTotalPageFile - msex.ullAvailPageFile);
+ hr = add_ull_as_bstr_property(node, L"ullUsedPageFile", msex.ullTotalPageFile - msex.ullAvailPageFile);
if (FAILED(hr))
return hr;
- hr = add_ull_as_bstr_property(node, ullAvailPageFile, msex.ullAvailPageFile);
+ hr = add_ull_as_bstr_property(node, L"ullAvailPageFile", msex.ullAvailPageFile);
if (FAILED(hr))
return hr;
- hr = add_bool_property(node, bNetMeetingRunning, is_netmeeting_running());
+ hr = add_bool_property(node, L"bNetMeetingRunning", is_netmeeting_running());
if (FAILED(hr))
return hr;
info.dwOSVersionInfoSize = sizeof(info);
GetVersionExW(&info);
- hr = add_ui4_property(node, dwOSMajorVersion, info.dwMajorVersion);
+ hr = add_ui4_property(node, L"dwOSMajorVersion", info.dwMajorVersion);
if (FAILED(hr))
return hr;
- hr = add_ui4_property(node, dwOSMinorVersion, info.dwMinorVersion);
+ hr = add_ui4_property(node, L"dwOSMinorVersion", info.dwMinorVersion);
if (FAILED(hr))
return hr;
- hr = add_ui4_property(node, dwOSBuildNumber, info.dwBuildNumber);
+ hr = add_ui4_property(node, L"dwOSBuildNumber", info.dwBuildNumber);
if (FAILED(hr))
return hr;
- hr = add_ui4_property(node, dwOSPlatformID, info.dwPlatformId);
+ hr = add_ui4_property(node, L"dwOSPlatformID", info.dwPlatformId);
if (FAILED(hr))
return hr;
- hr = add_bstr_property(node, szCSDVersion, info.szCSDVersion);
+ hr = add_bstr_property(node, L"szCSDVersion", info.szCSDVersion);
if (FAILED(hr))
return hr;
/* FIXME: Roundoff should not be done with truncated division. */
- swprintf(print_buf, ARRAY_SIZE(print_buf), physmem_fmtW,
- (DWORD)(msex.ullTotalPhys / (1024 * 1024)));
- hr = add_bstr_property(node, szPhysicalMemoryEnglish, print_buf);
+ swprintf(print_buf, ARRAY_SIZE(print_buf), L"%uMB RAM", (DWORD)(msex.ullTotalPhys / (1024 * 1024)));
+ hr = add_bstr_property(node, L"szPhysicalMemoryEnglish", print_buf);
if (FAILED(hr))
return hr;
@@ -815,19 +699,19 @@ static HRESULT build_systeminfo_tree(IDxDiagContainerImpl_Container *node)
FormatMessageW(FORMAT_MESSAGE_FROM_STRING|FORMAT_MESSAGE_ARGUMENT_ARRAY, localized_pagefile_fmt,
0, 0, print_buf, ARRAY_SIZE(print_buf), (__ms_va_list*)args);
- hr = add_bstr_property(node, szPageFileLocalized, print_buf);
+ hr = add_bstr_property(node, L"szPageFileLocalized", print_buf);
if (FAILED(hr))
return hr;
- swprintf(print_buf, ARRAY_SIZE(print_buf), pagefile_fmtW, usedpage_mb, availpage_mb);
+ swprintf(print_buf, ARRAY_SIZE(print_buf), L"%uMB used, %uMB available", usedpage_mb, availpage_mb);
- hr = add_bstr_property(node, szPageFileEnglish, print_buf);
+ hr = add_bstr_property(node, L"szPageFileEnglish", print_buf);
if (FAILED(hr))
return hr;
GetWindowsDirectoryW(buffer, MAX_PATH);
- hr = add_bstr_property(node, szWindowsDir, buffer);
+ hr = add_bstr_property(node, L"szWindowsDir", buffer);
if (FAILED(hr))
return hr;
@@ -835,23 +719,23 @@ static HRESULT build_systeminfo_tree(IDxDiagContainerImpl_Container *node)
if (!GetComputerNameW(computer_name, &count))
return E_FAIL;
- hr = add_bstr_property(node, szMachineNameLocalized, computer_name);
+ hr = add_bstr_property(node, L"szMachineNameLocalized", computer_name);
if (FAILED(hr))
return hr;
- hr = add_bstr_property(node, szMachineNameEnglish, computer_name);
+ hr = add_bstr_property(node, L"szMachineNameEnglish", computer_name);
if (FAILED(hr))
return hr;
- hr = add_bstr_property(node, szSystemManufacturerEnglish, szEmpty);
+ hr = add_bstr_property(node, L"szSystemManufacturerEnglish", L"");
if (FAILED(hr))
return hr;
- hr = add_bstr_property(node, szSystemModelEnglish, szEmpty);
+ hr = add_bstr_property(node, L"szSystemModelEnglish", L"");
if (FAILED(hr))
return hr;
- hr = add_bstr_property(node, szBIOSEnglish, szEmpty);
+ hr = add_bstr_property(node, L"szBIOSEnglish", L"");
if (FAILED(hr))
return hr;
@@ -859,11 +743,11 @@ static HRESULT build_systeminfo_tree(IDxDiagContainerImpl_Container *node)
if (FAILED(hr))
return hr;
- hr = add_bstr_property(node, szSetupParamEnglish, notpresentW);
+ hr = add_bstr_property(node, L"szSetupParamEnglish", L"Not present");
if (FAILED(hr))
return hr;
- hr = add_bstr_property(node, szDxDiagVersion, szEmpty);
+ hr = add_bstr_property(node, L"szDxDiagVersion", L"");
if (FAILED(hr))
return hr;
@@ -921,13 +805,6 @@ static BOOL get_texture_memory(GUID *adapter, DWORD *available_mem)
static const WCHAR *vendor_id_to_manufacturer_string(DWORD vendor_id)
{
unsigned int i;
-
- static const WCHAR atiW[] = {'A','T','I',' ','T','e','c','h','n','o','l','o','g','i','e','s',' ','I','n','c','.',0};
- static const WCHAR nvidiaW[] = {'N','V','I','D','I','A',0};
- static const WCHAR intelW[] = {'I','n','t','e','l',' ','C','o','r','p','o','r','a','t','i','o','n',0};
- static const WCHAR vmwareW[] = {'V','M','w','a','r','e',0};
- static const WCHAR redhatW[] = {'R','e','d',' ','H','a','t',0};
- static const WCHAR unknownW[] = {'U','n','k','n','o','w','n',0};
static const struct
{
DWORD id;
@@ -935,11 +812,11 @@ static const WCHAR *vendor_id_to_manufacturer_string(DWORD vendor_id)
}
vendors[] =
{
- {0x1002, atiW},
- {0x10de, nvidiaW},
- {0x15ad, vmwareW},
- {0x1af4, redhatW},
- {0x8086, intelW},
+ {0x1002, L"ATI Technologies Inc."},
+ {0x10de, L"NVIDIA"},
+ {0x15ad, L"VMware"},
+ {0x1af4, L"Red Hat"},
+ {0x8086, L"Intel Corporation"},
};
for (i = 0; i < ARRAY_SIZE(vendors); ++i)
@@ -950,7 +827,7 @@ static const WCHAR *vendor_id_to_manufacturer_string(DWORD vendor_id)
FIXME("Unknown PCI vendor ID 0x%04x.\n", vendor_id);
- return unknownW;
+ return L"Unknown";
}
static HRESULT fill_display_information_d3d(IDxDiagContainerImpl_Container *node)
@@ -968,32 +845,13 @@ static HRESULT fill_display_information_d3d(IDxDiagContainerImpl_Container *node
count = IDirect3D9_GetAdapterCount(pDirect3D9);
for (index = 0; index < count; index++)
{
- static const WCHAR adapterid_fmtW[] = {'%','u',0};
- static const WCHAR driverversion_fmtW[] = {'%','u','.','%','u','.','%','0','4','u','.','%','0','4','u',0};
- static const WCHAR id_fmtW[] = {'0','x','%','0','4','x',0};
- static const WCHAR subsysid_fmtW[] = {'0','x','%','0','8','x',0};
- static const WCHAR mem_fmt[] = {'%','.','1','f',' ','M','B',0};
- static const WCHAR b3DAccelerationExists[] = {'b','3','D','A','c','c','e','l','e','r','a','t','i','o','n','E','x','i','s','t','s',0};
- static const WCHAR b3DAccelerationEnabled[] = {'b','3','D','A','c','c','e','l','e','r','a','t','i','o','n','E','n','a','b','l','e','d',0};
- static const WCHAR bDDAccelerationEnabled[] = {'b','D','D','A','c','c','e','l','e','r','a','t','i','o','n','E','n','a','b','l','e','d',0};
- static const WCHAR bNoHardware[] = {'b','N','o','H','a','r','d','w','a','r','e',0};
- static const WCHAR mode_fmtW[] = {'%','d',' ','x',' ','%','d',' ','(','%','d',' ','b','i','t',')',' ','(','%','d','H','z',')',0};
- static const WCHAR gernericPNPMonitorW[] = {'G','e','n','e','r','i','c',' ','P','n','P',' ','M','o','n','i','t','o','r',0};
- static const WCHAR failedToGetParameterW[] = {'F','a','i','l','e','d',' ','t','o',' ','g','e','t',' ','p','a','r','a','m','e','t','e','r',0};
- static const WCHAR driverAttributesW[] = {'F','i','n','a','l',' ','R','e','t','a','i','l',0};
- static const WCHAR englishW[] = {'E','n','g','l','i','s','h',0};
- static const WCHAR driverDateEnglishW[] = {'1','/','1','/','2','0','1','6',' ','1','0',':','0','0',':','0','0',0};
- static const WCHAR driverDateLocalW[] = {'1','/','1','/','2','0','1','6',' ','1','0',':','0','0',':','0','0',' ','A','M',0};
- static const WCHAR naW[] = {'n','/','a',0};
- static const WCHAR ddi11W[] = {'1','1',0};
-
D3DADAPTER_IDENTIFIER9 adapter_info;
D3DDISPLAYMODE adapter_mode;
D3DCAPS9 device_caps;
DWORD available_mem = 0;
BOOL hardware_accel;
- swprintf(buffer, ARRAY_SIZE(buffer), adapterid_fmtW, index);
+ swprintf(buffer, ARRAY_SIZE(buffer), L"%u", index);
display_adapter = allocate_information_node(buffer);
if (!display_adapter)
{
@@ -1016,52 +874,53 @@ static HRESULT fill_display_information_d3d(IDxDiagContainerImpl_Container *node
MultiByteToWideChar(CP_ACP, 0, adapter_info.DeviceName, -1, devicenameW,
ARRAY_SIZE(devicenameW));
- hr = add_bstr_property(display_adapter, szDriverName, driverW);
+ hr = add_bstr_property(display_adapter, L"szDriverName", driverW);
if (FAILED(hr))
goto cleanup;
- hr = add_bstr_property(display_adapter, szDescription, descriptionW);
+ hr = add_bstr_property(display_adapter, L"szDescription", descriptionW);
if (FAILED(hr))
goto cleanup;
- hr = add_bstr_property(display_adapter, szDeviceName, devicenameW);
+ hr = add_bstr_property(display_adapter, L"szDeviceName", devicenameW);
if (FAILED(hr))
goto cleanup;
- swprintf(buffer, ARRAY_SIZE(buffer), driverversion_fmtW,
- HIWORD(adapter_info.DriverVersion.u.HighPart), LOWORD(adapter_info.DriverVersion.u.HighPart),
- HIWORD(adapter_info.DriverVersion.u.LowPart), LOWORD(adapter_info.DriverVersion.u.LowPart));
+ swprintf(buffer, ARRAY_SIZE(buffer), L"%u.%u.%04u.%04u",
+ HIWORD(adapter_info.DriverVersion.u.HighPart), LOWORD(adapter_info.DriverVersion.u.HighPart),
+ HIWORD(adapter_info.DriverVersion.u.LowPart), LOWORD(adapter_info.DriverVersion.u.LowPart));
- hr = add_bstr_property(display_adapter, szDriverVersion, buffer);
+ hr = add_bstr_property(display_adapter, L"szDriverVersion", buffer);
if (FAILED(hr))
goto cleanup;
- swprintf(buffer, ARRAY_SIZE(buffer), id_fmtW, adapter_info.VendorId);
- hr = add_bstr_property(display_adapter, szVendorId, buffer);
+ swprintf(buffer, ARRAY_SIZE(buffer), L"0x%04x", adapter_info.VendorId);
+ hr = add_bstr_property(display_adapter, L"szVendorId", buffer);
if (FAILED(hr))
goto cleanup;
- swprintf(buffer, ARRAY_SIZE(buffer), id_fmtW, adapter_info.DeviceId);
- hr = add_bstr_property(display_adapter, szDeviceId, buffer);
+ swprintf(buffer, ARRAY_SIZE(buffer), L"0x%04x", adapter_info.DeviceId);
+ hr = add_bstr_property(display_adapter, L"szDeviceId", buffer);
if (FAILED(hr))
goto cleanup;
- swprintf(buffer, ARRAY_SIZE(buffer), subsysid_fmtW, adapter_info.SubSysId);
- hr = add_bstr_property(display_adapter, szSubSysId, buffer);
+ swprintf(buffer, ARRAY_SIZE(buffer), L"0x%08x", adapter_info.SubSysId);
+ hr = add_bstr_property(display_adapter, L"szSubSysId", buffer);
if (FAILED(hr))
goto cleanup;
- swprintf(buffer, ARRAY_SIZE(buffer), id_fmtW, adapter_info.Revision);
- hr = add_bstr_property(display_adapter, szRevisionId, buffer);
+ swprintf(buffer, ARRAY_SIZE(buffer), L"0x%04x", adapter_info.Revision);
+ hr = add_bstr_property(display_adapter, L"szRevisionId", buffer);
if (FAILED(hr))
goto cleanup;
StringFromGUID2(&adapter_info.DeviceIdentifier, buffer, 39);
- hr = add_bstr_property(display_adapter, szDeviceIdentifier, buffer);
+ hr = add_bstr_property(display_adapter, L"szDeviceIdentifier", buffer);
if (FAILED(hr))
goto cleanup;
- hr = add_bstr_property(display_adapter, szManufacturer, vendor_id_to_manufacturer_string(adapter_info.VendorId));
+ hr = add_bstr_property(display_adapter, L"szManufacturer",
+ vendor_id_to_manufacturer_string(adapter_info.VendorId));
if (FAILED(hr))
goto cleanup;
}
@@ -1069,179 +928,180 @@ static HRESULT fill_display_information_d3d(IDxDiagContainerImpl_Container *node
hr = IDirect3D9_GetAdapterDisplayMode(pDirect3D9, index, &adapter_mode);
if (SUCCEEDED(hr))
{
- hr = add_ui4_property(display_adapter, dwWidth, adapter_mode.Width);
+ hr = add_ui4_property(display_adapter, L"dwWidth", adapter_mode.Width);
if (FAILED(hr))
goto cleanup;
- hr = add_ui4_property(display_adapter, dwHeight, adapter_mode.Height);
+ hr = add_ui4_property(display_adapter, L"dwHeight", adapter_mode.Height);
if (FAILED(hr))
goto cleanup;
- hr = add_ui4_property(display_adapter, dwRefreshRate, adapter_mode.RefreshRate);
+ hr = add_ui4_property(display_adapter, L"dwRefreshRate", adapter_mode.RefreshRate);
if (FAILED(hr))
goto cleanup;
- hr = add_ui4_property(display_adapter, dwBpp, depth_for_pixelformat(adapter_mode.Format));
+ hr = add_ui4_property(display_adapter, L"dwBpp", depth_for_pixelformat(adapter_mode.Format));
if (FAILED(hr))
goto cleanup;
- swprintf(buffer, ARRAY_SIZE(buffer), mode_fmtW, adapter_mode.Width, adapter_mode.Height,
- depth_for_pixelformat(adapter_mode.Format), adapter_mode.RefreshRate);
+ swprintf(buffer, ARRAY_SIZE(buffer), L"%d x %d (%d bit) (%dHz)", adapter_mode.Width,
+ adapter_mode.Height, depth_for_pixelformat(adapter_mode.Format),
+ adapter_mode.RefreshRate);
- hr = add_bstr_property(display_adapter, szDisplayModeLocalized, buffer);
+ hr = add_bstr_property(display_adapter, L"szDisplayModeLocalized", buffer);
if (FAILED(hr))
goto cleanup;
- hr = add_bstr_property(display_adapter, szDisplayModeEnglish, buffer);
+ hr = add_bstr_property(display_adapter, L"szDisplayModeEnglish", buffer);
if (FAILED(hr))
goto cleanup;
}
- hr = add_bstr_property(display_adapter, szKeyDeviceKey, szEmpty);
+ hr = add_bstr_property(display_adapter, L"szKeyDeviceKey", L"");
if (FAILED(hr))
goto cleanup;
- hr = add_bstr_property(display_adapter, szKeyDeviceID, szEmpty);
+ hr = add_bstr_property(display_adapter, L"szKeyDeviceID", L"");
if (FAILED(hr))
goto cleanup;
- hr = add_bstr_property(display_adapter, szChipType, szEmpty);
+ hr = add_bstr_property(display_adapter, L"szChipType", L"");
if (FAILED(hr))
goto cleanup;
- hr = add_bstr_property(display_adapter, szDACType, szEmpty);
+ hr = add_bstr_property(display_adapter, L"szDACType", L"");
if (FAILED(hr))
goto cleanup;
- hr = add_bstr_property(display_adapter, szRevision, szEmpty);
+ hr = add_bstr_property(display_adapter, L"szRevision", L"");
if (FAILED(hr))
goto cleanup;
if (!get_texture_memory(&adapter_info.DeviceIdentifier, &available_mem))
WARN("get_texture_memory helper failed\n");
- swprintf(buffer, ARRAY_SIZE(buffer), mem_fmt, available_mem / 1000000.0f);
+ swprintf(buffer, ARRAY_SIZE(buffer), L"%.1f MB", available_mem / 1000000.0f);
- hr = add_bstr_property(display_adapter, szDisplayMemoryLocalized, buffer);
+ hr = add_bstr_property(display_adapter, L"szDisplayMemoryLocalized", buffer);
if (FAILED(hr))
goto cleanup;
- hr = add_bstr_property(display_adapter, szDisplayMemoryEnglish, buffer);
+ hr = add_bstr_property(display_adapter, L"szDisplayMemoryEnglish", buffer);
if (FAILED(hr))
goto cleanup;
hr = IDirect3D9_GetDeviceCaps(pDirect3D9, index, D3DDEVTYPE_HAL, &device_caps);
hardware_accel = SUCCEEDED(hr);
- hr = add_bool_property(display_adapter, b3DAccelerationEnabled, hardware_accel);
+ hr = add_bool_property(display_adapter, L"b3DAccelerationEnabled", hardware_accel);
if (FAILED(hr))
goto cleanup;
- hr = add_bool_property(display_adapter, b3DAccelerationExists, hardware_accel);
+ hr = add_bool_property(display_adapter, L"b3DAccelerationExists", hardware_accel);
if (FAILED(hr))
goto cleanup;
- hr = add_bool_property(display_adapter, bDDAccelerationEnabled, hardware_accel);
+ hr = add_bool_property(display_adapter, L"bDDAccelerationEnabled", hardware_accel);
if (FAILED(hr))
goto cleanup;
- hr = add_bool_property(display_adapter, bNoHardware, FALSE);
+ hr = add_bool_property(display_adapter, L"bNoHardware", FALSE);
if (FAILED(hr))
goto cleanup;
- hr = add_bool_property(display_adapter, bCanRenderWindow, TRUE);
+ hr = add_bool_property(display_adapter, L"bCanRenderWindow", TRUE);
if (FAILED(hr))
goto cleanup;
- hr = add_bstr_property(display_adapter, szMonitorName, gernericPNPMonitorW);
+ hr = add_bstr_property(display_adapter, L"szMonitorName", L"Generic PnP Monitor");
if (FAILED(hr))
goto cleanup;
- hr = add_bstr_property(display_adapter, szMonitorMaxRes, failedToGetParameterW);
+ hr = add_bstr_property(display_adapter, L"szMonitorMaxRes", L"Failed to get parameter");
if (FAILED(hr))
goto cleanup;
- hr = add_bstr_property(display_adapter, szDriverAttributes, driverAttributesW);
+ hr = add_bstr_property(display_adapter, L"szDriverAttributes", L"Final Retail");
if (FAILED(hr))
goto cleanup;
- hr = add_bstr_property(display_adapter, szDriverLanguageEnglish, englishW);
+ hr = add_bstr_property(display_adapter, L"szDriverLanguageEnglish", L"English");
if (FAILED(hr))
goto cleanup;
- hr = add_bstr_property(display_adapter, szDriverLanguageLocalized, englishW);
+ hr = add_bstr_property(display_adapter, L"szDriverLanguageLocalized", L"English");
if (FAILED(hr))
goto cleanup;
- hr = add_bstr_property(display_adapter, szDriverDateEnglish, driverDateEnglishW);
+ hr = add_bstr_property(display_adapter, L"szDriverDateEnglish", L"1/1/2016 10:00:00");
if (FAILED(hr))
goto cleanup;
- hr = add_bstr_property(display_adapter, szDriverDateLocalized, driverDateLocalW);
+ hr = add_bstr_property(display_adapter, L"szDriverDateLocalized", L"1/1/2016 10:00:00 AM");
if (FAILED(hr))
goto cleanup;
- hr = add_i4_property(display_adapter, lDriverSize, 10 * 1024 * 1024);
+ hr = add_i4_property(display_adapter, L"lDriverSize", 10 * 1024 * 1024);
if (FAILED(hr))
goto cleanup;
- hr = add_bstr_property(display_adapter, szMiniVdd, naW);
+ hr = add_bstr_property(display_adapter, L"szMiniVdd", L"n/a");
if (FAILED(hr))
goto cleanup;
- hr = add_bstr_property(display_adapter, szMiniVddDateLocalized, naW);
+ hr = add_bstr_property(display_adapter, L"szMiniVddDateLocalized", L"n/a");
if (FAILED(hr))
goto cleanup;
- hr = add_bstr_property(display_adapter, szMiniVddDateEnglish, naW);
+ hr = add_bstr_property(display_adapter, L"szMiniVddDateEnglish", L"n/a");
if (FAILED(hr))
goto cleanup;
- hr = add_i4_property(display_adapter, lMiniVddSize, 0);
+ hr = add_i4_property(display_adapter, L"lMiniVddSize", 0);
if (FAILED(hr))
goto cleanup;
- hr = add_bstr_property(display_adapter, szVdd, naW);
+ hr = add_bstr_property(display_adapter, L"szVdd", L"n/a");
if (FAILED(hr))
goto cleanup;
- hr = add_bool_property(display_adapter, bDriverBeta, FALSE);
+ hr = add_bool_property(display_adapter, L"bDriverBeta", FALSE);
if (FAILED(hr))
goto cleanup;
- hr = add_bool_property(display_adapter, bDriverDebug, FALSE);
+ hr = add_bool_property(display_adapter, L"bDriverDebug", FALSE);
if (FAILED(hr))
goto cleanup;
- hr = add_bool_property(display_adapter, bDriverSigned, TRUE);
+ hr = add_bool_property(display_adapter, L"bDriverSigned", TRUE);
if (FAILED(hr))
goto cleanup;
- hr = add_bool_property(display_adapter, bDriverSignedValid, TRUE);
+ hr = add_bool_property(display_adapter, L"bDriverSignedValid", TRUE);
if (FAILED(hr))
goto cleanup;
- hr = add_bstr_property(display_adapter, szDriverSignDate, naW);
+ hr = add_bstr_property(display_adapter, L"szDriverSignDate", L"n/a");
if (FAILED(hr))
goto cleanup;
- hr = add_ui4_property(display_adapter, dwDDIVersion, 11);
+ hr = add_ui4_property(display_adapter, L"dwDDIVersion", 11);
if (FAILED(hr))
goto cleanup;
- hr = add_bstr_property(display_adapter, szDDIVersionEnglish, ddi11W);
+ hr = add_bstr_property(display_adapter, L"szDDIVersionEnglish", L"11");
if (FAILED(hr))
goto cleanup;
- hr = add_bstr_property(display_adapter, szDDIVersionLocalized, ddi11W);
+ hr = add_bstr_property(display_adapter, L"szDDIVersionLocalized", L"11");
if (FAILED(hr))
goto cleanup;
- hr = add_ui4_property(display_adapter, iAdapter, index);
+ hr = add_ui4_property(display_adapter, L"iAdapter", index);
if (FAILED(hr))
goto cleanup;
- hr = add_ui4_property(display_adapter, dwWHQLLevel, 0);
+ hr = add_ui4_property(display_adapter, L"dwWHQLLevel", 0);
if (FAILED(hr))
goto cleanup;
}
@@ -1254,11 +1114,12 @@ cleanup:
static HRESULT fill_display_information_fallback(IDxDiagContainerImpl_Container *node)
{
- static const WCHAR szAdapterID[] = {'0',0};
- static const WCHAR *empty_properties[] = {szDeviceIdentifier, szVendorId, szDeviceId,
- szKeyDeviceKey, szKeyDeviceID, szDriverName,
- szDriverVersion, szSubSysId, szRevisionId,
- szManufacturer, szChipType, szDACType, szRevision};
+ static const WCHAR *empty_properties[] =
+ {
+ L"szDeviceIdentifier", L"szVendorId", L"szDeviceId", L"szKeyDeviceKey",
+ L"szKeyDeviceID", L"szDriverName", L"szDriverVersion", L"szSubSysId",
+ L"szRevisionId", L"szManufacturer", L"szChipType", L"szDACType", L"szRevision"
+ };
IDxDiagContainerImpl_Container *display_adapter;
HRESULT hr;
@@ -1269,7 +1130,7 @@ static HRESULT fill_display_information_fallback(IDxDiagContainerImpl_Container
DWORD tmp;
WCHAR buffer[256];
- display_adapter = allocate_information_node(szAdapterID);
+ display_adapter = allocate_information_node(L"0");
if (!display_adapter)
return E_OUTOFMEMORY;
@@ -1278,11 +1139,11 @@ static HRESULT fill_display_information_fallback(IDxDiagContainerImpl_Container
disp_dev.cb = sizeof(disp_dev);
if (EnumDisplayDevicesW( NULL, 0, &disp_dev, 0 ))
{
- hr = add_bstr_property(display_adapter, szDeviceName, disp_dev.DeviceName);
+ hr = add_bstr_property(display_adapter, L"szDeviceName", disp_dev.DeviceName);
if (FAILED(hr))
return hr;
- hr = add_bstr_property(display_adapter, szDescription, disp_dev.DeviceString);
+ hr = add_bstr_property(display_adapter, L"szDescription", disp_dev.DeviceString);
if (FAILED(hr))
return hr;
}
@@ -1297,15 +1158,13 @@ static HRESULT fill_display_information_fallback(IDxDiagContainerImpl_Container
hr = IDirectDraw7_GetAvailableVidMem(pDirectDraw, &dd_caps, &tmp, NULL);
if (SUCCEEDED(hr))
{
- static const WCHAR mem_fmt[] = {'%','.','1','f',' ','M','B',0};
+ swprintf(buffer, ARRAY_SIZE(buffer), L"%.1f MB", tmp / 1000000.0f);
- swprintf(buffer, ARRAY_SIZE(buffer), mem_fmt, tmp / 1000000.0f);
-
- hr = add_bstr_property(display_adapter, szDisplayMemoryLocalized, buffer);
+ hr = add_bstr_property(display_adapter, L"szDisplayMemoryLocalized", buffer);
if (FAILED(hr))
goto cleanup;
- hr = add_bstr_property(display_adapter, szDisplayMemoryEnglish, buffer);
+ hr = add_bstr_property(display_adapter, L"szDisplayMemoryEnglish", buffer);
if (FAILED(hr))
goto cleanup;
}
@@ -1316,33 +1175,34 @@ static HRESULT fill_display_information_fallback(IDxDiagContainerImpl_Container
{
if (surface_descr.dwFlags & DDSD_WIDTH)
{
- hr = add_ui4_property(display_adapter, dwWidth, surface_descr.dwWidth);
+ hr = add_ui4_property(display_adapter, L"dwWidth", surface_descr.dwWidth);
if (FAILED(hr))
goto cleanup;
}
if (surface_descr.dwFlags & DDSD_HEIGHT)
{
- hr = add_ui4_property(display_adapter, dwHeight, surface_descr.dwHeight);
+ hr = add_ui4_property(display_adapter, L"dwHeight", surface_descr.dwHeight);
if (FAILED(hr))
goto cleanup;
}
if (surface_descr.dwFlags & DDSD_PIXELFORMAT)
{
- hr = add_ui4_property(display_adapter, dwBpp, surface_descr.u4.ddpfPixelFormat.u1.dwRGBBitCount);
+ hr = add_ui4_property(display_adapter, L"dwBpp",
+ surface_descr.u4.ddpfPixelFormat.u1.dwRGBBitCount);
if (FAILED(hr))
goto cleanup;
}
}
- hr = add_ui4_property(display_adapter, dwRefreshRate, 60);
+ hr = add_ui4_property(display_adapter, L"dwRefreshRate", 60);
if (FAILED(hr))
goto cleanup;
for (tmp = 0; tmp < ARRAY_SIZE(empty_properties); tmp++)
{
- hr = add_bstr_property(display_adapter, empty_properties[tmp], szEmpty);
+ hr = add_bstr_property(display_adapter, empty_properties[tmp], L"");
if (FAILED(hr))
goto cleanup;
}
@@ -1406,7 +1266,7 @@ BOOL CALLBACK dsound_enum(LPGUID guid, LPCWSTR desc, LPCWSTR module, LPVOID cont
if (FAILED(enum_ctx->hr))
return FALSE;
- enum_ctx->hr = add_bstr_property(device, szDescription, desc);
+ enum_ctx->hr = add_bstr_property(device, L"szDescription", desc);
if (FAILED(enum_ctx->hr))
return FALSE;
@@ -1418,7 +1278,7 @@ BOOL CALLBACK dsound_enum(LPGUID guid, LPCWSTR desc, LPCWSTR module, LPVOID cont
if ((p = wcsrchr(name, '\\'))) name = p + 1;
if ((p = wcsrchr(name, '/'))) name = p + 1;
- enum_ctx->hr = add_bstr_property(device, szDriverName, name);
+ enum_ctx->hr = add_bstr_property(device, L"szDriverName", name);
if (FAILED(enum_ctx->hr))
return FALSE;
@@ -1428,13 +1288,10 @@ BOOL CALLBACK dsound_enum(LPGUID guid, LPCWSTR desc, LPCWSTR module, LPVOID cont
static HRESULT build_directsound_tree(IDxDiagContainerImpl_Container *node)
{
- static const WCHAR DxDiag_SoundDevices[] = {'D','x','D','i','a','g','_','S','o','u','n','d','D','e','v','i','c','e','s',0};
- static const WCHAR DxDiag_SoundCaptureDevices[] = {'D','x','D','i','a','g','_','S','o','u','n','d','C','a','p','t','u','r','e','D','e','v','i','c','e','s',0};
-
struct enum_context enum_ctx;
IDxDiagContainerImpl_Container *cont;
- cont = allocate_information_node(DxDiag_SoundDevices);
+ cont = allocate_information_node(L"DxDiag_SoundDevices");
if (!cont)
return E_OUTOFMEMORY;
@@ -1448,7 +1305,7 @@ static HRESULT build_directsound_tree(IDxDiagContainerImpl_Container *node)
if (FAILED(enum_ctx.hr))
return enum_ctx.hr;
- cont = allocate_information_node(DxDiag_SoundCaptureDevices);
+ cont = allocate_information_node(L"DxDiag_SoundCaptureDevices");
if (!cont)
return E_OUTOFMEMORY;
@@ -1487,23 +1344,6 @@ static HRESULT build_systemdevices_tree(IDxDiagContainerImpl_Container *node)
static HRESULT fill_file_description(IDxDiagContainerImpl_Container *node, const WCHAR *szFilePath, const WCHAR *szFileName)
{
- static const WCHAR szSlashSep[] = {'\\',0};
- static const WCHAR szPath[] = {'s','z','P','a','t','h',0};
- static const WCHAR szName[] = {'s','z','N','a','m','e',0};
- static const WCHAR szVersion[] = {'s','z','V','e','r','s','i','o','n',0};
- static const WCHAR szAttributes[] = {'s','z','A','t','t','r','i','b','u','t','e','s',0};
- static const WCHAR szLanguageEnglish[] = {'s','z','L','a','n','g','u','a','g','e','E','n','g','l','i','s','h',0};
- static const WCHAR dwFileTimeHigh[] = {'d','w','F','i','l','e','T','i','m','e','H','i','g','h',0};
- static const WCHAR dwFileTimeLow[] = {'d','w','F','i','l','e','T','i','m','e','L','o','w',0};
- static const WCHAR bBeta[] = {'b','B','e','t','a',0};
- static const WCHAR bDebug[] = {'b','D','e','b','u','g',0};
- static const WCHAR bExists[] = {'b','E','x','i','s','t','s',0};
-
- /* Values */
- static const WCHAR szFinal_Retail_v[] = {'F','i','n','a','l',' ','R','e','t','a','i','l',0};
- static const WCHAR szEnglish_v[] = {'E','n','g','l','i','s','h',0};
- static const WCHAR szVersionFormat[] = {'%','u','.','%','0','2','u','.','%','0','4','u','.','%','0','4','u',0};
-
HRESULT hr;
WCHAR *szFile;
WCHAR szVersion_v[1024];
@@ -1522,7 +1362,7 @@ static HRESULT fill_file_description(IDxDiagContainerImpl_Container *node, const
return E_OUTOFMEMORY;
lstrcpyW(szFile, szFilePath);
- lstrcatW(szFile, szSlashSep);
+ lstrcatW(szFile, L"\\");
lstrcatW(szFile, szFileName);
retval = GetFileVersionInfoSizeW(szFile, &hdl);
@@ -1536,55 +1376,57 @@ static HRESULT fill_file_description(IDxDiagContainerImpl_Container *node, const
}
if (GetFileVersionInfoW(szFile, 0, retval, pVersionInfo) &&
- VerQueryValueW(pVersionInfo, szSlashSep, (void **)&pFileInfo, &uiLength))
+ VerQueryValueW(pVersionInfo, L"\\", (void **)&pFileInfo, &uiLength))
boolret = TRUE;
}
- hr = add_bstr_property(node, szPath, szFile);
+ hr = add_bstr_property(node, L"szPath", szFile);
if (FAILED(hr))
goto cleanup;
- hr = add_bstr_property(node, szName, szFileName);
+ hr = add_bstr_property(node, L"szName", szFileName);
if (FAILED(hr))
goto cleanup;
- hr = add_bool_property(node, bExists, boolret);
+ hr = add_bool_property(node, L"bExists", boolret);
if (FAILED(hr))
goto cleanup;
if (boolret)
{
- swprintf(szVersion_v, ARRAY_SIZE(szVersion_v), szVersionFormat,
- HIWORD(pFileInfo->dwFileVersionMS), LOWORD(pFileInfo->dwFileVersionMS),
- HIWORD(pFileInfo->dwFileVersionLS), LOWORD(pFileInfo->dwFileVersionLS));
+ swprintf(szVersion_v, ARRAY_SIZE(szVersion_v), L"%u.%02u.%04u.%04u",
+ HIWORD(pFileInfo->dwFileVersionMS), LOWORD(pFileInfo->dwFileVersionMS),
+ HIWORD(pFileInfo->dwFileVersionLS), LOWORD(pFileInfo->dwFileVersionLS));
TRACE("Found version as (%s)\n", debugstr_w(szVersion_v));
- hr = add_bstr_property(node, szVersion, szVersion_v);
+ hr = add_bstr_property(node, L"szVersion", szVersion_v);
if (FAILED(hr))
goto cleanup;
- hr = add_bstr_property(node, szAttributes, szFinal_Retail_v);
+ hr = add_bstr_property(node, L"szAttributes", L"Final Retail");
if (FAILED(hr))
goto cleanup;
- hr = add_bstr_property(node, szLanguageEnglish, szEnglish_v);
+ hr = add_bstr_property(node, L"szLanguageEnglish", L"English");
if (FAILED(hr))
goto cleanup;
- hr = add_ui4_property(node, dwFileTimeHigh, pFileInfo->dwFileDateMS);
+ hr = add_ui4_property(node, L"dwFileTimeHigh", pFileInfo->dwFileDateMS);
if (FAILED(hr))
goto cleanup;
- hr = add_ui4_property(node, dwFileTimeLow, pFileInfo->dwFileDateLS);
+ hr = add_ui4_property(node, L"dwFileTimeLow", pFileInfo->dwFileDateLS);
if (FAILED(hr))
goto cleanup;
- hr = add_bool_property(node, bBeta, ((pFileInfo->dwFileFlags & pFileInfo->dwFileFlagsMask) & VS_FF_PRERELEASE) != 0);
+ hr = add_bool_property(node, L"bBeta",
+ ((pFileInfo->dwFileFlags & pFileInfo->dwFileFlagsMask) & VS_FF_PRERELEASE) != 0);
if (FAILED(hr))
goto cleanup;
- hr = add_bool_property(node, bDebug, ((pFileInfo->dwFileFlags & pFileInfo->dwFileFlagsMask) & VS_FF_DEBUG) != 0);
+ hr = add_bool_property(node, L"bDebug",
+ ((pFileInfo->dwFileFlags & pFileInfo->dwFileFlagsMask) & VS_FF_DEBUG) != 0);
if (FAILED(hr))
goto cleanup;
}
@@ -1600,26 +1442,26 @@ static HRESULT build_directxfiles_tree(IDxDiagContainerImpl_Container *node)
{
static const WCHAR dlls[][15] =
{
- {'d','3','d','8','.','d','l','l',0},
- {'d','3','d','9','.','d','l','l',0},
- {'d','d','r','a','w','.','d','l','l',0},
- {'d','e','v','e','n','u','m','.','d','l','l',0},
- {'d','i','n','p','u','t','8','.','d','l','l',0},
- {'d','i','n','p','u','t','.','d','l','l',0},
- {'d','m','b','a','n','d','.','d','l','l',0},
- {'d','m','c','o','m','p','o','s','.','d','l','l',0},
- {'d','m','i','m','e','.','d','l','l',0},
- {'d','m','l','o','a','d','e','r','.','d','l','l',0},
- {'d','m','s','c','r','i','p','t','.','d','l','l',0},
- {'d','m','s','t','y','l','e','.','d','l','l',0},
- {'d','m','s','y','n','t','h','.','d','l','l',0},
- {'d','m','u','s','i','c','.','d','l','l',0},
- {'d','p','l','a','y','x','.','d','l','l',0},
- {'d','p','n','e','t','.','d','l','l',0},
- {'d','s','o','u','n','d','.','d','l','l',0},
- {'d','s','w','a','v','e','.','d','l','l',0},
- {'d','x','d','i','a','g','n','.','d','l','l',0},
- {'q','u','a','r','t','z','.','d','l','l',0}
+ L"d3d8.dll",
+ L"d3d9.dll",
+ L"ddraw.dll",
+ L"devenum.dll",
+ L"dinput8.dll",
+ L"dinput.dll",
+ L"dmband.dll",
+ L"dmcompos.dll",
+ L"dmime.dll",
+ L"dmloader.dll",
+ L"dmscript.dll",
+ L"dmstyle.dll",
+ L"dmsynth.dll",
+ L"dmusic.dll",
+ L"dplayx.dll",
+ L"dpnet.dll",
+ L"dsound.dll",
+ L"dswave.dll",
+ L"dxdiagn.dll",
+ L"quartz.dll"
};
HRESULT hr;
@@ -1630,12 +1472,10 @@ static HRESULT build_directxfiles_tree(IDxDiagContainerImpl_Container *node)
for (i = 0; i < ARRAY_SIZE(dlls); i++)
{
- static const WCHAR szFormat[] = {'%','d',0};
-
WCHAR szFileID[5];
IDxDiagContainerImpl_Container *file_container;
- swprintf(szFileID, ARRAY_SIZE(szFileID), szFormat, i);
+ swprintf(szFileID, ARRAY_SIZE(szFileID), L"%d", i);
file_container = allocate_information_node(szFileID);
if (!file_container)
@@ -1656,19 +1496,16 @@ static HRESULT build_directxfiles_tree(IDxDiagContainerImpl_Container *node)
static HRESULT read_property_names(IPropertyBag *pPropBag, VARIANT *friendly_name, VARIANT *clsid_name)
{
- static const WCHAR wszFriendlyName[] = {'F','r','i','e','n','d','l','y','N','a','m','e',0};
- static const WCHAR wszClsidName[] = {'C','L','S','I','D',0};
-
HRESULT hr;
VariantInit(friendly_name);
VariantInit(clsid_name);
- hr = IPropertyBag_Read(pPropBag, wszFriendlyName, friendly_name, 0);
+ hr = IPropertyBag_Read(pPropBag, L"FriendlyName", friendly_name, 0);
if (FAILED(hr))
return hr;
- hr = IPropertyBag_Read(pPropBag, wszClsidName, clsid_name, 0);
+ hr = IPropertyBag_Read(pPropBag, L"CLSID", clsid_name, 0);
if (FAILED(hr))
{
VariantClear(friendly_name);
@@ -1680,12 +1517,6 @@ static HRESULT read_property_names(IPropertyBag *pPropBag, VARIANT *friendly_nam
static HRESULT fill_filter_data_information(IDxDiagContainerImpl_Container *subcont, BYTE *pData, ULONG cb)
{
- static const WCHAR szVersionW[] = {'s','z','V','e','r','s','i','o','n',0};
- static const WCHAR dwInputs[] = {'d','w','I','n','p','u','t','s',0};
- static const WCHAR dwOutputs[] = {'d','w','O','u','t','p','u','t','s',0};
- static const WCHAR dwMeritW[] = {'d','w','M','e','r','i','t',0};
- static const WCHAR szVersionFormat[] = {'v','%','d',0};
-
HRESULT hr;
IFilterMapper2 *pFileMapper = NULL;
IAMFilterData *pFilterData = NULL;
@@ -1710,8 +1541,8 @@ static HRESULT fill_filter_data_information(IDxDiagContainerImpl_Container *subc
goto cleanup;
pRF = ((REGFILTER2**)ppRF)[0];
- swprintf(bufferW, ARRAY_SIZE(bufferW), szVersionFormat, pRF->dwVersion);
- hr = add_bstr_property(subcont, szVersionW, bufferW);
+ swprintf(bufferW, ARRAY_SIZE(bufferW), L"v%d", pRF->dwVersion);
+ hr = add_bstr_property(subcont, L"szVersion", bufferW);
if (FAILED(hr))
goto cleanup;
@@ -1732,15 +1563,15 @@ static HRESULT fill_filter_data_information(IDxDiagContainerImpl_Container *subc
dwNInputs++;
}
- hr = add_ui4_property(subcont, dwInputs, dwNInputs);
+ hr = add_ui4_property(subcont, L"dwInputs", dwNInputs);
if (FAILED(hr))
goto cleanup;
- hr = add_ui4_property(subcont, dwOutputs, dwNOutputs);
+ hr = add_ui4_property(subcont, L"dwOutputs", dwNOutputs);
if (FAILED(hr))
goto cleanup;
- hr = add_ui4_property(subcont, dwMeritW, pRF->dwMerit);
+ hr = add_ui4_property(subcont, L"dwMerit", pRF->dwMerit);
if (FAILED(hr))
goto cleanup;
@@ -1755,10 +1586,6 @@ cleanup:
static HRESULT fill_filter_container(IDxDiagContainerImpl_Container *subcont, IMoniker *pMoniker)
{
- static const WCHAR szName[] = {'s','z','N','a','m','e',0};
- static const WCHAR ClsidFilterW[] = {'C','l','s','i','d','F','i','l','t','e','r',0};
- static const WCHAR wszFilterDataName[] = {'F','i','l','t','e','r','D','a','t','a',0};
-
HRESULT hr;
IPropertyBag *pPropFilterBag = NULL;
BYTE *pData;
@@ -1781,15 +1608,15 @@ static HRESULT fill_filter_container(IDxDiagContainerImpl_Container *subcont, IM
TRACE("Name = %s\n", debugstr_w(V_BSTR(&friendly_name)));
TRACE("CLSID = %s\n", debugstr_w(V_BSTR(&clsid_name)));
- hr = add_bstr_property(subcont, szName, V_BSTR(&friendly_name));
+ hr = add_bstr_property(subcont, L"szName", V_BSTR(&friendly_name));
if (FAILED(hr))
goto cleanup;
- hr = add_bstr_property(subcont, ClsidFilterW, V_BSTR(&clsid_name));
+ hr = add_bstr_property(subcont, L"ClsidFilter", V_BSTR(&clsid_name));
if (FAILED(hr))
goto cleanup;
- hr = IPropertyBag_Read(pPropFilterBag, wszFilterDataName, &v, NULL);
+ hr = IPropertyBag_Read(pPropFilterBag, L"FilterData", &v, NULL);
if (FAILED(hr))
goto cleanup;
@@ -1814,10 +1641,6 @@ cleanup:
static HRESULT build_directshowfilters_tree(IDxDiagContainerImpl_Container *node)
{
- static const WCHAR szCatName[] = {'s','z','C','a','t','N','a','m','e',0};
- static const WCHAR ClsidCatW[] = {'C','l','s','i','d','C','a','t',0};
- static const WCHAR szIdFormat[] = {'%','d',0};
-
HRESULT hr;
int i = 0;
ICreateDevEnum *pCreateDevEnum;
@@ -1882,7 +1705,7 @@ static HRESULT build_directshowfilters_tree(IDxDiagContainerImpl_Container *node
WCHAR bufferW[10];
IDxDiagContainerImpl_Container *subcont;
- swprintf(bufferW, ARRAY_SIZE(bufferW), szIdFormat, i);
+ swprintf(bufferW, ARRAY_SIZE(bufferW), L"%d", i);
subcont = allocate_information_node(bufferW);
if (!subcont)
{
@@ -1891,7 +1714,7 @@ static HRESULT build_directshowfilters_tree(IDxDiagContainerImpl_Container *node
break;
}
- hr = add_bstr_property(subcont, szCatName, V_BSTR(&vCatName));
+ hr = add_bstr_property(subcont, L"szCatName", V_BSTR(&vCatName));
if (FAILED(hr))
{
free_information_tree(subcont);
@@ -1899,7 +1722,7 @@ static HRESULT build_directshowfilters_tree(IDxDiagContainerImpl_Container *node
break;
}
- hr = add_bstr_property(subcont, ClsidCatW, V_BSTR(&vCatClsid));
+ hr = add_bstr_property(subcont, L"ClsidCat", V_BSTR(&vCatClsid));
if (FAILED(hr))
{
free_information_tree(subcont);
@@ -1943,33 +1766,22 @@ static HRESULT build_logicaldisks_tree(IDxDiagContainerImpl_Container *node)
static HRESULT build_information_tree(IDxDiagContainerImpl_Container **pinfo_root)
{
- static const WCHAR DxDiag_SystemInfo[] = {'D','x','D','i','a','g','_','S','y','s','t','e','m','I','n','f','o',0};
- static const WCHAR DxDiag_DisplayDevices[] = {'D','x','D','i','a','g','_','D','i','s','p','l','a','y','D','e','v','i','c','e','s',0};
- static const WCHAR DxDiag_DirectSound[] = {'D','x','D','i','a','g','_','D','i','r','e','c','t','S','o','u','n','d',0};
- static const WCHAR DxDiag_DirectMusic[] = {'D','x','D','i','a','g','_','D','i','r','e','c','t','M','u','s','i','c',0};
- static const WCHAR DxDiag_DirectInput[] = {'D','x','D','i','a','g','_','D','i','r','e','c','t','I','n','p','u','t',0};
- static const WCHAR DxDiag_DirectPlay[] = {'D','x','D','i','a','g','_','D','i','r','e','c','t','P','l','a','y',0};
- static const WCHAR DxDiag_SystemDevices[] = {'D','x','D','i','a','g','_','S','y','s','t','e','m','D','e','v','i','c','e','s',0};
- static const WCHAR DxDiag_DirectXFiles[] = {'D','x','D','i','a','g','_','D','i','r','e','c','t','X','F','i','l','e','s',0};
- static const WCHAR DxDiag_DirectShowFilters[] = {'D','x','D','i','a','g','_','D','i','r','e','c','t','S','h','o','w','F','i','l','t','e','r','s',0};
- static const WCHAR DxDiag_LogicalDisks[] = {'D','x','D','i','a','g','_','L','o','g','i','c','a','l','D','i','s','k','s',0};
-
static const struct
{
const WCHAR *name;
HRESULT (*initfunc)(IDxDiagContainerImpl_Container *);
} root_children[] =
{
- {DxDiag_SystemInfo, build_systeminfo_tree},
- {DxDiag_DisplayDevices, build_displaydevices_tree},
- {DxDiag_DirectSound, build_directsound_tree},
- {DxDiag_DirectMusic, build_directmusic_tree},
- {DxDiag_DirectInput, build_directinput_tree},
- {DxDiag_DirectPlay, build_directplay_tree},
- {DxDiag_SystemDevices, build_systemdevices_tree},
- {DxDiag_DirectXFiles, build_directxfiles_tree},
- {DxDiag_DirectShowFilters, build_directshowfilters_tree},
- {DxDiag_LogicalDisks, build_logicaldisks_tree},
+ {L"DxDiag_SystemInfo", build_systeminfo_tree},
+ {L"DxDiag_DisplayDevices", build_displaydevices_tree},
+ {L"DxDiag_DirectSound", build_directsound_tree},
+ {L"DxDiag_DirectMusic", build_directmusic_tree},
+ {L"DxDiag_DirectInput", build_directinput_tree},
+ {L"DxDiag_DirectPlay", build_directplay_tree},
+ {L"DxDiag_SystemDevices", build_systemdevices_tree},
+ {L"DxDiag_DirectXFiles", build_directxfiles_tree},
+ {L"DxDiag_DirectShowFilters", build_directshowfilters_tree},
+ {L"DxDiag_LogicalDisks", build_logicaldisks_tree},
};
IDxDiagContainerImpl_Container *info_root;
--
2.26.2
1
0