[2/5] wbemprox: Implement IWbemServices::CreateInstanceEnum.

Hans Leidekker hans at codeweavers.com
Tue Jun 26 09:02:04 CDT 2012


---
 dlls/wbemprox/services.c |   20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/dlls/wbemprox/services.c b/dlls/wbemprox/services.c
index b4bc8fb..aeca7c8 100644
--- a/dlls/wbemprox/services.c
+++ b/dlls/wbemprox/services.c
@@ -366,13 +366,27 @@ static HRESULT WINAPI wbem_services_DeleteInstanceAsync(
 
 static HRESULT WINAPI wbem_services_CreateInstanceEnum(
     IWbemServices *iface,
-    const BSTR strFilter,
+    const BSTR strClass,
     LONG lFlags,
     IWbemContext *pCtx,
     IEnumWbemClassObject **ppEnum )
 {
-    FIXME("\n");
-    return WBEM_E_FAILED;
+    static const WCHAR selectW[] = {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',0};
+    WCHAR *query;
+    HRESULT hr;
+
+    TRACE("%p, %s, 0%08x, %p, %p\n", iface, debugstr_w(strClass), lFlags, pCtx, ppEnum);
+
+    if (lFlags) FIXME("unsupported flags 0x%08x\n", lFlags);
+
+    if (!(query = heap_alloc( strlenW( strClass ) * sizeof(WCHAR) + sizeof(selectW) )))
+        return E_OUTOFMEMORY;
+    strcpyW( query, selectW );
+    strcatW( query, strClass );
+
+    hr = exec_query( query, ppEnum );
+    heap_free( query );
+    return hr;
 }
 
 static HRESULT WINAPI wbem_services_CreateInstanceEnumAsync(
-- 
1.7.10







More information about the wine-patches mailing list