Wine-devel
Threads by month
- ----- 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
February 2020
- 80 participants
- 745 discussions
25 Feb '20
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45801
Signed-off-by: Aaro Altonen <a.altonen(a)hotmail.com>
---
dlls/ws2_32/socket.c | 17 +++++++++++++----
dlls/ws2_32/tests/sock.c | 37 +++++++++++++++++++++++++++++++++++++
2 files changed, 50 insertions(+), 4 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index c284f595ab..700e93894d 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -9006,12 +9006,21 @@ INT WINAPI WSCEnableNSProvider( LPGUID provider, BOOL enable )
*/
INT WINAPI WSCGetProviderPath( LPGUID provider, LPWSTR path, LPINT len, LPINT errcode )
{
- FIXME( "(%s %p %p %p) Stub!\n", debugstr_guid(provider), path, len, errcode );
+ if (!provider || !len || !path) {
+ if (errcode)
+ *errcode = WSAEFAULT;
+ return SOCKET_ERROR;
+ }
- if (!errcode || !provider || !len) return WSAEFAULT;
+ if (*len <= 0) {
+ if (errcode)
+ *errcode = WSAEFAULT;
+ return SOCKET_ERROR;
+ }
- *errcode = WSAEINVAL;
- return SOCKET_ERROR;
+ FIXME("WSCGetProviderPath not implemented.\n");
+
+ return 0;
}
/***********************************************************************
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index 60c5dfc63f..176a19bcfa 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -84,6 +84,7 @@ static int (WINAPI *pWSALookupServiceNextW)(HANDLE,DWORD,LPDWORD,LPWSAQUERYSET
static int (WINAPI *pWSAEnumNameSpaceProvidersA)(LPDWORD,LPWSANAMESPACE_INFOA);
static int (WINAPI *pWSAEnumNameSpaceProvidersW)(LPDWORD,LPWSANAMESPACE_INFOW);
static int (WINAPI *pWSAPoll)(WSAPOLLFD *,ULONG,INT);
+static int (WINAPI *pWSCGetProviderPath)(LPGUID, LPWSTR, LPINT, LPINT);
/* Function pointers from iphlpapi */
static DWORD (WINAPI *pGetAdaptersInfo)(PIP_ADAPTER_INFO,PULONG);
@@ -1300,6 +1301,7 @@ static void Init (void)
pWSAEnumNameSpaceProvidersA = (void *)GetProcAddress(hws2_32, "WSAEnumNameSpaceProvidersA");
pWSAEnumNameSpaceProvidersW = (void *)GetProcAddress(hws2_32, "WSAEnumNameSpaceProvidersW");
pWSAPoll = (void *)GetProcAddress(hws2_32, "WSAPoll");
+ pWSCGetProviderPath = (void *)GetProcAddress(hws2_32, "WSCGetProviderPath");
hiphlpapi = LoadLibraryA("iphlpapi.dll");
if (hiphlpapi)
@@ -10600,6 +10602,39 @@ static void test_address_list_query(void)
closesocket(s);
}
+static void test_WSCGetProviderPath(void)
+{
+ GUID ProviderIdIP = { 0x0, 0x0, 0x0, { 0x0, 0x0, 0x00, 0x0, 0x0, 0x0, 0x0, 0x0 } };
+ wchar_t buffer[256];
+ INT ret, err, len;
+
+ ret = pWSCGetProviderPath(NULL, NULL, NULL, NULL);
+ ok(ret == SOCKET_ERROR, "Got unexpected ret %d.\n", ret);
+
+ ret = pWSCGetProviderPath(&ProviderIdIP, NULL, NULL, NULL);
+ ok(ret == SOCKET_ERROR, "Got unexpected ret %d.\n", ret);
+
+ ret = pWSCGetProviderPath(NULL, NULL, NULL, &err);
+ ok(ret == SOCKET_ERROR, "Got unexpected ret %d.\n", ret);
+ ok(err == WSAEFAULT, "Got unexpected error %d.\n", err);
+
+ ret = pWSCGetProviderPath(&ProviderIdIP, NULL, NULL, &err);
+ ok(ret == SOCKET_ERROR, "Got unexpected ret %d.\n", ret);
+ ok(err == WSAEFAULT, "Got unexpected error %d.\n", err);
+
+ len = -1;
+ ret = pWSCGetProviderPath(&ProviderIdIP, buffer, &len, &err);
+ ok(ret == SOCKET_ERROR, "Got unexpected ret %d.\n", ret);
+ ok(err == WSAEFAULT, "Got unexpected error %d.\n", err);
+
+ /* WSCGetProviderPath() will return an error but if "ProviderIdIP"
+ * was valid, its path's length is written to "len" */
+ len = -1;
+ ret = pWSCGetProviderPath(&ProviderIdIP, NULL, &len, &err);
+ ok(ret == SOCKET_ERROR, "Got unexpected ret %d.\n", ret);
+ ok(err == WSAEFAULT, "Got unexpected error %d.\n", err);
+}
+
static DWORD WINAPI inet_ntoa_thread_proc(void *param)
{
ULONG addr;
@@ -11681,6 +11716,8 @@ START_TEST( sock )
test_completion_port();
test_address_list_query();
+ test_WSCGetProviderPath();
+
/* this is an io heavy test, do it at the end so the kernel doesn't start dropping packets */
test_send();
test_synchronous_WSAIoctl();
--
2.25.1
2
1
From: Sven Baars <sbaars(a)codeweavers.com>
Signed-off-by: Sven Baars <sbaars(a)codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com>
---
dlls/d3dx9_36/tests/core.c | 78 ++++++++++++++++++++++++++++++++++++++
1 file changed, 78 insertions(+)
diff --git a/dlls/d3dx9_36/tests/core.c b/dlls/d3dx9_36/tests/core.c
index f5c539ca85e..c44473396b7 100644
--- a/dlls/d3dx9_36/tests/core.c
+++ b/dlls/d3dx9_36/tests/core.c
@@ -770,6 +770,84 @@ static void test_ID3DXFont(IDirect3DDevice9 *device)
height = ID3DXFont_DrawTextW(font, NULL, long_textW, -1, &rect, DT_WORDBREAK | DT_NOCLIP, 0xff00ff);
ok(height == 96, "Got unexpected height %d.\n", height);
+
+ height = ID3DXFont_DrawTextW(font, NULL, L"a\na", -1, &rect, 0, 0xff00ff);
+ ok(height == 24, "Got unexpected height %d.\n", height);
+
+ height = ID3DXFont_DrawTextW(font, NULL, L"a\r\na", -1, &rect, 0, 0xff00ff);
+ ok(height == 24, "Got unexpected height %d.\n", height);
+
+ height = ID3DXFont_DrawTextW(font, NULL, L"a\ra", -1, &rect, 0, 0xff00ff);
+ ok(height == 12, "Got unexpected height %d.\n", height);
+
+ height = ID3DXFont_DrawTextW(font, NULL, L"a\na", -1, &rect, DT_SINGLELINE, 0xff00ff);
+ ok(height == 12, "Got unexpected height %d.\n", height);
+
+ height = ID3DXFont_DrawTextW(font, NULL, L"a\naaaaa aaaa", -1, &rect, 0, 0xff00ff);
+ ok(height == 24, "Got unexpected height %d.\n", height);
+
+ height = ID3DXFont_DrawTextW(font, NULL, L"a\naaaaa aaaa", -1, &rect, DT_WORDBREAK, 0xff00ff);
+ ok(height == 36, "Got unexpected height %d.\n", height);
+
+ height = ID3DXFont_DrawTextW(font, NULL, L"1\n2\n3\n4\n5\n6", -1, &rect, 0, 0xff00ff);
+ ok(height == 48, "Got unexpected height %d.\n", height);
+
+ height = ID3DXFont_DrawTextW(font, NULL, L"1\n2\n3\n4\n5\n6", -1, &rect, DT_NOCLIP, 0xff00ff);
+ ok(height == 72, "Got unexpected height %d.\n", height);
+
+ height = ID3DXFont_DrawTextW(font, NULL, L"\t\t\t\t\t\t\t\t\t\t", -1, &rect, DT_WORDBREAK, 0xff00ff);
+ ok(height == 0, "Got unexpected height %d.\n", height);
+
+ height = ID3DXFont_DrawTextW(font, NULL, L"\t\t\t\t\t\t\t\t\t\ta", -1, &rect, DT_WORDBREAK, 0xff00ff);
+ ok(height == 12, "Got unexpected height %d.\n", height);
+
+ height = ID3DXFont_DrawTextW(font, NULL, L"\taaaaaaaaaa", -1, &rect, DT_WORDBREAK, 0xff00ff);
+ ok(height == 24, "Got unexpected height %d.\n", height);
+
+ height = ID3DXFont_DrawTextW(font, NULL, L"\taaaaaaaaaa", -1, &rect, DT_EXPANDTABS | DT_WORDBREAK, 0xff00ff);
+ ok(height == 36, "Got unexpected height %d.\n", height);
+
+ height = ID3DXFont_DrawTextW(font, NULL, L"\taaa\taaa\taaa", -1, &rect, DT_WORDBREAK, 0xff00ff);
+ ok(height == 24, "Got unexpected height %d.\n", height);
+
+ height = ID3DXFont_DrawTextW(font, NULL, L"\taaa\taaa\taaa", -1, &rect, DT_EXPANDTABS | DT_WORDBREAK, 0xff00ff);
+ ok(height == 48, "Got unexpected height %d.\n", height);
+
+ height = ID3DXFont_DrawTextW(font, NULL, L"\t\t\t\t\t\t\t\t\t\t", -1, &rect, DT_EXPANDTABS | DT_WORDBREAK, 0xff00ff);
+ ok(height == 60, "Got unexpected height %d.\n", height);
+
+ height = ID3DXFont_DrawTextW(font, NULL, L"a\ta", -1, &rect, DT_EXPANDTABS | DT_WORDBREAK, 0xff00ff);
+ ok(height == 12, "Got unexpected height %d.\n", height);
+
+ height = ID3DXFont_DrawTextW(font, NULL, L"a\ta\ta", -1, &rect, DT_EXPANDTABS | DT_WORDBREAK, 0xff00ff);
+ ok(height == 24, "Got unexpected height %d.\n", height);
+
+ height = ID3DXFont_DrawTextW(font, NULL, L"aaaaaaaaaaaaaaaaaaaa", -1, &rect, DT_WORDBREAK, 0xff00ff);
+ ok(height == 36, "Got unexpected height %d.\n", height);
+
+ height = ID3DXFont_DrawTextW(font, NULL, L"a a", -1, &rect, DT_WORDBREAK, 0xff00ff);
+ ok(height == 36, "Got unexpected height %d.\n", height);
+
+ height = ID3DXFont_DrawTextW(font, NULL, L"aaaa aaaa", -1, &rect, DT_WORDBREAK, 0xff00ff);
+ ok(height == 36, "Got unexpected height %d.\n", height);
+
+ height = ID3DXFont_DrawTextW(font, NULL, L"aaaa aaaa", -1, &rect, DT_WORDBREAK | DT_RIGHT, 0xff00ff);
+ ok(height == 36, "Got unexpected height %d.\n", height);
+
+ height = ID3DXFont_DrawTextW(font, NULL, L"aaaa aaaa", -1, &rect, DT_WORDBREAK | DT_RIGHT, 0xff00ff);
+ ok(height == 36, "Got unexpected height %d.\n", height);
+
+ height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_BOTTOM, 0xff00ff);
+ ok(height == 40, "Got unexpected height %d.\n", height);
+
+ height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_VCENTER, 0xff00ff);
+ ok(height == 32, "Got unexpected height %d.\n", height);
+
+ height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_RIGHT, 0xff00ff);
+ ok(height == 24, "Got unexpected height %d.\n", height);
+
+ height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_CENTER, 0xff00ff);
+ ok(height == 24, "Got unexpected height %d.\n", height);
}
ID3DXFont_Release(font);
--
2.24.1
1
1
[PATCH 1/2] vbscript: Return the item's disp when it does not have the SCRIPTITEM_CODEONLY flag, rather than the script dispatch.
by Gabriel Ivăncescu 25 Feb '20
by Gabriel Ivăncescu 25 Feb '20
25 Feb '20
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
---
dlls/vbscript/interp.c | 4 +++-
dlls/vbscript/tests/vbscript.c | 18 ++++++++++++++++++
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/dlls/vbscript/interp.c b/dlls/vbscript/interp.c
index b0046cb..27a4aee 100644
--- a/dlls/vbscript/interp.c
+++ b/dlls/vbscript/interp.c
@@ -1527,7 +1527,9 @@ static HRESULT interp_me(exec_ctx_t *ctx)
if(ctx->vbthis)
disp = (IDispatch*)&ctx->vbthis->IDispatchEx_iface;
else if(ctx->code->named_item)
- disp = (IDispatch*)&ctx->code->named_item->script_obj->IDispatchEx_iface;
+ disp = (ctx->code->named_item->flags & SCRIPTITEM_CODEONLY)
+ ? (IDispatch*)&ctx->code->named_item->script_obj->IDispatchEx_iface
+ : ctx->code->named_item->disp;
else if(ctx->script->host_global)
disp = ctx->script->host_global;
else
diff --git a/dlls/vbscript/tests/vbscript.c b/dlls/vbscript/tests/vbscript.c
index 19689b5..8536ee1 100644
--- a/dlls/vbscript/tests/vbscript.c
+++ b/dlls/vbscript/tests/vbscript.c
@@ -1858,6 +1858,15 @@ static void test_named_items(void)
hres = IActiveScript_GetScriptDispatch(script, L"visibleCodeItem", &disp);
ok(hres == S_OK, "GetScriptDispatch returned: %08x\n", hres);
+ SET_EXPECT(OnEnterScript);
+ SET_EXPECT(OnLeaveScript);
+ hres = IActiveScriptParse_ParseScriptText(parse, L"me", L"visibleCodeItem", NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, &var, NULL);
+ ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres);
+ ok(V_VT(&var) == VT_DISPATCH && V_DISPATCH(&var) == disp,
+ "Unexpected 'me': V_VT = %d, V_DISPATCH = %p\n", V_VT(&var), V_DISPATCH(&var));
+ VariantClear(&var);
+ CHECK_CALLED(OnEnterScript);
+ CHECK_CALLED(OnLeaveScript);
IDispatch_Release(disp);
SET_EXPECT(GetItemInfo_visible_code);
@@ -1993,6 +2002,15 @@ static void test_named_items(void)
CHECK_CALLED(OnLeaveScript);
SET_EXPECT(OnEnterScript);
SET_EXPECT(OnLeaveScript);
+ hres = IActiveScriptParse_ParseScriptText(parse, L"me", L"globalItem", NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, &var, NULL);
+ ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres);
+ ok(V_VT(&var) == VT_DISPATCH && V_DISPATCH(&var) == &global_named_item,
+ "Unexpected 'me': V_VT = %d, V_DISPATCH = %p\n", V_VT(&var), V_DISPATCH(&var));
+ VariantClear(&var);
+ CHECK_CALLED(OnEnterScript);
+ CHECK_CALLED(OnLeaveScript);
+ SET_EXPECT(OnEnterScript);
+ SET_EXPECT(OnLeaveScript);
hres = IActiveScriptParse_ParseScriptText(parse, L"me", L"codeOnlyItem", NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, &var, NULL);
ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres);
ok(V_VT(&var) == VT_DISPATCH && V_DISPATCH(&var) == (IDispatch*)script_disp2,
--
2.21.0
2
5
25 Feb '20
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/kernel32/tests/volume.c | 79 ++++++++++++++++++++++++++++--------
1 file changed, 63 insertions(+), 16 deletions(-)
diff --git a/dlls/kernel32/tests/volume.c b/dlls/kernel32/tests/volume.c
index 348ce1a76c5..5fa8a9f05de 100644
--- a/dlls/kernel32/tests/volume.c
+++ b/dlls/kernel32/tests/volume.c
@@ -24,6 +24,7 @@
#include "ntddstor.h"
#include <stdio.h>
#include "ddk/ntddcdvd.h"
+#include "ddk/mountmgr.h"
#include <pshpack1.h>
struct COMPLETE_DVD_LAYER_DESCRIPTOR
@@ -105,11 +106,12 @@ static void test_query_dos_deviceA(void)
HeapFree( GetProcessHeap(), 0, buffer );
}
-static void test_define_dos_deviceA(void)
+static void test_dos_devices(void)
{
+ char buf[MAX_PATH], buf2[400];
char drivestr[3];
- char buf[MAX_PATH];
- DWORD ret;
+ HANDLE file;
+ BOOL ret;
/* Find an unused drive letter */
drivestr[1] = ':';
@@ -123,20 +125,65 @@ static void test_define_dos_deviceA(void)
return;
}
- /* Map it to point to the current directory */
- ret = GetCurrentDirectoryA(sizeof(buf), buf);
- ok(ret, "GetCurrentDir\n");
+ ret = DefineDosDeviceA( 0, drivestr, "C:/windows/" );
+ todo_wine ok(ret, "failed to define drive %s, error %u\n", drivestr, GetLastError());
- ret = DefineDosDeviceA(0, drivestr, buf);
- todo_wine
- ok(ret, "Could not make drive %s point to %s!\n", drivestr, buf);
+ ret = QueryDosDeviceA( drivestr, buf, sizeof(buf) );
+ todo_wine ok(ret, "failed to query drive %s, error %u\n", drivestr, GetLastError());
+ todo_wine ok(!strcmp(buf, "\\??\\C:\\windows\\"), "got path %s\n", debugstr_a(buf));
- if (!ret) {
- skip("can't test removing fake drive\n");
- } else {
- ret = DefineDosDeviceA(DDD_REMOVE_DEFINITION, drivestr, NULL);
- ok(ret, "Could not remove fake drive %s!\n", drivestr);
- }
+ sprintf(buf, "%s/system32", drivestr);
+ file = CreateFileA( buf, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
+ OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL );
+ todo_wine ok(file != INVALID_HANDLE_VALUE, "got error %u\n", GetLastError());
+ CloseHandle( file );
+
+ /* but it's not a volume mount point */
+
+ sprintf(buf, "%s\\", drivestr);
+ ret = GetVolumeNameForVolumeMountPointA( buf, buf2, sizeof(buf2) );
+ ok(!ret, "expected failure\n");
+ todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %u\n", GetLastError());
+
+ ret = DefineDosDeviceA(DDD_REMOVE_DEFINITION, drivestr, NULL);
+ todo_wine ok(ret, "failed to remove drive %s, error %u\n", drivestr, GetLastError());
+
+ ret = QueryDosDeviceA( drivestr, buf, sizeof(buf) );
+ ok(!ret, "expected failure\n");
+ ok(GetLastError() == ERROR_FILE_NOT_FOUND, "got error %u\n", GetLastError());
+
+ sprintf(buf, "%s/system32", drivestr);
+ file = CreateFileA( buf, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
+ OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL );
+ ok(file == INVALID_HANDLE_VALUE, "expected failure\n");
+ todo_wine ok(GetLastError() == ERROR_PATH_NOT_FOUND, "got error %u\n", GetLastError());
+
+ /* try with DDD_RAW_TARGET_PATH */
+
+ ret = DefineDosDeviceA( DDD_RAW_TARGET_PATH, drivestr, "\\??\\C:\\windows\\" );
+ ok(ret, "failed to define drive %s, error %u\n", drivestr, GetLastError());
+
+ ret = QueryDosDeviceA( drivestr, buf, sizeof(buf) );
+ todo_wine ok(ret, "failed to query drive %s, error %u\n", drivestr, GetLastError());
+ todo_wine ok(!strcmp(buf, "\\??\\C:\\windows\\"), "got path %s\n", debugstr_a(buf));
+
+ sprintf(buf, "%s/system32", drivestr);
+ file = CreateFileA( buf, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
+ OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL );
+ todo_wine ok(file != INVALID_HANDLE_VALUE, "got error %u\n", GetLastError());
+ CloseHandle( file );
+
+ sprintf(buf, "%s\\", drivestr);
+ ret = GetVolumeNameForVolumeMountPointA( buf, buf2, sizeof(buf2) );
+ ok(!ret, "expected failure\n");
+ todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %u\n", GetLastError());
+
+ ret = DefineDosDeviceA(DDD_REMOVE_DEFINITION, drivestr, NULL);
+ ok(ret, "failed to remove drive %s, error %u\n", drivestr, GetLastError());
+
+ ret = QueryDosDeviceA( drivestr, buf, sizeof(buf) );
+ ok(!ret, "expected failure\n");
+ ok(GetLastError() == ERROR_FILE_NOT_FOUND, "got error %u\n", GetLastError());
}
static void test_FindFirstVolume(void)
@@ -1272,7 +1319,7 @@ START_TEST(volume)
pGetVolumePathNamesForVolumeNameW = (void *) GetProcAddress(hdll, "GetVolumePathNamesForVolumeNameW");
test_query_dos_deviceA();
- test_define_dos_deviceA();
+ test_dos_devices();
test_FindFirstVolume();
test_GetVolumePathNameA();
test_GetVolumePathNameW();
--
2.25.0
1
1
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
---
include/msvcrt/corecrt_wstring.h | 88 ++++++++++++++++++++++++++++++++
include/msvcrt/string.h | 74 +--------------------------
include/msvcrt/wchar.h | 59 +--------------------
3 files changed, 90 insertions(+), 131 deletions(-)
create mode 100644 include/msvcrt/corecrt_wstring.h
1
0
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
---
include/msvcrt/corecrt_wstring.h | 86 ++++++++++++++++++++++++++++++++
include/msvcrt/string.h | 73 +--------------------------
include/msvcrt/wchar.h | 59 +---------------------
3 files changed, 88 insertions(+), 130 deletions(-)
create mode 100644 include/msvcrt/corecrt_wstring.h
1
0
[PATCH 1/6] d3d8: Retrieve transform states from the primary stateblock.
by Zebediah Figura 25 Feb '20
by Zebediah Figura 25 Feb '20
25 Feb '20
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/d3d8/device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c
index 5e18f64550..8ce38e2d9e 100644
--- a/dlls/d3d8/device.c
+++ b/dlls/d3d8/device.c
@@ -1636,7 +1636,7 @@ static HRESULT WINAPI d3d8_device_GetTransform(IDirect3DDevice8 *iface,
/* Note: D3DMATRIX is compatible with struct wined3d_matrix. */
wined3d_mutex_lock();
- wined3d_device_get_transform(device->wined3d_device, state, (struct wined3d_matrix *)matrix);
+ memcpy(matrix, &wined3d_stateblock_get_state(device->state)->transforms[state], sizeof(*matrix));
wined3d_mutex_unlock();
return D3D_OK;
--
2.25.0
2
11
25 Feb '20
I think GlobalHandle() does the right thing here because it should succeed
if the buffer is allocated by GlobalAlloc(GMEM_FIXED) or HeapAlloc().
Therefore, dsound needs to be fixed.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48635
Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com>
---
dlls/dsound/buffer.c | 16 +++++-----------
dlls/dsound/tests/dsound.c | 6 ++++++
2 files changed, 11 insertions(+), 11 deletions(-)
2
1
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/crypt32/tests/chain.c | 252 ++++++++++++++++++++++---------------
1 file changed, 150 insertions(+), 102 deletions(-)
diff --git a/dlls/crypt32/tests/chain.c b/dlls/crypt32/tests/chain.c
index 1bf78b084d..30a69a21f9 100644
--- a/dlls/crypt32/tests/chain.c
+++ b/dlls/crypt32/tests/chain.c
@@ -402,95 +402,130 @@ static const BYTE google_com[]={
};
/* *.winehq.org cert */
static const BYTE winehq_org[] = {
-0x30,0x82,0x05,0x2a,0x30,0x82,0x04,0x12,0xa0,0x03,0x02,0x01,0x02,0x02,0x03,
-0x0c,0x35,0xd0,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,
-0x05,0x05,0x00,0x30,0x3c,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,
-0x02,0x55,0x53,0x31,0x17,0x30,0x15,0x06,0x03,0x55,0x04,0x0a,0x13,0x0e,0x47,
-0x65,0x6f,0x54,0x72,0x75,0x73,0x74,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x31,0x14,
-0x30,0x12,0x06,0x03,0x55,0x04,0x03,0x13,0x0b,0x52,0x61,0x70,0x69,0x64,0x53,
-0x53,0x4c,0x20,0x43,0x41,0x30,0x1e,0x17,0x0d,0x31,0x33,0x30,0x35,0x32,0x32,
-0x30,0x33,0x35,0x36,0x30,0x39,0x5a,0x17,0x0d,0x31,0x34,0x30,0x35,0x32,0x35,
-0x30,0x37,0x33,0x34,0x31,0x34,0x5a,0x30,0x81,0xbb,0x31,0x29,0x30,0x27,0x06,
-0x03,0x55,0x04,0x05,0x13,0x20,0x30,0x6d,0x4a,0x75,0x76,0x31,0x74,0x2d,0x31,
-0x43,0x46,0x79,0x70,0x51,0x6b,0x79,0x54,0x5a,0x77,0x66,0x76,0x6a,0x48,0x48,
-0x42,0x41,0x62,0x6e,0x55,0x6e,0x64,0x47,0x31,0x13,0x30,0x11,0x06,0x03,0x55,
-0x04,0x0b,0x13,0x0a,0x47,0x54,0x39,0x38,0x33,0x38,0x30,0x30,0x31,0x31,0x31,
-0x31,0x30,0x2f,0x06,0x03,0x55,0x04,0x0b,0x13,0x28,0x53,0x65,0x65,0x20,0x77,
-0x77,0x77,0x2e,0x72,0x61,0x70,0x69,0x64,0x73,0x73,0x6c,0x2e,0x63,0x6f,0x6d,
-0x2f,0x72,0x65,0x73,0x6f,0x75,0x72,0x63,0x65,0x73,0x2f,0x63,0x70,0x73,0x20,
-0x28,0x63,0x29,0x31,0x33,0x31,0x2f,0x30,0x2d,0x06,0x03,0x55,0x04,0x0b,0x13,
-0x26,0x44,0x6f,0x6d,0x61,0x69,0x6e,0x20,0x43,0x6f,0x6e,0x74,0x72,0x6f,0x6c,
-0x20,0x56,0x61,0x6c,0x69,0x64,0x61,0x74,0x65,0x64,0x20,0x2d,0x20,0x52,0x61,
-0x70,0x69,0x64,0x53,0x53,0x4c,0x28,0x52,0x29,0x31,0x15,0x30,0x13,0x06,0x03,
-0x55,0x04,0x03,0x0c,0x0c,0x2a,0x2e,0x77,0x69,0x6e,0x65,0x68,0x71,0x2e,0x6f,
-0x72,0x67,0x30,0x82,0x01,0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,
-0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x82,0x01,0x0f,0x00,0x30,0x82,0x01,0x0a,
-0x02,0x82,0x01,0x01,0x00,0xc2,0x91,0x35,0xc7,0x67,0x32,0xf1,0x66,0x12,0x38,
-0x79,0xdb,0x02,0x11,0x95,0x89,0x1b,0x4a,0x6a,0x63,0x45,0x35,0x58,0x1b,0x57,
-0x8d,0xec,0x19,0x88,0xf5,0xa3,0x9e,0x6b,0xdb,0x07,0xfb,0x6e,0x29,0xe9,0xa9,
-0x14,0x07,0x8c,0x3a,0xc1,0xd7,0x88,0xcc,0xe4,0x55,0x79,0x6e,0x97,0xe9,0x93,
-0x88,0x9a,0x89,0xf9,0x31,0x0f,0x91,0x61,0xc2,0x9c,0xae,0x59,0x25,0x93,0x9a,
-0xc8,0xf9,0x28,0x7a,0x0f,0x0f,0x89,0x9a,0xda,0x46,0xbe,0xb2,0xdc,0x90,0x5b,
-0xd8,0x87,0xda,0xda,0xce,0x70,0x70,0x95,0x43,0x51,0xa0,0x21,0x22,0x54,0xab,
-0xa7,0x09,0xe1,0x81,0x09,0x8c,0x00,0x15,0x30,0x5a,0xa7,0x61,0x77,0xba,0x48,
-0x91,0xc6,0x94,0x90,0xdd,0x1a,0xf4,0x3f,0xa6,0x8a,0xb4,0x2f,0x98,0x16,0x0d,
-0x96,0x9f,0x0c,0x96,0x01,0x15,0xbc,0x74,0x7e,0x5c,0x4e,0xe3,0x95,0xae,0x00,
-0xf5,0x5b,0x88,0x0f,0xef,0x7c,0x1f,0xab,0x22,0xfe,0x95,0x42,0x1a,0xbd,0xee,
-0x23,0xca,0x5b,0x7f,0x4a,0xb0,0xbe,0x15,0x65,0xe2,0xce,0x02,0xc4,0xf6,0xb8,
-0xf3,0xd6,0x7e,0x75,0x5e,0x63,0x47,0x5d,0xc1,0xca,0xc3,0xc4,0x4a,0xf5,0x4d,
-0x66,0x34,0x03,0xf8,0xf4,0x54,0x7d,0x6b,0x54,0x2f,0x17,0x7c,0x39,0x13,0x78,
-0x09,0x9e,0xd0,0x9c,0x51,0x02,0x11,0x9d,0xa7,0x53,0x60,0xdd,0x62,0x2b,0xee,
-0xb0,0xd1,0xf2,0x1a,0x5c,0xdc,0xa7,0x58,0xc2,0xfa,0x29,0xcf,0xf3,0xc9,0xe9,
-0xae,0xe8,0x70,0x60,0x99,0xc7,0x30,0xdd,0x1c,0xda,0x32,0xc0,0x45,0xa5,0x48,
-0xc5,0x22,0x29,0x0c,0x74,0x25,0x02,0x03,0x01,0x00,0x01,0xa3,0x82,0x01,0xb3,
-0x30,0x82,0x01,0xaf,0x30,0x1f,0x06,0x03,0x55,0x1d,0x23,0x04,0x18,0x30,0x16,
-0x80,0x14,0x6b,0x69,0x3d,0x6a,0x18,0x42,0x4a,0xdd,0x8f,0x02,0x65,0x39,0xfd,
-0x35,0x24,0x86,0x78,0x91,0x16,0x30,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,
-0x01,0xff,0x04,0x04,0x03,0x02,0x05,0xa0,0x30,0x1d,0x06,0x03,0x55,0x1d,0x25,
-0x04,0x16,0x30,0x14,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x03,0x01,0x06,
-0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x03,0x02,0x30,0x23,0x06,0x03,0x55,0x1d,
-0x11,0x04,0x1c,0x30,0x1a,0x82,0x0c,0x2a,0x2e,0x77,0x69,0x6e,0x65,0x68,0x71,
-0x2e,0x6f,0x72,0x67,0x82,0x0a,0x77,0x69,0x6e,0x65,0x68,0x71,0x2e,0x6f,0x72,
-0x67,0x30,0x43,0x06,0x03,0x55,0x1d,0x1f,0x04,0x3c,0x30,0x3a,0x30,0x38,0xa0,
-0x36,0xa0,0x34,0x86,0x32,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x72,0x61,0x70,
-0x69,0x64,0x73,0x73,0x6c,0x2d,0x63,0x72,0x6c,0x2e,0x67,0x65,0x6f,0x74,0x72,
-0x75,0x73,0x74,0x2e,0x63,0x6f,0x6d,0x2f,0x63,0x72,0x6c,0x73,0x2f,0x72,0x61,
-0x70,0x69,0x64,0x73,0x73,0x6c,0x2e,0x63,0x72,0x6c,0x30,0x1d,0x06,0x03,0x55,
-0x1d,0x0e,0x04,0x16,0x04,0x14,0xff,0x4c,0x0f,0x46,0xb8,0x3c,0x5b,0x72,0xe4,
-0x10,0x96,0xbb,0xa7,0xbc,0x91,0xa2,0x63,0xf6,0x81,0x0a,0x30,0x0c,0x06,0x03,
-0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x02,0x30,0x00,0x30,0x78,0x06,0x08,0x2b,
-0x06,0x01,0x05,0x05,0x07,0x01,0x01,0x04,0x6c,0x30,0x6a,0x30,0x2d,0x06,0x08,
-0x2b,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x86,0x21,0x68,0x74,0x74,0x70,0x3a,
-0x2f,0x2f,0x72,0x61,0x70,0x69,0x64,0x73,0x73,0x6c,0x2d,0x6f,0x63,0x73,0x70,
-0x2e,0x67,0x65,0x6f,0x74,0x72,0x75,0x73,0x74,0x2e,0x63,0x6f,0x6d,0x30,0x39,
-0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x30,0x02,0x86,0x2d,0x68,0x74,0x74,
-0x70,0x3a,0x2f,0x2f,0x72,0x61,0x70,0x69,0x64,0x73,0x73,0x6c,0x2d,0x61,0x69,
-0x61,0x2e,0x67,0x65,0x6f,0x74,0x72,0x75,0x73,0x74,0x2e,0x63,0x6f,0x6d,0x2f,
-0x72,0x61,0x70,0x69,0x64,0x73,0x73,0x6c,0x2e,0x63,0x72,0x74,0x30,0x4c,0x06,
-0x03,0x55,0x1d,0x20,0x04,0x45,0x30,0x43,0x30,0x41,0x06,0x0a,0x60,0x86,0x48,
-0x01,0x86,0xf8,0x45,0x01,0x07,0x36,0x30,0x33,0x30,0x31,0x06,0x08,0x2b,0x06,
-0x01,0x05,0x05,0x07,0x02,0x01,0x16,0x25,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,
-0x77,0x77,0x77,0x2e,0x67,0x65,0x6f,0x74,0x72,0x75,0x73,0x74,0x2e,0x63,0x6f,
-0x6d,0x2f,0x72,0x65,0x73,0x6f,0x75,0x72,0x63,0x65,0x73,0x2f,0x63,0x70,0x73,
-0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,
-0x03,0x82,0x01,0x01,0x00,0x1b,0xa8,0x34,0xc1,0xb7,0xf3,0xbe,0xb6,0xed,0x12,
-0x85,0x58,0xe1,0x69,0x35,0x0c,0xb8,0x7e,0x38,0x11,0xb3,0xd2,0xe2,0x2e,0x52,
-0xcf,0xa6,0x39,0xe1,0x25,0x73,0xf0,0x1d,0xc9,0x54,0xa1,0xc2,0x50,0x19,0xea,
-0x68,0xeb,0x1a,0x21,0xdb,0x86,0x14,0x55,0x73,0x02,0x28,0x56,0x14,0xf7,0xf1,
-0x48,0x43,0xfb,0xd7,0xbf,0xcf,0xbb,0x20,0xc4,0x1e,0x4e,0x9a,0x7c,0xf1,0xe8,
-0x28,0x76,0xce,0xf9,0xb3,0xf0,0x6f,0x93,0x70,0x51,0xcd,0xed,0x28,0x1b,0xdd,
-0x66,0x38,0x40,0x5e,0x0b,0x13,0xaf,0x21,0xff,0x23,0xf1,0x5b,0xcd,0x32,0x43,
-0x00,0x87,0x3d,0x10,0xc6,0x6e,0xe5,0x67,0xdc,0x9f,0x44,0x12,0x94,0xb4,0x76,
-0xbd,0xd9,0x4c,0x53,0x12,0x1c,0x2e,0x2c,0x09,0x66,0x41,0x83,0x6c,0xee,0x68,
-0x98,0x38,0xd2,0xc8,0x32,0xa3,0x42,0xcf,0x1c,0xfd,0x60,0x6c,0x5d,0x4b,0x4b,
-0x6c,0xb8,0xf3,0x7e,0xc8,0x93,0x0a,0x68,0x66,0x14,0x3b,0x39,0x73,0x82,0xfe,
-0x86,0x3c,0x3d,0xb3,0xb5,0x42,0xec,0x4c,0xc6,0xe6,0xdd,0x7e,0xd7,0xb4,0x5d,
-0xeb,0x6d,0x8c,0x9e,0x29,0x95,0x99,0xb6,0x95,0x5b,0xc0,0xdd,0x46,0xdf,0xdc,
-0xf2,0x1c,0x3d,0x80,0xeb,0x14,0x3d,0xd9,0x4a,0xb4,0x6f,0x3e,0x79,0xca,0x7f,
-0xbc,0x27,0x47,0x90,0x86,0x55,0xfa,0x27,0xf5,0x35,0x3d,0x1d,0xc4,0xa8,0x55,
-0x31,0x8f,0x3a,0x76,0x8d,0x98,0x50,0xa3,0x11,0x91,0x1c,0xb0,0xa8,0x06,0xf9,
-0x22,0xb1,0xca,0x20,0x49,0xaa,0xe1,0x4d,0x41,0xf1,0x21,0xcc,0x25,0x45,0x33,
-0x4f,0x2f,0x3a,0x48,0x70,0xbb };
+ 0x30, 0x82, 0x05, 0xb5, 0x30, 0x82, 0x04, 0x9d, 0xa0, 0x03, 0x02, 0x01,
+ 0x02, 0x02, 0x11, 0x00, 0xc9, 0xce, 0x10, 0xbc, 0x5e, 0xcf, 0xf2, 0xfd,
+ 0xa6, 0x37, 0xb8, 0x51, 0xf1, 0xe4, 0xb9, 0x30, 0x30, 0x0d, 0x06, 0x09,
+ 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x30,
+ 0x7a, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02,
+ 0x55, 0x53, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x13,
+ 0x02, 0x56, 0x41, 0x31, 0x10, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x04, 0x07,
+ 0x13, 0x07, 0x48, 0x65, 0x72, 0x6e, 0x64, 0x6f, 0x6e, 0x31, 0x21, 0x30,
+ 0x1f, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x18, 0x4e, 0x65, 0x74, 0x77,
+ 0x6f, 0x72, 0x6b, 0x20, 0x53, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x20, 0x4c, 0x2e, 0x4c, 0x2e, 0x43, 0x2e, 0x31, 0x29, 0x30, 0x27,
+ 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x20, 0x4e, 0x65, 0x74, 0x77, 0x6f,
+ 0x72, 0x6b, 0x20, 0x53, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x20, 0x4f, 0x56, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x43,
+ 0x41, 0x20, 0x32, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x38, 0x30, 0x33, 0x30,
+ 0x36, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x17, 0x0d, 0x32, 0x30,
+ 0x30, 0x36, 0x30, 0x37, 0x32, 0x33, 0x35, 0x39, 0x35, 0x39, 0x5a, 0x30,
+ 0x81, 0xc8, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13,
+ 0x02, 0x55, 0x53, 0x31, 0x0e, 0x30, 0x0c, 0x06, 0x03, 0x55, 0x04, 0x11,
+ 0x13, 0x05, 0x35, 0x35, 0x31, 0x31, 0x34, 0x31, 0x0b, 0x30, 0x09, 0x06,
+ 0x03, 0x55, 0x04, 0x08, 0x13, 0x02, 0x4d, 0x4e, 0x31, 0x13, 0x30, 0x11,
+ 0x06, 0x03, 0x55, 0x04, 0x07, 0x13, 0x0a, 0x53, 0x61, 0x69, 0x6e, 0x74,
+ 0x20, 0x50, 0x61, 0x75, 0x6c, 0x31, 0x10, 0x30, 0x0e, 0x06, 0x03, 0x55,
+ 0x04, 0x09, 0x13, 0x07, 0x53, 0x74, 0x65, 0x20, 0x31, 0x32, 0x30, 0x31,
+ 0x18, 0x30, 0x16, 0x06, 0x03, 0x55, 0x04, 0x09, 0x13, 0x0f, 0x37, 0x30,
+ 0x30, 0x20, 0x52, 0x61, 0x79, 0x6d, 0x6f, 0x6e, 0x64, 0x20, 0x41, 0x76,
+ 0x65, 0x31, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x0b,
+ 0x43, 0x6f, 0x64, 0x65, 0x57, 0x65, 0x61, 0x76, 0x65, 0x72, 0x73, 0x31,
+ 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x13, 0x02, 0x49, 0x54,
+ 0x31, 0x21, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x13, 0x18, 0x53,
+ 0x65, 0x63, 0x75, 0x72, 0x65, 0x20, 0x4c, 0x69, 0x6e, 0x6b, 0x20, 0x53,
+ 0x53, 0x4c, 0x20, 0x57, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x31,
+ 0x15, 0x30, 0x13, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x0c, 0x2a, 0x2e,
+ 0x77, 0x69, 0x6e, 0x65, 0x68, 0x71, 0x2e, 0x6f, 0x72, 0x67, 0x30, 0x82,
+ 0x01, 0x22, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d,
+ 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82, 0x01, 0x0f, 0x00, 0x30, 0x82,
+ 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01, 0x00, 0xc2, 0x91, 0x35, 0xc7, 0x67,
+ 0x32, 0xf1, 0x66, 0x12, 0x38, 0x79, 0xdb, 0x02, 0x11, 0x95, 0x89, 0x1b,
+ 0x4a, 0x6a, 0x63, 0x45, 0x35, 0x58, 0x1b, 0x57, 0x8d, 0xec, 0x19, 0x88,
+ 0xf5, 0xa3, 0x9e, 0x6b, 0xdb, 0x07, 0xfb, 0x6e, 0x29, 0xe9, 0xa9, 0x14,
+ 0x07, 0x8c, 0x3a, 0xc1, 0xd7, 0x88, 0xcc, 0xe4, 0x55, 0x79, 0x6e, 0x97,
+ 0xe9, 0x93, 0x88, 0x9a, 0x89, 0xf9, 0x31, 0x0f, 0x91, 0x61, 0xc2, 0x9c,
+ 0xae, 0x59, 0x25, 0x93, 0x9a, 0xc8, 0xf9, 0x28, 0x7a, 0x0f, 0x0f, 0x89,
+ 0x9a, 0xda, 0x46, 0xbe, 0xb2, 0xdc, 0x90, 0x5b, 0xd8, 0x87, 0xda, 0xda,
+ 0xce, 0x70, 0x70, 0x95, 0x43, 0x51, 0xa0, 0x21, 0x22, 0x54, 0xab, 0xa7,
+ 0x09, 0xe1, 0x81, 0x09, 0x8c, 0x00, 0x15, 0x30, 0x5a, 0xa7, 0x61, 0x77,
+ 0xba, 0x48, 0x91, 0xc6, 0x94, 0x90, 0xdd, 0x1a, 0xf4, 0x3f, 0xa6, 0x8a,
+ 0xb4, 0x2f, 0x98, 0x16, 0x0d, 0x96, 0x9f, 0x0c, 0x96, 0x01, 0x15, 0xbc,
+ 0x74, 0x7e, 0x5c, 0x4e, 0xe3, 0x95, 0xae, 0x00, 0xf5, 0x5b, 0x88, 0x0f,
+ 0xef, 0x7c, 0x1f, 0xab, 0x22, 0xfe, 0x95, 0x42, 0x1a, 0xbd, 0xee, 0x23,
+ 0xca, 0x5b, 0x7f, 0x4a, 0xb0, 0xbe, 0x15, 0x65, 0xe2, 0xce, 0x02, 0xc4,
+ 0xf6, 0xb8, 0xf3, 0xd6, 0x7e, 0x75, 0x5e, 0x63, 0x47, 0x5d, 0xc1, 0xca,
+ 0xc3, 0xc4, 0x4a, 0xf5, 0x4d, 0x66, 0x34, 0x03, 0xf8, 0xf4, 0x54, 0x7d,
+ 0x6b, 0x54, 0x2f, 0x17, 0x7c, 0x39, 0x13, 0x78, 0x09, 0x9e, 0xd0, 0x9c,
+ 0x51, 0x02, 0x11, 0x9d, 0xa7, 0x53, 0x60, 0xdd, 0x62, 0x2b, 0xee, 0xb0,
+ 0xd1, 0xf2, 0x1a, 0x5c, 0xdc, 0xa7, 0x58, 0xc2, 0xfa, 0x29, 0xcf, 0xf3,
+ 0xc9, 0xe9, 0xae, 0xe8, 0x70, 0x60, 0x99, 0xc7, 0x30, 0xdd, 0x1c, 0xda,
+ 0x32, 0xc0, 0x45, 0xa5, 0x48, 0xc5, 0x22, 0x29, 0x0c, 0x74, 0x25, 0x02,
+ 0x03, 0x01, 0x00, 0x01, 0xa3, 0x82, 0x01, 0xe5, 0x30, 0x82, 0x01, 0xe1,
+ 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80,
+ 0x14, 0x20, 0x33, 0xcd, 0xb7, 0x61, 0xf6, 0xa5, 0x86, 0x4f, 0xdc, 0xc9,
+ 0xd7, 0x73, 0x6a, 0xbc, 0x0a, 0x51, 0x65, 0x98, 0xec, 0x30, 0x1d, 0x06,
+ 0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, 0xff, 0x4c, 0x0f, 0x46,
+ 0xb8, 0x3c, 0x5b, 0x72, 0xe4, 0x10, 0x96, 0xbb, 0xa7, 0xbc, 0x91, 0xa2,
+ 0x63, 0xf6, 0x81, 0x0a, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x01,
+ 0x01, 0xff, 0x04, 0x04, 0x03, 0x02, 0x05, 0xa0, 0x30, 0x0c, 0x06, 0x03,
+ 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x02, 0x30, 0x00, 0x30, 0x1d,
+ 0x06, 0x03, 0x55, 0x1d, 0x25, 0x04, 0x16, 0x30, 0x14, 0x06, 0x08, 0x2b,
+ 0x06, 0x01, 0x05, 0x05, 0x07, 0x03, 0x01, 0x06, 0x08, 0x2b, 0x06, 0x01,
+ 0x05, 0x05, 0x07, 0x03, 0x02, 0x30, 0x75, 0x06, 0x03, 0x55, 0x1d, 0x20,
+ 0x04, 0x6e, 0x30, 0x6c, 0x30, 0x60, 0x06, 0x0c, 0x2b, 0x06, 0x01, 0x04,
+ 0x01, 0x86, 0x0e, 0x01, 0x02, 0x01, 0x03, 0x01, 0x30, 0x50, 0x30, 0x4e,
+ 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x02, 0x01, 0x16, 0x42,
+ 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x6e,
+ 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x65, 0x67, 0x61,
+ 0x6c, 0x2f, 0x53, 0x53, 0x4c, 0x2d, 0x6c, 0x65, 0x67, 0x61, 0x6c, 0x2d,
+ 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x2d, 0x63,
+ 0x70, 0x73, 0x2e, 0x6a, 0x73, 0x70, 0x30, 0x08, 0x06, 0x06, 0x67, 0x81,
+ 0x0c, 0x01, 0x02, 0x02, 0x30, 0x49, 0x06, 0x03, 0x55, 0x1d, 0x1f, 0x04,
+ 0x42, 0x30, 0x40, 0x30, 0x3e, 0xa0, 0x3c, 0xa0, 0x3a, 0x86, 0x38, 0x68,
+ 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x63, 0x72, 0x6c, 0x2e, 0x6e, 0x65,
+ 0x74, 0x73, 0x6f, 0x6c, 0x73, 0x73, 0x6c, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
+ 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x6f, 0x6c, 0x75, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x4f, 0x56, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72,
+ 0x43, 0x41, 0x32, 0x2e, 0x63, 0x72, 0x6c, 0x30, 0x7b, 0x06, 0x08, 0x2b,
+ 0x06, 0x01, 0x05, 0x05, 0x07, 0x01, 0x01, 0x04, 0x6f, 0x30, 0x6d, 0x30,
+ 0x44, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x30, 0x02, 0x86,
+ 0x38, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x63, 0x72, 0x74, 0x2e,
+ 0x6e, 0x65, 0x74, 0x73, 0x6f, 0x6c, 0x73, 0x73, 0x6c, 0x2e, 0x63, 0x6f,
+ 0x6d, 0x2f, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x6f, 0x6c,
+ 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4f, 0x56, 0x53, 0x65, 0x72, 0x76,
+ 0x65, 0x72, 0x43, 0x41, 0x32, 0x2e, 0x63, 0x72, 0x74, 0x30, 0x25, 0x06,
+ 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x30, 0x01, 0x86, 0x19, 0x68,
+ 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x6f, 0x63, 0x73, 0x70, 0x2e, 0x6e,
+ 0x65, 0x74, 0x73, 0x6f, 0x6c, 0x73, 0x73, 0x6c, 0x2e, 0x63, 0x6f, 0x6d,
+ 0x30, 0x23, 0x06, 0x03, 0x55, 0x1d, 0x11, 0x04, 0x1c, 0x30, 0x1a, 0x82,
+ 0x0c, 0x2a, 0x2e, 0x77, 0x69, 0x6e, 0x65, 0x68, 0x71, 0x2e, 0x6f, 0x72,
+ 0x67, 0x82, 0x0a, 0x77, 0x69, 0x6e, 0x65, 0x68, 0x71, 0x2e, 0x6f, 0x72,
+ 0x67, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01,
+ 0x01, 0x0b, 0x05, 0x00, 0x03, 0x82, 0x01, 0x01, 0x00, 0x58, 0x90, 0xa4,
+ 0x5b, 0x56, 0x5f, 0xf6, 0xab, 0x28, 0x6b, 0xc8, 0x17, 0xe6, 0x48, 0x51,
+ 0x38, 0x51, 0xea, 0xc2, 0x16, 0x07, 0x88, 0x32, 0xa0, 0x75, 0x17, 0xef,
+ 0xc3, 0xc3, 0x19, 0xce, 0xfb, 0xc9, 0x98, 0x2c, 0x1f, 0x16, 0x94, 0x41,
+ 0xa0, 0x46, 0xc5, 0x0d, 0x7e, 0x90, 0x40, 0x24, 0xd2, 0xb1, 0xf4, 0xc8,
+ 0x51, 0x43, 0x21, 0x54, 0xdb, 0xed, 0x47, 0x21, 0x97, 0x37, 0x11, 0xc9,
+ 0x22, 0xe5, 0xcc, 0xe1, 0x64, 0x5e, 0x3a, 0xd0, 0xbf, 0x95, 0x4a, 0xe9,
+ 0x3a, 0x32, 0x05, 0xca, 0x9d, 0xb4, 0x8c, 0x7e, 0xce, 0x31, 0x54, 0xb0,
+ 0x5f, 0xf5, 0xcf, 0xef, 0x59, 0x71, 0x7b, 0x5d, 0xaf, 0xc0, 0x76, 0xe2,
+ 0xdb, 0x89, 0x03, 0x25, 0x94, 0xc4, 0x55, 0xd4, 0xf8, 0xac, 0xe1, 0xbb,
+ 0x12, 0xc1, 0x24, 0x97, 0xd0, 0xfb, 0x17, 0x64, 0xae, 0x80, 0xc9, 0x3b,
+ 0xff, 0x16, 0x20, 0xfd, 0x65, 0x0c, 0x34, 0xdf, 0x7b, 0x11, 0xf6, 0x37,
+ 0xcb, 0x5c, 0xec, 0x98, 0xef, 0xab, 0xd3, 0x60, 0xaf, 0x6e, 0x1b, 0x0d,
+ 0x1b, 0xfd, 0xc1, 0x43, 0xf0, 0x8d, 0xb5, 0x44, 0xdf, 0xcc, 0xc3, 0xe7,
+ 0x6e, 0xb6, 0x51, 0x9e, 0x8b, 0x77, 0x5c, 0x1a, 0x8b, 0xbd, 0xb4, 0xa4,
+ 0x28, 0xf8, 0x01, 0x41, 0xc5, 0xa1, 0xc0, 0x64, 0x0a, 0xe0, 0x6f, 0x32,
+ 0x30, 0x2c, 0x06, 0x2a, 0xc4, 0x76, 0x0b, 0x95, 0x8b, 0xbf, 0x14, 0x59,
+ 0x16, 0xb3, 0xd1, 0xee, 0xc9, 0xef, 0x71, 0xd5, 0x5a, 0x26, 0xb4, 0xb0,
+ 0xba, 0x86, 0x1f, 0x41, 0x13, 0xd8, 0xff, 0x96, 0x51, 0x7b, 0x2e, 0x8f,
+ 0x85, 0x21, 0x60, 0xcd, 0x8f, 0x47, 0xe2, 0x48, 0x44, 0x07, 0x38, 0x29,
+ 0xdd, 0x0a, 0x3a, 0x01, 0xd8, 0x2c, 0x37, 0x8d, 0xc3, 0x0e, 0x68, 0xc5,
+ 0xd4, 0x24, 0x86, 0x2b, 0x05, 0x8f, 0xf5, 0x08, 0xd7, 0x46, 0x73, 0x59,
+ 0xb2
+};
/* Battle.Net's cert */
static const BYTE battlenet[] = {
0x30,0x82,0x03,0xd8,0x30,0x82,0x02,0xc0,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,
@@ -4109,7 +4144,8 @@ static void testGetCertChain(void)
return;
}
- ok(!chain->TrustStatus.dwErrorStatus, "chain->TrustStatus.dwErrorStatus = %x\n", chain->TrustStatus.dwErrorStatus);
+ ok(chain->TrustStatus.dwErrorStatus == CERT_TRUST_HAS_EXACT_MATCH_ISSUER, "chain->TrustStatus.dwErrorStatus = %x\n",
+ chain->TrustStatus.dwErrorStatus);
todo_wine
ok(chain->TrustStatus.dwInfoStatus == CERT_TRUST_HAS_PREFERRED_ISSUER, "chain->TrustStatus.dwInfoStatus = %x\n",
chain->TrustStatus.dwInfoStatus);
@@ -4120,7 +4156,7 @@ static void testGetCertChain(void)
simple_chain = *chain->rgpChain;
ok(simple_chain->cbSize == sizeof(*simple_chain), "simple_chain->cbSize = %u\n", simple_chain->cbSize);
- ok(!simple_chain->TrustStatus.dwErrorStatus, "simple_chain->TrustStatus.dwErrorStatus = %x\n",
+ ok(simple_chain->TrustStatus.dwErrorStatus == CERT_TRUST_HAS_EXACT_MATCH_ISSUER, "simple_chain->TrustStatus.dwErrorStatus = %x\n",
simple_chain->TrustStatus.dwErrorStatus);
todo_wine
ok(simple_chain->TrustStatus.dwInfoStatus == CERT_TRUST_HAS_PREFERRED_ISSUER,
@@ -4130,9 +4166,15 @@ static void testGetCertChain(void)
for(i=0; i < simple_chain->cElement; i++) {
chain_elem = simple_chain->rgpElement[i];
ok(chain_elem->cbSize == sizeof(*chain_elem), "chain_elem->cbSize = %u\n", chain_elem->cbSize);
-
- ok(!chain_elem->TrustStatus.dwErrorStatus, "chain_elem->TrustStatus.dwErrorStatus = %x\n",
- chain_elem->TrustStatus.dwErrorStatus);
+ if (!i)
+ ok(chain_elem->TrustStatus.dwErrorStatus == CERT_TRUST_HAS_EXACT_MATCH_ISSUER,
+ "chain_elem->TrustStatus.dwErrorStatus = %x\n", chain_elem->TrustStatus.dwErrorStatus);
+ else if (i == 1)
+ todo_wine ok(!chain_elem->TrustStatus.dwErrorStatus, "chain_elem->TrustStatus.dwErrorStatus = %x\n",
+ chain_elem->TrustStatus.dwErrorStatus);
+ else
+ ok(!chain_elem->TrustStatus.dwErrorStatus, "chain_elem->TrustStatus.dwErrorStatus = %x\n",
+ chain_elem->TrustStatus.dwErrorStatus);
trace("info[%u] = %x\n", i, chain_elem->TrustStatus.dwInfoStatus);
ok(chain_elem->pCertContext->dwCertEncodingType == CRYPT_ASN_ENCODING,
"chain_elem->pCertContext->dwCertEncodingType = %x\n",
@@ -4140,10 +4182,14 @@ static void testGetCertChain(void)
}
ok(simple_chain->rgpElement[0]->pCertContext == cert, "simple_chain->rgpElement[0]->pCertContext != cert\n");
- test_name_blob(&simple_chain->rgpElement[1]->pCertContext->pCertInfo->Issuer, "US, GeoTrust Inc., GeoTrust Global CA");
- test_name_blob(&simple_chain->rgpElement[1]->pCertContext->pCertInfo->Subject, "US, \"GeoTrust, Inc.\", RapidSSL CA");
- test_name_blob(&simple_chain->rgpElement[2]->pCertContext->pCertInfo->Issuer, "US, GeoTrust Inc., GeoTrust Global CA");
- test_name_blob(&simple_chain->rgpElement[2]->pCertContext->pCertInfo->Subject, "US, GeoTrust Inc., GeoTrust Global CA");
+ test_name_blob(&simple_chain->rgpElement[1]->pCertContext->pCertInfo->Issuer,
+ "US, New Jersey, Jersey City, The USERTRUST Network, USERTrust RSA Certification Authority");
+ test_name_blob(&simple_chain->rgpElement[1]->pCertContext->pCertInfo->Subject,
+ "US, VA, Herndon, Network Solutions L.L.C., Network Solutions OV Server CA 2");
+ test_name_blob(&simple_chain->rgpElement[2]->pCertContext->pCertInfo->Issuer,
+ "US, New Jersey, Jersey City, The USERTRUST Network, USERTrust RSA Certification Authority");
+ test_name_blob(&simple_chain->rgpElement[2]->pCertContext->pCertInfo->Subject,
+ "US, New Jersey, Jersey City, The USERTRUST Network, USERTrust RSA Certification Authority");
pCertFreeCertificateChain(chain);
@@ -4151,20 +4197,22 @@ static void testGetCertChain(void)
ret = CertGetCertificateChain(NULL, cert, &fileTime, store, ¶, CERT_CHAIN_REVOCATION_CHECK_END_CERT, NULL,
&chain);
ok(ret, "CertGetCertificateChain failed: %u\n", GetLastError());
- ok(!chain->TrustStatus.dwErrorStatus, "chain->TrustStatus.dwErrorStatus = %x\n", chain->TrustStatus.dwErrorStatus);
+ ok(chain->TrustStatus.dwErrorStatus == CERT_TRUST_HAS_EXACT_MATCH_ISSUER, "chain->TrustStatus.dwErrorStatus = %x\n",
+ chain->TrustStatus.dwErrorStatus);
pCertFreeCertificateChain(chain);
ret = CertGetCertificateChain(NULL, cert, &fileTime, store, ¶, CERT_CHAIN_REVOCATION_CHECK_CHAIN, NULL, &chain);
ok(ret, "CertGetCertificateChain failed: %u\n", GetLastError());
- ok(!chain->TrustStatus.dwErrorStatus
- || broken(chain->TrustStatus.dwErrorStatus == CERT_TRUST_REVOCATION_STATUS_UNKNOWN), /* XP */
+ ok(chain->TrustStatus.dwErrorStatus == CERT_TRUST_HAS_EXACT_MATCH_ISSUER ||
+ broken(chain->TrustStatus.dwErrorStatus == (CERT_TRUST_IS_NOT_TIME_VALID|CERT_TRUST_REVOCATION_STATUS_UNKNOWN)), /* XP */
"chain->TrustStatus.dwErrorStatus = %x\n", chain->TrustStatus.dwErrorStatus);
pCertFreeCertificateChain(chain);
ret = CertGetCertificateChain(NULL, cert, &fileTime, store, ¶, CERT_CHAIN_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT,
NULL, &chain);
ok(ret, "CertGetCertificateChain failed: %u\n", GetLastError());
- ok(!chain->TrustStatus.dwErrorStatus, "chain->TrustStatus.dwErrorStatus = %x\n", chain->TrustStatus.dwErrorStatus);
+ ok(chain->TrustStatus.dwErrorStatus == CERT_TRUST_HAS_EXACT_MATCH_ISSUER, "chain->TrustStatus.dwErrorStatus = %x\n",
+ chain->TrustStatus.dwErrorStatus);
pCertFreeCertificateChain(chain);
/* Test HCCE_LOCAL_MACHINE */
--
2.20.1
1
0
25 Feb '20
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/wbemprox/tests/query.c | 746 ++++++++++-----------------------
dlls/wbemprox/tests/services.c | 84 ++--
2 files changed, 249 insertions(+), 581 deletions(-)
diff --git a/dlls/wbemprox/tests/query.c b/dlls/wbemprox/tests/query.c
index 02e4f564e7..77aa5ee882 100644
--- a/dlls/wbemprox/tests/query.c
+++ b/dlls/wbemprox/tests/query.c
@@ -27,15 +27,11 @@
#include "wbemcli.h"
#include "wine/test.h"
-static const WCHAR wqlW[] = {'w','q','l',0};
-
static HRESULT exec_query( IWbemServices *services, const WCHAR *str, IEnumWbemClassObject **result )
{
- static const WCHAR captionW[] = {'C','a','p','t','i','o','n',0};
- static const WCHAR descriptionW[] = {'D','e','s','c','r','i','p','t','i','o','n',0};
HRESULT hr;
IWbemClassObject *obj;
- BSTR wql = SysAllocString( wqlW ), query = SysAllocString( str );
+ BSTR wql = SysAllocString( L"wql" ), query = SysAllocString( str );
LONG flags = WBEM_FLAG_RETURN_IMMEDIATELY | WBEM_FLAG_FORWARD_ONLY;
ULONG count;
@@ -52,12 +48,12 @@ static HRESULT exec_query( IWbemServices *services, const WCHAR *str, IEnumWbemC
IEnumWbemClassObject_Next( *result, 10000, 1, &obj, &count );
if (!count) break;
- if (IWbemClassObject_Get( obj, captionW, 0, &var, NULL, NULL ) == WBEM_S_NO_ERROR)
+ if (IWbemClassObject_Get( obj, L"Caption", 0, &var, NULL, NULL ) == WBEM_S_NO_ERROR)
{
trace("caption: %s\n", wine_dbgstr_w(V_BSTR(&var)));
VariantClear( &var );
}
- if (IWbemClassObject_Get( obj, descriptionW, 0, &var, NULL, NULL ) == WBEM_S_NO_ERROR)
+ if (IWbemClassObject_Get( obj, L"Description", 0, &var, NULL, NULL ) == WBEM_S_NO_ERROR)
{
trace("description: %s\n", wine_dbgstr_w(V_BSTR(&var)));
VariantClear( &var );
@@ -81,61 +77,29 @@ static HRESULT exec_query( IWbemServices *services, const WCHAR *str, IEnumWbemC
static void test_select( IWbemServices *services )
{
- static const WCHAR emptyW[] = {0};
- static const WCHAR sqlW[] = {'S','Q','L',0};
- static const WCHAR query1[] =
- {'S','E','L','E','C','T',' ','H','O','T','F','I','X','I','D',' ','F','R','O','M',' ',
- 'W','i','n','3','2','_','Q','u','i','c','k','F','i','x','E','n','g','i','n','e','e','r','i','n','g',0};
- static const WCHAR query2[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_','B','I','O','S',0};
- static const WCHAR query3[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_',
- 'L','o','g','i','c','a','l','D','i','s','k',' ','W','H','E','R','E',' ',
- '\"','N','T','F','S','\"',' ','=',' ','F','i','l','e','S','y','s','t','e','m',0};
- static const WCHAR query4[] =
- {'S','E','L','E','C','T',' ','a',' ','F','R','O','M',' ','b',0};
- static const WCHAR query5[] =
- {'S','E','L','E','C','T',' ','a',' ','F','R','O','M',' ','W','i','n','3','2','_','B','i','o','s',0};
- static const WCHAR query6[] =
- {'S','E','L','E','C','T',' ','D','e','s','c','r','i','p','t','i','o','n',' ','F','R','O','M',' ',
- 'W','i','n','3','2','_','B','i','o','s',0};
- static const WCHAR query7[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_',
- 'P','r','o','c','e','s','s',' ','W','H','E','R','E',' ','C','a','p','t','i','o','n',' ',
- 'L','I','K','E',' ','\'','%','%','R','E','G','E','D','I','T','%','\'',0};
- static const WCHAR query8[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_',
- 'D','i','s','k','D','r','i','v','e',' ','W','H','E','R','E',' ','D','e','v','i','c','e','I','D','=',
- '\"','\\','\\','\\','\\','.','\\','\\','P','H','Y','S','I','C','A','L','D','R','I','V','E','0','\"',0};
- static const WCHAR query9[] =
- {'S','E','L','E','C','T','\n','a','\r','F','R','O','M','\t','b',0};
- static const WCHAR query10[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_',
- 'P','r','o','c','e','s','s',' ','W','H','E','R','E',' ','C','a','p','t','i','o','n',' ',
- 'L','I','K','E',' ','"','%','f','i','r','e','f','o','x','.','e','x','e','"',0};
- static const WCHAR query11[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
- 'W','i','n','3','2','_','V','i','d','e','o','C','o','n','t','r','o','l','l','e','r',' ','w','h','e','r','e',' ',
- 'a','v','a','i','l','a','b','i','l','i','t','y',' ','=',' ','\'','3','\'',0};
- static const WCHAR query12[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_','B','I','O','S',
- ' ','W','H','E','R','E',' ','N','A','M','E',' ','<','>',' ','N','U','L','L', 0};
- static const WCHAR query13[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_','B','I','O','S',
- ' ','W','H','E','R','E',' ','N','U','L','L',' ','=',' ','N','A','M','E', 0};
- static const WCHAR query14[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_',
- 'L','o','g','i','c','a','l','D','i','s','k','T','o','P','a','r','t','i','t','i','o','n',0};
- static const WCHAR query15[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_',
- 'D','i','s','k','D','r','i','v','e','T','o','D','i','s','k','P','a','r','t','i','t','i','o','n',0};
- static const WCHAR *test[] = { query1, query2, query3, query4, query5, query6, query7, query8, query9, query10,
- query11, query12, query13, query14, query15 };
+ static const WCHAR *test[] =
+ {
+ L"SELECT HOTFIXID FROM Win32_QuickFixEngineering",
+ L"SELECT * FROM Win32_BIOS",
+ L"SELECT * FROM Win32_LogicalDisk WHERE \"NTFS\" = FileSystem",
+ L"SELECT a FROM b",
+ L"SELECT a FROM Win32_Bios",
+ L"SELECT Description FROM Win32_Bios",
+ L"SELECT * FROM Win32_Process WHERE Caption LIKE '%%REGEDIT%'",
+ L"SELECT * FROM Win32_DiskDrive WHERE DeviceID=\"\\\\\\\\.\\\\PHYSICALDRIVE0\"",
+ L"SELECT\na\rFROM\tb",
+ L"SELECT * FROM Win32_Process WHERE Caption LIKE \"%firefox.exe\"",
+ L"SELECT * FROM Win32_VideoController where availability = '3'",
+ L"SELECT * FROM Win3_BIOS WHERE NAME <> NULL",
+ L"SELECT * FROM Win32_BIOS WHERE NULL = NAME",
+ L"SELECT * FROM Win32_LogicalDiskToPartition",
+ L"SELECT * FROM Win32_DiskDriveToDiskPartition",
+ };
HRESULT hr;
IEnumWbemClassObject *result;
- BSTR wql = SysAllocString( wqlW );
- BSTR sql = SysAllocString( sqlW );
- BSTR query = SysAllocString( query1 );
+ BSTR wql = SysAllocString( L"wql" );
+ BSTR sql = SysAllocString( L"SQL" );
+ BSTR query = SysAllocString( L"SELECT * FROM Win32_BIOS" );
UINT i;
hr = IWbemServices_ExecQuery( services, NULL, NULL, 0, NULL, &result );
@@ -154,7 +118,7 @@ static void test_select( IWbemServices *services )
ok( hr == WBEM_E_INVALID_PARAMETER, "query failed %08x\n", hr );
SysFreeString( query );
- query = SysAllocString( emptyW );
+ query = SysAllocString( L"" );
hr = IWbemServices_ExecQuery( services, wql, query, 0, NULL, &result );
ok( hr == WBEM_E_INVALID_PARAMETER, "query failed %08x\n", hr );
@@ -172,38 +136,16 @@ static void test_select( IWbemServices *services )
static void test_associators( IWbemServices *services )
{
- static const WCHAR query1[] =
- {'A','S','S','O','C','I','A','T','O','R','S',' ',' ','O','F','{','W','i','n','3','2','_',
- 'L','o','g','i','c','a','l','D','i','s','k','.','D','e','v','i','c','e','I','D','=','"','C',':','"','}',0};
- static const WCHAR query2[] =
- {'A','S','S','O','C','I','A','T','O','R','S',' ','O','F',' ','{','W','i','n','3','2','_',
- 'L','o','g','i','c','a','l','D','i','s','k','.','D','e','v','i','c','e','I','D','=','"','C',':','"','}',' ',
- 'W','H','E','R','E',' ','A','s','s','o','c','C','l','a','s','s','=','W','i','n','3','2','_',
- 'L','o','g','i','c','a','l','D','i','s','k','T','o','P','a','r','t','i','t','i','o','n',0};
- static const WCHAR query3[] =
- {'A','S','S','O','C','I','A','T','O','R','S',' ',' ','O','F',' ','{','W','i','n','3','2','_',
- 'L','o','g','i','c','a','l','D','i','s','k','.','D','e','v','i','c','e','I','D','}',0};
- static const WCHAR query4[] =
- {'A','S','S','O','C','I','A','T','O','R','S',' ',' ','O','F',' ','{','W','i','n','3','2','_',
- 'D','i','s','k','D','r','i','v','e','.','D','e','v','i','c','e','I','D','=',
- '\'','\\','\\','.','\\','P','H','Y','S','I','C','A','L','D','R','I','V','E','0','\'','}',0};
- static const WCHAR query5[] =
- {'A','S','S','O','C','I','A','T','O','R','S',' ','O','F',' ','{','W','i','n','3','2','_',
- 'L','o','g','i','c','a','l','D','i','s','k','.','D','e','v','i','c','e','I','D','=','"','C',':','"','}',' ',
- 'W','H','E','R','E',' ','A','s','s','o','c','C','l','a','s','s','=','W','i','n','3','2','_',
- 'L','o','g','i','c','a','l','D','i','s','k','T','o','P','a','r','t','i','t','i','o','n',' ',
- 'C','l','a','s','s','D','e','f','s','O','n','l','y',0};
- static const WCHAR query6[] =
- {'A','S','S','O','C','I','A','T','O','R','S',' ','O','F',' ','{','W','i','n','3','2','_',
- 'L','o','g','i','c','a','l','D','i','s','k','.','D','e','v','i','c','e','I','D','=','"','C',':','"','}',' ',
- 'W','H','E','R','E',' ','C','l','a','s','s','D','e','f','s','O','n','l','y',0};
- static const WCHAR query7[] =
- {'A','S','S','O','C','I','A','T','O','R','S',' ','O','F',' ','{','W','i','n','3','2','_',
- 'L','o','g','i','c','a','l','D','i','s','k','.','D','e','v','i','c','e','I','D','=','"','C',':','"','}',' ',
- 'W','H','E','R','E',' ','C','l','a','s','s','D','e','f','s','O','n','l','y',' ',
- 'A','s','s','o','c','C','l','a','s','s',' ','=',' ','W','i','n','3','2','_',
- 'L','o','g','i','c','a','l','D','i','s','k','T','o','P','a','r','t','i','t','i','o','n',0};
- static const WCHAR *test[] = { query1, query2, query3, query4, query5, query6, query7 };
+ static const WCHAR *test[] =
+ {
+ L"ASSOCIATORS OF{Win32_LogicalDisk.DeviceID=\"C:\"}",
+ L"ASSOCIATORS OF {Win32_LogicalDisk.DeviceID=\"C:\"} WHERE AssocClass=Win32_LogicalDiskToPartition",
+ L"ASSOCIATORS OF {Win32_LogicalDisk.DeviceID}",
+ L"ASSOCIATORS OF {Win32_DiskDrive.DeviceID='\\\\.\\PHYSICALDRIVE0'}",
+ L"ASSOCIATORS OF {Win32_LogicalDisk.DeviceID=\"C:\"} WHERE AssocClass=Win32_LogicalDiskToPartition ClassDefsOnly",
+ L"ASSOCIATORS OF {Win32_LogicalDisk.DeviceID=\"C:\"} WHERE ClassDefsOnly",
+ L"ASSOCIATORS OF {Win32_LogicalDisk.DeviceID=\"C:\"} WHERE ClassDefsOnly AssocClass = Win32_LogicalDiskToPartition",
+ };
HRESULT hr;
IEnumWbemClassObject *result;
UINT i;
@@ -250,18 +192,7 @@ static void _check_property( ULONG line, IWbemClassObject *obj, const WCHAR *pro
static void test_Win32_Service( IWbemServices *services )
{
- static const WCHAR pauseserviceW[] = {'P','a','u','s','e','S','e','r','v','i','c','e',0};
- static const WCHAR processidW[] = {'P','r','o','c','e','s','s','I','D',0};
- static const WCHAR resumeserviceW[] = {'R','e','s','u','m','e','S','e','r','v','i','c','e',0};
- static const WCHAR returnvalueW[] = {'R','e','t','u','r','n','V','a','l','u','e',0};
- static const WCHAR serviceW[] = {'W','i','n','3','2','_','S','e','r','v','i','c','e','.',
- 'N','a','m','e','=','"','S','p','o','o','l','e','r','"',0};
- static const WCHAR startserviceW[] = {'S','t','a','r','t','S','e','r','v','i','c','e',0};
- static const WCHAR stateW[] = {'S','t','a','t','e',0};
- static const WCHAR stoppedW[] = {'S','t','o','p','p','e','d',0};
- static const WCHAR stopserviceW[] = {'S','t','o','p','S','e','r','v','i','c','e',0};
- static const WCHAR emptyW[] = {0};
- BSTR class = SysAllocString( serviceW ), empty = SysAllocString( emptyW ), method;
+ BSTR class = SysAllocString( L"Win32_Service.Name=\"Spooler\"" ), empty = SysAllocString( L"" ), method;
IWbemClassObject *service, *out;
VARIANT state, retval;
CIMTYPE type;
@@ -274,62 +205,62 @@ static void test_Win32_Service( IWbemServices *services )
goto out;
}
- check_property( service, processidW, VT_I4, CIM_UINT32 );
+ check_property( service, L"ProcessID", VT_I4, CIM_UINT32 );
type = 0xdeadbeef;
VariantInit( &state );
- hr = IWbemClassObject_Get( service, stateW, 0, &state, &type, NULL );
+ hr = IWbemClassObject_Get( service, L"State", 0, &state, &type, NULL );
ok( hr == S_OK, "failed to get service state %08x\n", hr );
ok( V_VT( &state ) == VT_BSTR, "unexpected variant type 0x%x\n", V_VT( &state ) );
ok( type == CIM_STRING, "unexpected type 0x%x\n", type );
- if (!lstrcmpW( V_BSTR( &state ), stoppedW ))
+ if (!lstrcmpW( V_BSTR( &state ), L"Stopped" ))
{
out = NULL;
- method = SysAllocString( startserviceW );
+ method = SysAllocString( L"StartService" );
hr = IWbemServices_ExecMethod( services, class, method, 0, NULL, NULL, &out, NULL );
ok( hr == S_OK, "failed to execute method %08x\n", hr );
SysFreeString( method );
VariantInit( &retval );
- hr = IWbemClassObject_Get( out, returnvalueW, 0, &retval, NULL, NULL );
+ hr = IWbemClassObject_Get( out, L"ReturnValue", 0, &retval, NULL, NULL );
ok( hr == S_OK, "failed to get return value %08x\n", hr );
ok( !V_I4( &retval ), "unexpected error %u\n", V_UI4( &retval ) );
IWbemClassObject_Release( out );
}
out = NULL;
- method = SysAllocString( pauseserviceW );
+ method = SysAllocString( L"PauseService" );
hr = IWbemServices_ExecMethod( services, class, method, 0, NULL, NULL, &out, NULL );
ok( hr == S_OK, "failed to execute method %08x\n", hr );
SysFreeString( method );
VariantInit( &retval );
- hr = IWbemClassObject_Get( out, returnvalueW, 0, &retval, NULL, NULL );
+ hr = IWbemClassObject_Get( out, L"ReturnValue", 0, &retval, NULL, NULL );
ok( hr == S_OK, "failed to get return value %08x\n", hr );
ok( V_I4( &retval ), "unexpected success\n" );
IWbemClassObject_Release( out );
out = NULL;
- method = SysAllocString( resumeserviceW );
+ method = SysAllocString( L"ResumeService" );
hr = IWbemServices_ExecMethod( services, class, method, 0, NULL, NULL, &out, NULL );
ok( hr == S_OK, "failed to execute method %08x\n", hr );
SysFreeString( method );
VariantInit( &retval );
- hr = IWbemClassObject_Get( out, returnvalueW, 0, &retval, NULL, NULL );
+ hr = IWbemClassObject_Get( out, L"ReturnValue", 0, &retval, NULL, NULL );
ok( hr == S_OK, "failed to get return value %08x\n", hr );
ok( V_I4( &retval ), "unexpected success\n" );
IWbemClassObject_Release( out );
- if (!lstrcmpW( V_BSTR( &state ), stoppedW ))
+ if (!lstrcmpW( V_BSTR( &state ), L"Stopped" ))
{
out = NULL;
- method = SysAllocString( stopserviceW );
+ method = SysAllocString( L"StopService" );
hr = IWbemServices_ExecMethod( services, class, method, 0, NULL, NULL, &out, NULL );
ok( hr == S_OK, "failed to execute method %08x\n", hr );
SysFreeString( method );
VariantInit( &retval );
- hr = IWbemClassObject_Get( out, returnvalueW, 0, &retval, NULL, NULL );
+ hr = IWbemClassObject_Get( out, L"ReturnValue", 0, &retval, NULL, NULL );
ok( hr == S_OK, "failed to get return value %08x\n", hr );
ok( !V_I4( &retval ), "unexpected error %u\n", V_UI4( &retval ) );
IWbemClassObject_Release( out );
@@ -354,19 +285,7 @@ out:
static void test_Win32_Bios( IWbemServices *services )
{
- static const WCHAR queryW[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_','B','i','o','s',0};
- static const WCHAR descriptionW[] = {'D','e','s','c','r','i','p','t','i','o','n',0};
- static const WCHAR identificationcodeW[] = {'I','d','e','n','t','i','f','i','c','a','t','i','o','n','C','o','d','e',0};
- static const WCHAR manufacturerW[] = {'M','a','n','u','f','a','c','t','u','r','e','r',0};
- static const WCHAR nameW[] = {'N','a','m','e',0};
- static const WCHAR releasedateW[] = {'R','e','l','e','a','s','e','D','a','t','e',0};
- static const WCHAR serialnumberW[] = {'S','e','r','i','a','l','N','u','m','b','e','r',0};
- static const WCHAR smbiosbiosversionW[] = {'S','M','B','I','O','S','B','I','O','S','V','e','r','s','i','o','n',0};
- static const WCHAR smbiosmajorversionW[] = {'S','M','B','I','O','S','M','a','j','o','r','V','e','r','s','i','o','n',0};
- static const WCHAR smbiosminorversionW[] = {'S','M','B','I','O','S','M','i','n','o','r','V','e','r','s','i','o','n',0};
- static const WCHAR versionW[] = {'V','e','r','s','i','o','n',0};
- BSTR wql = SysAllocString( wqlW ), query = SysAllocString( queryW );
+ BSTR wql = SysAllocString( L"wql" ), query = SysAllocString( L"SELECT * FROM Win32_BIOS" );
IEnumWbemClassObject *result;
IWbemClassObject *obj;
CIMTYPE type;
@@ -380,25 +299,25 @@ static void test_Win32_Bios( IWbemServices *services )
hr = IEnumWbemClassObject_Next( result, 10000, 1, &obj, &count );
ok( hr == S_OK, "IEnumWbemClassObject_Next failed %08x\n", hr );
- check_property( obj, descriptionW, VT_BSTR, CIM_STRING );
- check_property( obj, identificationcodeW, VT_NULL, CIM_STRING );
- check_property( obj, manufacturerW, VT_BSTR, CIM_STRING );
- check_property( obj, nameW, VT_BSTR, CIM_STRING );
- check_property( obj, releasedateW, VT_BSTR, CIM_DATETIME );
+ check_property( obj, L"Description", VT_BSTR, CIM_STRING );
+ check_property( obj, L"IdentificationCode", VT_NULL, CIM_STRING );
+ check_property( obj, L"Manufacturer", VT_BSTR, CIM_STRING );
+ check_property( obj, L"Name", VT_BSTR, CIM_STRING );
+ check_property( obj, L"ReleaseDate", VT_BSTR, CIM_DATETIME );
type = 0xdeadbeef;
VariantInit( &val );
- hr = IWbemClassObject_Get( obj, serialnumberW, 0, &val, &type, NULL );
+ hr = IWbemClassObject_Get( obj, L"SerialNumber", 0, &val, &type, NULL );
ok( hr == S_OK, "failed to get serial number %08x\n", hr );
ok( V_VT( &val ) == VT_BSTR || V_VT( &val ) == VT_NULL /* Testbot VMs */,
"unexpected variant type 0x%x\n", V_VT( &val ) );
ok( type == CIM_STRING, "unexpected type 0x%x\n", type );
VariantClear( &val );
- check_property( obj, smbiosbiosversionW, VT_BSTR, CIM_STRING );
- check_property( obj, smbiosmajorversionW, VT_I4, CIM_UINT16 );
- check_property( obj, smbiosminorversionW, VT_I4, CIM_UINT16 );
- check_property( obj, versionW, VT_BSTR, CIM_STRING );
+ check_property( obj, L"SMBIOSBIOSVersion", VT_BSTR, CIM_STRING );
+ check_property( obj, L"SMBIOSMajorVersion", VT_I4, CIM_UINT16 );
+ check_property( obj, L"SMBIOSMinorVersion", VT_I4, CIM_UINT16 );
+ check_property( obj, L"Version", VT_BSTR, CIM_STRING );
IWbemClassObject_Release( obj );
IEnumWbemClassObject_Release( result );
@@ -408,15 +327,7 @@ static void test_Win32_Bios( IWbemServices *services )
static void test_Win32_Baseboard( IWbemServices *services )
{
- static const WCHAR queryW[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_','B','a','s','e','b','o','a','r','d',0};
- static const WCHAR manufacturerW[] = {'M','a','n','u','f','a','c','t','u','r','e','r',0};
- static const WCHAR modelW[] = {'M','o','d','e','l',0};
- static const WCHAR nameW[] = {'N','a','m','e',0};
- static const WCHAR productW[] = {'P','r','o','d','u','c','t',0};
- static const WCHAR tagW[] = {'T','a','g',0};
- static const WCHAR versionW[] = {'V','e','r','s','i','o','n',0};
- BSTR wql = SysAllocString( wqlW ), query = SysAllocString( queryW );
+ BSTR wql = SysAllocString( L"wql" ), query = SysAllocString( L"SELECT * FROM Win32_Baseboard" );
IEnumWbemClassObject *result;
IWbemClassObject *obj;
CIMTYPE type;
@@ -435,21 +346,21 @@ static void test_Win32_Baseboard( IWbemServices *services )
}
ok( hr == S_OK, "IEnumWbemClassObject_Next failed %08x\n", hr );
- check_property( obj, manufacturerW, VT_BSTR, CIM_STRING );
+ check_property( obj, L"Manufacturer", VT_BSTR, CIM_STRING );
type = 0xdeadbeef;
VariantInit( &val );
- hr = IWbemClassObject_Get( obj, modelW, 0, &val, &type, NULL );
+ hr = IWbemClassObject_Get( obj, L"Model", 0, &val, &type, NULL );
ok( hr == S_OK, "failed to get model %08x\n", hr );
ok( V_VT( &val ) == VT_BSTR || V_VT( &val ) == VT_NULL, "unexpected variant type 0x%x\n", V_VT( &val ) );
ok( type == CIM_STRING, "unexpected type 0x%x\n", type );
trace( "model: %s\n", wine_dbgstr_w(V_BSTR(&val)) );
VariantClear( &val );
- check_property( obj, nameW, VT_BSTR, CIM_STRING );
- check_property( obj, productW, VT_BSTR, CIM_STRING );
- check_property( obj, tagW, VT_BSTR, CIM_STRING );
- check_property( obj, versionW, VT_BSTR, CIM_STRING );
+ check_property( obj, L"Name", VT_BSTR, CIM_STRING );
+ check_property( obj, L"Product", VT_BSTR, CIM_STRING );
+ check_property( obj, L"Tag", VT_BSTR, CIM_STRING );
+ check_property( obj, L"Version", VT_BSTR, CIM_STRING );
IWbemClassObject_Release( obj );
IEnumWbemClassObject_Release( result );
@@ -459,20 +370,10 @@ static void test_Win32_Baseboard( IWbemServices *services )
static void test_Win32_Process( IWbemServices *services, BOOL use_full_path )
{
- static const WCHAR returnvalueW[] = {'R','e','t','u','r','n','V','a','l','u','e',0};
- static const WCHAR getownerW[] = {'G','e','t','O','w','n','e','r',0};
- static const WCHAR userW[] = {'U','s','e','r',0};
- static const WCHAR domainW[] = {'D','o','m','a','i','n',0};
- static const WCHAR processW[] = {'W','i','n','3','2','_','P','r','o','c','e','s','s',0};
- static const WCHAR idW[] = {'I','D',0};
- static const WCHAR fmtW[] = {'W','i','n','3','2','_','P','r','o','c','e','s','s','.',
- 'H','a','n','d','l','e','=','"','%','u','"',0};
- static const WCHAR full_path_fmt[] =
- {'\\','\\','%','s','\\','R','O','O','T','\\','C','I','M','V','2',':',0};
static const LONG expected_flavor = WBEM_FLAVOR_FLAG_PROPAGATE_TO_INSTANCE |
WBEM_FLAVOR_NOT_OVERRIDABLE |
WBEM_FLAVOR_ORIGIN_PROPAGATED;
- WCHAR full_path[MAX_COMPUTERNAME_LENGTH + ARRAY_SIZE(full_path_fmt)];
+ WCHAR full_path[MAX_COMPUTERNAME_LENGTH + ARRAY_SIZE( L"\\\\%s\\ROOT\\CIMV2:" )];
BSTR class, method;
IWbemClassObject *process, *sig_in, *out;
IWbemQualifierSet *qualifiers;
@@ -488,12 +389,12 @@ static void test_Win32_Process( IWbemServices *services, BOOL use_full_path )
full_path_len = ARRAY_SIZE(server);
ok( GetComputerNameW(server, &full_path_len), "GetComputerName failed\n" );
- full_path_len = wsprintfW(full_path, full_path_fmt, server);
+ full_path_len = wsprintfW( full_path, L"\\\\%s\\ROOT\\CIMV2:", server );
}
- class = SysAllocStringLen( NULL, full_path_len + ARRAY_SIZE( processW ) );
+ class = SysAllocStringLen( NULL, full_path_len + ARRAY_SIZE( L"Win32_Process" ) );
memcpy( class, full_path, full_path_len * sizeof(WCHAR) );
- memcpy( class + full_path_len, processW, sizeof(processW) );
+ memcpy( class + full_path_len, L"Win32_Process", sizeof(L"Win32_Process") );
hr = IWbemServices_GetObject( services, class, 0, NULL, &process, NULL );
SysFreeString( class );
if (hr != S_OK)
@@ -502,16 +403,16 @@ static void test_Win32_Process( IWbemServices *services, BOOL use_full_path )
return;
}
sig_in = (void*)0xdeadbeef;
- hr = IWbemClassObject_GetMethod( process, getownerW, 0, &sig_in, NULL );
+ hr = IWbemClassObject_GetMethod( process, L"GetOwner", 0, &sig_in, NULL );
ok( hr == S_OK, "failed to get GetOwner method %08x\n", hr );
ok( !sig_in, "sig_in != NULL\n");
IWbemClassObject_Release( process );
out = NULL;
- method = SysAllocString( getownerW );
- class = SysAllocStringLen( NULL, full_path_len + ARRAY_SIZE( fmtW ) + 10 );
+ method = SysAllocString( L"GetOwner" );
+ class = SysAllocStringLen( NULL, full_path_len + ARRAY_SIZE( L"Win32_Process.Handle=\"%u\"" ) + 10 );
memcpy( class, full_path, full_path_len * sizeof(WCHAR) );
- wsprintfW( class + full_path_len, fmtW, GetCurrentProcessId() );
+ wsprintfW( class + full_path_len, L"Win32_Process.Handle=\"%u\"", GetCurrentProcessId() );
hr = IWbemServices_ExecMethod( services, class, method, 0, NULL, NULL, &out, NULL );
ok( hr == S_OK, "failed to execute method %08x\n", hr );
SysFreeString( method );
@@ -519,22 +420,22 @@ static void test_Win32_Process( IWbemServices *services, BOOL use_full_path )
type = 0xdeadbeef;
VariantInit( &retval );
- hr = IWbemClassObject_Get( out, returnvalueW, 0, &retval, &type, NULL );
+ hr = IWbemClassObject_Get( out, L"ReturnValue", 0, &retval, &type, NULL );
ok( hr == S_OK, "failed to get return value %08x\n", hr );
ok( V_VT( &retval ) == VT_I4, "unexpected variant type 0x%x\n", V_VT( &retval ) );
ok( !V_I4( &retval ), "unexpected error %u\n", V_I4( &retval ) );
ok( type == CIM_UINT32, "unexpected type 0x%x\n", type );
- check_property( out, userW, VT_BSTR, CIM_STRING );
- check_property( out, domainW, VT_BSTR, CIM_STRING );
+ check_property( out, L"User", VT_BSTR, CIM_STRING );
+ check_property( out, L"Domain", VT_BSTR, CIM_STRING );
- hr = IWbemClassObject_GetPropertyQualifierSet( out, userW, &qualifiers );
+ hr = IWbemClassObject_GetPropertyQualifierSet( out, L"User", &qualifiers );
ok( hr == S_OK, "failed to get qualifier set %08x\n", hr );
flavor = -1;
V_I4(&val) = -1;
V_VT(&val) = VT_ERROR;
- hr = IWbemQualifierSet_Get( qualifiers, idW, 0, &val, &flavor );
+ hr = IWbemQualifierSet_Get( qualifiers, L"ID", 0, &val, &flavor );
ok( hr == S_OK, "got %08x\n", hr );
ok( flavor == expected_flavor, "got %d\n", flavor );
ok( V_VT(&val) == VT_I4, "got %u\n", V_VT(&val) );
@@ -542,13 +443,13 @@ static void test_Win32_Process( IWbemServices *services, BOOL use_full_path )
VariantClear( &val );
IWbemQualifierSet_Release( qualifiers );
- hr = IWbemClassObject_GetPropertyQualifierSet( out, domainW, &qualifiers );
+ hr = IWbemClassObject_GetPropertyQualifierSet( out, L"Domain", &qualifiers );
ok( hr == S_OK, "failed to get qualifier set %08x\n", hr );
flavor = -1;
V_I4(&val) = -1;
V_VT(&val) = VT_ERROR;
- hr = IWbemQualifierSet_Get( qualifiers, idW, 0, &val, &flavor );
+ hr = IWbemQualifierSet_Get( qualifiers, L"ID", 0, &val, &flavor );
ok( hr == S_OK, "got %08x\n", hr );
ok( flavor == expected_flavor, "got %d\n", flavor );
ok( V_VT(&val) == VT_I4, "got %u\n", V_VT(&val) );
@@ -556,10 +457,10 @@ static void test_Win32_Process( IWbemServices *services, BOOL use_full_path )
VariantClear( &val );
IWbemQualifierSet_Release( qualifiers );
- hr = IWbemClassObject_GetPropertyQualifierSet( out, returnvalueW, &qualifiers );
+ hr = IWbemClassObject_GetPropertyQualifierSet( out, L"ReturnValue", &qualifiers );
ok( hr == S_OK, "failed to get qualifier set %08x\n", hr );
- hr = IWbemQualifierSet_Get( qualifiers, idW, 0, &val, &flavor );
+ hr = IWbemQualifierSet_Get( qualifiers, L"ID", 0, &val, &flavor );
ok( hr == WBEM_E_NOT_FOUND, "got %08x\n", hr );
IWbemQualifierSet_Release( qualifiers );
@@ -568,19 +469,7 @@ static void test_Win32_Process( IWbemServices *services, BOOL use_full_path )
static void test_Win32_ComputerSystem( IWbemServices *services )
{
- static const WCHAR backslashW[] = {'\\',0};
- static const WCHAR memorytypeW[] = {'M','e','m','o','r','y','T','y','p','e',0};
- static const WCHAR modelW[] = {'M','o','d','e','l',0};
- static const WCHAR nameW[] = {'N','a','m','e',0};
- static const WCHAR usernameW[] = {'U','s','e','r','N','a','m','e',0};
- static const WCHAR numprocessorsW[] =
- {'N','u','m','b','e','r','O','f','P','r','o','c','e','s','s','o','r','s',0};
- static const WCHAR numlogicalprocessorsW[] =
- {'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 queryW[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_',
- 'C','o','m','p','u','t','e','r','S','y','s','t','e','m',0};
- BSTR wql = SysAllocString( wqlW ), query = SysAllocString( queryW );
+ BSTR wql = SysAllocString( L"wql" ), query = SysAllocString( L"SELECT * FROM Win32_ComputerSystem" );
IEnumWbemClassObject *result;
IWbemClassObject *obj;
VARIANT value;
@@ -595,7 +484,7 @@ static void test_Win32_ComputerSystem( IWbemServices *services )
compname[0] = 0;
lstrcpyW( username, compname );
- lstrcatW( username, backslashW );
+ lstrcatW( username, L"\\" );
len = ARRAY_SIZE( username ) - lstrlenW( username );
if (!GetUserNameW( username + lstrlenW( username ), &len ))
username[0] = 0;
@@ -618,14 +507,14 @@ static void test_Win32_ComputerSystem( IWbemServices *services )
type = 0xdeadbeef;
VariantInit( &value );
- hr = IWbemClassObject_Get( obj, memorytypeW, 0, &value, &type, NULL );
+ hr = IWbemClassObject_Get( obj, L"MemoryType", 0, &value, &type, NULL );
ok( hr == WBEM_E_NOT_FOUND, "got %08x\n", hr );
- check_property( obj, modelW, VT_BSTR, CIM_STRING );
+ check_property( obj, L"Model", VT_BSTR, CIM_STRING );
type = 0xdeadbeef;
VariantInit( &value );
- hr = IWbemClassObject_Get( obj, nameW, 0, &value, &type, NULL );
+ hr = IWbemClassObject_Get( obj, L"Name", 0, &value, &type, NULL );
ok( hr == S_OK, "failed to get computer name %08x\n", hr );
ok( V_VT( &value ) == VT_BSTR, "unexpected variant type 0x%x\n", V_VT( &value ) );
ok( type == CIM_STRING, "unexpected type 0x%x\n", type );
@@ -634,7 +523,7 @@ static void test_Win32_ComputerSystem( IWbemServices *services )
type = 0xdeadbeef;
VariantInit( &value );
- hr = IWbemClassObject_Get( obj, numlogicalprocessorsW, 0, &value, &type, NULL );
+ hr = IWbemClassObject_Get( obj, L"NumberOfLogicalProcessors", 0, &value, &type, NULL );
ok( hr == S_OK || broken(hr == WBEM_E_NOT_FOUND) /* win2k3 */, "got %08x\n", hr );
if (hr == S_OK)
{
@@ -643,11 +532,11 @@ static void test_Win32_ComputerSystem( IWbemServices *services )
trace( "numlogicalprocessors %u\n", V_I4( &value ) );
}
- check_property( obj, numprocessorsW, VT_I4, CIM_UINT32 );
+ check_property( obj, L"NumberOfProcessors", VT_I4, CIM_UINT32 );
type = 0xdeadbeef;
VariantInit( &value );
- hr = IWbemClassObject_Get( obj, usernameW, 0, &value, &type, NULL );
+ hr = IWbemClassObject_Get( obj, L"UserName", 0, &value, &type, NULL );
ok( hr == S_OK, "failed to get computer name %08x\n", hr );
ok( V_VT( &value ) == VT_BSTR, "unexpected variant type 0x%x\n", V_VT( &value ) );
ok( type == CIM_STRING, "unexpected type 0x%x\n", type );
@@ -663,17 +552,7 @@ out:
static void test_Win32_SystemEnclosure( IWbemServices *services )
{
- static const WCHAR queryW[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_',
- 'S','y','s','t','e','m','E','n','c','l','o','s','u','r','e',0};
- static const WCHAR captionW[] = {'C','a','p','t','i','o','n',0};
- static const WCHAR chassistypesW[] = {'C','h','a','s','s','i','s','T','y','p','e','s',0};
- static const WCHAR descriptionW[] = {'D','e','s','c','r','i','p','t','i','o','n',0};
- static const WCHAR lockpresentW[] = {'L','o','c','k','P','r','e','s','e','n','t',0};
- static const WCHAR manufacturerW[] = {'M','a','n','u','f','a','c','t','u','r','e','r',0};
- static const WCHAR nameW[] = {'N','a','m','e',0};
- static const WCHAR tagW[] = {'T','a','g',0};
- BSTR wql = SysAllocString( wqlW ), query = SysAllocString( queryW );
+ BSTR wql = SysAllocString( L"wql" ), query = SysAllocString( L"SELECT * FROM Win32_SystemEnclosure" );
IEnumWbemClassObject *result;
IWbemClassObject *obj;
CIMTYPE type;
@@ -688,11 +567,11 @@ static void test_Win32_SystemEnclosure( IWbemServices *services )
hr = IEnumWbemClassObject_Next( result, 10000, 1, &obj, &count );
ok( hr == S_OK, "IEnumWbemClassObject_Next failed %08x\n", hr );
- check_property( obj, captionW, VT_BSTR, CIM_STRING );
+ check_property( obj, L"Caption", VT_BSTR, CIM_STRING );
type = 0xdeadbeef;
VariantInit( &val );
- hr = IWbemClassObject_Get( obj, chassistypesW, 0, &val, &type, NULL );
+ hr = IWbemClassObject_Get( obj, L"ChassisTypes", 0, &val, &type, NULL );
ok( hr == S_OK, "failed to get chassis types %08x\n", hr );
ok( V_VT( &val ) == (VT_I4|VT_ARRAY), "unexpected variant type 0x%x\n", V_VT( &val ) );
ok( type == (CIM_UINT16|CIM_FLAG_ARRAY), "unexpected type 0x%x\n", type );
@@ -716,11 +595,11 @@ static void test_Win32_SystemEnclosure( IWbemServices *services )
}
VariantClear( &val );
- check_property( obj, descriptionW, VT_BSTR, CIM_STRING );
- check_property( obj, lockpresentW, VT_BOOL, CIM_BOOLEAN );
- check_property( obj, manufacturerW, VT_BSTR, CIM_STRING );
- check_property( obj, nameW, VT_BSTR, CIM_STRING );
- check_property( obj, tagW, VT_BSTR, CIM_STRING );
+ check_property( obj, L"Description", VT_BSTR, CIM_STRING );
+ check_property( obj, L"LockPresent", VT_BOOL, CIM_BOOLEAN );
+ check_property( obj, L"Manufacturer", VT_BSTR, CIM_STRING );
+ check_property( obj, L"Name", VT_BSTR, CIM_STRING );
+ check_property( obj, L"Tag", VT_BSTR, CIM_STRING );
IWbemClassObject_Release( obj );
IEnumWbemClassObject_Release( result );
@@ -730,25 +609,7 @@ static void test_Win32_SystemEnclosure( IWbemServices *services )
static void test_StdRegProv( IWbemServices *services )
{
- static const WCHAR createkeyW[] = {'C','r','e','a','t','e','K','e','y',0};
- static const WCHAR enumkeyW[] = {'E','n','u','m','K','e','y',0};
- static const WCHAR enumvaluesW[] = {'E','n','u','m','V','a','l','u','e','s',0};
- static const WCHAR getstringvalueW[] = {'G','e','t','S','t','r','i','n','g','V','a','l','u','e',0};
- static const WCHAR stdregprovW[] = {'S','t','d','R','e','g','P','r','o','v',0};
- static const WCHAR defkeyW[] = {'h','D','e','f','K','e','y',0};
- static const WCHAR subkeynameW[] = {'s','S','u','b','K','e','y','N','a','m','e',0};
- static const WCHAR returnvalueW[] = {'R','e','t','u','r','n','V','a','l','u','e',0};
- static const WCHAR namesW[] = {'s','N','a','m','e','s',0};
- static const WCHAR typesW[] = {'T','y','p','e','s',0};
- static const WCHAR valueW[] = {'s','V','a','l','u','e',0};
- static const WCHAR valuenameW[] = {'s','V','a','l','u','e','N','a','m','e',0};
- static const WCHAR programfilesW[] = {'P','r','o','g','r','a','m','F','i','l','e','s','D','i','r',0};
- static const WCHAR windowsW[] =
- {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\',
- 'W','i','n','d','o','w','s','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n',0};
- static const WCHAR regtestW[] =
- {'S','o','f','t','w','a','r','e','\\','S','t','d','R','e','g','P','r','o','v','T','e','s','t',0};
- BSTR class = SysAllocString( stdregprovW ), method, name;
+ BSTR class = SysAllocString( L"StdRegProv" ), method, name;
IWbemClassObject *reg, *sig_in, *sig_out, *in, *out;
VARIANT defkey, subkey, retval, valuename;
CIMTYPE type;
@@ -784,7 +645,7 @@ static void test_StdRegProv( IWbemServices *services )
hr = IWbemClassObject_EndEnumeration( reg );
ok( hr == S_OK, "got %08x\n", hr );
- hr = IWbemClassObject_GetMethod( reg, createkeyW, 0, &sig_in, NULL );
+ hr = IWbemClassObject_GetMethod( reg, L"CreateKey", 0, &sig_in, NULL );
ok( hr == S_OK, "failed to get CreateKey method %08x\n", hr );
hr = IWbemClassObject_SpawnInstance( sig_in, 0, &in );
@@ -792,29 +653,29 @@ static void test_StdRegProv( IWbemServices *services )
V_VT( &defkey ) = VT_I4;
V_I4( &defkey ) = 0x80000001;
- hr = IWbemClassObject_Put( in, defkeyW, 0, &defkey, 0 );
+ hr = IWbemClassObject_Put( in, L"hDefKey", 0, &defkey, 0 );
ok( hr == S_OK, "failed to set root %08x\n", hr );
V_VT( &subkey ) = VT_BSTR;
- V_BSTR( &subkey ) = SysAllocString( regtestW );
- hr = IWbemClassObject_Put( in, subkeynameW, 0, &subkey, 0 );
+ V_BSTR( &subkey ) = SysAllocString( L"Software\\StdRegProvTest" );
+ hr = IWbemClassObject_Put( in, L"sSubKeyName", 0, &subkey, 0 );
ok( hr == S_OK, "failed to set subkey %08x\n", hr );
out = NULL;
- method = SysAllocString( createkeyW );
+ method = SysAllocString( L"CreateKey" );
hr = IWbemServices_ExecMethod( services, class, method, 0, NULL, in, &out, NULL );
ok( hr == S_OK, "failed to execute method %08x\n", hr );
SysFreeString( method );
type = 0xdeadbeef;
VariantInit( &retval );
- hr = IWbemClassObject_Get( out, returnvalueW, 0, &retval, &type, NULL );
+ hr = IWbemClassObject_Get( out, L"ReturnValue", 0, &retval, &type, NULL );
ok( hr == S_OK, "failed to get return value %08x\n", hr );
ok( V_VT( &retval ) == VT_I4, "unexpected variant type 0x%x\n", V_VT( &retval ) );
ok( !V_I4( &retval ), "unexpected error %u\n", V_UI4( &retval ) );
ok( type == CIM_UINT32, "unexpected type 0x%x\n", type );
- res = RegDeleteKeyW( HKEY_CURRENT_USER, regtestW );
+ res = RegDeleteKeyW( HKEY_CURRENT_USER, L"Software\\StdRegProvTest" );
ok( !res, "got %d\n", res );
VariantClear( &subkey );
@@ -822,7 +683,7 @@ static void test_StdRegProv( IWbemServices *services )
IWbemClassObject_Release( out );
IWbemClassObject_Release( sig_in );
- hr = IWbemClassObject_GetMethod( reg, enumkeyW, 0, &sig_in, NULL );
+ hr = IWbemClassObject_GetMethod( reg, L"EnumKey", 0, &sig_in, NULL );
ok( hr == S_OK, "failed to get EnumKey method %08x\n", hr );
hr = IWbemClassObject_SpawnInstance( sig_in, 0, &in );
@@ -830,36 +691,36 @@ static void test_StdRegProv( IWbemServices *services )
V_VT( &defkey ) = VT_I4;
V_I4( &defkey ) = 0x80000002;
- hr = IWbemClassObject_Put( in, defkeyW, 0, &defkey, 0 );
+ hr = IWbemClassObject_Put( in, L"hDefKey", 0, &defkey, 0 );
ok( hr == S_OK, "failed to set root %08x\n", hr );
V_VT( &subkey ) = VT_BSTR;
- V_BSTR( &subkey ) = SysAllocString( windowsW );
- hr = IWbemClassObject_Put( in, subkeynameW, 0, &subkey, 0 );
+ V_BSTR( &subkey ) = SysAllocString( L"Software\\microsoft\\Windows\\CurrentVersion" );
+ hr = IWbemClassObject_Put( in, L"sSubKeyName", 0, &subkey, 0 );
ok( hr == S_OK, "failed to set subkey %08x\n", hr );
out = NULL;
- method = SysAllocString( enumkeyW );
+ method = SysAllocString( L"EnumKey" );
hr = IWbemServices_ExecMethod( services, class, method, 0, NULL, in, &out, NULL );
ok( hr == S_OK, "failed to execute method %08x\n", hr );
SysFreeString( method );
type = 0xdeadbeef;
VariantInit( &retval );
- hr = IWbemClassObject_Get( out, returnvalueW, 0, &retval, &type, NULL );
+ hr = IWbemClassObject_Get( out, L"ReturnValue", 0, &retval, &type, NULL );
ok( hr == S_OK, "failed to get return value %08x\n", hr );
ok( V_VT( &retval ) == VT_I4, "unexpected variant type 0x%x\n", V_VT( &retval ) );
ok( !V_I4( &retval ), "unexpected error %u\n", V_UI4( &retval ) );
ok( type == CIM_UINT32, "unexpected type 0x%x\n", type );
- check_property( out, namesW, VT_BSTR|VT_ARRAY, CIM_STRING|CIM_FLAG_ARRAY );
+ check_property( out, L"sNames", VT_BSTR|VT_ARRAY, CIM_STRING|CIM_FLAG_ARRAY );
VariantClear( &subkey );
IWbemClassObject_Release( in );
IWbemClassObject_Release( out );
IWbemClassObject_Release( sig_in );
- hr = IWbemClassObject_GetMethod( reg, enumvaluesW, 0, &sig_in, NULL );
+ hr = IWbemClassObject_GetMethod( reg, L"EnumValues", 0, &sig_in, NULL );
ok( hr == S_OK, "failed to get EnumValues method %08x\n", hr );
hr = IWbemClassObject_SpawnInstance( sig_in, 0, &in );
@@ -867,37 +728,37 @@ static void test_StdRegProv( IWbemServices *services )
V_VT( &defkey ) = VT_I4;
V_I4( &defkey ) = 0x80000002;
- hr = IWbemClassObject_Put( in, defkeyW, 0, &defkey, 0 );
+ hr = IWbemClassObject_Put( in, L"hDefKey", 0, &defkey, 0 );
ok( hr == S_OK, "failed to set root %08x\n", hr );
V_VT( &subkey ) = VT_BSTR;
- V_BSTR( &subkey ) = SysAllocString( windowsW );
- hr = IWbemClassObject_Put( in, subkeynameW, 0, &subkey, 0 );
+ V_BSTR( &subkey ) = SysAllocString( L"Software\\microsoft\\Windows\\CurrentVersion" );
+ hr = IWbemClassObject_Put( in, L"sSubKeyName", 0, &subkey, 0 );
ok( hr == S_OK, "failed to set subkey %08x\n", hr );
out = NULL;
- method = SysAllocString( enumvaluesW );
+ method = SysAllocString( L"EnumValues" );
hr = IWbemServices_ExecMethod( services, class, method, 0, NULL, in, &out, NULL );
ok( hr == S_OK, "failed to execute method %08x\n", hr );
SysFreeString( method );
type = 0xdeadbeef;
VariantInit( &retval );
- hr = IWbemClassObject_Get( out, returnvalueW, 0, &retval, &type, NULL );
+ hr = IWbemClassObject_Get( out, L"ReturnValue", 0, &retval, &type, NULL );
ok( hr == S_OK, "failed to get return value %08x\n", hr );
ok( V_VT( &retval ) == VT_I4, "unexpected variant type 0x%x\n", V_VT( &retval ) );
ok( !V_I4( &retval ), "unexpected error %u\n", V_I4( &retval ) );
ok( type == CIM_UINT32, "unexpected type 0x%x\n", type );
- check_property( out, namesW, VT_BSTR|VT_ARRAY, CIM_STRING|CIM_FLAG_ARRAY );
- check_property( out, typesW, VT_I4|VT_ARRAY, CIM_SINT32|CIM_FLAG_ARRAY );
+ check_property( out, L"sNames", VT_BSTR|VT_ARRAY, CIM_STRING|CIM_FLAG_ARRAY );
+ check_property( out, L"Types", VT_I4|VT_ARRAY, CIM_SINT32|CIM_FLAG_ARRAY );
VariantClear( &subkey );
IWbemClassObject_Release( in );
IWbemClassObject_Release( out );
IWbemClassObject_Release( sig_in );
- hr = IWbemClassObject_GetMethod( reg, getstringvalueW, 0, &sig_in, NULL );
+ hr = IWbemClassObject_GetMethod( reg, L"GetStringValue", 0, &sig_in, NULL );
ok( hr == S_OK, "failed to get GetStringValue method %08x\n", hr );
hr = IWbemClassObject_SpawnInstance( sig_in, 0, &in );
@@ -905,34 +766,34 @@ static void test_StdRegProv( IWbemServices *services )
V_VT( &defkey ) = VT_I4;
V_I4( &defkey ) = 0x80000002;
- hr = IWbemClassObject_Put( in, defkeyW, 0, &defkey, 0 );
+ hr = IWbemClassObject_Put( in, L"hDefKey", 0, &defkey, 0 );
ok( hr == S_OK, "failed to set root %08x\n", hr );
V_VT( &subkey ) = VT_BSTR;
- V_BSTR( &subkey ) = SysAllocString( windowsW );
- hr = IWbemClassObject_Put( in, subkeynameW, 0, &subkey, 0 );
+ V_BSTR( &subkey ) = SysAllocString( L"Software\\microsoft\\Windows\\CurrentVersion" );
+ hr = IWbemClassObject_Put( in, L"sSubKeyName", 0, &subkey, 0 );
ok( hr == S_OK, "failed to set subkey %08x\n", hr );
V_VT( &valuename ) = VT_BSTR;
- V_BSTR( &valuename ) = SysAllocString( programfilesW );
- hr = IWbemClassObject_Put( in, valuenameW, 0, &valuename, 0 );
+ V_BSTR( &valuename ) = SysAllocString( L"ProgramFilesDir" );
+ hr = IWbemClassObject_Put( in, L"sValueName", 0, &valuename, 0 );
ok( hr == S_OK, "failed to set value name %08x\n", hr );
out = NULL;
- method = SysAllocString( getstringvalueW );
+ method = SysAllocString( L"GetStringValue" );
hr = IWbemServices_ExecMethod( services, class, method, 0, NULL, in, &out, NULL );
ok( hr == S_OK, "failed to execute method %08x\n", hr );
SysFreeString( method );
type = 0xdeadbeef;
VariantInit( &retval );
- hr = IWbemClassObject_Get( out, returnvalueW, 0, &retval, &type, NULL );
+ hr = IWbemClassObject_Get( out, L"ReturnValue", 0, &retval, &type, NULL );
ok( hr == S_OK, "failed to get return value %08x\n", hr );
ok( V_VT( &retval ) == VT_I4, "unexpected variant type 0x%x\n", V_VT( &retval ) );
ok( !V_I4( &retval ), "unexpected error %u\n", V_I4( &retval ) );
ok( type == CIM_UINT32, "unexpected type 0x%x\n", type );
- check_property( out, valueW, VT_BSTR, CIM_STRING );
+ check_property( out, L"sValue", VT_BSTR, CIM_STRING );
VariantClear( &valuename );
VariantClear( &subkey );
@@ -998,10 +859,7 @@ static IWbemObjectSink sink = { &sink_vtbl };
static void test_notification_query_async( IWbemServices *services )
{
- static const WCHAR queryW[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_',
- 'D','e','v','i','c','e','C','h','a','n','g','e','E','v','e','n','t',0};
- BSTR wql = SysAllocString( wqlW ), query = SysAllocString( queryW );
+ BSTR wql = SysAllocString( L"wql" ), query = SysAllocString( L"SELECT * FROM Win32_DeviceChangeEvent" );
ULONG prev_sink_refs;
HRESULT hr;
@@ -1022,10 +880,7 @@ static void test_notification_query_async( IWbemServices *services )
static void test_query_async( IWbemServices *services )
{
- static const WCHAR queryW[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_',
- 'P','r','o','c','e','s','s',0};
- BSTR wql = SysAllocString( wqlW ), query = SysAllocString( queryW );
+ BSTR wql = SysAllocString( L"wql" ), query = SysAllocString( L"SELECT * FROM Win32_Process" );
HRESULT hr;
hr = IWbemServices_ExecQueryAsync( services, wql, query, 0, NULL, NULL );
@@ -1046,9 +901,7 @@ static void test_query_async( IWbemServices *services )
static void test_query_semisync( IWbemServices *services )
{
- static const WCHAR queryW[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_','D','u','m','m','y',0};
- BSTR wql = SysAllocString( wqlW ), query = SysAllocString( queryW );
+ BSTR wql = SysAllocString( L"wql" ), query = SysAllocString( L"SELECT * FROM Win32_Dummy" );
IEnumWbemClassObject *result;
IWbemClassObject *obj;
ULONG count;
@@ -1074,10 +927,7 @@ todo_wine
static void test_GetNames( IWbemServices *services )
{
- static const WCHAR queryW[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_',
- 'O','p','e','r','a','t','i','n','g','S','y','s','t','e','m',0};
- BSTR wql = SysAllocString( wqlW ), query = SysAllocString( queryW );
+ BSTR wql = SysAllocString( L"wql" ), query = SysAllocString( L"SELECT * FROM Win32_OperatingSystem" );
IEnumWbemClassObject *result;
HRESULT hr;
@@ -1108,11 +958,7 @@ static void test_GetNames( IWbemServices *services )
static void test_SystemSecurity( IWbemServices *services )
{
- static const WCHAR systemsecurityW[] = {'_','_','S','y','s','t','e','m','S','e','c','u','r','i','t','y',0};
- static const WCHAR getsdW[] = {'G','e','t','S','D',0};
- static const WCHAR returnvalueW[] = {'R','e','t','u','r','n','V','a','l','u','e',0};
- static const WCHAR sdW[] = {'S','D',0};
- BSTR class = SysAllocString( systemsecurityW ), method;
+ BSTR class = SysAllocString( L"__SystemSecurity" ), method;
IWbemClassObject *reg, *out;
VARIANT retval, var_sd;
void *data;
@@ -1137,7 +983,7 @@ static void test_SystemSecurity( IWbemServices *services )
ok( ret, "CreateWellKnownSid failed\n" );
out = NULL;
- method = SysAllocString( getsdW );
+ method = SysAllocString( L"GetSD" );
hr = IWbemServices_ExecMethod( services, class, method, 0, NULL, NULL, &out, NULL );
ok( hr == S_OK || hr == WBEM_E_ACCESS_DENIED, "failed to execute method %08x\n", hr );
SysFreeString( method );
@@ -1146,7 +992,7 @@ static void test_SystemSecurity( IWbemServices *services )
{
type = 0xdeadbeef;
VariantInit( &retval );
- hr = IWbemClassObject_Get( out, returnvalueW, 0, &retval, &type, NULL );
+ hr = IWbemClassObject_Get( out, L"ReturnValue", 0, &retval, &type, NULL );
ok( hr == S_OK, "failed to get return value %08x\n", hr );
ok( V_VT( &retval ) == VT_I4, "unexpected variant type 0x%x\n", V_VT( &retval ) );
ok( !V_I4( &retval ), "unexpected error %u\n", V_UI4( &retval ) );
@@ -1154,7 +1000,7 @@ static void test_SystemSecurity( IWbemServices *services )
type = 0xdeadbeef;
VariantInit( &var_sd );
- hr = IWbemClassObject_Get( out, sdW, 0, &var_sd, &type, NULL );
+ hr = IWbemClassObject_Get( out, L"SD", 0, &var_sd, &type, NULL );
ok( hr == S_OK, "failed to get names %08x\n", hr );
ok( V_VT( &var_sd ) == (VT_UI1|VT_ARRAY), "unexpected variant type 0x%x\n", V_VT( &var_sd ) );
ok( type == (CIM_UINT8|CIM_FLAG_ARRAY), "unexpected type 0x%x\n", type );
@@ -1186,33 +1032,7 @@ static void test_SystemSecurity( IWbemServices *services )
static void test_Win32_OperatingSystem( IWbemServices *services )
{
- static const WCHAR queryW[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_',
- 'O','p','e','r','a','t','i','n','g','S','y','s','t','e','m',0};
- static const WCHAR buildnumberW[] = {'B','u','i','l','d','N','u','m','b','e','r',0};
- static const WCHAR captionW[] = {'C','a','p','t','i','o','n',0};
- static const WCHAR csdversionW[] = {'C','S','D','V','e','r','s','i','o','n',0};
- static const WCHAR csnameW[] = {'C','S','N','a','m','e',0};
- static const WCHAR currenttimezoneW[] = {'C','u','r','r','e','n','t','T','i','m','e','Z','o','n','e',0};
- static const WCHAR freephysicalmemoryW[] = {'F','r','e','e','P','h','y','s','i','c','a','l','M','e','m','o','r','y',0};
- static const WCHAR manufacturerW[] = {'M','a','n','u','f','a','c','t','u','r','e','r',0};
- static const WCHAR nameW[] = {'N','a','m','e',0};
- static const WCHAR operatingsystemskuW[] = {'O','p','e','r','a','t','i','n','g','S','y','s','t','e','m','S','K','U',0};
- static const WCHAR osproductsuiteW[] = {'O','S','P','r','o','d','u','c','t','S','u','i','t','e',0};
- static const WCHAR ostypeW[] = {'O','S','T','y','p','e',0};
- static const WCHAR suitemaskW[] = {'S','u','i','t','e','M','a','s','k',0};
- static const WCHAR versionW[] = {'V','e','r','s','i','o','n',0};
- static const WCHAR servicepackmajorW[] =
- {'S','e','r','v','i','c','e','P','a','c','k','M','a','j','o','r','V','e','r','s','i','o','n',0};
- static const WCHAR servicepackminorW[] =
- {'S','e','r','v','i','c','e','P','a','c','k','M','i','n','o','r','V','e','r','s','i','o','n',0};
- static const WCHAR systemdriveW[] =
- {'S','y','s','t','e','m','D','r','i','v','e',0};
- static const WCHAR totalvisiblememorysizeW[] =
- {'T','o','t','a','l','V','i','s','i','b','l','e','M','e','m','o','r','y','S','i','z','e',0};
- static const WCHAR totalvirtualmemorysizeW[] =
- {'T','o','t','a','l','V','i','r','t','u','a','l','M','e','m','o','r','y','S','i','z','e',0};
- BSTR wql = SysAllocString( wqlW ), query = SysAllocString( queryW );
+ BSTR wql = SysAllocString( L"wql" ), query = SysAllocString( L"SELECT * FROM Win32_OperatingSystem" );
IEnumWbemClassObject *result;
IWbemClassObject *obj;
CIMTYPE type;
@@ -1234,24 +1054,24 @@ static void test_Win32_OperatingSystem( IWbemServices *services )
hr = IWbemClassObject_EndEnumeration( obj );
ok( hr == S_OK, "got %08x\n", hr );
- check_property( obj, buildnumberW, VT_BSTR, CIM_STRING );
- check_property( obj, captionW, VT_BSTR, CIM_STRING );
+ check_property( obj, L"BuildNumber", VT_BSTR, CIM_STRING );
+ check_property( obj, L"Caption", VT_BSTR, CIM_STRING );
type = 0xdeadbeef;
VariantInit( &val );
- hr = IWbemClassObject_Get( obj, csdversionW, 0, &val, &type, NULL );
+ hr = IWbemClassObject_Get( obj, L"CSDVersion", 0, &val, &type, NULL );
ok( hr == S_OK, "failed to get csdversion %08x\n", hr );
ok( V_VT( &val ) == VT_BSTR || V_VT( &val ) == VT_NULL, "unexpected variant type 0x%x\n", V_VT( &val ) );
ok( type == CIM_STRING, "unexpected type 0x%x\n", type );
trace( "csdversion: %s\n", wine_dbgstr_w(V_BSTR( &val )) );
VariantClear( &val );
- check_property( obj, freephysicalmemoryW, VT_BSTR, CIM_UINT64 );
- check_property( obj, nameW, VT_BSTR, CIM_STRING );
+ check_property( obj, L"FreePhysicalMemory", VT_BSTR, CIM_UINT64 );
+ check_property( obj, L"Name", VT_BSTR, CIM_STRING );
type = 0xdeadbeef;
VariantInit( &val );
- hr = IWbemClassObject_Get( obj, operatingsystemskuW, 0, &val, &type, NULL );
+ hr = IWbemClassObject_Get( obj, L"OperatingSystemSKU", 0, &val, &type, NULL );
ok( hr == S_OK || broken(hr == WBEM_E_NOT_FOUND) /* winxp */, "failed to get operatingsystemsku %08x\n", hr );
if (hr == S_OK)
{
@@ -1263,24 +1083,24 @@ static void test_Win32_OperatingSystem( IWbemServices *services )
type = 0xdeadbeef;
VariantInit( &val );
- hr = IWbemClassObject_Get( obj, osproductsuiteW, 0, &val, &type, NULL );
+ hr = IWbemClassObject_Get( obj, L"OSProductSuite", 0, &val, &type, NULL );
ok( hr == S_OK, "failed to get osproductsuite %08x\n", hr );
ok( V_VT( &val ) == VT_I4 || broken(V_VT( &val ) == VT_NULL) /* winxp */, "unexpected variant type 0x%x\n", V_VT( &val ) );
ok( type == CIM_UINT32, "unexpected type 0x%x\n", type );
trace( "osproductsuite: %d (%08x)\n", V_I4( &val ), V_I4( &val ) );
VariantClear( &val );
- check_property( obj, csnameW, VT_BSTR, CIM_STRING );
- check_property( obj, currenttimezoneW, VT_I2, CIM_SINT16 );
- check_property( obj, manufacturerW, VT_BSTR, CIM_STRING );
- check_property( obj, ostypeW, VT_I4, CIM_UINT16 );
- check_property( obj, servicepackmajorW, VT_I4, CIM_UINT16 );
- check_property( obj, servicepackminorW, VT_I4, CIM_UINT16 );
- check_property( obj, suitemaskW, VT_I4, CIM_UINT32 );
- check_property( obj, versionW, VT_BSTR, CIM_STRING );
- check_property( obj, totalvisiblememorysizeW, VT_BSTR, CIM_UINT64 );
- check_property( obj, totalvirtualmemorysizeW, VT_BSTR, CIM_UINT64 );
- check_property( obj, systemdriveW, VT_BSTR, CIM_STRING );
+ check_property( obj, L"CSName", VT_BSTR, CIM_STRING );
+ check_property( obj, L"CurrentTimeZone", VT_I2, CIM_SINT16 );
+ check_property( obj, L"Manufacturer", VT_BSTR, CIM_STRING );
+ check_property( obj, L"OSType", VT_I4, CIM_UINT16 );
+ check_property( obj, L"ServicePackMajorVersion", VT_I4, CIM_UINT16 );
+ check_property( obj, L"ServicePackMinorVersion", VT_I4, CIM_UINT16 );
+ check_property( obj, L"SuiteMask", VT_I4, CIM_UINT32 );
+ check_property( obj, L"Version", VT_BSTR, CIM_STRING );
+ check_property( obj, L"TotalVisibleMemorySize", VT_BSTR, CIM_UINT64 );
+ check_property( obj, L"TotalVirtualMemorySize", VT_BSTR, CIM_UINT64 );
+ check_property( obj, L"SystemDrive", VT_BSTR, CIM_STRING );
IWbemClassObject_Release( obj );
IEnumWbemClassObject_Release( result );
@@ -1290,22 +1110,7 @@ static void test_Win32_OperatingSystem( IWbemServices *services )
static void test_Win32_ComputerSystemProduct( IWbemServices *services )
{
- static const WCHAR identifyingnumberW[] =
- {'I','d','e','n','t','i','f','y','i','n','g','N','u','m','b','e','r',0};
- static const WCHAR nameW[] =
- {'N','a','m','e',0};
- static const WCHAR skunumberW[] =
- {'S','K','U','N','u','m','b','e','r',0};
- static const WCHAR uuidW[] =
- {'U','U','I','D',0};
- static const WCHAR vendorW[] =
- {'V','e','n','d','o','r',0};
- static const WCHAR versionW[] =
- {'V','e','r','s','i','o','n',0};
- static const WCHAR queryW[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_',
- 'C','o','m','p','u','t','e','r','S','y','s','t','e','m','P','r','o','d','u','c','t',0};
- BSTR wql = SysAllocString( wqlW ), query = SysAllocString( queryW );
+ BSTR wql = SysAllocString( L"wql" ), query = SysAllocString( L"SELECT * FROM Win32_ComputerSystemProduct" );
IEnumWbemClassObject *result;
IWbemClassObject *obj;
HRESULT hr;
@@ -1321,12 +1126,12 @@ static void test_Win32_ComputerSystemProduct( IWbemServices *services )
hr = IEnumWbemClassObject_Next( result, 10000, 1, &obj, &count );
ok( hr == S_OK, "got %08x\n", hr );
- check_property( obj, identifyingnumberW, VT_BSTR, CIM_STRING );
- check_property( obj, nameW, VT_BSTR, CIM_STRING );
- check_property( obj, skunumberW, VT_NULL, CIM_STRING );
- check_property( obj, uuidW, VT_BSTR, CIM_STRING );
- check_property( obj, vendorW, VT_BSTR, CIM_STRING );
- check_property( obj, versionW, VT_BSTR, CIM_STRING );
+ check_property( obj, L"IdentifyingNumber", VT_BSTR, CIM_STRING );
+ check_property( obj, L"Name", VT_BSTR, CIM_STRING );
+ check_property( obj, L"SKUNumber", VT_NULL, CIM_STRING );
+ check_property( obj, L"UUID", VT_BSTR, CIM_STRING );
+ check_property( obj, L"Vendor", VT_BSTR, CIM_STRING );
+ check_property( obj, L"Version", VT_BSTR, CIM_STRING );
IWbemClassObject_Release( obj );
IEnumWbemClassObject_Release( result );
@@ -1336,14 +1141,7 @@ static void test_Win32_ComputerSystemProduct( IWbemServices *services )
static void test_Win32_PhysicalMemory( IWbemServices *services )
{
- static const WCHAR capacityW[] = {'C','a','p','a','c','i','t','y',0};
- static const WCHAR memorytypeW[] = {'M','e','m','o','r','y','T','y','p','e',0};
- static const WCHAR formfactorW[] = {'F','o','r','m','F','a','c','t','o','r',0};
- static const WCHAR devicelocatorW[] = {'D','e','v','i','c','e','L','o','c','a','t','o','r',0};
- static const WCHAR queryW[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_',
- 'P','h','y','s','i','c','a','l','M','e','m','o','r','y',0};
- BSTR wql = SysAllocString( wqlW ), query = SysAllocString( queryW );
+ BSTR wql = SysAllocString( L"wql" ), query = SysAllocString( L"SELECT * FROM Win32_PhysicalMemory" );
IEnumWbemClassObject *result;
IWbemClassObject *obj;
HRESULT hr;
@@ -1361,10 +1159,10 @@ static void test_Win32_PhysicalMemory( IWbemServices *services )
if (count > 0)
{
- check_property( obj, capacityW, VT_BSTR, CIM_UINT64 );
- check_property( obj, devicelocatorW, VT_BSTR, CIM_STRING );
- check_property( obj, formfactorW, VT_I4, CIM_UINT16 );
- check_property( obj, memorytypeW, VT_I4, CIM_UINT16 );
+ check_property( obj, L"Capacity", VT_BSTR, CIM_UINT64 );
+ check_property( obj, L"DeviceLocator", VT_BSTR, CIM_STRING );
+ check_property( obj, L"FormFactor", VT_I4, CIM_UINT16 );
+ check_property( obj, L"MemoryType", VT_I4, CIM_UINT16 );
IWbemClassObject_Release( obj );
}
IEnumWbemClassObject_Release( result );
@@ -1374,13 +1172,7 @@ static void test_Win32_PhysicalMemory( IWbemServices *services )
static void test_Win32_IP4RouteTable( IWbemServices *services )
{
- static const WCHAR destinationW[] = {'D','e','s','t','i','n','a','t','i','o','n',0};
- static const WCHAR interfaceindexW[] = {'I','n','t','e','r','f','a','c','e','I','n','d','e','x',0};
- static const WCHAR nexthopW[] = {'N','e','x','t','H','o','p',0};
- static const WCHAR queryW[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_',
- 'I','P','4','R','o','u','t','e','T','a','b','l','e',0};
- BSTR wql = SysAllocString( wqlW ), query = SysAllocString( queryW );
+ BSTR wql = SysAllocString( L"wql" ), query = SysAllocString( L"SELECT * FROM Win32_IP4RouteTable" );
IEnumWbemClassObject *result;
IWbemClassObject *obj;
HRESULT hr;
@@ -1398,9 +1190,9 @@ static void test_Win32_IP4RouteTable( IWbemServices *services )
hr = IEnumWbemClassObject_Next( result, 10000, 1, &obj, &count );
if (hr != S_OK) break;
- check_property( obj, destinationW, VT_BSTR, CIM_STRING );
- check_property( obj, interfaceindexW, VT_I4, CIM_SINT32 );
- check_property( obj, nexthopW, VT_BSTR, CIM_STRING );
+ check_property( obj, L"Destination", VT_BSTR, CIM_STRING );
+ check_property( obj, L"InterfaceIndex", VT_I4, CIM_SINT32 );
+ check_property( obj, L"NextHop", VT_BSTR, CIM_STRING );
IWbemClassObject_Release( obj );
}
@@ -1411,34 +1203,7 @@ static void test_Win32_IP4RouteTable( IWbemServices *services )
static void test_Win32_Processor( IWbemServices *services )
{
- static const WCHAR architectureW[] =
- {'A','r','c','h','i','t','e','c','t','u','r','e',0};
- static const WCHAR captionW[] =
- {'C','a','p','t','i','o','n',0};
- static const WCHAR cpustatusW[] =
- {'C','p','u','S','t','a','t','u','s',0};
- static const WCHAR familyW[] =
- {'F','a','m','i','l','y',0};
- static const WCHAR levelW[] =
- {'L','e','v','e','l',0};
- static const WCHAR manufacturerW[] =
- {'M','a','n','u','f','a','c','t','u','r','e','r',0};
- static const WCHAR nameW[] =
- {'N','a','m','e',0};
- static const WCHAR numcoresW[] =
- {'N','u','m','b','e','r','O','f','C','o','r','e','s',0};
- static const WCHAR numlogicalprocessorsW[] =
- {'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 processoridW[] =
- {'P','r','o','c','e','s','s','o','r','I','d',0};
- static const WCHAR revisionW[] =
- {'R','e','v','i','s','i','o','n',0};
- static const WCHAR versionW[] =
- {'V','e','r','s','i','o','n',0};
- static const WCHAR queryW[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_',
- 'P','r','o','c','e','s','s','o','r',0};
- BSTR wql = SysAllocString( wqlW ), query = SysAllocString( queryW );
+ BSTR wql = SysAllocString( L"wql" ), query = SysAllocString( L"SELECT * FROM Win32_Processor" );
IEnumWbemClassObject *result;
IWbemClassObject *obj;
VARIANT val;
@@ -1454,20 +1219,20 @@ static void test_Win32_Processor( IWbemServices *services )
hr = IEnumWbemClassObject_Next( result, 10000, 1, &obj, &count );
if (hr != S_OK) break;
- check_property( obj, architectureW, VT_I4, CIM_UINT16 );
- check_property( obj, captionW, VT_BSTR, CIM_STRING );
- check_property( obj, cpustatusW, VT_I4, CIM_UINT16 );
- check_property( obj, familyW, VT_I4, CIM_UINT16 );
- check_property( obj, levelW, VT_I4, CIM_UINT16 );
- check_property( obj, manufacturerW, VT_BSTR, CIM_STRING );
- check_property( obj, nameW, VT_BSTR, CIM_STRING );
- check_property( obj, processoridW, VT_BSTR, CIM_STRING );
- check_property( obj, revisionW, VT_I4, CIM_UINT16 );
- check_property( obj, versionW, VT_BSTR, CIM_STRING );
+ check_property( obj, L"Architecture", VT_I4, CIM_UINT16 );
+ check_property( obj, L"Caption", VT_BSTR, CIM_STRING );
+ check_property( obj, L"CpuStatus", VT_I4, CIM_UINT16 );
+ check_property( obj, L"Family", VT_I4, CIM_UINT16 );
+ check_property( obj, L"Level", VT_I4, CIM_UINT16 );
+ check_property( obj, L"Manufacturer", VT_BSTR, CIM_STRING );
+ check_property( obj, L"Name", VT_BSTR, CIM_STRING );
+ check_property( obj, L"ProcessorId", VT_BSTR, CIM_STRING );
+ check_property( obj, L"Revision", VT_I4, CIM_UINT16 );
+ check_property( obj, L"Version", VT_BSTR, CIM_STRING );
type = 0xdeadbeef;
VariantInit( &val );
- hr = IWbemClassObject_Get( obj, numlogicalprocessorsW, 0, &val, &type, NULL );
+ hr = IWbemClassObject_Get( obj, L"NumberOfLogicalProcessors", 0, &val, &type, NULL );
ok( hr == S_OK || broken(hr == WBEM_E_NOT_FOUND) /* win2k3 */, "got %08x\n", hr );
if (hr == S_OK)
{
@@ -1478,7 +1243,7 @@ static void test_Win32_Processor( IWbemServices *services )
type = 0xdeadbeef;
VariantInit( &val );
- hr = IWbemClassObject_Get( obj, numcoresW, 0, &val, &type, NULL );
+ hr = IWbemClassObject_Get( obj, L"NumberOfCores", 0, &val, &type, NULL );
ok( hr == S_OK || broken(hr == WBEM_E_NOT_FOUND) /* win2k3 */, "got %08x\n", hr );
if (hr == S_OK)
{
@@ -1497,20 +1262,7 @@ static void test_Win32_Processor( IWbemServices *services )
static void test_Win32_VideoController( IWbemServices *services )
{
- static const WCHAR availabilityW[] =
- {'A','v','a','i','l','a','b','i','l','i','t','y',0};
- static const WCHAR configmanagererrorcodeW[] =
- {'C','o','n','f','i','g','M','a','n','a','g','e','r','E','r','r','o','r','C','o','d','e',0};
- static const WCHAR driverdateW[] =
- {'D','r','i','v','e','r','D','a','t','e',0};
- static const WCHAR installeddisplaydriversW[]=
- {'I','n','s','t','a','l','l','e','d','D','i','s','p','l','a','y','D','r','i','v','e','r','s',0};
- static const WCHAR statusW[] =
- {'S','t','a','t','u','s',0};
- static const WCHAR queryW[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_',
- 'V','i','d','e','o','C','o','n','t','r','o','l','l','e','r',0};
- BSTR wql = SysAllocString( wqlW ), query = SysAllocString( queryW );
+ BSTR wql = SysAllocString( L"wql" ), query = SysAllocString( L"SELECT * FROM Win32_VideoController" );
IEnumWbemClassObject *result;
IWbemClassObject *obj;
VARIANT val;
@@ -1530,20 +1282,20 @@ static void test_Win32_VideoController( IWbemServices *services )
hr = IEnumWbemClassObject_Next( result, 10000, 1, &obj, &count );
if (hr != S_OK) break;
- check_property( obj, availabilityW, VT_I4, CIM_UINT16 );
- check_property( obj, configmanagererrorcodeW, VT_I4, CIM_UINT32 );
- check_property( obj, driverdateW, VT_BSTR, CIM_DATETIME );
+ check_property( obj, L"Availability", VT_I4, CIM_UINT16 );
+ check_property( obj, L"ConfigManagerErrorCode", VT_I4, CIM_UINT32 );
+ check_property( obj, L"DriverDate", VT_BSTR, CIM_DATETIME );
type = 0xdeadbeef;
VariantInit( &val );
- hr = IWbemClassObject_Get( obj, installeddisplaydriversW, 0, &val, &type, NULL );
+ hr = IWbemClassObject_Get( obj, L"InstalledDisplayDrivers", 0, &val, &type, NULL );
ok( hr == S_OK, "got %08x\n", hr );
ok( V_VT( &val ) == VT_BSTR || V_VT( &val ) == VT_NULL, "unexpected variant type 0x%x\n", V_VT( &val ) );
ok( type == CIM_STRING, "unexpected type 0x%x\n", type );
trace( "installeddisplaydrivers %s\n", wine_dbgstr_w(V_BSTR( &val )) );
VariantClear( &val );
- check_property( obj, statusW, VT_BSTR, CIM_STRING );
+ check_property( obj, L"Status", VT_BSTR, CIM_STRING );
IWbemClassObject_Release( obj );
}
@@ -1554,20 +1306,7 @@ static void test_Win32_VideoController( IWbemServices *services )
static void test_Win32_Printer( IWbemServices *services )
{
- static const WCHAR attributesW[] =
- {'A','t','t','r','i','b','u','t','e','s',0};
- static const WCHAR deviceidW[] =
- {'D','e','v','i','c','e','I','d',0};
- static const WCHAR horizontalresolutionW[] =
- {'H','o','r','i','z','o','n','t','a','l','R','e','s','o','l','u','t','i','o','n',0};
- static const WCHAR locationW[] =
- {'L','o','c','a','t','i','o','n',0};
- static const WCHAR portnameW[] =
- {'P','o','r','t','N','a','m','e',0};
- static const WCHAR queryW[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_',
- 'P','r','i','n','t','e','r',0};
- BSTR wql = SysAllocString( wqlW ), query = SysAllocString( queryW );
+ BSTR wql = SysAllocString( L"wql" ), query = SysAllocString( L"SELECT * FROM Win32_Printer" );
IEnumWbemClassObject *result;
IWbemClassObject *obj;
VARIANT val;
@@ -1587,20 +1326,20 @@ static void test_Win32_Printer( IWbemServices *services )
hr = IEnumWbemClassObject_Next( result, 10000, 1, &obj, &count );
if (hr != S_OK) break;
- check_property( obj, attributesW, VT_I4, CIM_UINT32 );
- check_property( obj, deviceidW, VT_BSTR, CIM_STRING );
- check_property( obj, horizontalresolutionW, VT_I4, CIM_UINT32 );
+ check_property( obj, L"Attributes", VT_I4, CIM_UINT32 );
+ check_property( obj, L"DeviceId", VT_BSTR, CIM_STRING );
+ check_property( obj, L"HorizontalResolution", VT_I4, CIM_UINT32 );
type = 0xdeadbeef;
memset( &val, 0, sizeof(val) );
- hr = IWbemClassObject_Get( obj, locationW, 0, &val, &type, NULL );
+ hr = IWbemClassObject_Get( obj, L"Location", 0, &val, &type, NULL );
ok( hr == S_OK, "got %08x\n", hr );
ok( V_VT( &val ) == VT_BSTR || V_VT( &val ) == VT_NULL, "unexpected variant type 0x%x\n", V_VT( &val ) );
ok( type == CIM_STRING, "unexpected type 0x%x\n", type );
trace( "location %s\n", wine_dbgstr_w(V_BSTR( &val )) );
VariantClear( &val );
- check_property( obj, portnameW, VT_BSTR, CIM_STRING );
+ check_property( obj, L"PortName", VT_BSTR, CIM_STRING );
IWbemClassObject_Release( obj );
}
@@ -1619,17 +1358,12 @@ static void test_Win32_PnPEntity( IWbemServices *services )
ULONG count, i;
BSTR bstr;
- static WCHAR win32_pnpentityW[] = {'W','i','n','3','2','_','P','n','P','E','n','t','i','t','y',0};
- static const WCHAR deviceidW[] = {'D','e','v','i','c','e','I','d',0};
-
- bstr = SysAllocString( win32_pnpentityW );
-
+ bstr = SysAllocString( L"Win32_PnPEntity" );
hr = IWbemServices_CreateInstanceEnum( services, bstr, 0, NULL, &enm );
ok( hr == S_OK, "got %08x\n", hr );
-
SysFreeString( bstr );
- bstr = SysAllocString( deviceidW );
+ bstr = SysAllocString( L"DeviceId" );
while (1)
{
hr = IEnumWbemClassObject_Next( enm, 1000, 1, &obj, &count );
@@ -1656,29 +1390,12 @@ static void test_Win32_PnPEntity( IWbemServices *services )
}
SysFreeString( bstr );
-
IEnumWbemClassObject_Release( enm );
}
static void test_Win32_WinSAT( IWbemServices *services )
{
- static const WCHAR cpuscoreW[] =
- {'C','P','U','S','c','o','r','e',0};
- static const WCHAR d3dscoreW[] =
- {'D','3','D','S','c','o','r','e',0};
- static const WCHAR diskscoreW[] =
- {'D','i','s','k','S','c','o','r','e',0};
- static const WCHAR graphicsscoreW[] =
- {'G','r','a','p','h','i','c','s','S','c','o','r','e',0};
- static const WCHAR memoryscoreW[] =
- {'M','e','m','o','r','y','S','c','o','r','e',0};
- static const WCHAR winsatassessmentstateW[] =
- {'W','i','n','S','A','T','A','s','s','e','s','s','m','e','n','t','S','t','a','t','e',0};
- static const WCHAR winsprlevelW[] =
- {'W','i','n','S','P','R','L','e','v','e','l',0};
- static const WCHAR queryW[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_','W','i','n','S','A','T',0};
- BSTR wql = SysAllocString( wqlW ), query = SysAllocString( queryW );
+ BSTR wql = SysAllocString( L"wql" ), query = SysAllocString( L"SELECT * FROM Win32_WinSAT" );
IEnumWbemClassObject *result;
IWbemClassObject *obj;
HRESULT hr;
@@ -1697,13 +1414,13 @@ static void test_Win32_WinSAT( IWbemServices *services )
hr = IEnumWbemClassObject_Next( result, 10000, 1, &obj, &count );
if (hr != S_OK) break;
- check_property( obj, cpuscoreW, VT_R4, CIM_REAL32 );
- check_property( obj, d3dscoreW, VT_R4, CIM_REAL32 );
- check_property( obj, diskscoreW, VT_R4, CIM_REAL32 );
- check_property( obj, graphicsscoreW, VT_R4, CIM_REAL32 );
- check_property( obj, memoryscoreW, VT_R4, CIM_REAL32 );
- check_property( obj, winsatassessmentstateW, VT_I4, CIM_UINT32 );
- check_property( obj, winsprlevelW, VT_R4, CIM_REAL32 );
+ check_property( obj, L"CPUScore", VT_R4, CIM_REAL32 );
+ check_property( obj, L"D3DScore", VT_R4, CIM_REAL32 );
+ check_property( obj, L"DiskScore", VT_R4, CIM_REAL32 );
+ check_property( obj, L"GraphicsScore", VT_R4, CIM_REAL32 );
+ check_property( obj, L"MemoryScore", VT_R4, CIM_REAL32 );
+ check_property( obj, L"WinSATAssessmentState", VT_I4, CIM_UINT32 );
+ check_property( obj, L"WinSPRLevel", VT_R4, CIM_REAL32 );
IWbemClassObject_Release( obj );
}
@@ -1714,7 +1431,7 @@ static void test_Win32_WinSAT( IWbemServices *services )
static void test_Win32_DesktopMonitor( IWbemServices *services )
{
- BSTR wql = SysAllocString( wqlW ), query = SysAllocString( L"SELECT * FROM Win32_DesktopMonitor" );
+ BSTR wql = SysAllocString( L"wql" ), query = SysAllocString( L"SELECT * FROM Win32_DesktopMonitor" );
IEnumWbemClassObject *result;
IWbemClassObject *obj;
HRESULT hr;
@@ -1740,21 +1457,8 @@ static void test_Win32_DesktopMonitor( IWbemServices *services )
static void test_Win32_DisplayControllerConfiguration( IWbemServices *services )
{
- static const WCHAR bitsperpixelW[] =
- {'B','i','t','s','P','e','r','P','i','x','e','l',0};
- static const WCHAR captionW[] =
- {'C','a','p','t','i','o','n',0};
- static const WCHAR horizontalresolutionW[] =
- {'H','o','r','i','z','o','n','t','a','l','R','e','s','o','l','u','t','i','o','n',0};
- static const WCHAR nameW[] =
- {'N','a','m','e',0};
- static const WCHAR queryW[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_',
- 'D','i','s','p','l','a','y','C','o','n','t','r','o','l','l','e','r',
- 'C','o','n','f','i','g','u','r','a','t','i','o','n',0};
- static const WCHAR verticalresolutionW[] =
- {'V','e','r','t','i','c','a','l','R','e','s','o','l','u','t','i','o','n',0};
- BSTR wql = SysAllocString( wqlW ), query = SysAllocString( queryW );
+ BSTR wql = SysAllocString( L"wql" );
+ BSTR query = SysAllocString( L"SELECT * FROM Win32_DisplayControllerConfiguration" );
IEnumWbemClassObject *result;
IWbemClassObject *obj;
HRESULT hr;
@@ -1768,11 +1472,11 @@ static void test_Win32_DisplayControllerConfiguration( IWbemServices *services )
hr = IEnumWbemClassObject_Next( result, 10000, 1, &obj, &count );
if (hr != S_OK) break;
- check_property( obj, bitsperpixelW, VT_I4, CIM_UINT32 );
- check_property( obj, captionW, VT_BSTR, CIM_STRING );
- check_property( obj, horizontalresolutionW, VT_I4, CIM_UINT32 );
- check_property( obj, nameW, VT_BSTR, CIM_STRING );
- check_property( obj, verticalresolutionW, VT_I4, CIM_UINT32 );
+ check_property( obj, L"BitsPerPixel", VT_I4, CIM_UINT32 );
+ check_property( obj, L"Caption", VT_BSTR, CIM_STRING );
+ check_property( obj, L"HorizontalResolution", VT_I4, CIM_UINT32 );
+ check_property( obj, L"Name", VT_BSTR, CIM_STRING );
+ check_property( obj, L"VerticalResolution", VT_I4, CIM_UINT32 );
IWbemClassObject_Release( obj );
}
@@ -1783,14 +1487,7 @@ static void test_Win32_DisplayControllerConfiguration( IWbemServices *services )
static void test_Win32_QuickFixEngineering( IWbemServices *services )
{
- static const WCHAR captionW[] =
- {'C','a','p','t','i','o','n',0};
- static const WCHAR hotfixidW[] =
- {'H','o','t','F','i','x','I','D',0};
- static const WCHAR queryW[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_',
- 'Q','u','i','c','k','F','i','x','E','n','g','i','n','e','e','r','i','n','g',0};
- BSTR wql = SysAllocString( wqlW ), query = SysAllocString( queryW );
+ BSTR wql = SysAllocString( L"wql" ), query = SysAllocString( L"SELECT * FROM Win32_QuickFixEngineering" );
IEnumWbemClassObject *result;
IWbemClassObject *obj;
HRESULT hr;
@@ -1808,13 +1505,13 @@ static void test_Win32_QuickFixEngineering( IWbemServices *services )
type = 0xdeadbeef;
VariantInit( &caption );
- hr = IWbemClassObject_Get( obj, captionW, 0, &caption, &type, NULL );
+ hr = IWbemClassObject_Get( obj, L"Caption", 0, &caption, &type, NULL );
ok( hr == S_OK, "failed to get caption %08x\n", hr );
ok( V_VT( &caption ) == VT_BSTR || V_VT( &caption ) == VT_NULL /* winxp */,
"unexpected variant type 0x%x\n", V_VT( &caption ) );
ok( type == CIM_STRING, "unexpected type 0x%x\n", type );
- check_property( obj, hotfixidW, VT_BSTR, CIM_STRING );
+ check_property( obj, L"HotFixID", VT_BSTR, CIM_STRING );
IWbemClassObject_Release( obj );
if (total++ >= 10) break;
}
@@ -1826,8 +1523,7 @@ static void test_Win32_QuickFixEngineering( IWbemServices *services )
START_TEST(query)
{
- static const WCHAR cimv2W[] = {'R','O','O','T','\\','C','I','M','V','2',0};
- BSTR path = SysAllocString( cimv2W );
+ BSTR path = SysAllocString( L"ROOT\\CIMV2" );
IWbemLocator *locator;
IWbemServices *services;
HRESULT hr;
diff --git a/dlls/wbemprox/tests/services.c b/dlls/wbemprox/tests/services.c
index da10e72fe1..cf45ed712b 100644
--- a/dlls/wbemprox/tests/services.c
+++ b/dlls/wbemprox/tests/services.c
@@ -26,12 +26,11 @@
static void test_IClientSecurity(void)
{
- static const WCHAR rootW[] = {'R','O','O','T','\\','C','I','M','V','2',0};
HRESULT hr;
IWbemLocator *locator;
IWbemServices *services;
IClientSecurity *security;
- BSTR path = SysAllocString( rootW );
+ BSTR path = SysAllocString( L"ROOT\\CIMV2" );
ULONG refs;
hr = CoCreateInstance( &CLSID_WbemLocator, NULL, CLSCTX_INPROC_SERVER, &IID_IWbemLocator, (void **)&locator );
@@ -86,33 +85,6 @@ static void test_IClientSecurity(void)
static void test_IWbemLocator(void)
{
- static const WCHAR path0W[] = {0};
- static const WCHAR path1W[] = {'\\',0};
- static const WCHAR path2W[] = {'\\','\\',0};
- static const WCHAR path3W[] = {'\\','\\','.',0};
- static const WCHAR path4W[] = {'\\','\\','.','\\',0};
- static const WCHAR path5W[] = {'\\','R','O','O','T',0};
- static const WCHAR path6W[] = {'\\','\\','R','O','O','T',0};
- static const WCHAR path7W[] = {'\\','\\','.','R','O','O','T',0};
- static const WCHAR path8W[] = {'\\','\\','.','\\','N','O','N','E',0};
- static const WCHAR path9W[] = {'\\','\\','.','\\','R','O','O','T',0};
- static const WCHAR path10W[] = {'\\','\\','\\','.','\\','R','O','O','T',0};
- static const WCHAR path11W[] = {'\\','/','.','\\','R','O','O','T',0};
- static const WCHAR path12W[] = {'/','/','.','\\','R','O','O','T',0};
- static const WCHAR path13W[] = {'\\','\\','.','/','R','O','O','T',0};
- static const WCHAR path14W[] = {'/','/','.','/','R','O','O','T',0};
- static const WCHAR path15W[] = {'N','O','N','E',0};
- static const WCHAR path16W[] = {'R','O','O','T',0};
- static const WCHAR path17W[] = {'R','O','O','T','\\','N','O','N','E',0};
- static const WCHAR path18W[] = {'R','O','O','T','\\','C','I','M','V','2',0};
- static const WCHAR path19W[] = {'R','O','O','T','\\','\\','C','I','M','V','2',0};
- static const WCHAR path20W[] = {'R','O','O','T','\\','C','I','M','V','2','\\',0};
- static const WCHAR path21W[] = {'R','O','O','T','/','C','I','M','V','2',0};
- static const WCHAR path22W[] = {'r','o','o','t','\\','d','e','f','a','u','l','t',0};
- static const WCHAR path23W[] = {'r','o','o','t','\\','c','i','m','v','0',0};
- static const WCHAR path24W[] = {'r','o','o','t','\\','c','i','m','v','1',0};
- static const WCHAR path25W[] = {'\\','\\','l','o','c','a','l','h','o','s','t','\\','R','O','O','T',0};
- static const WCHAR path26W[] = {'\\','\\','L','O','C','A','L','H','O','S','T','\\','R','O','O','T',0};
static const struct
{
const WCHAR *path;
@@ -122,33 +94,33 @@ static void test_IWbemLocator(void)
}
test[] =
{
- { path0W, WBEM_E_INVALID_NAMESPACE },
- { path1W, WBEM_E_INVALID_NAMESPACE },
- { path2W, WBEM_E_INVALID_NAMESPACE },
- { path3W, WBEM_E_INVALID_NAMESPACE },
- { path4W, WBEM_E_INVALID_NAMESPACE, FALSE, WBEM_E_INVALID_PARAMETER },
- { path5W, WBEM_E_INVALID_NAMESPACE },
- { path6W, 0x800706ba, TRUE },
- { path7W, 0x800706ba, TRUE },
- { path8W, WBEM_E_INVALID_NAMESPACE },
- { path9W, S_OK },
- { path10W, WBEM_E_INVALID_PARAMETER },
- { path11W, S_OK, FALSE, WBEM_E_INVALID_PARAMETER },
- { path12W, S_OK },
- { path13W, S_OK },
- { path14W, S_OK },
- { path15W, WBEM_E_INVALID_NAMESPACE },
- { path16W, S_OK },
- { path17W, WBEM_E_INVALID_NAMESPACE },
- { path18W, S_OK },
- { path19W, WBEM_E_INVALID_NAMESPACE, FALSE, WBEM_E_INVALID_PARAMETER },
- { path20W, WBEM_E_INVALID_NAMESPACE, FALSE, WBEM_E_INVALID_PARAMETER },
- { path21W, S_OK },
- { path22W, S_OK },
- { path23W, WBEM_E_INVALID_NAMESPACE },
- { path24W, WBEM_E_INVALID_NAMESPACE },
- { path25W, S_OK },
- { path26W, S_OK }
+ { L"", WBEM_E_INVALID_NAMESPACE },
+ { L"\\", WBEM_E_INVALID_NAMESPACE },
+ { L"\\\\", WBEM_E_INVALID_NAMESPACE },
+ { L"\\\\.", WBEM_E_INVALID_NAMESPACE },
+ { L"\\\\.\\", WBEM_E_INVALID_NAMESPACE, FALSE, WBEM_E_INVALID_PARAMETER },
+ { L"\\ROOT", WBEM_E_INVALID_NAMESPACE },
+ { L"\\\\ROOT", 0x800706ba, TRUE },
+ { L"\\\\.ROOT", 0x800706ba, TRUE },
+ { L"\\\\.\\NONE", WBEM_E_INVALID_NAMESPACE },
+ { L"\\\\.\\ROOT", S_OK },
+ { L"\\\\\\.\\ROOT", WBEM_E_INVALID_PARAMETER },
+ { L"\\/.\\ROOT", S_OK, FALSE, WBEM_E_INVALID_PARAMETER },
+ { L"//.\\ROOT", S_OK },
+ { L"\\\\./ROOT", S_OK },
+ { L"//./ROOT", S_OK },
+ { L"NONE", WBEM_E_INVALID_NAMESPACE },
+ { L"ROOT", S_OK },
+ { L"ROOT\\NONE", WBEM_E_INVALID_NAMESPACE },
+ { L"ROOT\\CIMV2", S_OK },
+ { L"ROOT\\\\CIMV2", WBEM_E_INVALID_NAMESPACE, FALSE, WBEM_E_INVALID_PARAMETER },
+ { L"ROOT\\CIMV2\\", WBEM_E_INVALID_NAMESPACE, FALSE, WBEM_E_INVALID_PARAMETER },
+ { L"ROOT/CIMV2", S_OK },
+ { L"root\\default", S_OK },
+ { L"root\\cimv0", WBEM_E_INVALID_NAMESPACE },
+ { L"root\\cimv1", WBEM_E_INVALID_NAMESPACE },
+ { L"\\\\localhost\\ROOT", S_OK },
+ { L"\\\\LOCALHOST\\ROOT", S_OK }
};
IWbemLocator *locator;
IWbemServices *services;
--
2.20.1
1
0