ReactOS  0.4.13-dev-101-g0ca4b50
locator.c
Go to the documentation of this file.
1 /*
2  * Copyright 2013 Hans Leidekker for CodeWeavers
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17  */
18 
19 #define COBJMACROS
20 
21 #include "config.h"
22 #include <stdarg.h>
23 
24 #include "windef.h"
25 #include "winbase.h"
26 #include "initguid.h"
27 #include "objbase.h"
28 #include "wmiutils.h"
29 #include "wbemcli.h"
30 #include "wbemdisp.h"
31 
32 #include "wine/debug.h"
33 #include "wine/heap.h"
34 #include "wine/unicode.h"
35 #include "wbemdisp_private.h"
36 #include "wbemdisp_classes.h"
37 
39 
41 static HRESULT ISWbemSecurity_create( ISWbemSecurity ** );
42 
43 enum type_id
44 {
53 };
54 
57 
59 {
60  &IID_ISWbemLocator,
61  &IID_ISWbemObject,
62  &IID_ISWbemObjectSet,
63  &IID_ISWbemProperty,
64  &IID_ISWbemPropertySet,
65  &IID_ISWbemServices,
66  &IID_ISWbemSecurity
67 };
68 
70 {
71  HRESULT hr;
72 
73  if (!wbemdisp_typelib)
74  {
76 
77  hr = LoadRegTypeLib( &LIBID_WbemScripting, 1, 2, LOCALE_SYSTEM_DEFAULT, &typelib );
78  if (FAILED( hr ))
79  {
80  ERR( "LoadRegTypeLib failed: %08x\n", hr );
81  return hr;
82  }
84  ITypeLib_Release( typelib );
85  }
86  if (!wbemdisp_typeinfo[tid])
87  {
89 
90  hr = ITypeLib_GetTypeInfoOfGuid( wbemdisp_typelib, wbemdisp_tid_id[tid], &typeinfo );
91  if (FAILED( hr ))
92  {
93  ERR( "GetTypeInfoOfGuid(%s) failed: %08x\n", debugstr_guid(wbemdisp_tid_id[tid]), hr );
94  return hr;
95  }
97  ITypeInfo_Release( typeinfo );
98  }
100  ITypeInfo_AddRef( *ret );
101  return S_OK;
102 }
103 
104 struct property
105 {
106  ISWbemProperty ISWbemProperty_iface;
110 };
111 
112 static inline struct property *impl_from_ISWbemProperty( ISWbemProperty *iface )
113 {
114  return CONTAINING_RECORD( iface, struct property, ISWbemProperty_iface );
115 }
116 
117 static ULONG WINAPI property_AddRef( ISWbemProperty *iface )
118 {
119  struct property *property = impl_from_ISWbemProperty( iface );
120  return InterlockedIncrement( &property->refs );
121 }
122 
123 static ULONG WINAPI property_Release( ISWbemProperty *iface )
124 {
125  struct property *property = impl_from_ISWbemProperty( iface );
127  if (!refs)
128  {
129  TRACE( "destroying %p\n", property );
130  IWbemClassObject_Release( property->object );
132  heap_free( property );
133  }
134  return refs;
135 }
136 
137 static HRESULT WINAPI property_QueryInterface( ISWbemProperty *iface, REFIID riid, void **obj )
138 {
139  struct property *property = impl_from_ISWbemProperty( iface );
140 
141  TRACE( "%p %s %p\n", property, debugstr_guid(riid), obj );
142 
143  if (IsEqualGUID( riid, &IID_ISWbemProperty ) ||
146  {
147  *obj = iface;
148  }
149  else
150  {
151  FIXME( "interface %s not implemented\n", debugstr_guid(riid) );
152  return E_NOINTERFACE;
153  }
154  ISWbemProperty_AddRef( iface );
155  return S_OK;
156 }
157 
158 static HRESULT WINAPI property_GetTypeInfoCount( ISWbemProperty *iface, UINT *count )
159 {
160  struct property *property = impl_from_ISWbemProperty( iface );
161  TRACE( "%p, %p\n", property, count );
162  *count = 1;
163  return S_OK;
164 }
165 
166 static HRESULT WINAPI property_GetTypeInfo( ISWbemProperty *iface, UINT index,
167  LCID lcid, ITypeInfo **info )
168 {
169  struct property *property = impl_from_ISWbemProperty( iface );
170  TRACE( "%p, %u, %u, %p\n", property, index, lcid, info );
171 
173 }
174 
175 static HRESULT WINAPI property_GetIDsOfNames( ISWbemProperty *iface, REFIID riid, LPOLESTR *names,
176  UINT count, LCID lcid, DISPID *dispid )
177 {
178  struct property *property = impl_from_ISWbemProperty( iface );
180  HRESULT hr;
181 
182  TRACE( "%p, %s, %p, %u, %u, %p\n", property, debugstr_guid(riid), names, count, lcid, dispid );
183 
184  if (!names || !count || !dispid) return E_INVALIDARG;
185 
187  if (SUCCEEDED(hr))
188  {
189  hr = ITypeInfo_GetIDsOfNames( typeinfo, names, count, dispid );
190  ITypeInfo_Release( typeinfo );
191  }
192  return hr;
193 }
194 
195 static HRESULT WINAPI property_Invoke( ISWbemProperty *iface, DISPID member, REFIID riid,
196  LCID lcid, WORD flags, DISPPARAMS *params,
197  VARIANT *result, EXCEPINFO *excep_info, UINT *arg_err )
198 {
199  struct property *property = impl_from_ISWbemProperty( iface );
201  HRESULT hr;
202 
203  TRACE( "%p, %d, %s, %d, %d, %p, %p, %p, %p\n", property, member, debugstr_guid(riid),
204  lcid, flags, params, result, excep_info, arg_err );
205 
207  if (SUCCEEDED(hr))
208  {
209  hr = ITypeInfo_Invoke( typeinfo, &property->ISWbemProperty_iface, member, flags,
210  params, result, excep_info, arg_err );
211  ITypeInfo_Release( typeinfo );
212  }
213  return hr;
214 }
215 
216 static HRESULT WINAPI property_get_Value( ISWbemProperty *iface, VARIANT *value )
217 {
218  struct property *property = impl_from_ISWbemProperty( iface );
219 
220  TRACE( "%p %p\n", property, value );
221 
222  return IWbemClassObject_Get( property->object, property->name, 0, value, NULL, NULL );
223 }
224 
225 static HRESULT WINAPI property_put_Value( ISWbemProperty *iface, VARIANT *varValue )
226 {
227  FIXME( "\n" );
228  return E_NOTIMPL;
229 }
230 
231 static HRESULT WINAPI property_get_Name( ISWbemProperty *iface, BSTR *strName )
232 {
233  FIXME( "\n" );
234  return E_NOTIMPL;
235 }
236 
237 static HRESULT WINAPI property_get_IsLocal( ISWbemProperty *iface, VARIANT_BOOL *bIsLocal )
238 {
239  FIXME( "\n" );
240  return E_NOTIMPL;
241 }
242 
243 static HRESULT WINAPI property_get_Origin( ISWbemProperty *iface, BSTR *strOrigin )
244 {
245  FIXME( "\n" );
246  return E_NOTIMPL;
247 }
248 
249 static HRESULT WINAPI property_get_CIMType( ISWbemProperty *iface, WbemCimtypeEnum *iCimType )
250 {
251  FIXME( "\n" );
252  return E_NOTIMPL;
253 }
254 
255 static HRESULT WINAPI property_get_Qualifiers_( ISWbemProperty *iface, ISWbemQualifierSet **objWbemQualifierSet )
256 {
257  FIXME( "\n" );
258  return E_NOTIMPL;
259 }
260 
261 static HRESULT WINAPI property_get_IsArray( ISWbemProperty *iface, VARIANT_BOOL *bIsArray )
262 {
263  FIXME( "\n" );
264  return E_NOTIMPL;
265 }
266 
267 static const ISWbemPropertyVtbl property_vtbl =
268 {
284 };
285 
286 static HRESULT SWbemProperty_create( IWbemClassObject *wbem_object, BSTR name, ISWbemProperty **obj )
287 {
288  struct property *property;
289 
290  TRACE( "%p, %p\n", obj, wbem_object );
291 
292  if (!(property = heap_alloc( sizeof(*property) ))) return E_OUTOFMEMORY;
293  property->ISWbemProperty_iface.lpVtbl = &property_vtbl;
294  property->refs = 1;
295  property->object = wbem_object;
296  IWbemClassObject_AddRef( property->object );
297  property->name = SysAllocStringLen( name, SysStringLen( name ) );
298  *obj = &property->ISWbemProperty_iface;
299  TRACE( "returning iface %p\n", *obj );
300  return S_OK;
301 }
302 
304 {
305  ISWbemPropertySet ISWbemPropertySet_iface;
308 };
309 
311  ISWbemPropertySet *iface )
312 {
313  return CONTAINING_RECORD( iface, struct propertyset, ISWbemPropertySet_iface );
314 }
315 
316 static ULONG WINAPI propertyset_AddRef( ISWbemPropertySet *iface )
317 {
320 }
321 
322 static ULONG WINAPI propertyset_Release( ISWbemPropertySet *iface )
323 {
326  if (!refs)
327  {
328  TRACE( "destroying %p\n", propertyset );
329  IWbemClassObject_Release( propertyset->object );
331  }
332  return refs;
333 }
334 
335 static HRESULT WINAPI propertyset_QueryInterface( ISWbemPropertySet *iface,
336  REFIID riid, void **obj )
337 {
339 
340  TRACE( "%p %s %p\n", propertyset, debugstr_guid(riid), obj );
341 
342  if (IsEqualGUID( riid, &IID_ISWbemPropertySet ) ||
345  {
346  *obj = iface;
347  }
348  else
349  {
350  FIXME( "interface %s not implemented\n", debugstr_guid(riid) );
351  return E_NOINTERFACE;
352  }
353  ISWbemPropertySet_AddRef( iface );
354  return S_OK;
355 }
356 
357 static HRESULT WINAPI propertyset_GetTypeInfoCount( ISWbemPropertySet *iface, UINT *count )
358 {
360  TRACE( "%p, %p\n", propertyset, count );
361  *count = 1;
362  return S_OK;
363 }
364 
365 static HRESULT WINAPI propertyset_GetTypeInfo( ISWbemPropertySet *iface,
366  UINT index, LCID lcid, ITypeInfo **info )
367 {
369  TRACE( "%p, %u, %u, %p\n", propertyset, index, lcid, info );
370 
372 }
373 
374 static HRESULT WINAPI propertyset_GetIDsOfNames( ISWbemPropertySet *iface, REFIID riid, LPOLESTR *names,
375  UINT count, LCID lcid, DISPID *dispid )
376 {
379  HRESULT hr;
380 
381  TRACE( "%p, %s, %p, %u, %u, %p\n", propertyset, debugstr_guid(riid), names, count, lcid, dispid );
382 
383  if (!names || !count || !dispid) return E_INVALIDARG;
384 
386  if (SUCCEEDED(hr))
387  {
388  hr = ITypeInfo_GetIDsOfNames( typeinfo, names, count, dispid );
389  ITypeInfo_Release( typeinfo );
390  }
391  return hr;
392 }
393 
394 static HRESULT WINAPI propertyset_Invoke( ISWbemPropertySet *iface, DISPID member, REFIID riid,
395  LCID lcid, WORD flags, DISPPARAMS *params,
396  VARIANT *result, EXCEPINFO *excep_info, UINT *arg_err )
397 {
400  HRESULT hr;
401 
402  TRACE( "%p, %d, %s, %d, %d, %p, %p, %p, %p\n", propertyset, member, debugstr_guid(riid),
403  lcid, flags, params, result, excep_info, arg_err );
404 
406  if (SUCCEEDED(hr))
407  {
408  hr = ITypeInfo_Invoke( typeinfo, &propertyset->ISWbemPropertySet_iface, member, flags,
409  params, result, excep_info, arg_err );
410  ITypeInfo_Release( typeinfo );
411  }
412  return hr;
413 }
414 
415 static HRESULT WINAPI propertyset_get__NewEnum( ISWbemPropertySet *iface, IUnknown **unk )
416 {
417  FIXME( "\n" );
418  return E_NOTIMPL;
419 }
420 
421 static HRESULT WINAPI propertyset_Item( ISWbemPropertySet *iface, BSTR name,
422  LONG flags, ISWbemProperty **prop )
423 {
425  HRESULT hr;
426  VARIANT var;
427 
428  TRACE( "%p, %s, %08x, %p\n", propertyset, debugstr_w(name), flags, prop );
429 
430  hr = IWbemClassObject_Get( propertyset->object, name, 0, &var, NULL, NULL );
431  if (SUCCEEDED(hr))
432  {
434  VariantClear( &var );
435  }
436  return hr;
437 }
438 
439 static HRESULT WINAPI propertyset_get_Count( ISWbemPropertySet *iface, LONG *count )
440 {
441  static const WCHAR propcountW[] = {'_','_','P','R','O','P','E','R','T','Y','_','C','O','U','N','T',0};
443  HRESULT hr;
444  VARIANT val;
445 
446  TRACE( "%p, %p\n", propertyset, count );
447 
448  hr = IWbemClassObject_Get( propertyset->object, propcountW, 0, &val, NULL, NULL );
449  if (SUCCEEDED(hr))
450  {
451  *count = V_I4( &val );
452  }
453  return hr;
454 }
455 
456 static HRESULT WINAPI propertyset_Add( ISWbemPropertySet *iface, BSTR name, WbemCimtypeEnum type,
457  VARIANT_BOOL is_array, LONG flags, ISWbemProperty **prop )
458 {
459  FIXME( "\n" );
460  return E_NOTIMPL;
461 }
462 
463 static HRESULT WINAPI propertyset_Remove( ISWbemPropertySet *iface, BSTR name, LONG flags )
464 {
465  FIXME( "\n" );
466  return E_NOTIMPL;
467 }
468 
469 static const ISWbemPropertySetVtbl propertyset_vtbl =
470 {
483 };
484 
485 static HRESULT SWbemPropertySet_create( IWbemClassObject *wbem_object, ISWbemPropertySet **obj )
486 {
487  struct propertyset *propertyset;
488 
489  TRACE( "%p, %p\n", obj, wbem_object );
490 
491  if (!(propertyset = heap_alloc( sizeof(*propertyset) ))) return E_OUTOFMEMORY;
493  propertyset->refs = 1;
494  propertyset->object = wbem_object;
495  IWbemClassObject_AddRef( propertyset->object );
497 
498  TRACE( "returning iface %p\n", *obj );
499  return S_OK;
500 }
501 
502 #define DISPID_BASE 0x1800000
503 #define DISPID_BASE_METHOD 0x1000000
504 
505 struct member
506 {
510 };
511 
512 struct object
513 {
514  ISWbemObject ISWbemObject_iface;
517  struct member *members;
521 };
522 
523 static inline struct object *impl_from_ISWbemObject(
524  ISWbemObject *iface )
525 {
526  return CONTAINING_RECORD( iface, struct object, ISWbemObject_iface );
527 }
528 
530  ISWbemObject *iface )
531 {
532  struct object *object = impl_from_ISWbemObject( iface );
533  return InterlockedIncrement( &object->refs );
534 }
535 
537  ISWbemObject *iface )
538 {
539  struct object *object = impl_from_ISWbemObject( iface );
541  if (!refs)
542  {
543  UINT i;
544 
545  TRACE( "destroying %p\n", object );
546  IWbemClassObject_Release( object->object );
547  for (i = 0; i < object->nb_members; i++) SysFreeString( object->members[i].name );
549  heap_free( object );
550  }
551  return refs;
552 }
553 
555  ISWbemObject *iface,
556  REFIID riid,
557  void **ppvObject )
558 {
559  struct object *object = impl_from_ISWbemObject( iface );
560 
561  TRACE( "%p %s %p\n", object, debugstr_guid(riid), ppvObject );
562 
563  if (IsEqualGUID( riid, &IID_ISWbemObject ) ||
566  {
567  *ppvObject = iface;
568  }
569  else
570  {
571  FIXME( "interface %s not implemented\n", debugstr_guid(riid) );
572  return E_NOINTERFACE;
573  }
574  ISWbemObject_AddRef( iface );
575  return S_OK;
576 }
577 
579  ISWbemObject *iface,
580  UINT *count )
581 {
582  struct object *object = impl_from_ISWbemObject( iface );
583 
584  TRACE( "%p, %p\n", object, count );
585  *count = 1;
586  return S_OK;
587 }
588 
590  ISWbemObject *iface,
591  UINT index,
592  LCID lcid,
593  ITypeInfo **info )
594 {
595  struct object *object = impl_from_ISWbemObject( iface );
596  FIXME( "%p, %u, %u, %p\n", object, index, lcid, info );
597  return E_NOTIMPL;
598 }
599 
600 static HRESULT init_members( struct object *object )
601 {
602  IWbemClassObject *sig_in, *sig_out;
603  LONG i = 0, count = 0;
604  BSTR name;
605  HRESULT hr;
606 
607  if (object->members) return S_OK;
608 
609  hr = IWbemClassObject_BeginEnumeration( object->object, 0 );
610  if (SUCCEEDED( hr ))
611  {
612  while (IWbemClassObject_Next( object->object, 0, NULL, NULL, NULL, NULL ) == S_OK) count++;
613  IWbemClassObject_EndEnumeration( object->object );
614  }
615 
616  hr = IWbemClassObject_BeginMethodEnumeration( object->object, 0 );
617  if (SUCCEEDED( hr ))
618  {
619  while (IWbemClassObject_NextMethod( object->object, 0, &name, &sig_in, &sig_out ) == S_OK)
620  {
621  count++;
622  SysFreeString( name );
623  IWbemClassObject_Release( sig_in );
624  IWbemClassObject_Release( sig_out );
625  }
626  IWbemClassObject_EndMethodEnumeration( object->object );
627  }
628 
629  if (!(object->members = heap_alloc( sizeof(struct member) * count ))) return E_OUTOFMEMORY;
630 
631  hr = IWbemClassObject_BeginEnumeration( object->object, 0 );
632  if (SUCCEEDED( hr ))
633  {
634  while (IWbemClassObject_Next( object->object, 0, &name, NULL, NULL, NULL ) == S_OK)
635  {
636  object->members[i].name = name;
637  object->members[i].is_method = FALSE;
638  object->members[i].dispid = 0;
639  if (++i > count)
640  {
641  IWbemClassObject_EndEnumeration( object->object );
642  goto error;
643  }
644  TRACE( "added property %s\n", debugstr_w(name) );
645  }
646  IWbemClassObject_EndEnumeration( object->object );
647  }
648 
649  hr = IWbemClassObject_BeginMethodEnumeration( object->object, 0 );
650  if (SUCCEEDED( hr ))
651  {
652  while (IWbemClassObject_NextMethod( object->object, 0, &name, &sig_in, &sig_out ) == S_OK)
653  {
654  object->members[i].name = name;
655  object->members[i].is_method = TRUE;
656  object->members[i].dispid = 0;
657  if (++i > count)
658  {
659  IWbemClassObject_EndMethodEnumeration( object->object );
660  goto error;
661  }
662  IWbemClassObject_Release( sig_in );
663  IWbemClassObject_Release( sig_out );
664  TRACE( "added method %s\n", debugstr_w(name) );
665  }
666  IWbemClassObject_EndMethodEnumeration( object->object );
667  }
668 
669  object->nb_members = count;
670  TRACE( "added %u members\n", object->nb_members );
671  return S_OK;
672 
673 error:
674  for (--i; i >= 0; i--) SysFreeString( object->members[i].name );
676  object->members = NULL;
677  object->nb_members = 0;
678  return E_FAIL;
679 }
680 
681 static DISPID get_member_dispid( struct object *object, const WCHAR *name )
682 {
683  UINT i;
684  for (i = 0; i < object->nb_members; i++)
685  {
686  if (!strcmpiW( object->members[i].name, name ))
687  {
688  if (!object->members[i].dispid)
689  {
690  if (object->members[i].is_method)
691  object->members[i].dispid = ++object->last_dispid_method;
692  else
693  object->members[i].dispid = ++object->last_dispid;
694  }
695  return object->members[i].dispid;
696  }
697  }
698  return DISPID_UNKNOWN;
699 }
700 
702  ISWbemObject *iface,
703  REFIID riid,
704  LPOLESTR *names,
705  UINT count,
706  LCID lcid,
707  DISPID *dispid )
708 {
709  struct object *object = impl_from_ISWbemObject( iface );
710  HRESULT hr;
711  UINT i;
713 
714  TRACE( "%p, %s, %p, %u, %u, %p\n", object, debugstr_guid(riid), names, count, lcid, dispid );
715 
716  if (!names || !count || !dispid) return E_INVALIDARG;
717 
718  hr = init_members( object );
719  if (FAILED( hr )) return hr;
720 
722  if (SUCCEEDED(hr))
723  {
724  hr = ITypeInfo_GetIDsOfNames( typeinfo, names, count, dispid );
725  ITypeInfo_Release( typeinfo );
726  }
727  if (SUCCEEDED(hr)) return hr;
728 
729  for (i = 0; i < count; i++)
730  {
731  if ((dispid[i] = get_member_dispid( object, names[i] )) == DISPID_UNKNOWN) break;
732  }
733  if (i != count) return DISP_E_UNKNOWNNAME;
734  return S_OK;
735 }
736 
737 static BSTR get_member_name( struct object *object, DISPID dispid )
738 {
739  UINT i;
740  for (i = 0; i < object->nb_members; i++)
741  {
742  if (object->members[i].dispid == dispid) return object->members[i].name;
743  }
744  return NULL;
745 }
746 
748  ISWbemObject *iface,
749  DISPID member,
750  REFIID riid,
751  LCID lcid,
752  WORD flags,
754  VARIANT *result,
755  EXCEPINFO *excep_info,
756  UINT *arg_err )
757 {
758  struct object *object = impl_from_ISWbemObject( iface );
759  BSTR name;
761  HRESULT hr;
762 
763  TRACE( "%p, %x, %s, %u, %x, %p, %p, %p, %p\n", object, member, debugstr_guid(riid),
764  lcid, flags, params, result, excep_info, arg_err );
765 
766  if (member <= DISPID_BASE_METHOD)
767  {
769  if (SUCCEEDED(hr))
770  {
771  hr = ITypeInfo_Invoke( typeinfo, &object->ISWbemObject_iface, member, flags,
772  params, result, excep_info, arg_err );
773  ITypeInfo_Release( typeinfo );
774  }
775  return hr;
776  }
777 
779  {
780  FIXME( "flags %x not supported\n", flags );
781  return E_NOTIMPL;
782  }
783  if (!(name = get_member_name( object, member )))
784  return DISP_E_MEMBERNOTFOUND;
785 
786  memset( params, 0, sizeof(*params) );
787  return IWbemClassObject_Get( object->object, name, 0, result, NULL, NULL );
788 }
789 
791  ISWbemObject *iface,
792  LONG iFlags,
793  IDispatch *objWbemNamedValueSet,
794  ISWbemObjectPath **objWbemObjectPath )
795 {
796  FIXME( "\n" );
797  return E_NOTIMPL;
798 }
799 
801  ISWbemObject *iface,
802  IDispatch *objWbemSink,
803  LONG iFlags,
804  IDispatch *objWbemNamedValueSet,
805  IDispatch *objWbemAsyncContext )
806 {
807  FIXME( "\n" );
808  return E_NOTIMPL;
809 }
810 
812  ISWbemObject *iface,
813  LONG iFlags,
814  IDispatch *objWbemNamedValueSet )
815 {
816  FIXME( "\n" );
817  return E_NOTIMPL;
818 }
819 
821  ISWbemObject *iface,
822  IDispatch *objWbemSink,
823  LONG iFlags,
824  IDispatch *objWbemNamedValueSet,
825  IDispatch *objWbemAsyncContext )
826 {
827  FIXME( "\n" );
828  return E_NOTIMPL;
829 }
830 
832  ISWbemObject *iface,
833  LONG iFlags,
834  IDispatch *objWbemNamedValueSet,
835  ISWbemObjectSet **objWbemObjectSet )
836 {
837  FIXME( "\n" );
838  return E_NOTIMPL;
839 }
840 
842  ISWbemObject *iface,
843  IDispatch *objWbemSink,
844  LONG iFlags,
845  IDispatch *objWbemNamedValueSet,
846  IDispatch *objWbemAsyncContext )
847 {
848  FIXME( "\n" );
849  return E_NOTIMPL;
850 }
851 
853  ISWbemObject *iface,
854  LONG iFlags,
855  IDispatch *objWbemNamedValueSet,
856  ISWbemObjectSet **objWbemObjectSet )
857 {
858  FIXME( "\n" );
859  return E_NOTIMPL;
860 }
861 
863  ISWbemObject *iface,
864  IDispatch *objWbemSink,
865  LONG iFlags,
866  IDispatch *objWbemNamedValueSet,
867  IDispatch *objWbemAsyncContext )
868 {
869  FIXME( "\n" );
870  return E_NOTIMPL;
871 }
872 
874  ISWbemObject *iface,
875  BSTR strAssocClass,
876  BSTR strResultClass,
877  BSTR strResultRole,
878  BSTR strRole,
879  VARIANT_BOOL bClassesOnly,
880  VARIANT_BOOL bSchemaOnly,
881  BSTR strRequiredAssocQualifier,
882  BSTR strRequiredQualifier,
883  LONG iFlags,
884  IDispatch *objWbemNamedValueSet,
885  ISWbemObjectSet **objWbemObjectSet )
886 {
887  FIXME( "\n" );
888  return E_NOTIMPL;
889 }
890 
892  ISWbemObject *iface,
893  IDispatch *objWbemSink,
894  BSTR strAssocClass,
895  BSTR strResultClass,
896  BSTR strResultRole,
897  BSTR strRole,
898  VARIANT_BOOL bClassesOnly,
899  VARIANT_BOOL bSchemaOnly,
900  BSTR strRequiredAssocQualifier,
901  BSTR strRequiredQualifier,
902  LONG iFlags,
903  IDispatch *objWbemNamedValueSet,
904  IDispatch *objWbemAsyncContext )
905 {
906  FIXME( "\n" );
907  return E_NOTIMPL;
908 }
909 
911  ISWbemObject *iface,
912  BSTR strResultClass,
913  BSTR strRole,
914  VARIANT_BOOL bClassesOnly,
915  VARIANT_BOOL bSchemaOnly,
916  BSTR strRequiredQualifier,
917  LONG iFlags,
918  IDispatch *objWbemNamedValueSet,
919  ISWbemObjectSet **objWbemObjectSet )
920 {
921  FIXME( "\n" );
922  return E_NOTIMPL;
923 }
924 
926  ISWbemObject *iface,
927  IDispatch *objWbemSink,
928  BSTR strResultClass,
929  BSTR strRole,
930  VARIANT_BOOL bClassesOnly,
931  VARIANT_BOOL bSchemaOnly,
932  BSTR strRequiredQualifier,
933  LONG iFlags,
934  IDispatch *objWbemNamedValueSet,
935  IDispatch *objWbemAsyncContext )
936 {
937  FIXME( "\n" );
938  return E_NOTIMPL;
939 }
940 
942  ISWbemObject *iface,
943  BSTR strMethodName,
944  IDispatch *objWbemInParameters,
945  LONG iFlags,
946  IDispatch *objWbemNamedValueSet,
947  ISWbemObject **objWbemOutParameters )
948 {
949  FIXME( "\n" );
950  return E_NOTIMPL;
951 }
952 
954  ISWbemObject *iface,
955  IDispatch *objWbemSink,
956  BSTR strMethodName,
957  IDispatch *objWbemInParameters,
958  LONG iFlags,
959  IDispatch *objWbemNamedValueSet,
960  IDispatch *objWbemAsyncContext )
961 {
962  FIXME( "\n" );
963  return E_NOTIMPL;
964 }
965 
967  ISWbemObject *iface,
968  ISWbemObject **objWbemObject )
969 {
970  FIXME( "\n" );
971  return E_NOTIMPL;
972 }
973 
975  ISWbemObject *iface,
976  LONG iFlags,
977  BSTR *strObjectText )
978 {
979  FIXME( "\n" );
980  return E_NOTIMPL;
981 }
982 
984  ISWbemObject *iface,
985  LONG iFlags,
986  ISWbemObject **objWbemObject )
987 {
988  FIXME( "\n" );
989  return E_NOTIMPL;
990 }
991 
993  ISWbemObject *iface,
994  LONG iFlags,
995  ISWbemObject **objWbemObject )
996 {
997  FIXME( "\n" );
998  return E_NOTIMPL;
999 }
1000 
1002  ISWbemObject *iface,
1003  IDispatch *objWbemObject,
1004  LONG iFlags,
1005  VARIANT_BOOL *bResult )
1006 {
1007  FIXME( "\n" );
1008  return E_NOTIMPL;
1009 }
1010 
1012  ISWbemObject *iface,
1013  ISWbemQualifierSet **objWbemQualifierSet )
1014 {
1015  FIXME( "\n" );
1016  return E_NOTIMPL;
1017 }
1018 
1019 static HRESULT WINAPI object_get_Properties_( ISWbemObject *iface, ISWbemPropertySet **prop_set )
1020 {
1021  struct object *object = impl_from_ISWbemObject( iface );
1022 
1023  TRACE( "%p, %p\n", object, prop_set );
1024  return SWbemPropertySet_create( object->object, prop_set );
1025 }
1026 
1028  ISWbemObject *iface,
1029  ISWbemMethodSet **objWbemMethodSet )
1030 {
1031  FIXME( "\n" );
1032  return E_NOTIMPL;
1033 }
1034 
1036  ISWbemObject *iface,
1037  VARIANT *strClassNameArray )
1038 {
1039  FIXME( "\n" );
1040  return E_NOTIMPL;
1041 }
1042 
1044  ISWbemObject *iface,
1045  ISWbemObjectPath **objWbemObjectPath )
1046 {
1047  FIXME( "\n" );
1048  return E_NOTIMPL;
1049 }
1050 
1052  ISWbemObject *iface,
1053  ISWbemSecurity **objWbemSecurity )
1054 {
1055  FIXME( "\n" );
1056  return E_NOTIMPL;
1057 }
1058 
1059 static const ISWbemObjectVtbl object_vtbl =
1060 {
1062  object_AddRef,
1067  object_Invoke,
1068  object_Put_,
1082  object_Clone_,
1093 };
1094 
1095 static HRESULT SWbemObject_create( IWbemClassObject *wbem_object, ISWbemObject **obj )
1096 {
1097  struct object *object;
1098 
1099  TRACE( "%p, %p\n", obj, wbem_object );
1100 
1101  if (!(object = heap_alloc( sizeof(*object) ))) return E_OUTOFMEMORY;
1102  object->ISWbemObject_iface.lpVtbl = &object_vtbl;
1103  object->refs = 1;
1104  object->object = wbem_object;
1105  IWbemClassObject_AddRef( object->object );
1106  object->members = NULL;
1107  object->nb_members = 0;
1108  object->last_dispid = DISPID_BASE;
1109  object->last_dispid_method = DISPID_BASE_METHOD;
1110 
1111  *obj = &object->ISWbemObject_iface;
1112  TRACE( "returning iface %p\n", *obj );
1113  return S_OK;
1114 }
1115 
1117 {
1118  ISWbemObjectSet ISWbemObjectSet_iface;
1122 };
1123 
1124 static inline struct objectset *impl_from_ISWbemObjectSet(
1125  ISWbemObjectSet *iface )
1126 {
1127  return CONTAINING_RECORD( iface, struct objectset, ISWbemObjectSet_iface );
1128 }
1129 
1131  ISWbemObjectSet *iface )
1132 {
1133  struct objectset *objectset = impl_from_ISWbemObjectSet( iface );
1134  return InterlockedIncrement( &objectset->refs );
1135 }
1136 
1138  ISWbemObjectSet *iface )
1139 {
1140  struct objectset *objectset = impl_from_ISWbemObjectSet( iface );
1142  if (!refs)
1143  {
1144  TRACE( "destroying %p\n", objectset );
1145  IEnumWbemClassObject_Release( objectset->objectenum );
1146  heap_free( objectset );
1147  }
1148  return refs;
1149 }
1150 
1152  ISWbemObjectSet *iface,
1153  REFIID riid,
1154  void **ppvObject )
1155 {
1156  struct objectset *objectset = impl_from_ISWbemObjectSet( iface );
1157 
1158  TRACE( "%p %s %p\n", objectset, debugstr_guid(riid), ppvObject );
1159 
1160  if (IsEqualGUID( riid, &IID_ISWbemObjectSet ) ||
1163  {
1164  *ppvObject = iface;
1165  }
1166  else
1167  {
1168  FIXME( "interface %s not implemented\n", debugstr_guid(riid) );
1169  return E_NOINTERFACE;
1170  }
1171  ISWbemObjectSet_AddRef( iface );
1172  return S_OK;
1173 }
1174 
1176  ISWbemObjectSet *iface,
1177  UINT *count )
1178 {
1179  struct objectset *objectset = impl_from_ISWbemObjectSet( iface );
1180  TRACE( "%p, %p\n", objectset, count );
1181  *count = 1;
1182  return S_OK;
1183 }
1184 
1186  ISWbemObjectSet *iface,
1187  UINT index,
1188  LCID lcid,
1189  ITypeInfo **info )
1190 {
1191  struct objectset *objectset = impl_from_ISWbemObjectSet( iface );
1192  TRACE( "%p, %u, %u, %p\n", objectset, index, lcid, info );
1193 
1195 }
1196 
1198  ISWbemObjectSet *iface,
1199  REFIID riid,
1200  LPOLESTR *names,
1201  UINT count,
1202  LCID lcid,
1203  DISPID *dispid )
1204 {
1205  struct objectset *objectset = impl_from_ISWbemObjectSet( iface );
1207  HRESULT hr;
1208 
1209  TRACE( "%p, %s, %p, %u, %u, %p\n", objectset, debugstr_guid(riid), names, count, lcid, dispid );
1210 
1211  if (!names || !count || !dispid) return E_INVALIDARG;
1212 
1214  if (SUCCEEDED(hr))
1215  {
1216  hr = ITypeInfo_GetIDsOfNames( typeinfo, names, count, dispid );
1217  ITypeInfo_Release( typeinfo );
1218  }
1219  return hr;
1220 }
1221 
1223  ISWbemObjectSet *iface,
1224  DISPID member,
1225  REFIID riid,
1226  LCID lcid,
1227  WORD flags,
1228  DISPPARAMS *params,
1229  VARIANT *result,
1230  EXCEPINFO *excep_info,
1231  UINT *arg_err )
1232 {
1233  struct objectset *objectset = impl_from_ISWbemObjectSet( iface );
1235  HRESULT hr;
1236 
1237  TRACE( "%p, %d, %s, %d, %d, %p, %p, %p, %p\n", objectset, member, debugstr_guid(riid),
1238  lcid, flags, params, result, excep_info, arg_err );
1239 
1241  if (SUCCEEDED(hr))
1242  {
1243  hr = ITypeInfo_Invoke( typeinfo, &objectset->ISWbemObjectSet_iface, member, flags,
1244  params, result, excep_info, arg_err );
1245  ITypeInfo_Release( typeinfo );
1246  }
1247  return hr;
1248 }
1249 
1251  ISWbemObjectSet *iface,
1252  IUnknown **pUnk )
1253 {
1254  struct objectset *objectset = impl_from_ISWbemObjectSet( iface );
1256  HRESULT hr;
1257 
1258  TRACE( "%p, %p\n", objectset, pUnk );
1259 
1260  hr = IEnumWbemClassObject_Clone( objectset->objectenum, &objectenum );
1261  if (FAILED( hr )) return hr;
1262 
1264  IEnumWbemClassObject_Release( objectenum );
1265  return hr;
1266 }
1267 
1269  ISWbemObjectSet *iface,
1270  BSTR strObjectPath,
1271  LONG iFlags,
1272  ISWbemObject **objWbemObject )
1273 {
1274  FIXME( "\n" );
1275  return E_NOTIMPL;
1276 }
1277 
1279  ISWbemObjectSet *iface,
1280  LONG *iCount )
1281 {
1282  struct objectset *objectset = impl_from_ISWbemObjectSet( iface );
1283 
1284  TRACE( "%p, %p\n", objectset, iCount );
1285 
1286  *iCount = objectset->count;
1287  return S_OK;
1288 }
1289 
1291  ISWbemObjectSet *iface,
1292  ISWbemSecurity **objWbemSecurity )
1293 {
1294  FIXME( "\n" );
1295  return E_NOTIMPL;
1296 }
1297 
1299  ISWbemObjectSet *iface,
1300  LONG lIndex,
1301  ISWbemObject **objWbemObject )
1302 {
1303  struct objectset *objectset = impl_from_ISWbemObjectSet( iface );
1304  LONG count;
1305  HRESULT hr;
1306  IEnumVARIANT *enum_var;
1307  VARIANT var;
1308 
1309  TRACE( "%p, %d, %p\n", objectset, lIndex, objWbemObject );
1310 
1311  *objWbemObject = NULL;
1312  hr = ISWbemObjectSet_get_Count( iface, &count );
1313  if (FAILED(hr)) return hr;
1314 
1315  if (lIndex >= count) return WBEM_E_NOT_FOUND;
1316 
1317  hr = ISWbemObjectSet_get__NewEnum( iface, (IUnknown **)&enum_var );
1318  if (FAILED(hr)) return hr;
1319 
1320  IEnumVARIANT_Reset( enum_var );
1321  hr = IEnumVARIANT_Skip( enum_var, lIndex );
1322  if (SUCCEEDED(hr))
1323  hr = IEnumVARIANT_Next( enum_var, 1, &var, NULL );
1324  IEnumVARIANT_Release( enum_var );
1325 
1326  if (SUCCEEDED(hr))
1327  {
1328  if (V_VT( &var ) == VT_DISPATCH)
1329  hr = IDispatch_QueryInterface( V_DISPATCH( &var ), &IID_ISWbemObject, (void **)objWbemObject );
1330  else
1331  hr = WBEM_E_NOT_FOUND;
1332  VariantClear( &var );
1333  }
1334 
1335  return hr;
1336 }
1337 
1338 static const ISWbemObjectSetVtbl objectset_vtbl =
1339 {
1352 };
1353 
1355 {
1356  LONG count = 0;
1357  while (IEnumWbemClassObject_Skip( iter, WBEM_INFINITE, 1 ) == S_OK) count++;
1358  IEnumWbemClassObject_Reset( iter );
1359  return count;
1360 }
1361 
1362 static HRESULT SWbemObjectSet_create( IEnumWbemClassObject *wbem_objectenum, ISWbemObjectSet **obj )
1363 {
1364  struct objectset *objectset;
1365 
1366  TRACE( "%p, %p\n", obj, wbem_objectenum );
1367 
1368  if (!(objectset = heap_alloc( sizeof(*objectset) ))) return E_OUTOFMEMORY;
1370  objectset->refs = 1;
1371  objectset->objectenum = wbem_objectenum;
1372  IEnumWbemClassObject_AddRef( objectset->objectenum );
1374 
1376  TRACE( "returning iface %p\n", *obj );
1377  return S_OK;
1378 }
1379 
1380 struct enumvar
1381 {
1385 };
1386 
1387 static inline struct enumvar *impl_from_IEnumVARIANT(
1388  IEnumVARIANT *iface )
1389 {
1390  return CONTAINING_RECORD( iface, struct enumvar, IEnumVARIANT_iface );
1391 }
1392 
1394  IEnumVARIANT *iface )
1395 {
1396  struct enumvar *enumvar = impl_from_IEnumVARIANT( iface );
1397  return InterlockedIncrement( &enumvar->refs );
1398 }
1399 
1401  IEnumVARIANT *iface )
1402 {
1403  struct enumvar *enumvar = impl_from_IEnumVARIANT( iface );
1405  if (!refs)
1406  {
1407  TRACE( "destroying %p\n", enumvar );
1408  IEnumWbemClassObject_Release( enumvar->objectenum );
1409  heap_free( enumvar );
1410  }
1411  return refs;
1412 }
1413 
1415  IEnumVARIANT *iface,
1416  REFIID riid,
1417  void **ppvObject )
1418 {
1419  struct enumvar *enumvar = impl_from_IEnumVARIANT( iface );
1420 
1421  TRACE( "%p %s %p\n", enumvar, debugstr_guid(riid), ppvObject );
1422 
1423  if (IsEqualGUID( riid, &IID_IEnumVARIANT ) ||
1425  {
1426  *ppvObject = iface;
1427  }
1428  else
1429  {
1430  FIXME( "interface %s not implemented\n", debugstr_guid(riid) );
1431  return E_NOINTERFACE;
1432  }
1433  IEnumVARIANT_AddRef( iface );
1434  return S_OK;
1435 }
1436 
1437 static HRESULT WINAPI enumvar_Next( IEnumVARIANT *iface, ULONG celt, VARIANT *var, ULONG *fetched )
1438 {
1439  struct enumvar *enumvar = impl_from_IEnumVARIANT( iface );
1441  ULONG count = 0;
1442 
1443  TRACE( "%p, %u, %p, %p\n", iface, celt, var, fetched );
1444 
1445  if (celt) IEnumWbemClassObject_Next( enumvar->objectenum, WBEM_INFINITE, 1, &obj, &count );
1446  if (count)
1447  {
1448  ISWbemObject *sobj;
1449  HRESULT hr;
1450 
1451  hr = SWbemObject_create( obj, &sobj );
1452  IWbemClassObject_Release( obj );
1453  if (FAILED( hr )) return hr;
1454 
1455  V_VT( var ) = VT_DISPATCH;
1456  V_DISPATCH( var ) = (IDispatch *)sobj;
1457  }
1458  if (fetched) *fetched = count;
1459  return (count < celt) ? S_FALSE : S_OK;
1460 }
1461 
1463 {
1464  struct enumvar *enumvar = impl_from_IEnumVARIANT( iface );
1465 
1466  TRACE( "%p, %u\n", iface, celt );
1467 
1468  return IEnumWbemClassObject_Skip( enumvar->objectenum, WBEM_INFINITE, celt );
1469 }
1470 
1472 {
1473  struct enumvar *enumvar = impl_from_IEnumVARIANT( iface );
1474 
1475  TRACE( "%p\n", iface );
1476 
1477  return IEnumWbemClassObject_Reset( enumvar->objectenum );
1478 }
1479 
1481 {
1482  FIXME( "%p, %p\n", iface, penum );
1483  return E_NOTIMPL;
1484 }
1485 
1486 static const struct IEnumVARIANTVtbl enumvar_vtbl =
1487 {
1491  enumvar_Next,
1492  enumvar_Skip,
1493  enumvar_Reset,
1495 };
1496 
1498 {
1499  struct enumvar *enumvar;
1500 
1501  if (!(enumvar = heap_alloc( sizeof(*enumvar) ))) return E_OUTOFMEMORY;
1503  enumvar->refs = 1;
1505  IEnumWbemClassObject_AddRef( enumvar->objectenum );
1506 
1508  TRACE( "returning iface %p\n", *obj );
1509  return S_OK;
1510 }
1511 
1512 struct services
1513 {
1514  ISWbemServices ISWbemServices_iface;
1517 };
1518 
1519 static inline struct services *impl_from_ISWbemServices(
1520  ISWbemServices *iface )
1521 {
1522  return CONTAINING_RECORD( iface, struct services, ISWbemServices_iface );
1523 }
1524 
1526  ISWbemServices *iface )
1527 {
1528  struct services *services = impl_from_ISWbemServices( iface );
1529  return InterlockedIncrement( &services->refs );
1530 }
1531 
1533  ISWbemServices *iface )
1534 {
1535  struct services *services = impl_from_ISWbemServices( iface );
1537  if (!refs)
1538  {
1539  TRACE( "destroying %p\n", services );
1540  IWbemServices_Release( services->services );
1541  heap_free( services );
1542  }
1543  return refs;
1544 }
1545 
1547  ISWbemServices *iface,
1548  REFIID riid,
1549  void **ppvObject )
1550 {
1551  struct services *services = impl_from_ISWbemServices( iface );
1552 
1553  TRACE( "%p %s %p\n", services, debugstr_guid(riid), ppvObject );
1554 
1555  if (IsEqualGUID( riid, &IID_ISWbemServices ) ||
1558  {
1559  *ppvObject = iface;
1560  }
1561  else
1562  {
1563  FIXME( "interface %s not implemented\n", debugstr_guid(riid) );
1564  return E_NOINTERFACE;
1565  }
1566  ISWbemServices_AddRef( iface );
1567  return S_OK;
1568 }
1569 
1571  ISWbemServices *iface,
1572  UINT *count )
1573 {
1574  struct services *services = impl_from_ISWbemServices( iface );
1575  TRACE( "%p, %p\n", services, count );
1576 
1577  *count = 1;
1578  return S_OK;
1579 }
1580 
1582  ISWbemServices *iface,
1583  UINT index,
1584  LCID lcid,
1585  ITypeInfo **info )
1586 {
1587  struct services *services = impl_from_ISWbemServices( iface );
1588  TRACE( "%p, %u, %u, %p\n", services, index, lcid, info );
1589 
1591 }
1592 
1594  ISWbemServices *iface,
1595  REFIID riid,
1596  LPOLESTR *names,
1597  UINT count,
1598  LCID lcid,
1599  DISPID *dispid )
1600 {
1601  struct services *services = impl_from_ISWbemServices( iface );
1603  HRESULT hr;
1604 
1605  TRACE( "%p, %s, %p, %u, %u, %p\n", services, debugstr_guid(riid), names, count, lcid, dispid );
1606 
1607  if (!names || !count || !dispid) return E_INVALIDARG;
1608 
1610  if (SUCCEEDED(hr))
1611  {
1612  hr = ITypeInfo_GetIDsOfNames( typeinfo, names, count, dispid );
1613  ITypeInfo_Release( typeinfo );
1614  }
1615  return hr;
1616 }
1617 
1619  ISWbemServices *iface,
1620  DISPID member,
1621  REFIID riid,
1622  LCID lcid,
1623  WORD flags,
1624  DISPPARAMS *params,
1625  VARIANT *result,
1626  EXCEPINFO *excep_info,
1627  UINT *arg_err )
1628 {
1629  struct services *services = impl_from_ISWbemServices( iface );
1631  HRESULT hr;
1632 
1633  TRACE( "%p, %d, %s, %d, %d, %p, %p, %p, %p\n", services, member, debugstr_guid(riid),
1634  lcid, flags, params, result, excep_info, arg_err );
1635 
1637  if (SUCCEEDED(hr))
1638  {
1639  hr = ITypeInfo_Invoke( typeinfo, &services->ISWbemServices_iface, member, flags,
1640  params, result, excep_info, arg_err );
1641  ITypeInfo_Release( typeinfo );
1642  }
1643  return hr;
1644 }
1645 
1647  ISWbemServices *iface,
1648  BSTR strObjectPath,
1649  LONG iFlags,
1650  IDispatch *objWbemNamedValueSet,
1651  ISWbemObject **objWbemObject )
1652 {
1653  struct services *services = impl_from_ISWbemServices( iface );
1655  HRESULT hr;
1656 
1657  TRACE( "%p, %s, %d, %p, %p\n", iface, debugstr_w(strObjectPath), iFlags, objWbemNamedValueSet,
1658  objWbemObject );
1659 
1660  if (objWbemNamedValueSet) FIXME( "ignoring context\n" );
1661 
1662  hr = IWbemServices_GetObject( services->services, strObjectPath, iFlags, NULL, &obj, NULL );
1663  if (hr != S_OK) return hr;
1664 
1665  hr = SWbemObject_create( obj, objWbemObject );
1666  IWbemClassObject_Release( obj );
1667  return hr;
1668 }
1669 
1671  ISWbemServices *iface,
1672  IDispatch *objWbemSink,
1673  BSTR strObjectPath,
1674  LONG iFlags,
1675  IDispatch *objWbemNamedValueSet,
1676  IDispatch *objWbemAsyncContext )
1677 {
1678  FIXME( "\n" );
1679  return E_NOTIMPL;
1680 }
1681 
1683  ISWbemServices *iface,
1684  BSTR strObjectPath,
1685  LONG iFlags,
1686  IDispatch *objWbemNamedValueSet )
1687 {
1688  FIXME( "\n" );
1689  return E_NOTIMPL;
1690 }
1691 
1693  ISWbemServices* This,
1694  IDispatch *objWbemSink,
1695  BSTR strObjectPath,
1696  LONG iFlags,
1697  IDispatch *objWbemNamedValueSet,
1698  IDispatch *objWbemAsyncContext )
1699 {
1700  FIXME( "\n" );
1701  return E_NOTIMPL;
1702 }
1703 
1704 static BSTR build_query_string( const WCHAR *class )
1705 {
1706  static const WCHAR selectW[] = {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',0};
1707  UINT len = strlenW(class) + ARRAY_SIZE(selectW);
1708  BSTR ret;
1709 
1710  if (!(ret = SysAllocStringLen( NULL, len ))) return NULL;
1711  strcpyW( ret, selectW );
1712  strcatW( ret, class );
1713  return ret;
1714 }
1715 
1717  ISWbemServices *iface,
1718  BSTR strClass,
1719  LONG iFlags,
1720  IDispatch *objWbemNamedValueSet,
1721  ISWbemObjectSet **objWbemObjectSet )
1722 {
1723  static const WCHAR wqlW[] = {'W','Q','L',0};
1724  BSTR query, wql = SysAllocString( wqlW );
1725  HRESULT hr;
1726 
1727  TRACE( "%p, %s, %x, %p, %p\n", iface, debugstr_w(strClass), iFlags, objWbemNamedValueSet,
1728  objWbemObjectSet );
1729 
1730  if (!(query = build_query_string( strClass )))
1731  {
1732  SysFreeString( wql );
1733  return E_OUTOFMEMORY;
1734  }
1735  hr = ISWbemServices_ExecQuery( iface, query, wql, iFlags, objWbemNamedValueSet, objWbemObjectSet );
1736  SysFreeString( wql );
1737  SysFreeString( query );
1738  return hr;
1739 }
1740 
1742  ISWbemServices *iface,
1743  IDispatch *objWbemSink,
1744  BSTR strClass,
1745  LONG iFlags,
1746  IDispatch *objWbemNamedValueSet,
1747  IDispatch *objWbemAsyncContext )
1748 {
1749  FIXME( "\n" );
1750  return E_NOTIMPL;
1751 }
1752 
1754  ISWbemServices *iface,
1755  BSTR strSuperclass,
1756  LONG iFlags,
1757  IDispatch *objWbemNamedValueSet,
1758  ISWbemObjectSet **objWbemObjectSet )
1759 {
1760  FIXME( "\n" );
1761  return E_NOTIMPL;
1762 }
1763 
1765  ISWbemServices *iface,
1766  IDispatch *objWbemSink,
1767  BSTR strSuperclass,
1768  LONG iFlags,
1769  IDispatch *objWbemNamedValueSet,
1770  IDispatch *objWbemAsyncContext )
1771 {
1772  FIXME( "\n" );
1773  return E_NOTIMPL;
1774 }
1775 
1777  ISWbemServices *iface,
1778  BSTR strQuery,
1779  BSTR strQueryLanguage,
1780  LONG iFlags,
1781  IDispatch *objWbemNamedValueSet,
1782  ISWbemObjectSet **objWbemObjectSet )
1783 {
1784  struct services *services = impl_from_ISWbemServices( iface );
1785  IEnumWbemClassObject *iter;
1786  HRESULT hr;
1787 
1788  TRACE( "%p, %s, %s, %x, %p, %p\n", iface, debugstr_w(strQuery), debugstr_w(strQueryLanguage),
1789  iFlags, objWbemNamedValueSet, objWbemObjectSet );
1790 
1791  if (objWbemNamedValueSet) FIXME( "ignoring context\n" );
1792 
1793  hr = IWbemServices_ExecQuery( services->services, strQueryLanguage, strQuery, iFlags, NULL, &iter );
1794  if (hr != S_OK) return hr;
1795 
1796  hr = SWbemObjectSet_create( iter, objWbemObjectSet );
1797  IEnumWbemClassObject_Release( iter );
1798  return hr;
1799 }
1800 
1802  ISWbemServices *iface,
1803  IDispatch *objWbemSink,
1804  BSTR strQuery,
1805  BSTR strQueryLanguage,
1806  LONG lFlags,
1807  IDispatch *objWbemNamedValueSet,
1808  IDispatch *objWbemAsyncContext )
1809 {
1810  FIXME( "\n" );
1811  return E_NOTIMPL;
1812 }
1813 
1815  ISWbemServices *iface,
1816  BSTR strObjectPath,
1817  BSTR strAssocClass,
1818  BSTR strResultClass,
1819  BSTR strResultRole,
1820  BSTR strRole,
1821  VARIANT_BOOL bClassesOnly,
1822  VARIANT_BOOL bSchemaOnly,
1823  BSTR strRequiredAssocQualifier,
1824  BSTR strRequiredQualifier,
1825  LONG iFlags,
1826  IDispatch *objWbemNamedValueSet,
1827  ISWbemObjectSet **objWbemObjectSet )
1828 {
1829  FIXME( "\n" );
1830  return E_NOTIMPL;
1831 }
1832 
1834  ISWbemServices *iface,
1835  IDispatch *objWbemSink,
1836  BSTR strObjectPath,
1837  BSTR strAssocClass,
1838  BSTR strResultClass,
1839  BSTR strResultRole,
1840  BSTR strRole,
1841  VARIANT_BOOL bClassesOnly,
1842  VARIANT_BOOL bSchemaOnly,
1843  BSTR strRequiredAssocQualifier,
1844  BSTR strRequiredQualifier,
1845  LONG iFlags,
1846  IDispatch *objWbemNamedValueSet,
1847  IDispatch *objWbemAsyncContext )
1848 {
1849  FIXME( "\n" );
1850  return E_NOTIMPL;
1851 }
1852 
1854  ISWbemServices *iface,
1855  BSTR strObjectPath,
1856  BSTR strResultClass,
1857  BSTR strRole,
1858  VARIANT_BOOL bClassesOnly,
1859  VARIANT_BOOL bSchemaOnly,
1860  BSTR strRequiredQualifier,
1861  LONG iFlags,
1862  IDispatch *objWbemNamedValueSet,
1863  ISWbemObjectSet **objWbemObjectSet )
1864 {
1865  FIXME( "\n" );
1866  return E_NOTIMPL;
1867 }
1868 
1870  ISWbemServices *iface,
1871  IDispatch *objWbemSink,
1872  BSTR strObjectPath,
1873  BSTR strResultClass,
1874  BSTR strRole,
1875  VARIANT_BOOL bClassesOnly,
1876  VARIANT_BOOL bSchemaOnly,
1877  BSTR strRequiredQualifier,
1878  LONG iFlags,
1879  IDispatch *objWbemNamedValueSet,
1880  IDispatch *objWbemAsyncContext )
1881 {
1882  FIXME( "\n" );
1883  return E_NOTIMPL;
1884 }
1885 
1887  ISWbemServices *iface,
1888  BSTR strQuery,
1889  BSTR strQueryLanguage,
1890  LONG iFlags,
1891  IDispatch *objWbemNamedValueSet,
1892  ISWbemEventSource **objWbemEventSource )
1893 {
1894  FIXME( "\n" );
1895  return E_NOTIMPL;
1896 }
1897 
1899  ISWbemServices *iface,
1900  IDispatch *objWbemSink,
1901  BSTR strQuery,
1902  BSTR strQueryLanguage,
1903  LONG iFlags,
1904  IDispatch *objWbemNamedValueSet,
1905  IDispatch *objWbemAsyncContext )
1906 {
1907  FIXME( "\n" );
1908  return E_NOTIMPL;
1909 }
1910 
1912  ISWbemServices *iface,
1913  BSTR strObjectPath,
1914  BSTR strMethodName,
1915  IDispatch *objWbemInParameters,
1916  LONG iFlags,
1917  IDispatch *objWbemNamedValueSet,
1918  ISWbemObject **objWbemOutParameters )
1919 {
1920  FIXME( "\n" );
1921  return E_NOTIMPL;
1922 }
1923 
1925  ISWbemServices *iface,
1926  IDispatch *objWbemSink,
1927  BSTR strObjectPath,
1928  BSTR strMethodName,
1929  IDispatch *objWbemInParameters,
1930  LONG iFlags,
1931  IDispatch *objWbemNamedValueSet,
1932  IDispatch *objWbemAsyncContext )
1933 {
1934  FIXME( "\n" );
1935  return E_NOTIMPL;
1936 }
1937 
1939  ISWbemServices *iface,
1940  ISWbemSecurity **objWbemSecurity )
1941 {
1942  TRACE( "%p, %p\n", iface, objWbemSecurity );
1943 
1944  if (!objWbemSecurity)
1945  return E_INVALIDARG;
1946 
1947  return ISWbemSecurity_create( objWbemSecurity );
1948 }
1949 
1950 static const ISWbemServicesVtbl services_vtbl =
1951 {
1959  services_Get,
1978 };
1979 
1981 {
1982  struct services *services;
1983 
1984  TRACE( "%p, %p\n", obj, wbem_services );
1985 
1986  if (!(services = heap_alloc( sizeof(*services) ))) return E_OUTOFMEMORY;
1988  services->refs = 1;
1990  IWbemServices_AddRef( services->services );
1991 
1993  TRACE( "returning iface %p\n", *obj );
1994  return S_OK;
1995 }
1996 
1997 struct locator
1998 {
1999  ISWbemLocator ISWbemLocator_iface;
2002 };
2003 
2004 static inline struct locator *impl_from_ISWbemLocator( ISWbemLocator *iface )
2005 {
2006  return CONTAINING_RECORD( iface, struct locator, ISWbemLocator_iface );
2007 }
2008 
2010  ISWbemLocator *iface )
2011 {
2012  struct locator *locator = impl_from_ISWbemLocator( iface );
2013  return InterlockedIncrement( &locator->refs );
2014 }
2015 
2017  ISWbemLocator *iface )
2018 {
2019  struct locator *locator = impl_from_ISWbemLocator( iface );
2021  if (!refs)
2022  {
2023  TRACE( "destroying %p\n", locator );
2024  if (locator->locator)
2025  IWbemLocator_Release( locator->locator );
2026  heap_free( locator );
2027  }
2028  return refs;
2029 }
2030 
2032  ISWbemLocator *iface,
2033  REFIID riid,
2034  void **ppvObject )
2035 {
2036  struct locator *locator = impl_from_ISWbemLocator( iface );
2037 
2038  TRACE( "%p, %s, %p\n", locator, debugstr_guid( riid ), ppvObject );
2039 
2040  if (IsEqualGUID( riid, &IID_ISWbemLocator ) ||
2043  {
2044  *ppvObject = iface;
2045  }
2046  else
2047  {
2048  FIXME( "interface %s not implemented\n", debugstr_guid(riid) );
2049  return E_NOINTERFACE;
2050  }
2051  ISWbemLocator_AddRef( iface );
2052  return S_OK;
2053 }
2054 
2056  ISWbemLocator *iface,
2057  UINT *count )
2058 {
2059  struct locator *locator = impl_from_ISWbemLocator( iface );
2060 
2061  TRACE( "%p, %p\n", locator, count );
2062  *count = 1;
2063  return S_OK;
2064 }
2065 
2067  ISWbemLocator *iface,
2068  UINT index,
2069  LCID lcid,
2070  ITypeInfo **info )
2071 {
2072  struct locator *locator = impl_from_ISWbemLocator( iface );
2073  TRACE( "%p, %u, %u, %p\n", locator, index, lcid, info );
2074 
2075  return get_typeinfo( ISWbemLocator_tid, info );
2076 }
2077 
2079  ISWbemLocator *iface,
2080  REFIID riid,
2081  LPOLESTR *names,
2082  UINT count,
2083  LCID lcid,
2084  DISPID *dispid )
2085 {
2086  struct locator *locator = impl_from_ISWbemLocator( iface );
2088  HRESULT hr;
2089 
2090  TRACE( "%p, %s, %p, %u, %u, %p\n", locator, debugstr_guid(riid), names, count, lcid, dispid );
2091 
2092  if (!names || !count || !dispid) return E_INVALIDARG;
2093 
2095  if (SUCCEEDED(hr))
2096  {
2097  hr = ITypeInfo_GetIDsOfNames( typeinfo, names, count, dispid );
2098  ITypeInfo_Release( typeinfo );
2099  }
2100  return hr;
2101 }
2102 
2104  ISWbemLocator *iface,
2105  DISPID member,
2106  REFIID riid,
2107  LCID lcid,
2108  WORD flags,
2109  DISPPARAMS *params,
2110  VARIANT *result,
2111  EXCEPINFO *excep_info,
2112  UINT *arg_err )
2113 {
2114  struct locator *locator = impl_from_ISWbemLocator( iface );
2116  HRESULT hr;
2117 
2118  TRACE( "%p, %d, %s, %d, %d, %p, %p, %p, %p\n", locator, member, debugstr_guid(riid),
2119  lcid, flags, params, result, excep_info, arg_err );
2120 
2122  if (SUCCEEDED(hr))
2123  {
2124  hr = ITypeInfo_Invoke( typeinfo, &locator->ISWbemLocator_iface, member, flags,
2125  params, result, excep_info, arg_err );
2126  ITypeInfo_Release( typeinfo );
2127  }
2128  return hr;
2129 }
2130 
2132 {
2133  static const WCHAR defaultW[] = {'r','o','o','t','\\','d','e','f','a','u','l','t',0};
2134  ULONG len, len_server = 0, len_namespace = 0;
2135  BSTR ret;
2136 
2137  if (server && *server) len_server = strlenW( server );
2138  else len_server = 1;
2139  if (namespace && *namespace) len_namespace = strlenW( namespace );
2140  else len_namespace = ARRAY_SIZE(defaultW) - 1;
2141 
2142  if (!(ret = SysAllocStringLen( NULL, 2 + len_server + 1 + len_namespace ))) return NULL;
2143 
2144  ret[0] = ret[1] = '\\';
2145  if (server && *server) strcpyW( ret + 2, server );
2146  else ret[2] = '.';
2147 
2148  len = len_server + 2;
2149  ret[len++] = '\\';
2150 
2151  if (namespace && *namespace) strcpyW( ret + len, namespace );
2152  else strcpyW( ret + len, defaultW );
2153  return ret;
2154 }
2155 
2157  ISWbemLocator *iface,
2158  BSTR strServer,
2159  BSTR strNamespace,
2160  BSTR strUser,
2161  BSTR strPassword,
2162  BSTR strLocale,
2163  BSTR strAuthority,
2164  LONG iSecurityFlags,
2165  IDispatch *objWbemNamedValueSet,
2166  ISWbemServices **objWbemServices )
2167 {
2168  struct locator *locator = impl_from_ISWbemLocator( iface );
2170  BSTR resource;
2171  HRESULT hr;
2172 
2173  TRACE( "%p, %s, %s, %s, %p, %s, %s, 0x%08x, %p, %p\n", iface, debugstr_w(strServer),
2174  debugstr_w(strNamespace), debugstr_w(strUser), strPassword, debugstr_w(strLocale),
2175  debugstr_w(strAuthority), iSecurityFlags, objWbemNamedValueSet, objWbemServices );
2176 
2177  if (objWbemNamedValueSet) FIXME( "context not supported\n" );
2178 
2179  if (!locator->locator)
2180  {
2181  hr = CoCreateInstance( &CLSID_WbemLocator, NULL, CLSCTX_INPROC_SERVER, &IID_IWbemLocator,
2182  (void **)&locator->locator );
2183  if (hr != S_OK) return hr;
2184  }
2185 
2186  if (!(resource = build_resource_string( strServer, strNamespace ))) return E_OUTOFMEMORY;
2187  hr = IWbemLocator_ConnectServer( locator->locator, resource, strUser, strPassword, strLocale,
2188  iSecurityFlags, strAuthority, NULL, &services );
2190  if (hr != S_OK) return hr;
2191 
2192  hr = SWbemServices_create( services, objWbemServices );
2193  IWbemServices_Release( services );
2194  return hr;
2195 }
2196 
2198  ISWbemLocator *iface,
2199  ISWbemSecurity **objWbemSecurity )
2200 {
2201  TRACE( "%p, %p\n", iface, objWbemSecurity );
2202 
2203  if (!objWbemSecurity)
2204  return E_INVALIDARG;
2205 
2206  return ISWbemSecurity_create( objWbemSecurity );
2207 }
2208 
2209 static const ISWbemLocatorVtbl locator_vtbl =
2210 {
2220 };
2221 
2223 {
2224  struct locator *locator;
2225 
2226  TRACE( "%p\n", obj );
2227 
2228  if (!(locator = heap_alloc( sizeof(*locator) ))) return E_OUTOFMEMORY;
2230  locator->refs = 1;
2231  locator->locator = NULL;
2232 
2234  TRACE( "returning iface %p\n", *obj );
2235  return S_OK;
2236 }
2237 
2238 struct security
2239 {
2240  ISWbemSecurity ISWbemSecurity_iface;
2244 };
2245 
2246 static inline struct security *impl_from_ISWbemSecurity( ISWbemSecurity *iface )
2247 {
2248  return CONTAINING_RECORD( iface, struct security, ISWbemSecurity_iface );
2249 }
2250 
2252  ISWbemSecurity *iface )
2253 {
2254  struct security *security = impl_from_ISWbemSecurity( iface );
2255  return InterlockedIncrement( &security->refs );
2256 }
2257 
2259  ISWbemSecurity *iface )
2260 {
2261  struct security *security = impl_from_ISWbemSecurity( iface );
2263  if (!refs)
2264  {
2265  TRACE( "destroying %p\n", security );
2266  heap_free( security );
2267  }
2268  return refs;
2269 }
2270 
2272  ISWbemSecurity *iface,
2273  REFIID riid,
2274  void **ppvObject )
2275 {
2276  struct security *security = impl_from_ISWbemSecurity( iface );
2277  TRACE( "%p, %s, %p\n", security, debugstr_guid( riid ), ppvObject );
2278 
2279  if (IsEqualGUID( riid, &IID_ISWbemSecurity ) ||
2282  {
2283  *ppvObject = iface;
2284  }
2285  else
2286  {
2287  FIXME( "interface %s not implemented\n", debugstr_guid(riid) );
2288  return E_NOINTERFACE;
2289  }
2290  ISWbemSecurity_AddRef( iface );
2291  return S_OK;
2292 }
2293 
2295  ISWbemSecurity *iface,
2296  UINT *count )
2297 {
2298  struct security *security = impl_from_ISWbemSecurity( iface );
2299  TRACE( "%p, %p\n", security, count );
2300 
2301  *count = 1;
2302  return S_OK;
2303 }
2304 
2306  ISWbemSecurity *iface,
2307  UINT index,
2308  LCID lcid,
2309  ITypeInfo **info )
2310 {
2311  struct security *security = impl_from_ISWbemSecurity( iface );
2312  TRACE( "%p, %u, %u, %p\n", security, index, lcid, info );
2313 
2315 }
2316 
2318  ISWbemSecurity *iface,
2319  REFIID riid,
2320  LPOLESTR *names,
2321  UINT count,
2322  LCID lcid,
2323  DISPID *dispid )
2324 {
2325  struct security *security = impl_from_ISWbemSecurity( iface );
2327  HRESULT hr;
2328 
2329  TRACE( "%p, %s, %p, %u, %u, %p\n", security, debugstr_guid(riid), names, count, lcid, dispid );
2330 
2331  if (!names || !count || !dispid) return E_INVALIDARG;
2332 
2334  if (SUCCEEDED(hr))
2335  {
2336  hr = ITypeInfo_GetIDsOfNames( typeinfo, names, count, dispid );
2337  ITypeInfo_Release( typeinfo );
2338  }
2339  return hr;
2340 }
2341 
2343  ISWbemSecurity *iface,
2344  DISPID member,
2345  REFIID riid,
2346  LCID lcid,
2347  WORD flags,
2348  DISPPARAMS *params,
2349  VARIANT *result,
2350  EXCEPINFO *excep_info,
2351  UINT *arg_err )
2352 {
2353  struct security *security = impl_from_ISWbemSecurity( iface );
2355  HRESULT hr;
2356 
2357  TRACE( "%p, %d, %s, %d, %d, %p, %p, %p, %p\n", security, member, debugstr_guid(riid),
2358  lcid, flags, params, result, excep_info, arg_err );
2359 
2361  if (SUCCEEDED(hr))
2362  {
2363  hr = ITypeInfo_Invoke( typeinfo, &security->ISWbemSecurity_iface, member, flags,
2364  params, result, excep_info, arg_err );
2365  ITypeInfo_Release( typeinfo );
2366  }
2367  return hr;
2368 }
2369 
2371  ISWbemSecurity *iface,
2372  WbemImpersonationLevelEnum *impersonation_level )
2373 {
2374  struct security *security = impl_from_ISWbemSecurity( iface );
2375  FIXME( "%p, %p: stub\n", security, impersonation_level );
2376 
2377  if (!impersonation_level)
2378  return E_INVALIDARG;
2379 
2380  *impersonation_level = security->implevel;
2381  return S_OK;
2382 }
2383 
2385  ISWbemSecurity *iface,
2386  WbemImpersonationLevelEnum impersonation_level )
2387 {
2388  struct security *security = impl_from_ISWbemSecurity( iface );
2389  FIXME( "%p, %d: stub\n", security, impersonation_level );
2390 
2391  security->implevel = impersonation_level;
2392  return S_OK;
2393 }
2394 
2396  ISWbemSecurity *iface,
2397  WbemAuthenticationLevelEnum *authentication_level )
2398 {
2399  struct security *security = impl_from_ISWbemSecurity( iface );
2400  FIXME( "%p, %p: stub\n", security, authentication_level );
2401 
2402  if (!authentication_level)
2403  return E_INVALIDARG;
2404 
2405  *authentication_level = security->authlevel;
2406  return S_OK;
2407 }
2408 
2410  ISWbemSecurity *iface,
2411  WbemAuthenticationLevelEnum authentication_level )
2412 {
2413  struct security *security = impl_from_ISWbemSecurity( iface );
2414  FIXME( "%p, %d: stub\n", security, authentication_level );
2415 
2416  security->authlevel = authentication_level;
2417  return S_OK;
2418 }
2419 
2421  ISWbemSecurity *iface,
2422  ISWbemPrivilegeSet **privilege_set )
2423 {
2424  struct security *security = impl_from_ISWbemSecurity( iface );
2425  FIXME( "%p, %p: stub\n", security, privilege_set );
2426 
2427  if (!privilege_set)
2428  return E_INVALIDARG;
2429 
2430  return E_NOTIMPL;
2431 }
2432 
2433 static const ISWbemSecurityVtbl security_vtbl =
2434 {
2447 };
2448 
2449 static HRESULT ISWbemSecurity_create( ISWbemSecurity **obj )
2450 {
2451  struct security *security;
2452 
2453  TRACE( "%p\n", obj );
2454 
2455  if (!(security = heap_alloc( sizeof(*security) ))) return E_OUTOFMEMORY;
2457  security->refs = 1;
2460 
2462  TRACE( "returning iface %p\n", *obj );
2463  return S_OK;
2464 }
static HRESULT ISWbemSecurity_create(ISWbemSecurity **)
Definition: locator.c:2449
#define DISP_E_UNKNOWNNAME
Definition: winerror.h:2515
static HRESULT WINAPI property_get_Value(ISWbemProperty *iface, VARIANT *value)
Definition: locator.c:216
static HRESULT WINAPI objectset_Item(ISWbemObjectSet *iface, BSTR strObjectPath, LONG iFlags, ISWbemObject **objWbemObject)
Definition: locator.c:1268
static const ISWbemPropertySetVtbl propertyset_vtbl
Definition: locator.c:469
static HRESULT WINAPI services_GetTypeInfo(ISWbemServices *iface, UINT index, LCID lcid, ITypeInfo **info)
Definition: locator.c:1581
static HRESULT WINAPI object_get_Path_(ISWbemObject *iface, ISWbemObjectPath **objWbemObjectPath)
Definition: locator.c:1043
static ULONG WINAPI property_AddRef(ISWbemProperty *iface)
Definition: locator.c:117
#define REFIID
Definition: guiddef.h:113
#define TRUE
Definition: types.h:120
static HRESULT WINAPI objectset_get__NewEnum(ISWbemObjectSet *iface, IUnknown **pUnk)
Definition: locator.c:1250
#define E_NOINTERFACE
Definition: winerror.h:2364
static HRESULT WINAPI object_GetTypeInfo(ISWbemObject *iface, UINT index, LCID lcid, ITypeInfo **info)
Definition: locator.c:589
static struct object * impl_from_ISWbemObject(ISWbemObject *iface)
Definition: locator.c:523
static HRESULT WINAPI propertyset_Item(ISWbemPropertySet *iface, BSTR name, LONG flags, ISWbemProperty **prop)
Definition: locator.c:421
#define DISPATCH_PROPERTYGET
Definition: oleauto.h:1007
static HRESULT WINAPI object_GetTypeInfoCount(ISWbemObject *iface, UINT *count)
Definition: locator.c:578
static rfbScreenInfoPtr server
Definition: vnc.c:74
IWbemClassObject * object
Definition: locator.c:516
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
static ULONG WINAPI enumvar_Release(IEnumVARIANT *iface)
Definition: locator.c:1400
static const ISWbemObjectVtbl object_vtbl
Definition: locator.c:1059
static BSTR build_query_string(const WCHAR *class)
Definition: locator.c:1704
static HRESULT WINAPI propertyset_Remove(ISWbemPropertySet *iface, BSTR name, LONG flags)
Definition: locator.c:463
static ITypeInfo * wbemdisp_typeinfo[last_tid]
Definition: locator.c:56
static HRESULT WINAPI object_SpawnDerivedClass_(ISWbemObject *iface, LONG iFlags, ISWbemObject **objWbemObject)
Definition: locator.c:983
static HRESULT WINAPI locator_GetTypeInfo(ISWbemLocator *iface, UINT index, LCID lcid, ITypeInfo **info)
Definition: locator.c:2066
HRESULT hr
Definition: shlfolder.c:183
#define error(str)
Definition: mkdosfs.c:1605
static HRESULT WINAPI security_GetTypeInfoCount(ISWbemSecurity *iface, UINT *count)
Definition: locator.c:2294
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:342
static HRESULT WINAPI locator_GetIDsOfNames(ISWbemLocator *iface, REFIID riid, LPOLESTR *names, UINT count, LCID lcid, DISPID *dispid)
Definition: locator.c:2078
IWbemServices * services
Definition: locator.c:1516
IEnumWbemClassObject * objectenum
Definition: locator.c:1120
static REFIID wbemdisp_tid_id[]
Definition: locator.c:58
static HRESULT WINAPI propertyset_GetTypeInfo(ISWbemPropertySet *iface, UINT index, LCID lcid, ITypeInfo **info)
Definition: locator.c:365
static ULONG WINAPI locator_Release(ISWbemLocator *iface)
Definition: locator.c:2016
static HRESULT WINAPI services_Invoke(ISWbemServices *iface, DISPID member, REFIID riid, LCID lcid, WORD flags, DISPPARAMS *params, VARIANT *result, EXCEPINFO *excep_info, UINT *arg_err)
Definition: locator.c:1618
static HRESULT WINAPI objectset_ItemIndex(ISWbemObjectSet *iface, LONG lIndex, ISWbemObject **objWbemObject)
Definition: locator.c:1298
static HRESULT WINAPI object_AssociatorsAsync_(ISWbemObject *iface, IDispatch *objWbemSink, BSTR strAssocClass, BSTR strResultClass, BSTR strResultRole, BSTR strRole, VARIANT_BOOL bClassesOnly, VARIANT_BOOL bSchemaOnly, BSTR strRequiredAssocQualifier, BSTR strRequiredQualifier, LONG iFlags, IDispatch *objWbemNamedValueSet, IDispatch *objWbemAsyncContext)
Definition: locator.c:891
REFIID riid
Definition: precomp.h:44
static HRESULT WINAPI services_ReferencesToAsync(ISWbemServices *iface, IDispatch *objWbemSink, BSTR strObjectPath, BSTR strResultClass, BSTR strRole, VARIANT_BOOL bClassesOnly, VARIANT_BOOL bSchemaOnly, BSTR strRequiredQualifier, LONG iFlags, IDispatch *objWbemNamedValueSet, IDispatch *objWbemAsyncContext)
Definition: locator.c:1869
static BSTR build_resource_string(BSTR server, BSTR namespace)
Definition: locator.c:2131
static struct locator * impl_from_ISWbemLocator(ISWbemLocator *iface)
Definition: locator.c:2004
static HRESULT WINAPI object_References_(ISWbemObject *iface, BSTR strResultClass, BSTR strRole, VARIANT_BOOL bClassesOnly, VARIANT_BOOL bSchemaOnly, BSTR strRequiredQualifier, LONG iFlags, IDispatch *objWbemNamedValueSet, ISWbemObjectSet **objWbemObjectSet)
Definition: locator.c:910
static HRESULT WINAPI object_SpawnInstance_(ISWbemObject *iface, LONG iFlags, ISWbemObject **objWbemObject)
Definition: locator.c:992
static HRESULT WINAPI services_GetIDsOfNames(ISWbemServices *iface, REFIID riid, LPOLESTR *names, UINT count, LCID lcid, DISPID *dispid)
Definition: locator.c:1593
GLuint GLuint GLsizei count
Definition: gl.h:1545
static HRESULT WINAPI object_Put_(ISWbemObject *iface, LONG iFlags, IDispatch *objWbemNamedValueSet, ISWbemObjectPath **objWbemObjectPath)
Definition: locator.c:790
static HRESULT WINAPI property_get_CIMType(ISWbemProperty *iface, WbemCimtypeEnum *iCimType)
Definition: locator.c:249
static const WCHAR defaultW[]
Definition: lex.c:47
LONG refs
Definition: locator.c:2241
static HRESULT WINAPI security_QueryInterface(ISWbemSecurity *iface, REFIID riid, void **ppvObject)
Definition: locator.c:2271
static HRESULT WINAPI security_put_AuthenticationLevel(ISWbemSecurity *iface, WbemAuthenticationLevelEnum authentication_level)
Definition: locator.c:2409
BOOL is_method
Definition: locator.c:508
#define DISP_E_MEMBERNOTFOUND
Definition: winerror.h:2512
static HRESULT WINAPI security_get_AuthenticationLevel(ISWbemSecurity *iface, WbemAuthenticationLevelEnum *authentication_level)
Definition: locator.c:2395
static struct propertyset * impl_from_ISWbemPropertySet(ISWbemPropertySet *iface)
Definition: locator.c:310
static struct services * impl_from_ISWbemServices(ISWbemServices *iface)
Definition: locator.c:1519
static ITypeLib * typelib
Definition: apps.c:105
ISWbemObjectSet ISWbemObjectSet_iface
Definition: locator.c:1118
static HRESULT WINAPI property_QueryInterface(ISWbemProperty *iface, REFIID riid, void **obj)
Definition: locator.c:137
WbemImpersonationLevelEnum
Definition: wbemdisp.idl:943
static HRESULT WINAPI object_Subclasses_(ISWbemObject *iface, LONG iFlags, IDispatch *objWbemNamedValueSet, ISWbemObjectSet **objWbemObjectSet)
Definition: locator.c:852
static HRESULT WINAPI object_CompareTo_(ISWbemObject *iface, IDispatch *objWbemObject, LONG iFlags, VARIANT_BOOL *bResult)
Definition: locator.c:1001
static HRESULT WINAPI property_GetTypeInfoCount(ISWbemProperty *iface, UINT *count)
Definition: locator.c:158
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
static HRESULT WINAPI services_InstancesOfAsync(ISWbemServices *iface, IDispatch *objWbemSink, BSTR strClass, LONG iFlags, IDispatch *objWbemNamedValueSet, IDispatch *objWbemAsyncContext)
Definition: locator.c:1741
WbemAuthenticationLevelEnum authlevel
Definition: locator.c:2243
static HRESULT WINAPI objectset_get_Count(ISWbemObjectSet *iface, LONG *iCount)
Definition: locator.c:1278
static HRESULT WINAPI object_Invoke(ISWbemObject *iface, DISPID member, REFIID riid, LCID lcid, WORD flags, DISPPARAMS *params, VARIANT *result, EXCEPINFO *excep_info, UINT *arg_err)
Definition: locator.c:747
DWORD LCID
Definition: nls.h:13
OLECHAR * BSTR
Definition: compat.h:1934
IWbemLocator * locator
Definition: locator.c:2001
ISWbemLocator ISWbemLocator_iface
Definition: locator.c:1999
int resource
Definition: rdpsnd_sgi.c:44
static LPOLESTR
Definition: stg_prop.c:27
#define E_FAIL
Definition: ddrawi.h:102
static const ISWbemSecurityVtbl security_vtbl
Definition: locator.c:2433
static HRESULT WINAPI propertyset_get_Count(ISWbemPropertySet *iface, LONG *count)
Definition: locator.c:439
short VARIANT_BOOL
Definition: compat.h:1931
ISWbemSecurity ISWbemSecurity_iface
Definition: locator.c:2240
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define V_I4(A)
Definition: oleauto.h:247
#define DISPATCH_METHOD
Definition: oleauto.h:1006
GLsizei GLsizei GLuint * obj
Definition: glext.h:6042
static HRESULT WINAPI security_GetIDsOfNames(ISWbemSecurity *iface, REFIID riid, LPOLESTR *names, UINT count, LCID lcid, DISPID *dispid)
Definition: locator.c:2317
static HRESULT WINAPI object_GetObjectText_(ISWbemObject *iface, LONG iFlags, BSTR *strObjectText)
Definition: locator.c:974
#define V_DISPATCH(A)
Definition: oleauto.h:239
static HRESULT WINAPI enumvar_QueryInterface(IEnumVARIANT *iface, REFIID riid, void **ppvObject)
Definition: locator.c:1414
static HRESULT WINAPI objectset_QueryInterface(ISWbemObjectSet *iface, REFIID riid, void **ppvObject)
Definition: locator.c:1151
static HRESULT WINAPI objectset_get_Security_(ISWbemObjectSet *iface, ISWbemSecurity **objWbemSecurity)
Definition: locator.c:1290
static HRESULT WINAPI services_AssociatorsOf(ISWbemServices *iface, BSTR strObjectPath, BSTR strAssocClass, BSTR strResultClass, BSTR strResultRole, BSTR strRole, VARIANT_BOOL bClassesOnly, VARIANT_BOOL bSchemaOnly, BSTR strRequiredAssocQualifier, BSTR strRequiredQualifier, LONG iFlags, IDispatch *objWbemNamedValueSet, ISWbemObjectSet **objWbemObjectSet)
Definition: locator.c:1814
GLuint GLuint * names
Definition: glext.h:11545
static HRESULT WINAPI services_GetTypeInfoCount(ISWbemServices *iface, UINT *count)
Definition: locator.c:1570
static HRESULT get_typeinfo(enum type_id tid, ITypeInfo **ret)
Definition: locator.c:69
static HRESULT WINAPI locator_QueryInterface(ISWbemLocator *iface, REFIID riid, void **ppvObject)
Definition: locator.c:2031
static HRESULT WINAPI services_ExecQueryAsync(ISWbemServices *iface, IDispatch *objWbemSink, BSTR strQuery, BSTR strQueryLanguage, LONG lFlags, IDispatch *objWbemNamedValueSet, IDispatch *objWbemAsyncContext)
Definition: locator.c:1801
static HRESULT WINAPI object_get_Methods_(ISWbemObject *iface, ISWbemMethodSet **objWbemMethodSet)
Definition: locator.c:1027
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static HRESULT WINAPI objectset_GetTypeInfo(ISWbemObjectSet *iface, UINT index, LCID lcid, ITypeInfo **info)
Definition: locator.c:1185
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static HRESULT WINAPI object_Associators_(ISWbemObject *iface, BSTR strAssocClass, BSTR strResultClass, BSTR strResultRole, BSTR strRole, VARIANT_BOOL bClassesOnly, VARIANT_BOOL bSchemaOnly, BSTR strRequiredAssocQualifier, BSTR strRequiredQualifier, LONG iFlags, IDispatch *objWbemNamedValueSet, ISWbemObjectSet **objWbemObjectSet)
Definition: locator.c:873
GLenum const GLfloat * params
Definition: glext.h:5645
static HRESULT WINAPI services_QueryInterface(ISWbemServices *iface, REFIID riid, void **ppvObject)
Definition: locator.c:1546
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
static HRESULT WINAPI propertyset_Add(ISWbemPropertySet *iface, BSTR name, WbemCimtypeEnum type, VARIANT_BOOL is_array, LONG flags, ISWbemProperty **prop)
Definition: locator.c:456
static HRESULT WINAPI object_get_Properties_(ISWbemObject *iface, ISWbemPropertySet **prop_set)
Definition: locator.c:1019
ISWbemObject ISWbemObject_iface
Definition: locator.c:514
static HRESULT WINAPI services_ReferencesTo(ISWbemServices *iface, BSTR strObjectPath, BSTR strResultClass, BSTR strRole, VARIANT_BOOL bClassesOnly, VARIANT_BOOL bSchemaOnly, BSTR strRequiredQualifier, LONG iFlags, IDispatch *objWbemNamedValueSet, ISWbemObjectSet **objWbemObjectSet)
Definition: locator.c:1853
UINT nb_members
Definition: locator.c:518
static HRESULT WINAPI services_ExecNotificationQueryAsync(ISWbemServices *iface, IDispatch *objWbemSink, BSTR strQuery, BSTR strQueryLanguage, LONG iFlags, IDispatch *objWbemNamedValueSet, IDispatch *objWbemAsyncContext)
Definition: locator.c:1898
static DISPID get_member_dispid(struct object *object, const WCHAR *name)
Definition: locator.c:681
static HRESULT WINAPI property_GetTypeInfo(ISWbemProperty *iface, UINT index, LCID lcid, ITypeInfo **info)
Definition: locator.c:166
static HRESULT WINAPI locator_GetTypeInfoCount(ISWbemLocator *iface, UINT *count)
Definition: locator.c:2055
LONG refs
Definition: locator.c:2000
#define debugstr_w
Definition: kernel32.h:32
LONG refs
Definition: locator.c:306
#define FIXME(fmt,...)
Definition: debug.h:110
#define InterlockedCompareExchangePointer
Definition: interlocked.h:129
static HRESULT WINAPI property_GetIDsOfNames(ISWbemProperty *iface, REFIID riid, LPOLESTR *names, UINT count, LCID lcid, DISPID *dispid)
Definition: locator.c:175
#define S_FALSE
Definition: winerror.h:2357
ISWbemProperty ISWbemProperty_iface
Definition: locator.c:106
#define E_INVALIDARG
Definition: ddrawi.h:101
static const WCHAR wqlW[]
Definition: query.c:30
DISPID dispid
Definition: locator.c:509
static HRESULT WINAPI services_SubclassesOf(ISWbemServices *iface, BSTR strSuperclass, LONG iFlags, IDispatch *objWbemNamedValueSet, ISWbemObjectSet **objWbemObjectSet)
Definition: locator.c:1753
static HRESULT WINAPI propertyset_QueryInterface(ISWbemPropertySet *iface, REFIID riid, void **obj)
Definition: locator.c:335
smooth NULL
Definition: ftsmooth.c:416
static ULONG WINAPI property_Release(ISWbemProperty *iface)
Definition: locator.c:123
static int is_array(const type_t *t)
Definition: header.h:64
static HRESULT SWbemPropertySet_create(IWbemClassObject *wbem_object, ISWbemPropertySet **obj)
Definition: locator.c:485
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:241
static HRESULT WINAPI locator_ConnectServer(ISWbemLocator *iface, BSTR strServer, BSTR strNamespace, BSTR strUser, BSTR strPassword, BSTR strLocale, BSTR strAuthority, LONG iSecurityFlags, IDispatch *objWbemNamedValueSet, ISWbemServices **objWbemServices)
Definition: locator.c:2156
static HRESULT WINAPI property_get_IsArray(ISWbemProperty *iface, VARIANT_BOOL *bIsArray)
Definition: locator.c:261
static HRESULT WINAPI enumvar_Clone(IEnumVARIANT *iface, IEnumVARIANT **penum)
Definition: locator.c:1480
static HRESULT WINAPI security_get_Privileges(ISWbemSecurity *iface, ISWbemPrivilegeSet **privilege_set)
Definition: locator.c:2420
static ULONG WINAPI enumvar_AddRef(IEnumVARIANT *iface)
Definition: locator.c:1393
GLuint index
Definition: glext.h:6031
static HRESULT SWbemObjectSet_create(IEnumWbemClassObject *wbem_objectenum, ISWbemObjectSet **obj)
Definition: locator.c:1362
static HRESULT WINAPI security_GetTypeInfo(ISWbemSecurity *iface, UINT index, LCID lcid, ITypeInfo **info)
Definition: locator.c:2305
DISPID last_dispid_method
Definition: locator.c:520
#define debugstr_guid
Definition: kernel32.h:35
static const ISWbemPropertyVtbl property_vtbl
Definition: locator.c:267
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
static ULONG WINAPI services_Release(ISWbemServices *iface)
Definition: locator.c:1532
GLuint GLfloat * val
Definition: glext.h:7180
static HRESULT WINAPI locator_Invoke(ISWbemLocator *iface, DISPID member, REFIID riid, LCID lcid, WORD flags, DISPPARAMS *params, VARIANT *result, EXCEPINFO *excep_info, UINT *arg_err)
Definition: locator.c:2103
static HRESULT WINAPI object_QueryInterface(ISWbemObject *iface, REFIID riid, void **ppvObject)
Definition: locator.c:554
DISPID last_dispid
Definition: locator.c:519
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT WINAPI services_SubclassesOfAsync(ISWbemServices *iface, IDispatch *objWbemSink, BSTR strSuperclass, LONG iFlags, IDispatch *objWbemNamedValueSet, IDispatch *objWbemAsyncContext)
Definition: locator.c:1764
static HRESULT WINAPI object_ExecMethodAsync_(ISWbemObject *iface, IDispatch *objWbemSink, BSTR strMethodName, IDispatch *objWbemInParameters, LONG iFlags, IDispatch *objWbemNamedValueSet, IDispatch *objWbemAsyncContext)
Definition: locator.c:953
IWbemClassObject * object
Definition: locator.c:108
static HRESULT WINAPI object_InstancesAsync_(ISWbemObject *iface, IDispatch *objWbemSink, LONG iFlags, IDispatch *objWbemNamedValueSet, IDispatch *objWbemAsyncContext)
Definition: locator.c:841
static const WCHAR selectW[]
Definition: htmlelem.c:38
static ULONG WINAPI security_AddRef(ISWbemSecurity *iface)
Definition: locator.c:2251
__wchar_t WCHAR
Definition: xmlstorage.h:180
static const ISWbemObjectSetVtbl objectset_vtbl
Definition: locator.c:1338
static HRESULT WINAPI services_ExecMethodAsync(ISWbemServices *iface, IDispatch *objWbemSink, BSTR strObjectPath, BSTR strMethodName, IDispatch *objWbemInParameters, LONG iFlags, IDispatch *objWbemNamedValueSet, IDispatch *objWbemAsyncContext)
Definition: locator.c:1924
LONG HRESULT
Definition: typedefs.h:77
static HRESULT WINAPI object_GetIDsOfNames(ISWbemObject *iface, REFIID riid, LPOLESTR *names, UINT count, LCID lcid, DISPID *dispid)
Definition: locator.c:701
const GUID IID_IUnknown
static HRESULT WINAPI propertyset_GetTypeInfoCount(ISWbemPropertySet *iface, UINT *count)
Definition: locator.c:357
static HRESULT WINAPI services_Get(ISWbemServices *iface, BSTR strObjectPath, LONG iFlags, IDispatch *objWbemNamedValueSet, ISWbemObject **objWbemObject)
Definition: locator.c:1646
static HRESULT WINAPI security_Invoke(ISWbemSecurity *iface, DISPID member, REFIID riid, LCID lcid, WORD flags, DISPPARAMS *params, VARIANT *result, EXCEPINFO *excep_info, UINT *arg_err)
Definition: locator.c:2342
#define WINAPI
Definition: msvc.h:8
static HRESULT WINAPI object_Clone_(ISWbemObject *iface, ISWbemObject **objWbemObject)
Definition: locator.c:966
static HRESULT WINAPI property_get_Qualifiers_(ISWbemProperty *iface, ISWbemQualifierSet **objWbemQualifierSet)
Definition: locator.c:255
#define LOCALE_SYSTEM_DEFAULT
unsigned short WORD
Definition: ntddk_ex.h:93
static HRESULT WINAPI propertyset_get__NewEnum(ISWbemPropertySet *iface, IUnknown **unk)
Definition: locator.c:415
static struct enumvar * impl_from_IEnumVARIANT(IEnumVARIANT *iface)
Definition: locator.c:1387
LONG refs
Definition: locator.c:1119
static HRESULT WINAPI security_get_ImpersonationLevel(ISWbemSecurity *iface, WbemImpersonationLevelEnum *impersonation_level)
Definition: locator.c:2370
static struct property * impl_from_ISWbemProperty(ISWbemProperty *iface)
Definition: locator.c:112
static HRESULT WINAPI object_ReferencesAsync_(ISWbemObject *iface, IDispatch *objWbemSink, BSTR strResultClass, BSTR strRole, VARIANT_BOOL bClassesOnly, VARIANT_BOOL bSchemaOnly, BSTR strRequiredQualifier, LONG iFlags, IDispatch *objWbemNamedValueSet, IDispatch *objWbemAsyncContext)
Definition: locator.c:925
static HRESULT WINAPI object_Instances_(ISWbemObject *iface, LONG iFlags, IDispatch *objWbemNamedValueSet, ISWbemObjectSet **objWbemObjectSet)
Definition: locator.c:831
LONG refs
Definition: locator.c:1515
GLbitfield flags
Definition: glext.h:7161
type_id
LONG refs
Definition: locator.c:515
const GUID IID_IDispatch
static ULONG WINAPI objectset_AddRef(ISWbemObjectSet *iface)
Definition: locator.c:1130
static HRESULT WINAPI objectset_GetTypeInfoCount(ISWbemObjectSet *iface, UINT *count)
Definition: locator.c:1175
int ret
static HRESULT WINAPI object_get_Security_(ISWbemObject *iface, ISWbemSecurity **objWbemSecurity)
Definition: locator.c:1051
WbemImpersonationLevelEnum implevel
Definition: locator.c:2242
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:651
static HRESULT WINAPI services_GetAsync(ISWbemServices *iface, IDispatch *objWbemSink, BSTR strObjectPath, LONG iFlags, IDispatch *objWbemNamedValueSet, IDispatch *objWbemAsyncContext)
Definition: locator.c:1670
static ULONG WINAPI object_Release(ISWbemObject *iface)
Definition: locator.c:536
static ITypeInfo * typeinfo[last_tid]
Definition: apps.c:106
#define InterlockedDecrement
Definition: armddk.h:52
static HRESULT WINAPI enumvar_Next(IEnumVARIANT *iface, ULONG celt, VARIANT *var, ULONG *fetched)
Definition: locator.c:1437
WbemAuthenticationLevelEnum
Definition: wbemdisp.idl:956
#define V_VT(A)
Definition: oleauto.h:211
GLenum GLsizei len
Definition: glext.h:6722
REFIID LPVOID * ppvObject
Definition: precomp.h:44
UINT WINAPI SysStringLen(BSTR str)
Definition: oleaut.c:199
static HRESULT WINAPI services_ExecNotificationQuery(ISWbemServices *iface, BSTR strQuery, BSTR strQueryLanguage, LONG iFlags, IDispatch *objWbemNamedValueSet, ISWbemEventSource **objWbemEventSource)
Definition: locator.c:1886
static HRESULT WINAPI services_ExecMethod(ISWbemServices *iface, BSTR strObjectPath, BSTR strMethodName, IDispatch *objWbemInParameters, LONG iFlags, IDispatch *objWbemNamedValueSet, ISWbemObject **objWbemOutParameters)
Definition: locator.c:1911
static HRESULT WINAPI enumvar_Skip(IEnumVARIANT *iface, ULONG celt)
Definition: locator.c:1462
static HRESULT WINAPI object_ExecMethod_(ISWbemObject *iface, BSTR strMethodName, IDispatch *objWbemInParameters, LONG iFlags, IDispatch *objWbemNamedValueSet, ISWbemObject **objWbemOutParameters)
Definition: locator.c:941
static ULONG WINAPI locator_AddRef(ISWbemLocator *iface)
Definition: locator.c:2009
static const struct IEnumVARIANTVtbl enumvar_vtbl
Definition: locator.c:1486
#define strcmpiW(s1, s2)
Definition: unicode.h:39
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3234
#define ERR(fmt,...)
Definition: debug.h:109
BSTR name
Definition: locator.c:109
struct stdole::EXCEPINFO EXCEPINFO
LONG count
Definition: locator.c:1121
static VARIANTARG static DISPID
Definition: ordinal.c:49
#define S_OK
Definition: intsafe.h:59
static HRESULT EnumVARIANT_create(IEnumWbemClassObject *, IEnumVARIANT **)
Definition: locator.c:1497
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:219
HRESULT WINAPI LoadRegTypeLib(REFGUID rguid, WORD wVerMajor, WORD wVerMinor, LCID lcid, ITypeLib **ppTLib)
Definition: typelib.c:534
static HRESULT WINAPI objectset_Invoke(ISWbemObjectSet *iface, DISPID member, REFIID riid, LCID lcid, WORD flags, DISPPARAMS *params, VARIANT *result, EXCEPINFO *excep_info, UINT *arg_err)
Definition: locator.c:1222
#define InterlockedIncrement
Definition: armddk.h:53
static BSTR get_member_name(struct object *object, DISPID dispid)
Definition: locator.c:737
static HRESULT WINAPI object_DeleteAsync_(ISWbemObject *iface, IDispatch *objWbemSink, LONG iFlags, IDispatch *objWbemNamedValueSet, IDispatch *objWbemAsyncContext)
Definition: locator.c:820
static const ISWbemLocatorVtbl locator_vtbl
Definition: locator.c:2209
static ULONG WINAPI security_Release(ISWbemSecurity *iface)
Definition: locator.c:2258
IWbemClassObject * object
Definition: locator.c:307
static HRESULT WINAPI services_get_Security_(ISWbemServices *iface, ISWbemSecurity **objWbemSecurity)
Definition: locator.c:1938
#define ARRAY_SIZE(a)
Definition: main.h:24
static HRESULT WINAPI locator_get_Security_(ISWbemLocator *iface, ISWbemSecurity **objWbemSecurity)
Definition: locator.c:2197
#define E_NOTIMPL
Definition: ddrawi.h:99
WINE_UNICODE_INLINE WCHAR * strcatW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:242
static HRESULT WINAPI objectset_GetIDsOfNames(ISWbemObjectSet *iface, REFIID riid, LPOLESTR *names, UINT count, LCID lcid, DISPID *dispid)
Definition: locator.c:1197
static HRESULT WINAPI object_get_Derivation_(ISWbemObject *iface, VARIANT *strClassNameArray)
Definition: locator.c:1035
static HRESULT WINAPI services_Delete(ISWbemServices *iface, BSTR strObjectPath, LONG iFlags, IDispatch *objWbemNamedValueSet)
Definition: locator.c:1682
static ULONG WINAPI object_AddRef(ISWbemObject *iface)
Definition: locator.c:529
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:274
unsigned int UINT
Definition: ndis.h:50
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021
static HRESULT WINAPI services_ExecQuery(ISWbemServices *iface, BSTR strQuery, BSTR strQueryLanguage, LONG iFlags, IDispatch *objWbemNamedValueSet, ISWbemObjectSet **objWbemObjectSet)
Definition: locator.c:1776
static HRESULT WINAPI enumvar_Reset(IEnumVARIANT *iface)
Definition: locator.c:1471
HRESULT SWbemLocator_create(void **obj)
Definition: locator.c:2222
static ITypeLib * wbemdisp_typelib
Definition: locator.c:55
static ULONG WINAPI objectset_Release(ISWbemObjectSet *iface)
Definition: locator.c:1137
static HRESULT SWbemProperty_create(IWbemClassObject *wbem_object, BSTR name, ISWbemProperty **obj)
Definition: locator.c:286
static struct security * impl_from_ISWbemSecurity(ISWbemSecurity *iface)
Definition: locator.c:2246
static HRESULT WINAPI services_InstancesOf(ISWbemServices *iface, BSTR strClass, LONG iFlags, IDispatch *objWbemNamedValueSet, ISWbemObjectSet **objWbemObjectSet)
Definition: locator.c:1716
static HRESULT WINAPI object_Delete_(ISWbemObject *iface, LONG iFlags, IDispatch *objWbemNamedValueSet)
Definition: locator.c:811
static HRESULT WINAPI services_DeleteAsync(ISWbemServices *This, IDispatch *objWbemSink, BSTR strObjectPath, LONG iFlags, IDispatch *objWbemNamedValueSet, IDispatch *objWbemAsyncContext)
Definition: locator.c:1692
#define DISPID_BASE_METHOD
Definition: locator.c:503
Definition: name.c:36
struct stdole::DISPPARAMS DISPPARAMS
static ULONG WINAPI services_AddRef(ISWbemServices *iface)
Definition: locator.c:1525
unsigned int ULONG
Definition: retypes.h:1
static HRESULT WINAPI property_get_IsLocal(ISWbemProperty *iface, VARIANT_BOOL *bIsLocal)
Definition: locator.c:237
static const ISWbemServicesVtbl services_vtbl
Definition: locator.c:1950
WINE_DEFAULT_DEBUG_CHANNEL(wbemdisp)
static HRESULT init_members(struct object *object)
Definition: locator.c:600
static HRESULT WINAPI property_get_Origin(ISWbemProperty *iface, BSTR *strOrigin)
Definition: locator.c:243
static HRESULT WINAPI propertyset_GetIDsOfNames(ISWbemPropertySet *iface, REFIID riid, LPOLESTR *names, UINT count, LCID lcid, DISPID *dispid)
Definition: locator.c:374
static HRESULT WINAPI property_get_Name(ISWbemProperty *iface, BSTR *strName)
Definition: locator.c:231
ISWbemPropertySet ISWbemPropertySet_iface
Definition: locator.c:305
static ULONG WINAPI propertyset_AddRef(ISWbemPropertySet *iface)
Definition: locator.c:316
IEnumWbemClassObject * objectenum
Definition: locator.c:1384
static struct objectset * impl_from_ISWbemObjectSet(ISWbemObjectSet *iface)
Definition: locator.c:1124
static HRESULT WINAPI property_put_Value(ISWbemProperty *iface, VARIANT *varValue)
Definition: locator.c:225
BSTR name
Definition: locator.c:507
static HRESULT WINAPI propertyset_Invoke(ISWbemPropertySet *iface, DISPID member, REFIID riid, LCID lcid, WORD flags, DISPPARAMS *params, VARIANT *result, EXCEPINFO *excep_info, UINT *arg_err)
Definition: locator.c:394
static HRESULT WINAPI object_PutAsync_(ISWbemObject *iface, IDispatch *objWbemSink, LONG iFlags, IDispatch *objWbemNamedValueSet, IDispatch *objWbemAsyncContext)
Definition: locator.c:800
static HRESULT WINAPI object_SubclassesAsync_(ISWbemObject *iface, IDispatch *objWbemSink, LONG iFlags, IDispatch *objWbemNamedValueSet, IDispatch *objWbemAsyncContext)
Definition: locator.c:862
GLuint64EXT * result
Definition: glext.h:11304
#define memset(x, y, z)
Definition: compat.h:39
static HRESULT WINAPI object_get_Qualifiers_(ISWbemObject *iface, ISWbemQualifierSet **objWbemQualifierSet)
Definition: locator.c:1011
static void *static void *static LPDIRECTPLAY IUnknown * pUnk
Definition: dplayx.c:30
static TfClientId tid
static LONG get_object_count(IEnumWbemClassObject *iter)
Definition: locator.c:1354
static ULONG WINAPI propertyset_Release(ISWbemPropertySet *iface)
Definition: locator.c:322
static HRESULT WINAPI property_Invoke(ISWbemProperty *iface, DISPID member, REFIID riid, LCID lcid, WORD flags, DISPPARAMS *params, VARIANT *result, EXCEPINFO *excep_info, UINT *arg_err)
Definition: locator.c:195
static HRESULT SWbemObject_create(IWbemClassObject *wbem_object, ISWbemObject **obj)
Definition: locator.c:1095
GLenum query
Definition: glext.h:7781
IEnumVARIANT IEnumVARIANT_iface
Definition: locator.c:1382
struct member * members
Definition: locator.c:517
void * object
Definition: jmemsys.h:48
#define DISPID_BASE
Definition: locator.c:502
static HRESULT WINAPI services_AssociatorsOfAsync(ISWbemServices *iface, IDispatch *objWbemSink, BSTR strObjectPath, BSTR strAssocClass, BSTR strResultClass, BSTR strResultRole, BSTR strRole, VARIANT_BOOL bClassesOnly, VARIANT_BOOL bSchemaOnly, BSTR strRequiredAssocQualifier, BSTR strRequiredQualifier, LONG iFlags, IDispatch *objWbemNamedValueSet, IDispatch *objWbemAsyncContext)
Definition: locator.c:1833
LONG refs
Definition: locator.c:1383
static ISAXLocator * locator
Definition: saxreader.c:1037
#define SUCCEEDED(hr)
Definition: intsafe.h:57
static HRESULT SWbemServices_create(IWbemServices *wbem_services, ISWbemServices **obj)
Definition: locator.c:1980
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
ISWbemServices ISWbemServices_iface
Definition: locator.c:1514
LONG refs
Definition: locator.c:107
static HRESULT WINAPI security_put_ImpersonationLevel(ISWbemSecurity *iface, WbemImpersonationLevelEnum impersonation_level)
Definition: locator.c:2384
GLuint const GLchar * name
Definition: glext.h:6031