ReactOS  0.4.14-dev-98-gb0d4763
class.c
Go to the documentation of this file.
1 /*
2  * Copyright 2012 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 "objbase.h"
27 #include "wbemcli.h"
28 
29 #include "wine/debug.h"
30 #include "wbemprox_private.h"
31 
33 
35 {
38  struct query *query;
40 };
41 
43  IEnumWbemClassObject *iface )
44 {
46 }
47 
49  IEnumWbemClassObject *iface )
50 {
52  return InterlockedIncrement( &ec->refs );
53 }
54 
56  IEnumWbemClassObject *iface )
57 {
60  if (!refs)
61  {
62  TRACE("destroying %p\n", ec);
63  release_query( ec->query );
64  heap_free( ec );
65  }
66  return refs;
67 }
68 
70  IEnumWbemClassObject *iface,
71  REFIID riid,
72  void **ppvObject )
73 {
75 
76  TRACE("%p, %s, %p\n", ec, debugstr_guid( riid ), ppvObject );
77 
78  if ( IsEqualGUID( riid, &IID_IEnumWbemClassObject ) ||
80  {
81  *ppvObject = ec;
82  }
83  else if ( IsEqualGUID( riid, &IID_IClientSecurity ) )
84  {
86  return S_OK;
87  }
88  else
89  {
90  FIXME("interface %s not implemented\n", debugstr_guid(riid));
91  return E_NOINTERFACE;
92  }
93  IEnumWbemClassObject_AddRef( iface );
94  return S_OK;
95 }
96 
98  IEnumWbemClassObject *iface )
99 {
101 
102  TRACE("%p\n", iface);
103 
104  ec->index = 0;
105  return WBEM_S_NO_ERROR;
106 }
107 
109  IEnumWbemClassObject *iface,
110  LONG lTimeout,
111  ULONG uCount,
112  IWbemClassObject **apObjects,
113  ULONG *puReturned )
114 {
116  struct view *view = ec->query->view;
117  static int once = 0;
118  HRESULT hr;
119 
120  TRACE("%p, %d, %u, %p, %p\n", iface, lTimeout, uCount, apObjects, puReturned);
121 
122  if (!uCount) return WBEM_S_FALSE;
123  if (!apObjects || !puReturned) return WBEM_E_INVALID_PARAMETER;
124  if (lTimeout != WBEM_INFINITE && !once++) FIXME("timeout not supported\n");
125 
126  *puReturned = 0;
127  if (ec->index >= view->count) return WBEM_S_FALSE;
128 
129  hr = create_class_object( view->table->name, iface, ec->index, NULL, apObjects );
130  if (hr != S_OK) return hr;
131 
132  ec->index++;
133  *puReturned = 1;
134  if (ec->index == view->count && uCount > 1) return WBEM_S_FALSE;
135  if (uCount > 1) return WBEM_S_TIMEDOUT;
136  return WBEM_S_NO_ERROR;
137 }
138 
140  IEnumWbemClassObject *iface,
141  ULONG uCount,
142  IWbemObjectSink *pSink )
143 {
144  FIXME("%p, %u, %p\n", iface, uCount, pSink);
145  return E_NOTIMPL;
146 }
147 
149  IEnumWbemClassObject *iface,
150  IEnumWbemClassObject **ppEnum )
151 {
153 
154  TRACE("%p, %p\n", iface, ppEnum);
155 
156  return EnumWbemClassObject_create( ec->query, (void **)ppEnum );
157 }
158 
160  IEnumWbemClassObject *iface,
161  LONG lTimeout,
162  ULONG nCount )
163 {
165  struct view *view = ec->query->view;
166  static int once = 0;
167 
168  TRACE("%p, %d, %u\n", iface, lTimeout, nCount);
169 
170  if (lTimeout != WBEM_INFINITE && !once++) FIXME("timeout not supported\n");
171 
172  if (!view->count) return WBEM_S_FALSE;
173 
174  if (nCount > view->count - ec->index)
175  {
176  ec->index = view->count - 1;
177  return WBEM_S_FALSE;
178  }
179  ec->index += nCount;
180  return WBEM_S_NO_ERROR;
181 }
182 
183 static const IEnumWbemClassObjectVtbl enum_class_object_vtbl =
184 {
193 };
194 
196 {
197  struct enum_class_object *ec;
198 
199  TRACE("%p\n", ppObj);
200 
201  ec = heap_alloc( sizeof(*ec) );
202  if (!ec) return E_OUTOFMEMORY;
203 
205  ec->refs = 1;
206  ec->query = addref_query( query );
207  ec->index = 0;
208 
209  *ppObj = &ec->IEnumWbemClassObject_iface;
210 
211  TRACE("returning iface %p\n", *ppObj);
212  return S_OK;
213 }
214 
215 static struct record *create_record( struct table *table )
216 {
217  UINT i;
218  struct record *record;
219 
220  if (!(record = heap_alloc( sizeof(struct record) ))) return NULL;
221  if (!(record->fields = heap_alloc( table->num_cols * sizeof(struct field) )))
222  {
223  heap_free( record );
224  return NULL;
225  }
226  for (i = 0; i < table->num_cols; i++)
227  {
228  record->fields[i].type = table->columns[i].type;
229  record->fields[i].vartype = table->columns[i].vartype;
230  record->fields[i].u.ival = 0;
231  }
234  return record;
235 }
236 
238 {
239  UINT i, size;
240 
241  if (!array) return;
242  if (type == CIM_STRING || type == CIM_DATETIME)
243  {
244  size = get_type_size( type );
245  for (i = 0; i < array->count; i++) heap_free( *(WCHAR **)((char *)array->ptr + i * size) );
246  }
247  heap_free( array->ptr );
248  heap_free( array );
249 }
250 
251 static void destroy_record( struct record *record )
252 {
253  UINT i;
254 
255  if (!record) return;
257  for (i = 0; i < record->count; i++)
258  {
259  if (record->fields[i].type == CIM_STRING || record->fields[i].type == CIM_DATETIME)
260  heap_free( record->fields[i].u.sval );
261  else if (record->fields[i].type & CIM_FLAG_ARRAY)
262  destroy_array( record->fields[i].u.aval, record->fields[i].type & CIM_TYPE_MASK );
263  }
264  heap_free( record->fields );
265  heap_free( record );
266 }
267 
269 {
277  struct record *record; /* uncommitted instance */
278 };
279 
281  IWbemClassObject *iface )
282 {
284 }
285 
287  IWbemClassObject *iface )
288 {
289  struct class_object *co = impl_from_IWbemClassObject( iface );
290  return InterlockedIncrement( &co->refs );
291 }
292 
294  IWbemClassObject *iface )
295 {
296  struct class_object *co = impl_from_IWbemClassObject( iface );
298  if (!refs)
299  {
300  TRACE("destroying %p\n", co);
301  if (co->iter) IEnumWbemClassObject_Release( co->iter );
302  destroy_record( co->record );
303  heap_free( co->name );
304  heap_free( co );
305  }
306  return refs;
307 }
308 
310  IWbemClassObject *iface,
311  REFIID riid,
312  void **ppvObject )
313 {
314  struct class_object *co = impl_from_IWbemClassObject( iface );
315 
316  TRACE("%p, %s, %p\n", co, debugstr_guid( riid ), ppvObject );
317 
318  if ( IsEqualGUID( riid, &IID_IWbemClassObject ) ||
320  {
321  *ppvObject = co;
322  }
323  else if (IsEqualGUID( riid, &IID_IClientSecurity ))
324  {
326  return S_OK;
327  }
328  else
329  {
330  FIXME("interface %s not implemented\n", debugstr_guid(riid));
331  return E_NOINTERFACE;
332  }
333  IWbemClassObject_AddRef( iface );
334  return S_OK;
335 }
336 
338  IWbemClassObject *iface,
339  IWbemQualifierSet **ppQualSet )
340 {
341  FIXME("%p, %p\n", iface, ppQualSet);
342  return E_NOTIMPL;
343 }
344 
346 {
347  VARTYPE vartype = record->fields[index].vartype;
348 
349  if (type) *type = record->fields[index].type;
350 
351  if (record->fields[index].type & CIM_FLAG_ARRAY)
352  {
354  V_ARRAY( var ) = to_safearray( record->fields[index].u.aval, record->fields[index].type & CIM_TYPE_MASK );
355  return S_OK;
356  }
357  switch (record->fields[index].type)
358  {
359  case CIM_STRING:
360  case CIM_DATETIME:
361  if (!vartype) vartype = VT_BSTR;
362  V_BSTR( var ) = SysAllocString( record->fields[index].u.sval );
363  break;
364  case CIM_SINT32:
365  if (!vartype) vartype = VT_I4;
366  V_I4( var ) = record->fields[index].u.ival;
367  break;
368  case CIM_UINT32:
369  if (!vartype) vartype = VT_UI4;
370  V_UI4( var ) = record->fields[index].u.ival;
371  break;
372  default:
373  FIXME("unhandled type %u\n", record->fields[index].type);
375  }
376  V_VT( var ) = vartype;
377  return S_OK;
378 }
379 
381  IWbemClassObject *iface,
382  LPCWSTR wszName,
383  LONG lFlags,
384  VARIANT *pVal,
385  CIMTYPE *pType,
386  LONG *plFlavor )
387 {
388  struct class_object *co = impl_from_IWbemClassObject( iface );
390 
391  TRACE("%p, %s, %08x, %p, %p, %p\n", iface, debugstr_w(wszName), lFlags, pVal, pType, plFlavor);
392 
393  if (co->record)
394  {
395  UINT index;
396  HRESULT hr;
397 
398  if ((hr = get_column_index( co->record->table, wszName, &index )) != S_OK) return hr;
399  return record_get_value( co->record, index, pVal, pType );
400  }
401  return get_propval( ec->query->view, co->index, wszName, pVal, pType, plFlavor );
402 }
403 
405 {
406  LONGLONG val;
407  CIMTYPE type;
408  HRESULT hr;
409 
410  if ((hr = to_longlong( var, &val, &type )) != S_OK) return hr;
411  if (type != record->fields[index].type) return WBEM_E_TYPE_MISMATCH;
412 
413  if (type & CIM_FLAG_ARRAY)
414  {
415  record->fields[index].u.aval = (struct array *)(INT_PTR)val;
416  return S_OK;
417  }
418  switch (type)
419  {
420  case CIM_STRING:
421  case CIM_DATETIME:
422  record->fields[index].u.sval = (WCHAR *)(INT_PTR)val;
423  return S_OK;
424  case CIM_SINT16:
425  case CIM_UINT16:
426  case CIM_SINT32:
427  case CIM_UINT32:
428  record->fields[index].u.ival = val;
429  return S_OK;
430  default:
431  FIXME("unhandled type %u\n", type);
432  break;
433  }
435 }
436 
438  IWbemClassObject *iface,
439  LPCWSTR wszName,
440  LONG lFlags,
441  VARIANT *pVal,
442  CIMTYPE Type )
443 {
444  struct class_object *co = impl_from_IWbemClassObject( iface );
446 
447  TRACE("%p, %s, %08x, %p, %u\n", iface, debugstr_w(wszName), lFlags, pVal, Type);
448 
449  if (co->record)
450  {
451  UINT index;
452  HRESULT hr;
453 
454  if ((hr = get_column_index( co->record->table, wszName, &index )) != S_OK) return hr;
455  return record_set_value( co->record, index, pVal );
456  }
457  return put_propval( ec->query->view, co->index, wszName, pVal, Type );
458 }
459 
461  IWbemClassObject *iface,
462  LPCWSTR wszName )
463 {
464  FIXME("%p, %s\n", iface, debugstr_w(wszName));
465  return E_NOTIMPL;
466 }
467 
469  IWbemClassObject *iface,
470  LPCWSTR wszQualifierName,
471  LONG lFlags,
472  VARIANT *pQualifierVal,
473  SAFEARRAY **pNames )
474 {
475  struct class_object *co = impl_from_IWbemClassObject( iface );
477 
478  TRACE("%p, %s, %08x, %s, %p\n", iface, debugstr_w(wszQualifierName), lFlags,
479  debugstr_variant(pQualifierVal), pNames);
480 
481  if (lFlags != WBEM_FLAG_ALWAYS &&
482  lFlags != WBEM_FLAG_NONSYSTEM_ONLY &&
483  lFlags != WBEM_FLAG_SYSTEM_ONLY)
484  {
485  FIXME("flags %08x not supported\n", lFlags);
486  return E_NOTIMPL;
487  }
488  if (wszQualifierName || pQualifierVal)
489  FIXME("qualifier not supported\n");
490 
491  return get_properties( ec->query->view, lFlags, pNames );
492 }
493 
495  IWbemClassObject *iface,
496  LONG lEnumFlags )
497 {
498  struct class_object *co = impl_from_IWbemClassObject( iface );
499 
500  TRACE("%p, %08x\n", iface, lEnumFlags);
501 
502  if (lEnumFlags) FIXME("flags 0x%08x not supported\n", lEnumFlags);
503 
504  co->index_property = 0;
505  return S_OK;
506 }
507 
509  IWbemClassObject *iface,
510  LONG lFlags,
511  BSTR *strName,
512  VARIANT *pVal,
513  CIMTYPE *pType,
514  LONG *plFlavor )
515 {
516  struct class_object *obj = impl_from_IWbemClassObject( iface );
517  struct enum_class_object *iter = impl_from_IEnumWbemClassObject( obj->iter );
518  struct view *view = iter->query->view;
519  BSTR prop;
520  HRESULT hr;
521  UINT i;
522 
523  TRACE("%p, %08x, %p, %p, %p, %p\n", iface, lFlags, strName, pVal, pType, plFlavor);
524 
525  for (i = obj->index_property; i < view->table->num_cols; i++)
526  {
527  if (is_method( view->table, i )) continue;
528  if (!is_selected_prop( view, view->table->columns[i].name )) continue;
529  if (!(prop = SysAllocString( view->table->columns[i].name ))) return E_OUTOFMEMORY;
530  if ((hr = get_propval( view, obj->index, prop, pVal, pType, plFlavor )) != S_OK)
531  {
532  SysFreeString( prop );
533  return hr;
534  }
535 
536  obj->index_property = i + 1;
537  if (strName) *strName = prop;
538  else SysFreeString( prop );
539 
540  return S_OK;
541  }
542  return WBEM_S_NO_MORE_DATA;
543 }
544 
546  IWbemClassObject *iface )
547 {
548  struct class_object *co = impl_from_IWbemClassObject( iface );
549 
550  TRACE("%p\n", iface);
551 
552  co->index_property = 0;
553  return S_OK;
554 }
555 
557  IWbemClassObject *iface,
558  LPCWSTR wszProperty,
559  IWbemQualifierSet **ppQualSet )
560 {
561  struct class_object *co = impl_from_IWbemClassObject( iface );
562 
563  TRACE("%p, %s, %p\n", iface, debugstr_w(wszProperty), ppQualSet);
564 
565  return WbemQualifierSet_create( co->name, wszProperty, (void **)ppQualSet );
566 }
567 
569  IWbemClassObject *iface,
570  IWbemClassObject **ppCopy )
571 {
572  FIXME("%p, %p\n", iface, ppCopy);
573  return E_NOTIMPL;
574 }
575 
576 static BSTR get_body_text( const struct table *table, UINT row, UINT *len )
577 {
578  static const WCHAR fmtW[] = {'\n','\t','%','s',' ','=',' ','%','s',';',0};
579  BSTR value, ret;
580  WCHAR *p;
581  UINT i;
582 
583  *len = 0;
584  for (i = 0; i < table->num_cols; i++)
585  {
586  if ((value = get_value_bstr( table, row, i )))
587  {
588  *len += ARRAY_SIZE( fmtW );
589  *len += strlenW( table->columns[i].name );
590  *len += SysStringLen( value );
591  SysFreeString( value );
592  }
593  }
594  if (!(ret = SysAllocStringLen( NULL, *len ))) return NULL;
595  p = ret;
596  for (i = 0; i < table->num_cols; i++)
597  {
598  if ((value = get_value_bstr( table, row, i )))
599  {
600  p += sprintfW( p, fmtW, table->columns[i].name, value );
601  SysFreeString( value );
602  }
603  }
604  return ret;
605 }
606 
607 static BSTR get_object_text( const struct view *view, UINT index )
608 {
609  static const WCHAR fmtW[] =
610  {'\n','i','n','s','t','a','n','c','e',' ','o','f',' ','%','s','\n','{','%','s','\n','}',';',0};
611  UINT len, len_body, row = view->result[index];
612  BSTR ret, body;
613 
614  len = ARRAY_SIZE( fmtW );
615  len += strlenW( view->table->name );
616  if (!(body = get_body_text( view->table, row, &len_body ))) return NULL;
617  len += len_body;
618 
619  if (!(ret = SysAllocStringLen( NULL, len ))) return NULL;
620  sprintfW( ret, fmtW, view->table->name, body );
621  SysFreeString( body );
622  return ret;
623 }
624 
626  IWbemClassObject *iface,
627  LONG lFlags,
628  BSTR *pstrObjectText )
629 {
630  struct class_object *co = impl_from_IWbemClassObject( iface );
632  struct view *view = ec->query->view;
633  BSTR text;
634 
635  TRACE("%p, %08x, %p\n", iface, lFlags, pstrObjectText);
636 
637  if (lFlags) FIXME("flags %08x not implemented\n", lFlags);
638 
639  if (!(text = get_object_text( view, co->index ))) return E_OUTOFMEMORY;
640  *pstrObjectText = text;
641  return S_OK;
642 }
643 
645  IWbemClassObject *iface,
646  LONG lFlags,
647  IWbemClassObject **ppNewClass )
648 {
649  FIXME("%p, %08x, %p\n", iface, lFlags, ppNewClass);
650  return E_NOTIMPL;
651 }
652 
654  IWbemClassObject *iface,
655  LONG lFlags,
656  IWbemClassObject **ppNewInstance )
657 {
658  struct class_object *co = impl_from_IWbemClassObject( iface );
660  struct view *view = ec->query->view;
661  struct record *record;
662 
663  TRACE("%p, %08x, %p\n", iface, lFlags, ppNewInstance);
664 
665  if (!(record = create_record( view->table ))) return E_OUTOFMEMORY;
666 
667  return create_class_object( co->name, NULL, 0, record, ppNewInstance );
668 }
669 
671  IWbemClassObject *iface,
672  LONG lFlags,
673  IWbemClassObject *pCompareTo )
674 {
675  FIXME("%p, %08x, %p\n", iface, lFlags, pCompareTo);
676  return E_NOTIMPL;
677 }
678 
680  IWbemClassObject *iface,
681  LPCWSTR wszName,
682  BSTR *pstrClassName )
683 {
684  FIXME("%p, %s, %p\n", iface, debugstr_w(wszName), pstrClassName);
685  return E_NOTIMPL;
686 }
687 
689  IWbemClassObject *iface,
690  LPCWSTR strAncestor )
691 {
692  FIXME("%p, %s\n", iface, debugstr_w(strAncestor));
693  return E_NOTIMPL;
694 }
695 
697 {
698  UINT count = 0;
699  while (!IEnumWbemClassObject_Skip( iter, WBEM_INFINITE, 1 )) count++;
700  IEnumWbemClassObject_Reset( iter );
701  return count;
702 }
703 
705 {
706  switch (type)
707  {
708  case CIM_SINT16:
709  *(INT16 *)ptr = val;
710  break;
711  case CIM_UINT16:
712  *(UINT16 *)ptr = val;
713  break;
714  case CIM_SINT32:
715  *(INT32 *)ptr = val;
716  break;
717  case CIM_UINT32:
718  *(UINT32 *)ptr = val;
719  break;
720  default:
721  FIXME("unhandled type %u\n", type);
722  break;
723  }
724 }
725 
727  struct column **cols, BYTE **data )
728 {
729  static const WCHAR parameterW[] = {'P','a','r','a','m','e','t','e','r',0};
730  static const WCHAR typeW[] = {'T','y','p','e',0};
731  static const WCHAR varianttypeW[] = {'V','a','r','i','a','n','t','T','y','p','e',0};
732  static const WCHAR defaultvalueW[] = {'D','e','f','a','u','l','t','V','a','l','u','e',0};
733  struct column *columns;
734  BYTE *row;
736  VARIANT val;
738  UINT offset = 0;
739  ULONG count;
740  int i = 0;
741 
742  count = count_instances( iter );
743  if (!(columns = heap_alloc( count * sizeof(struct column) ))) return E_OUTOFMEMORY;
744  if (!(row = heap_alloc_zero( count * sizeof(LONGLONG) ))) goto error;
745 
746  for (;;)
747  {
748  IEnumWbemClassObject_Next( iter, WBEM_INFINITE, 1, &param, &count );
749  if (!count) break;
750 
751  hr = IWbemClassObject_Get( param, parameterW, 0, &val, NULL, NULL );
752  if (hr != S_OK) goto error;
753  columns[i].name = heap_strdupW( V_BSTR( &val ) );
754  VariantClear( &val );
755 
756  hr = IWbemClassObject_Get( param, typeW, 0, &val, NULL, NULL );
757  if (hr != S_OK) goto error;
758  columns[i].type = V_UI4( &val );
759 
760  hr = IWbemClassObject_Get( param, varianttypeW, 0, &val, NULL, NULL );
761  if (hr != S_OK) goto error;
762  columns[i].vartype = V_UI4( &val );
763 
764  hr = IWbemClassObject_Get( param, defaultvalueW, 0, &val, NULL, NULL );
765  if (hr != S_OK) goto error;
766  if (V_UI4( &val )) set_default_value( columns[i].type, V_UI4( &val ), row + offset );
767  offset += get_type_size( columns[i].type );
768 
769  IWbemClassObject_Release( param );
770  i++;
771  }
772  *num_cols = i;
773  *cols = columns;
774  *data = row;
775  return S_OK;
776 
777 error:
778  for (; i >= 0; i--) heap_free( (WCHAR *)columns[i].name );
779  heap_free( columns );
780  heap_free( row );
781  return hr;
782 }
783 
785 {
786  HRESULT hr;
787  struct table *table;
788  struct column *columns;
789  UINT num_cols;
790  BYTE *row;
791 
792  hr = create_signature_columns_and_data( iter, &num_cols, &columns, &row );
793  if (hr != S_OK) return hr;
794 
795  if (!(table = create_table( name, num_cols, columns, 1, 1, row, NULL )))
796  {
797  free_columns( columns, num_cols );
798  heap_free( row );
799  return E_OUTOFMEMORY;
800  }
801  if (!add_table( table )) free_table( table ); /* already exists */
802  return S_OK;
803 }
804 
805 static WCHAR *build_signature_table_name( const WCHAR *class, const WCHAR *method, enum param_direction dir )
806 {
807  static const WCHAR fmtW[] = {'_','_','%','s','_','%','s','_','%','s',0};
808  static const WCHAR outW[] = {'O','U','T',0};
809  static const WCHAR inW[] = {'I','N',0};
810  UINT len = ARRAY_SIZE(fmtW) + ARRAY_SIZE(outW) + strlenW( class ) + strlenW( method );
811  WCHAR *ret;
812 
813  if (!(ret = heap_alloc( len * sizeof(WCHAR) ))) return NULL;
814  sprintfW( ret, fmtW, class, method, dir == PARAM_IN ? inW : outW );
815  return struprW( ret );
816 }
817 
819  IWbemClassObject **sig )
820 {
821  static const WCHAR selectW[] =
822  {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
823  '_','_','P','A','R','A','M','E','T','E','R','S',' ','W','H','E','R','E',' ',
824  'C','l','a','s','s','=','\'','%','s','\'',' ','A','N','D',' ',
825  'M','e','t','h','o','d','=','\'','%','s','\'',' ','A','N','D',' ',
826  'D','i','r','e','c','t','i','o','n','%','s',0};
827  static const WCHAR geW[] = {'>','=','0',0};
828  static const WCHAR leW[] = {'<','=','0',0};
830  IEnumWbemClassObject *iter;
831  WCHAR *query, *name;
832  HRESULT hr;
833 
834  len += strlenW( class ) + strlenW( method );
835  if (!(query = heap_alloc( len * sizeof(WCHAR) ))) return E_OUTOFMEMORY;
836  sprintfW( query, selectW, class, method, dir >= 0 ? geW : leW );
837 
838  hr = exec_query( query, &iter );
839  heap_free( query );
840  if (hr != S_OK) return hr;
841 
842  if (!count_instances( iter ))
843  {
844  *sig = NULL;
845  IEnumWbemClassObject_Release( iter );
846  return S_OK;
847  }
848 
849  if (!(name = build_signature_table_name( class, method, dir )))
850  {
851  IEnumWbemClassObject_Release( iter );
852  return E_OUTOFMEMORY;
853  }
854  hr = create_signature_table( iter, name );
855  IEnumWbemClassObject_Release( iter );
856  if (hr == S_OK)
857  hr = get_object( name, sig );
858 
859  heap_free( name );
860  return hr;
861 }
862 
864  IWbemClassObject *iface,
865  LPCWSTR wszName,
866  LONG lFlags,
867  IWbemClassObject **ppInSignature,
868  IWbemClassObject **ppOutSignature )
869 {
870  struct class_object *co = impl_from_IWbemClassObject( iface );
872  HRESULT hr;
873 
874  TRACE("%p, %s, %08x, %p, %p\n", iface, debugstr_w(wszName), lFlags, ppInSignature, ppOutSignature);
875 
876  hr = create_signature( co->name, wszName, PARAM_IN, &in );
877  if (hr != S_OK) return hr;
878 
879  hr = create_signature( co->name, wszName, PARAM_OUT, &out );
880  if (hr == S_OK)
881  {
882  if (ppInSignature) *ppInSignature = in;
883  else if (in) IWbemClassObject_Release( in );
884  if (ppOutSignature) *ppOutSignature = out;
885  else if (out) IWbemClassObject_Release( out );
886  }
887  else IWbemClassObject_Release( in );
888  return hr;
889 }
890 
892  IWbemClassObject *iface,
893  LPCWSTR wszName,
894  LONG lFlags,
895  IWbemClassObject *pInSignature,
896  IWbemClassObject *pOutSignature )
897 {
898  FIXME("%p, %s, %08x, %p, %p\n", iface, debugstr_w(wszName), lFlags, pInSignature, pOutSignature);
899  return E_NOTIMPL;
900 }
901 
903  IWbemClassObject *iface,
904  LPCWSTR wszName )
905 {
906  FIXME("%p, %s\n", iface, debugstr_w(wszName));
907  return E_NOTIMPL;
908 }
909 
911  IWbemClassObject *iface,
912  LONG lEnumFlags)
913 {
914  struct class_object *co = impl_from_IWbemClassObject( iface );
915 
916  TRACE("%p, %08x\n", iface, lEnumFlags);
917 
918  if (lEnumFlags) FIXME("flags 0x%08x not supported\n", lEnumFlags);
919 
920  co->index_method = 0;
921  return S_OK;
922 }
923 
925  IWbemClassObject *iface,
926  LONG lFlags,
927  BSTR *pstrName,
928  IWbemClassObject **ppInSignature,
929  IWbemClassObject **ppOutSignature)
930 {
931  struct class_object *co = impl_from_IWbemClassObject( iface );
932  BSTR method;
933  HRESULT hr;
934 
935  TRACE("%p, %08x, %p, %p, %p\n", iface, lFlags, pstrName, ppInSignature, ppOutSignature);
936 
937  if (!(method = get_method_name( co->name, co->index_method ))) return WBEM_S_NO_MORE_DATA;
938 
939  hr = create_signature( co->name, method, PARAM_IN, ppInSignature );
940  if (hr != S_OK)
941  {
943  return hr;
944  }
945  hr = create_signature( co->name, method, PARAM_OUT, ppOutSignature );
946  if (hr != S_OK)
947  {
949  if (*ppInSignature)
950  IWbemClassObject_Release( *ppInSignature );
951  }
952  else
953  {
954  *pstrName = method;
955  co->index_method++;
956  }
957  return hr;
958 }
959 
961  IWbemClassObject *iface )
962 {
963  struct class_object *co = impl_from_IWbemClassObject( iface );
964 
965  TRACE("%p\n", iface);
966 
967  co->index_method = 0;
968  return S_OK;
969 }
970 
972  IWbemClassObject *iface,
973  LPCWSTR wszMethod,
974  IWbemQualifierSet **ppQualSet)
975 {
976  FIXME("%p, %s, %p\n", iface, debugstr_w(wszMethod), ppQualSet);
977  return E_NOTIMPL;
978 }
979 
981  IWbemClassObject *iface,
982  LPCWSTR wszMethodName,
983  BSTR *pstrClassName)
984 {
985  FIXME("%p, %s, %p\n", iface, debugstr_w(wszMethodName), pstrClassName);
986  return E_NOTIMPL;
987 }
988 
989 static const IWbemClassObjectVtbl class_object_vtbl =
990 {
1018 };
1019 
1021  struct record *record, IWbemClassObject **obj )
1022 {
1023  struct class_object *co;
1024 
1025  TRACE("%s, %p\n", debugstr_w(name), obj);
1026 
1027  co = heap_alloc( sizeof(*co) );
1028  if (!co) return E_OUTOFMEMORY;
1029 
1031  co->refs = 1;
1032  if (!name) co->name = NULL;
1033  else if (!(co->name = heap_strdupW( name )))
1034  {
1035  heap_free( co );
1036  return E_OUTOFMEMORY;
1037  }
1038  co->iter = iter;
1039  co->index = index;
1040  co->index_method = 0;
1041  co->index_property = 0;
1042  co->record = record;
1043  if (iter) IEnumWbemClassObject_AddRef( iter );
1044 
1045  *obj = &co->IWbemClassObject_iface;
1046 
1047  TRACE("returning iface %p\n", *obj);
1048  return S_OK;
1049 }
static HRESULT WINAPI enum_class_object_QueryInterface(IEnumWbemClassObject *iface, REFIID riid, void **ppvObject)
Definition: class.c:69
static HRESULT WINAPI class_object_EndEnumeration(IWbemClassObject *iface)
Definition: class.c:545
static BSTR get_body_text(const struct table *table, UINT row, UINT *len)
Definition: class.c:576
static struct class_object * impl_from_IWbemClassObject(IWbemClassObject *iface)
Definition: class.c:280
static HRESULT WINAPI class_object_Next(IWbemClassObject *iface, LONG lFlags, BSTR *strName, VARIANT *pVal, CIMTYPE *pType, LONG *plFlavor)
Definition: class.c:508
UINT num_cols
static HRESULT WINAPI class_object_GetMethodQualifierSet(IWbemClassObject *iface, LPCWSTR wszMethod, IWbemQualifierSet **ppQualSet)
Definition: class.c:971
HRESULT put_propval(const struct view *view, UINT index, const WCHAR *name, VARIANT *var, CIMTYPE type)
Definition: query.c:1046
void free_columns(struct column *columns, UINT num_cols)
Definition: table.c:319
static HRESULT WINAPI enum_class_object_Clone(IEnumWbemClassObject *iface, IEnumWbemClassObject **ppEnum)
Definition: class.c:148
#define REFIID
Definition: guiddef.h:118
static void destroy_record(struct record *record)
Definition: class.c:251
IWbemClassObject IWbemClassObject_iface
Definition: class.c:270
HRESULT get_column_index(const struct table *table, const WCHAR *name, UINT *column)
Definition: table.c:33
#define E_NOINTERFACE
Definition: winerror.h:2364
Definition: compat.h:1939
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
Type
Definition: Type.h:6
HRESULT hr
Definition: shlfolder.c:183
#define error(str)
Definition: mkdosfs.c:1605
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:342
static HRESULT WINAPI class_object_NextMethod(IWbemClassObject *iface, LONG lFlags, BSTR *pstrName, IWbemClassObject **ppInSignature, IWbemClassObject **ppOutSignature)
Definition: class.c:924
static HRESULT WINAPI class_object_Get(IWbemClassObject *iface, LPCWSTR wszName, LONG lFlags, VARIANT *pVal, CIMTYPE *pType, LONG *plFlavor)
Definition: class.c:380
static HRESULT WINAPI class_object_GetPropertyQualifierSet(IWbemClassObject *iface, LPCWSTR wszProperty, IWbemQualifierSet **ppQualSet)
Definition: class.c:556
struct query * query
Definition: class.c:38
static HRESULT WINAPI class_object_GetObjectText(IWbemClassObject *iface, LONG lFlags, BSTR *pstrObjectText)
Definition: class.c:625
static const IWbemClassObjectVtbl class_object_vtbl
Definition: class.c:989
static IDispatch * get_object(jsval_t v)
Definition: jsval.h:219
REFIID riid
Definition: precomp.h:44
const WCHAR * text
Definition: package.c:1827
BOOL add_table(struct table *table)
Definition: table.c:389
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define V_ARRAY(A)
Definition: oleauto.h:222
static struct enum_class_object * impl_from_IEnumWbemClassObject(IEnumWbemClassObject *iface)
Definition: class.c:42
GLintptr offset
Definition: glext.h:5920
VARTYPE vartype
const struct column * columns
HRESULT get_propval(const struct view *view, UINT index, const WCHAR *name, VARIANT *ret, CIMTYPE *type, LONG *flavor)
Definition: query.c:840
static const WCHAR typeW[]
Definition: name.c:49
HRESULT EnumWbemClassObject_create(struct query *query, LPVOID *ppObj)
Definition: class.c:195
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLenum GLsizei GLenum GLenum const GLvoid * table
Definition: glext.h:5644
struct field * fields
VARTYPE to_vartype(CIMTYPE type)
Definition: query.c:743
struct table * addref_table(struct table *table)
Definition: table.c:348
static HRESULT WINAPI enum_class_object_Skip(IEnumWbemClassObject *iface, LONG lTimeout, ULONG nCount)
Definition: class.c:159
static void set_default_value(CIMTYPE type, UINT val, BYTE *ptr)
Definition: class.c:704
OLECHAR * BSTR
Definition: compat.h:1934
int32_t INT_PTR
Definition: typedefs.h:62
LONG refs
Definition: class.c:271
BSTR get_value_bstr(const struct table *table, UINT row, UINT column)
Definition: table.c:149
UINT count
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define V_I4(A)
Definition: oleauto.h:247
static HRESULT WINAPI class_object_CompareTo(IWbemClassObject *iface, LONG lFlags, IWbemClassObject *pCompareTo)
Definition: class.c:670
static HRESULT WINAPI class_object_BeginEnumeration(IWbemClassObject *iface, LONG lEnumFlags)
Definition: class.c:494
struct table * table
static HRESULT create_signature_table(IEnumWbemClassObject *iter, WCHAR *name)
Definition: class.c:784
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
HRESULT WbemQualifierSet_create(const WCHAR *class, const WCHAR *member, LPVOID *ppObj)
Definition: qualifier.c:250
static UINT count_instances(IEnumWbemClassObject *iter)
Definition: class.c:696
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static HRESULT WINAPI class_object_GetPropertyOrigin(IWbemClassObject *iface, LPCWSTR wszName, BSTR *pstrClassName)
Definition: class.c:679
#define CIM_TYPE_MASK
unsigned int UINT32
static const WCHAR inW[]
Definition: lex.c:57
long LONG
Definition: pedump.c:60
static ULONG WINAPI enum_class_object_Release(IEnumWbemClassObject *iface)
Definition: class.c:55
static WCHAR * heap_strdupW(const WCHAR *str)
Definition: propsheet.c:178
static HRESULT WINAPI enum_class_object_NextAsync(IEnumWbemClassObject *iface, ULONG uCount, IWbemObjectSink *pSink)
Definition: class.c:139
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
static PVOID ptr
Definition: dispmode.c:27
void destroy_array(struct array *array, CIMTYPE type)
Definition: class.c:237
HRESULT get_properties(const struct view *view, LONG flags, SAFEARRAY **props)
Definition: query.c:1067
IEnumWbemClassObject IEnumWbemClassObject_iface
Definition: class.c:36
UINT * result
void release_query(struct query *query)
Definition: query.c:466
static HRESULT create_signature_columns_and_data(IEnumWbemClassObject *iter, UINT *num_cols, struct column **cols, BYTE **data)
Definition: class.c:726
smooth NULL
Definition: ftsmooth.c:416
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:241
IEnumWbemClassObject * iter
Definition: class.c:273
static HRESULT WINAPI class_object_SpawnDerivedClass(IWbemClassObject *iface, LONG lFlags, IWbemClassObject **ppNewClass)
Definition: class.c:644
GLuint index
Definition: glext.h:6031
struct table * table
unsigned int dir
Definition: maze.c:112
#define debugstr_guid
Definition: kernel32.h:35
static HRESULT WINAPI class_object_Clone(IWbemClassObject *iface, IWbemClassObject **ppCopy)
Definition: class.c:568
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 HRESULT WINAPI class_object_GetMethodOrigin(IWbemClassObject *iface, LPCWSTR wszMethodName, BSTR *pstrClassName)
Definition: class.c:980
GLuint GLfloat * val
Definition: glext.h:7180
static HRESULT WINAPI class_object_BeginMethodEnumeration(IWbemClassObject *iface, LONG lEnumFlags)
Definition: class.c:910
static HRESULT WINAPI class_object_SpawnInstance(IWbemClassObject *iface, LONG lFlags, IWbemClassObject **ppNewInstance)
Definition: class.c:653
static HRESULT record_get_value(const struct record *record, UINT index, VARIANT *var, CIMTYPE *type)
Definition: class.c:345
const char name[9]
Definition: class.c:929
int64_t LONGLONG
Definition: typedefs.h:66
UINT index_property
Definition: class.c:276
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
static const WCHAR selectW[]
Definition: htmlelem.c:38
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned int get_type_size(ULONG *pFlags, VARTYPE vt)
Definition: usrmarshal.c:209
static const IEnumWbemClassObjectVtbl enum_class_object_vtbl
Definition: class.c:183
static struct record * create_record(struct table *table)
Definition: class.c:215
Definition: parser.c:43
LONG HRESULT
Definition: typedefs.h:77
const GUID IID_IUnknown
BOOL is_selected_prop(const struct view *view, const WCHAR *name)
Definition: query.c:489
GLfloat param
Definition: glext.h:5796
#define WINAPI
Definition: msvc.h:8
static ULONG WINAPI class_object_AddRef(IWbemClassObject *iface)
Definition: class.c:286
static FILE * out
Definition: regtests2xml.c:44
int JSAMPARRAY int int JDIMENSION num_cols
Definition: jpegint.h:412
WCHAR * name
Definition: class.c:272
void release_table(struct table *table)
Definition: table.c:343
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
method
Definition: dragdrop.c:53
#define V_UI4(A)
Definition: oleauto.h:270
int ret
IClientSecurity client_security
Definition: services.c:136
static HRESULT WINAPI class_object_InheritsFrom(IWbemClassObject *iface, LPCWSTR strAncestor)
Definition: class.c:688
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:651
#define index(s, c)
Definition: various.h:29
#define InterlockedDecrement
Definition: armddk.h:52
#define V_VT(A)
Definition: oleauto.h:211
static HRESULT WINAPI enum_class_object_Next(IEnumWbemClassObject *iface, LONG lTimeout, ULONG uCount, IWbemClassObject **apObjects, ULONG *puReturned)
Definition: class.c:108
GLenum GLsizei len
Definition: glext.h:6722
unsigned char BYTE
Definition: mem.h:68
REFIID LPVOID * ppvObject
Definition: precomp.h:44
UINT WINAPI SysStringLen(BSTR str)
Definition: oleaut.c:199
long CIMTYPE
Definition: wbemcli.idl:258
struct query * addref_query(struct query *query)
Definition: query.c:460
struct record * record
Definition: class.c:277
BSTR get_method_name(const WCHAR *class, UINT index)
Definition: table.c:406
static HRESULT WINAPI class_object_GetNames(IWbemClassObject *iface, LPCWSTR wszQualifierName, LONG lFlags, VARIANT *pQualifierVal, SAFEARRAY **pNames)
Definition: class.c:468
param_direction
#define V_BSTR(A)
Definition: oleauto.h:226
UINT index_method
Definition: class.c:275
SAFEARRAY * to_safearray(const struct array *array, CIMTYPE type)
Definition: query.c:765
static void free_table(MSITABLE *table)
Definition: table.c:372
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
#define S_OK
Definition: intsafe.h:59
static WCHAR * build_signature_table_name(const WCHAR *class, const WCHAR *method, enum param_direction dir)
Definition: class.c:805
static ULONG WINAPI enum_class_object_AddRef(IEnumWbemClassObject *iface)
Definition: class.c:48
#define InterlockedIncrement
Definition: armddk.h:53
static HRESULT WINAPI class_object_DeleteMethod(IWbemClassObject *iface, LPCWSTR wszName)
Definition: class.c:902
void * ptr
GLuint in
Definition: glext.h:9616
static ULONG WINAPI class_object_Release(IWbemClassObject *iface)
Definition: class.c:293
HRESULT create_class_object(const WCHAR *name, IEnumWbemClassObject *iter, UINT index, struct record *record, IWbemClassObject **obj)
Definition: class.c:1020
const WCHAR * name
static HRESULT WINAPI class_object_PutMethod(IWbemClassObject *iface, LPCWSTR wszName, LONG lFlags, IWbemClassObject *pInSignature, IWbemClassObject *pOutSignature)
Definition: class.c:891
int value
Definition: class.c:930
#define ARRAY_SIZE(a)
Definition: main.h:24
#define E_NOTIMPL
Definition: ddrawi.h:99
#define sprintfW
Definition: unicode.h:58
unsigned short VARTYPE
Definition: compat.h:1895
static const void * body(MD5_CTX *ctx, const void *data, unsigned long size)
Definition: md5.c:100
HRESULT exec_query(const WCHAR *str, IEnumWbemClassObject **result)
Definition: query.c:471
unsigned short UINT16
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 class_object_GetQualifierSet(IWbemClassObject *iface, IWbemQualifierSet **ppQualSet)
Definition: class.c:337
static HRESULT WINAPI enum_class_object_Reset(IEnumWbemClassObject *iface)
Definition: class.c:97
HRESULT create_signature(const WCHAR *class, const WCHAR *method, enum param_direction dir, IWbemClassObject **sig)
Definition: class.c:818
struct table * create_table(const WCHAR *name, UINT num_cols, const struct column *columns, UINT num_rows, UINT num_allocated, BYTE *data, enum fill_status(*fill)(struct table *, const struct expr *cond))
Definition: table.c:369
static BSTR get_object_text(const struct view *view, UINT index)
Definition: class.c:607
Definition: name.c:36
static HRESULT WINAPI class_object_Put(IWbemClassObject *iface, LPCWSTR wszName, LONG lFlags, VARIANT *pVal, CIMTYPE Type)
Definition: class.c:437
static HRESULT WINAPI class_object_GetMethod(IWbemClassObject *iface, LPCWSTR wszName, LONG lFlags, IWbemClassObject **ppInSignature, IWbemClassObject **ppOutSignature)
Definition: class.c:863
WINE_DEFAULT_DEBUG_CHANNEL(wbemprox)
unsigned int ULONG
Definition: retypes.h:1
signed int INT32
static HRESULT record_set_value(struct record *record, UINT index, VARIANT *var)
Definition: class.c:404
static HRESULT WINAPI class_object_Delete(IWbemClassObject *iface, LPCWSTR wszName)
Definition: class.c:460
HRESULT to_longlong(VARIANT *var, LONGLONG *val, CIMTYPE *type)
Definition: query.c:996
UINT index
Definition: class.c:274
BOOL is_method(const struct table *table, UINT column)
Definition: query.c:628
static HRESULT WINAPI class_object_EndMethodEnumeration(IWbemClassObject *iface)
Definition: class.c:960
GLfloat GLfloat p
Definition: glext.h:8902
GLuint GLenum GLenum GLenum GLenum outW
Definition: glext.h:9616
GLenum query
Definition: glext.h:7781
static HRESULT WINAPI class_object_QueryInterface(IWbemClassObject *iface, REFIID riid, void **ppvObject)
Definition: class.c:309
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
Definition: typeof.h:78
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
signed short INT16
WINE_UNICODE_INLINE WCHAR * struprW(WCHAR *str)
Definition: unicode.h:288