[WBEMDISP] Sync with Wine Staging 4.18. CORE-16441

This commit is contained in:
Amine Khaldi 2019-12-01 19:44:13 +01:00
parent 658118f098
commit 36873c4934
4 changed files with 16 additions and 23 deletions

View file

@ -18,7 +18,6 @@
#define COBJMACROS #define COBJMACROS
#include "config.h"
#include <stdarg.h> #include <stdarg.h>
#include "windef.h" #include "windef.h"
@ -31,7 +30,6 @@
#include "wine/debug.h" #include "wine/debug.h"
#include "wine/heap.h" #include "wine/heap.h"
#include "wine/unicode.h"
#include "wbemdisp_private.h" #include "wbemdisp_private.h"
#include "wbemdisp_classes.h" #include "wbemdisp_classes.h"
@ -620,8 +618,8 @@ static HRESULT init_members( struct object *object )
{ {
count++; count++;
SysFreeString( name ); SysFreeString( name );
IWbemClassObject_Release( sig_in ); if (sig_in) IWbemClassObject_Release( sig_in );
IWbemClassObject_Release( sig_out ); if (sig_out) IWbemClassObject_Release( sig_out );
} }
IWbemClassObject_EndMethodEnumeration( object->object ); IWbemClassObject_EndMethodEnumeration( object->object );
} }
@ -659,8 +657,8 @@ static HRESULT init_members( struct object *object )
IWbemClassObject_EndMethodEnumeration( object->object ); IWbemClassObject_EndMethodEnumeration( object->object );
goto error; goto error;
} }
IWbemClassObject_Release( sig_in ); if (sig_in) IWbemClassObject_Release( sig_in );
IWbemClassObject_Release( sig_out ); if (sig_out) IWbemClassObject_Release( sig_out );
TRACE( "added method %s\n", debugstr_w(name) ); TRACE( "added method %s\n", debugstr_w(name) );
} }
IWbemClassObject_EndMethodEnumeration( object->object ); IWbemClassObject_EndMethodEnumeration( object->object );
@ -683,7 +681,7 @@ static DISPID get_member_dispid( struct object *object, const WCHAR *name )
UINT i; UINT i;
for (i = 0; i < object->nb_members; 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) if (!object->members[i].dispid)
{ {
@ -1704,12 +1702,12 @@ static HRESULT WINAPI services_DeleteAsync(
static BSTR build_query_string( const WCHAR *class ) static BSTR build_query_string( const WCHAR *class )
{ {
static const WCHAR selectW[] = {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',0}; 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; BSTR ret;
if (!(ret = SysAllocStringLen( NULL, len ))) return NULL; if (!(ret = SysAllocStringLen( NULL, len ))) return NULL;
strcpyW( ret, selectW ); lstrcpyW( ret, selectW );
strcatW( ret, class ); lstrcatW( ret, class );
return ret; return ret;
} }
@ -2134,22 +2132,22 @@ static BSTR build_resource_string( BSTR server, BSTR namespace )
ULONG len, len_server = 0, len_namespace = 0; ULONG len, len_server = 0, len_namespace = 0;
BSTR ret; BSTR ret;
if (server && *server) len_server = strlenW( server ); if (server && *server) len_server = lstrlenW( server );
else len_server = 1; 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; else len_namespace = ARRAY_SIZE(defaultW) - 1;
if (!(ret = SysAllocStringLen( NULL, 2 + len_server + 1 + len_namespace ))) return NULL; if (!(ret = SysAllocStringLen( NULL, 2 + len_server + 1 + len_namespace ))) return NULL;
ret[0] = ret[1] = '\\'; ret[0] = ret[1] = '\\';
if (server && *server) strcpyW( ret + 2, server ); if (server && *server) lstrcpyW( ret + 2, server );
else ret[2] = '.'; else ret[2] = '.';
len = len_server + 2; len = len_server + 2;
ret[len++] = '\\'; ret[len++] = '\\';
if (namespace && *namespace) strcpyW( ret + len, namespace ); if (namespace && *namespace) lstrcpyW( ret + len, namespace );
else strcpyW( ret + len, defaultW ); else lstrcpyW( ret + len, defaultW );
return ret; return ret;
} }

View file

@ -16,7 +16,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include "config.h"
#include <stdarg.h> #include <stdarg.h>
#define COBJMACROS #define COBJMACROS
@ -30,7 +29,6 @@
#include "wine/debug.h" #include "wine/debug.h"
#include "wine/heap.h" #include "wine/heap.h"
#include "wine/unicode.h"
#include "wbemdisp_private.h" #include "wbemdisp_private.h"
#include "wbemdisp_classes.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 ); 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; p = pszDisplayName + prefix_len;
if (*p == '{') if (*p == '{')
@ -418,7 +416,7 @@ done:
SysFreeString( server ); SysFreeString( server );
SysFreeString( namespace ); SysFreeString( namespace );
SysFreeString( relative ); SysFreeString( relative );
if (hr == S_OK) *pchEaten = strlenW( pszDisplayName ); if (hr == S_OK) *pchEaten = lstrlenW( pszDisplayName );
return hr; return hr;
} }

View file

@ -2,8 +2,6 @@
#ifndef _WBEMDISP_PRECOMP_H_ #ifndef _WBEMDISP_PRECOMP_H_
#define _WBEMDISP_PRECOMP_H_ #define _WBEMDISP_PRECOMP_H_
#include <wine/config.h>
#include <stdarg.h> #include <stdarg.h>
#define WIN32_NO_STATUS #define WIN32_NO_STATUS
@ -19,7 +17,6 @@
#include <wbemdisp.h> #include <wbemdisp.h>
#include <wine/debug.h> #include <wine/debug.h>
#include <wine/unicode.h>
#include "wbemdisp_private.h" #include "wbemdisp_private.h"

View file

@ -195,7 +195,7 @@ dll/win32/uxtheme # Forked
dll/win32/vbscript # Synced to WineStaging-4.18 dll/win32/vbscript # Synced to WineStaging-4.18
dll/win32/version # Synced to WineStaging-4.18 dll/win32/version # Synced to WineStaging-4.18
dll/win32/vssapi # 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/wbemprox # Synced to WineStaging-4.0
dll/win32/windowscodecs # Synced to WineStaging-4.0 dll/win32/windowscodecs # Synced to WineStaging-4.0
dll/win32/windowscodecsext # Synced to WineStaging-2.9 dll/win32/windowscodecsext # Synced to WineStaging-2.9