Commit 21ea8b3c authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

wbemprox: Implement IWbemServices::OpenNamespace.

parent d93e61f2
...@@ -201,8 +201,17 @@ static HRESULT WINAPI wbem_services_OpenNamespace( ...@@ -201,8 +201,17 @@ static HRESULT WINAPI wbem_services_OpenNamespace(
IWbemServices **ppWorkingNamespace, IWbemServices **ppWorkingNamespace,
IWbemCallResult **ppResult ) IWbemCallResult **ppResult )
{ {
FIXME("\n"); static const WCHAR cimv2W[] = {'c','i','m','v','2',0};
return WBEM_E_FAILED; static const WCHAR defaultW[] = {'d','e','f','a','u','l','t',0};
struct wbem_services *ws = impl_from_IWbemServices( iface );
TRACE("%p, %s, 0x%08x, %p, %p, %p\n", iface, debugstr_w(strNamespace), lFlags,
pCtx, ppWorkingNamespace, ppResult);
if ((strcmpiW( strNamespace, cimv2W ) && strcmpiW( strNamespace, defaultW )) || ws->namespace)
return WBEM_E_INVALID_NAMESPACE;
return WbemServices_create( NULL, cimv2W, (void **)ppWorkingNamespace );
} }
static HRESULT WINAPI wbem_services_CancelAsyncCall( static HRESULT WINAPI wbem_services_CancelAsyncCall(
...@@ -488,7 +497,7 @@ static const IWbemServicesVtbl wbem_services_vtbl = ...@@ -488,7 +497,7 @@ static const IWbemServicesVtbl wbem_services_vtbl =
wbem_services_ExecMethodAsync wbem_services_ExecMethodAsync
}; };
HRESULT WbemServices_create( IUnknown *pUnkOuter, WCHAR *namespace, LPVOID *ppObj ) HRESULT WbemServices_create( IUnknown *pUnkOuter, const WCHAR *namespace, LPVOID *ppObj )
{ {
struct wbem_services *ws; struct wbem_services *ws;
...@@ -499,7 +508,7 @@ HRESULT WbemServices_create( IUnknown *pUnkOuter, WCHAR *namespace, LPVOID *ppOb ...@@ -499,7 +508,7 @@ HRESULT WbemServices_create( IUnknown *pUnkOuter, WCHAR *namespace, LPVOID *ppOb
ws->IWbemServices_iface.lpVtbl = &wbem_services_vtbl; ws->IWbemServices_iface.lpVtbl = &wbem_services_vtbl;
ws->refs = 1; ws->refs = 1;
ws->namespace = namespace; ws->namespace = heap_strdupW( namespace );
*ppObj = &ws->IWbemServices_iface; *ppObj = &ws->IWbemServices_iface;
......
...@@ -192,10 +192,10 @@ static HRESULT WINAPI wbem_locator_ConnectServer( ...@@ -192,10 +192,10 @@ static HRESULT WINAPI wbem_locator_ConnectServer(
FIXME("unsupported flags\n"); FIXME("unsupported flags\n");
hr = WbemServices_create( NULL, namespace, (void **)ppNamespace ); hr = WbemServices_create( NULL, namespace, (void **)ppNamespace );
heap_free( namespace );
if (SUCCEEDED( hr )) if (SUCCEEDED( hr ))
return WBEM_NO_ERROR; return WBEM_NO_ERROR;
heap_free( namespace );
return WBEM_E_FAILED; return WBEM_E_FAILED;
} }
......
...@@ -121,7 +121,7 @@ HRESULT get_propval( const struct view *, UINT, const WCHAR *, VARIANT *, ...@@ -121,7 +121,7 @@ HRESULT get_propval( const struct view *, UINT, const WCHAR *, VARIANT *,
HRESULT get_properties( const struct view *, SAFEARRAY ** ) DECLSPEC_HIDDEN; HRESULT get_properties( const struct view *, SAFEARRAY ** ) DECLSPEC_HIDDEN;
HRESULT WbemLocator_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN; HRESULT WbemLocator_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN;
HRESULT WbemServices_create(IUnknown *, WCHAR *, LPVOID *) DECLSPEC_HIDDEN; HRESULT WbemServices_create(IUnknown *, const WCHAR *, LPVOID *) DECLSPEC_HIDDEN;
HRESULT WbemClassObject_create(IUnknown *, IEnumWbemClassObject *, UINT, LPVOID *) DECLSPEC_HIDDEN; HRESULT WbemClassObject_create(IUnknown *, IEnumWbemClassObject *, UINT, LPVOID *) DECLSPEC_HIDDEN;
HRESULT EnumWbemClassObject_create(IUnknown *, struct query *, LPVOID *) DECLSPEC_HIDDEN; HRESULT EnumWbemClassObject_create(IUnknown *, struct query *, LPVOID *) DECLSPEC_HIDDEN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment