https://git.reactos.org/?p=reactos.git;a=commitdiff;h=36873c49345171875fbbf…
commit 36873c49345171875fbbf50db6288003ebce6150
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Sun Dec 1 19:44:13 2019 +0100
Commit: Amine Khaldi <amine.khaldi(a)reactos.org>
CommitDate: Sun Dec 1 19:44:13 2019 +0100
[WBEMDISP] Sync with Wine Staging 4.18. CORE-16441
---
dll/win32/wbemdisp/locator.c | 28 +++++++++++++---------------
dll/win32/wbemdisp/main.c | 6 ++----
dll/win32/wbemdisp/precomp.h | 3 ---
media/doc/README.WINE | 2 +-
4 files changed, 16 insertions(+), 23 deletions(-)
diff --git a/dll/win32/wbemdisp/locator.c b/dll/win32/wbemdisp/locator.c
index c307e347cf8..a9ef1618882 100644
--- a/dll/win32/wbemdisp/locator.c
+++ b/dll/win32/wbemdisp/locator.c
@@ -18,7 +18,6 @@
#define COBJMACROS
-#include "config.h"
#include <stdarg.h>
#include "windef.h"
@@ -31,7 +30,6 @@
#include "wine/debug.h"
#include "wine/heap.h"
-#include "wine/unicode.h"
#include "wbemdisp_private.h"
#include "wbemdisp_classes.h"
@@ -620,8 +618,8 @@ static HRESULT init_members( struct object *object )
{
count++;
SysFreeString( name );
- IWbemClassObject_Release( sig_in );
- IWbemClassObject_Release( sig_out );
+ if (sig_in) IWbemClassObject_Release( sig_in );
+ if (sig_out) IWbemClassObject_Release( sig_out );
}
IWbemClassObject_EndMethodEnumeration( object->object );
}
@@ -659,8 +657,8 @@ static HRESULT init_members( struct object *object )
IWbemClassObject_EndMethodEnumeration( object->object );
goto error;
}
- IWbemClassObject_Release( sig_in );
- IWbemClassObject_Release( sig_out );
+ if (sig_in) IWbemClassObject_Release( sig_in );
+ if (sig_out) IWbemClassObject_Release( sig_out );
TRACE( "added method %s\n", debugstr_w(name) );
}
IWbemClassObject_EndMethodEnumeration( object->object );
@@ -683,7 +681,7 @@ static DISPID get_member_dispid( struct object *object, const WCHAR
*name )
UINT i;
for (i = 0; i < object->nb_members; i++)
{
- if (!strcmpiW( object->members[i].name, name ))
+ if (!wcsicmp( object->members[i].name, name ))
{
if (!object->members[i].dispid)
{
@@ -1704,12 +1702,12 @@ static HRESULT WINAPI services_DeleteAsync(
static BSTR build_query_string( const WCHAR *class )
{
static const WCHAR selectW[] =
{'S','E','L','E','C','T','
','*',' ','F','R','O','M','
',0};
- UINT len = strlenW(class) + ARRAY_SIZE(selectW);
+ UINT len = lstrlenW(class) + ARRAY_SIZE(selectW);
BSTR ret;
if (!(ret = SysAllocStringLen( NULL, len ))) return NULL;
- strcpyW( ret, selectW );
- strcatW( ret, class );
+ lstrcpyW( ret, selectW );
+ lstrcatW( ret, class );
return ret;
}
@@ -2134,22 +2132,22 @@ static BSTR build_resource_string( BSTR server, BSTR namespace )
ULONG len, len_server = 0, len_namespace = 0;
BSTR ret;
- if (server && *server) len_server = strlenW( server );
+ if (server && *server) len_server = lstrlenW( server );
else len_server = 1;
- if (namespace && *namespace) len_namespace = strlenW( namespace );
+ if (namespace && *namespace) len_namespace = lstrlenW( namespace );
else len_namespace = ARRAY_SIZE(defaultW) - 1;
if (!(ret = SysAllocStringLen( NULL, 2 + len_server + 1 + len_namespace ))) return
NULL;
ret[0] = ret[1] = '\\';
- if (server && *server) strcpyW( ret + 2, server );
+ if (server && *server) lstrcpyW( ret + 2, server );
else ret[2] = '.';
len = len_server + 2;
ret[len++] = '\\';
- if (namespace && *namespace) strcpyW( ret + len, namespace );
- else strcpyW( ret + len, defaultW );
+ if (namespace && *namespace) lstrcpyW( ret + len, namespace );
+ else lstrcpyW( ret + len, defaultW );
return ret;
}
diff --git a/dll/win32/wbemdisp/main.c b/dll/win32/wbemdisp/main.c
index aff4d5042b7..f434eecb353 100644
--- a/dll/win32/wbemdisp/main.c
+++ b/dll/win32/wbemdisp/main.c
@@ -16,7 +16,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "config.h"
#include <stdarg.h>
#define COBJMACROS
@@ -30,7 +29,6 @@
#include "wine/debug.h"
#include "wine/heap.h"
-#include "wine/unicode.h"
#include "wbemdisp_private.h"
#include "wbemdisp_classes.h"
@@ -384,7 +382,7 @@ static HRESULT WINAPI WinMGMTS_ParseDisplayName(IParseDisplayName
*iface, IBindC
TRACE( "%p, %p, %s, %p, %p\n", iface, pbc, debugstr_w(pszDisplayName),
pchEaten, ppmkOut );
- if (strncmpiW( pszDisplayName, prefixW, prefix_len )) return MK_E_SYNTAX;
+ if (_wcsnicmp( pszDisplayName, prefixW, prefix_len )) return MK_E_SYNTAX;
p = pszDisplayName + prefix_len;
if (*p == '{')
@@ -418,7 +416,7 @@ done:
SysFreeString( server );
SysFreeString( namespace );
SysFreeString( relative );
- if (hr == S_OK) *pchEaten = strlenW( pszDisplayName );
+ if (hr == S_OK) *pchEaten = lstrlenW( pszDisplayName );
return hr;
}
diff --git a/dll/win32/wbemdisp/precomp.h b/dll/win32/wbemdisp/precomp.h
index c1f67ee56a5..0578883a8be 100644
--- a/dll/win32/wbemdisp/precomp.h
+++ b/dll/win32/wbemdisp/precomp.h
@@ -2,8 +2,6 @@
#ifndef _WBEMDISP_PRECOMP_H_
#define _WBEMDISP_PRECOMP_H_
-#include <wine/config.h>
-
#include <stdarg.h>
#define WIN32_NO_STATUS
@@ -19,7 +17,6 @@
#include <wbemdisp.h>
#include <wine/debug.h>
-#include <wine/unicode.h>
#include "wbemdisp_private.h"
diff --git a/media/doc/README.WINE b/media/doc/README.WINE
index 2d72bc86a44..3098a88e6d1 100644
--- a/media/doc/README.WINE
+++ b/media/doc/README.WINE
@@ -195,7 +195,7 @@ dll/win32/uxtheme # Forked
dll/win32/vbscript # Synced to WineStaging-4.18
dll/win32/version # Synced to WineStaging-4.18
dll/win32/vssapi # Synced to WineStaging-4.18
-dll/win32/wbemdisp # Synced to WineStaging-4.0
+dll/win32/wbemdisp # Synced to WineStaging-4.18
dll/win32/wbemprox # Synced to WineStaging-4.0
dll/win32/windowscodecs # Synced to WineStaging-4.0
dll/win32/windowscodecsext # Synced to WineStaging-2.9