From 6ad85c01c68a8fe6a572092bd57425a5911a460e Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Sun, 4 Jun 2017 01:47:48 +0000 Subject: [PATCH] [WBEMPROX] Sync with Wine Staging 2.9. CORE-13362 3ca407e wbemprox: Add Vendor field in Win32_ComputerSystemProduct. b3f98ab wbemprox: Add DriverDate for Win32_VideoController. 65473a8 wbemprox: Add InstalledDisplayDrivers for Win32_VideoController. b062c6c wbemprox: Add Status for Win32_VideoController. 32707e5 wbemprox: Add ConfigManagerErrorCode for Win32_VideoController. 9f81263 wbemprox: Provide DeviceID, Location and PortName for printers. 66e3c97 wbemprox: Also free data for tables that don't have a fill function (Valgrind). 34f77a6 wbemprox: Simplify and standardize the heap_xxx() declarations. svn path=/trunk/; revision=74859 --- reactos/dll/win32/wbemprox/builtin.c | 9 ++++++++- reactos/dll/win32/wbemprox/table.c | 1 + reactos/dll/win32/wbemprox/wbemprox_private.h | 19 ++++++++----------- reactos/media/doc/README.WINE | 2 +- 4 files changed, 18 insertions(+), 13 deletions(-) diff --git a/reactos/dll/win32/wbemprox/builtin.c b/reactos/dll/win32/wbemprox/builtin.c index 22c11360e1d..5f9add8a3d0 100644 --- a/reactos/dll/win32/wbemprox/builtin.c +++ b/reactos/dll/win32/wbemprox/builtin.c @@ -358,6 +358,8 @@ static const WCHAR prop_varianttypeW[] = {'V','a','r','i','a','n','t','T','y','p','e',0}; static const WCHAR prop_versionW[] = {'V','e','r','s','i','o','n',0}; +static const WCHAR prop_vendorW[] = + {'V','e','n','d','o','r',0}; static const WCHAR prop_videoarchitectureW[] = {'V','i','d','e','o','A','r','c','h','i','t','e','c','t','u','r','e',0}; static const WCHAR prop_videomemorytypeW[] = @@ -419,7 +421,8 @@ static const struct column col_compsys[] = static const struct column col_compsysproduct[] = { { prop_identifyingnumberW, CIM_STRING|COL_FLAG_KEY }, - { prop_uuidW, CIM_STRING|COL_FLAG_DYNAMIC } + { prop_uuidW, CIM_STRING|COL_FLAG_DYNAMIC }, + { prop_vendorW, CIM_STRING }, }; static const struct column col_datafile[] = { @@ -727,6 +730,8 @@ static const WCHAR compsysproduct_identifyingnumberW[] = static const WCHAR compsysproduct_uuidW[] = {'d','e','a','d','d','e','a','d','-','d','e','a','d','-','d','e','a','d','-','d','e','a','d','-', 'd','e','a','d','d','e','a','d','d','e','a','d',0}; +static const WCHAR compsysproduct_vendorW[] = + {'W','i','n','e',0}; static const WCHAR diskdrive_interfacetypeW[] = {'I','D','E',0}; static const WCHAR diskdrive_manufacturerW[] = @@ -821,6 +826,7 @@ struct record_computersystemproduct { const WCHAR *identifyingnumber; const WCHAR *uuid; + const WCHAR *vendor; }; struct record_datafile { @@ -1415,6 +1421,7 @@ static enum fill_status fill_compsysproduct( struct table *table, const struct e rec = (struct record_computersystemproduct *)table->data; rec->identifyingnumber = compsysproduct_identifyingnumberW; rec->uuid = get_compsysproduct_uuid(); + rec->vendor = compsysproduct_vendorW; if (!match_row( table, row, cond, &status )) free_row_values( table, row ); else row++; diff --git a/reactos/dll/win32/wbemprox/table.c b/reactos/dll/win32/wbemprox/table.c index f9250204e4e..6c53a06676a 100644 --- a/reactos/dll/win32/wbemprox/table.c +++ b/reactos/dll/win32/wbemprox/table.c @@ -324,6 +324,7 @@ void free_table( struct table *table ) TRACE("destroying %p\n", table); heap_free( (WCHAR *)table->name ); free_columns( (struct column *)table->columns, table->num_cols ); + heap_free( table->data ); list_remove( &table->entry ); heap_free( table ); } diff --git a/reactos/dll/win32/wbemprox/wbemprox_private.h b/reactos/dll/win32/wbemprox/wbemprox_private.h index 36508c94fb8..87fc719004e 100644 --- a/reactos/dll/win32/wbemprox/wbemprox_private.h +++ b/reactos/dll/win32/wbemprox/wbemprox_private.h @@ -252,27 +252,24 @@ HRESULT service_stop_service(IWbemClassObject *, IWbemClassObject *, IWbemClassO HRESULT security_get_sd(IWbemClassObject *, IWbemClassObject *, IWbemClassObject **) DECLSPEC_HIDDEN; HRESULT security_set_sd(IWbemClassObject *, IWbemClassObject *, IWbemClassObject **) DECLSPEC_HIDDEN; -static void *heap_alloc( size_t len ) __WINE_ALLOC_SIZE(1); -static inline void *heap_alloc( size_t len ) +static inline void* __WINE_ALLOC_SIZE(1) heap_alloc(size_t size) { - return HeapAlloc( GetProcessHeap(), 0, len ); + return HeapAlloc(GetProcessHeap(), 0, size); } -static void *heap_realloc( void *mem, size_t len ) __WINE_ALLOC_SIZE(2); -static inline void *heap_realloc( void *mem, size_t len ) +static inline void* __WINE_ALLOC_SIZE(1) heap_alloc_zero(size_t size) { - return HeapReAlloc( GetProcessHeap(), 0, mem, len ); + return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size); } -static void *heap_alloc_zero( size_t len ) __WINE_ALLOC_SIZE(1); -static inline void *heap_alloc_zero( size_t len ) +static inline void* __WINE_ALLOC_SIZE(2) heap_realloc(void *mem, size_t size) { - return HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, len ); + return HeapReAlloc(GetProcessHeap(), 0, mem, size); } -static inline BOOL heap_free( void *mem ) +static inline BOOL heap_free(void *mem) { - return HeapFree( GetProcessHeap(), 0, mem ); + return HeapFree(GetProcessHeap(), 0, mem); } static inline WCHAR *heap_strdupW( const WCHAR *src ) diff --git a/reactos/media/doc/README.WINE b/reactos/media/doc/README.WINE index 5f954383c3f..8ce2277cc2b 100644 --- a/reactos/media/doc/README.WINE +++ b/reactos/media/doc/README.WINE @@ -195,7 +195,7 @@ reactos/dll/win32/vbscript # Synced to WineStaging-2.9 reactos/dll/win32/version # Synced to WineStaging-2.9 reactos/dll/win32/vssapi # Synced to WineStaging-1.9.11 reactos/dll/win32/wbemdisp # Synced to WineStaging-2.9 -reactos/dll/win32/wbemprox # Synced to WineStaging-2.2 +reactos/dll/win32/wbemprox # Synced to WineStaging-2.9 reactos/dll/win32/windowscodecs # Synced to WineStaging-1.9.23 reactos/dll/win32/windowscodecsext # Synced to WineStaging-1.9.11 reactos/dll/win32/winemp3.acm # Synced to WineStaging-2.2