ReactOS  0.4.14-dev-49-gfb4591c
wbemprox_private.h File Reference
#include "wine/debug.h"
#include "wine/heap.h"
#include "wine/list.h"
#include "wine/unicode.h"
Include dependency graph for wbemprox_private.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  complex_expr
 
struct  expr
 
struct  column
 
struct  table
 
struct  property
 
struct  array
 
struct  field
 
struct  record
 
struct  view
 
struct  query
 

Macros

#define CIM_TYPE_MASK   0x00000fff
 
#define COL_TYPE_MASK   0x0000ffff
 
#define COL_FLAG_DYNAMIC   0x00010000
 
#define COL_FLAG_KEY   0x00020000
 
#define COL_FLAG_METHOD   0x00040000
 
#define TABLE_FLAG_DYNAMIC   0x00000001
 

Typedefs

typedef HRESULT() class_method(IWbemClassObject *, IWbemClassObject *, IWbemClassObject **)
 

Enumerations

enum  param_direction { PARAM_OUT = -1, PARAM_INOUT = 0, PARAM_IN = 1 }
 
enum  operator {
  OP_EQ = 1, OP_AND = 2, OP_OR = 3, OP_GT = 4,
  OP_LT = 5, OP_LE = 6, OP_GE = 7, OP_NE = 8,
  OP_ISNULL = 9, OP_NOTNULL = 10, OP_LIKE = 11, OP_NOT = 12
}
 
enum  expr_type {
  EXPR_COMPLEX = 1, EXPR_UNARY = 2, EXPR_PROPVAL = 3, EXPR_SVAL = 4,
  EXPR_IVAL = 5, EXPR_BVAL = 6, EXPR_VOID, EXPR_NUM,
  EXPR_HEXNUM, EXPR_DOUBLE, EXPR_IDENTIFIER, EXPR_NEG,
  EXPR_NOT, EXPR_PPTR, EXPR_CAST, EXPR_SIZEOF,
  EXPR_SHL, EXPR_SHR, EXPR_MUL, EXPR_DIV,
  EXPR_ADD, EXPR_SUB, EXPR_AND, EXPR_OR,
  EXPR_COND, EXPR_TRUEFALSE, EXPR_ADDRESSOF, EXPR_MEMBER,
  EXPR_ARRAY, EXPR_MOD, EXPR_LOGOR, EXPR_LOGAND,
  EXPR_XOR, EXPR_EQUALITY, EXPR_INEQUALITY, EXPR_GTR,
  EXPR_LESS, EXPR_GTREQL, EXPR_LESSEQL, EXPR_LOGNOT,
  EXPR_POS, EXPR_STRLIT, EXPR_WSTRLIT, EXPR_CHARCONST
}
 
enum  fill_status { FILL_STATUS_FAILED = -1, FILL_STATUS_UNFILTERED, FILL_STATUS_FILTERED }
 

Functions

struct querycreate_query (void) DECLSPEC_HIDDEN
 
void free_query (struct query *) DECLSPEC_HIDDEN
 
struct queryaddref_query (struct query *) DECLSPEC_HIDDEN
 
void release_query (struct query *query) DECLSPEC_HIDDEN
 
HRESULT exec_query (const WCHAR *, IEnumWbemClassObject **) DECLSPEC_HIDDEN
 
HRESULT parse_query (const WCHAR *, struct view **, struct list *) DECLSPEC_HIDDEN
 
HRESULT create_view (const struct property *, const WCHAR *, const struct expr *, struct view **) DECLSPEC_HIDDEN
 
void destroy_view (struct view *) DECLSPEC_HIDDEN
 
HRESULT execute_view (struct view *) DECLSPEC_HIDDEN
 
void init_table_list (void) DECLSPEC_HIDDEN
 
struct tablegrab_table (const WCHAR *) DECLSPEC_HIDDEN
 
struct tableaddref_table (struct table *) DECLSPEC_HIDDEN
 
void release_table (struct table *) DECLSPEC_HIDDEN
 
struct tablecreate_table (const WCHAR *, UINT, const struct column *, UINT, UINT, BYTE *, enum fill_status(*)(struct table *, const struct expr *)) DECLSPEC_HIDDEN
 
BOOL add_table (struct table *) DECLSPEC_HIDDEN
 
void free_columns (struct column *, UINT) DECLSPEC_HIDDEN
 
void free_row_values (const struct table *, UINT) DECLSPEC_HIDDEN
 
void clear_table (struct table *) DECLSPEC_HIDDEN
 
void free_table (struct table *) DECLSPEC_HIDDEN
 
UINT get_type_size (CIMTYPE) DECLSPEC_HIDDEN
 
HRESULT eval_cond (const struct table *, UINT, const struct expr *, LONGLONG *, UINT *) DECLSPEC_HIDDEN
 
HRESULT get_column_index (const struct table *, const WCHAR *, UINT *) DECLSPEC_HIDDEN
 
HRESULT get_value (const struct table *, UINT, UINT, LONGLONG *) DECLSPEC_HIDDEN
 
BSTR get_value_bstr (const struct table *, UINT, UINT) DECLSPEC_HIDDEN
 
HRESULT set_value (const struct table *, UINT, UINT, LONGLONG, CIMTYPE) DECLSPEC_HIDDEN
 
BOOL is_method (const struct table *, UINT) DECLSPEC_HIDDEN
 
HRESULT get_method (const struct table *, const WCHAR *, class_method **) DECLSPEC_HIDDEN
 
HRESULT get_propval (const struct view *, UINT, const WCHAR *, VARIANT *, CIMTYPE *, LONG *) DECLSPEC_HIDDEN
 
HRESULT put_propval (const struct view *, UINT, const WCHAR *, VARIANT *, CIMTYPE) DECLSPEC_HIDDEN
 
HRESULT to_longlong (VARIANT *, LONGLONG *, CIMTYPE *) DECLSPEC_HIDDEN
 
SAFEARRAYto_safearray (const struct array *, CIMTYPE) DECLSPEC_HIDDEN
 
VARTYPE to_vartype (CIMTYPE) DECLSPEC_HIDDEN
 
void destroy_array (struct array *, CIMTYPE) DECLSPEC_HIDDEN
 
BOOL is_selected_prop (const struct view *, const WCHAR *) DECLSPEC_HIDDEN
 
HRESULT get_properties (const struct view *, LONG, SAFEARRAY **) DECLSPEC_HIDDEN
 
HRESULT get_object (const WCHAR *, IWbemClassObject **) DECLSPEC_HIDDEN
 
BSTR get_method_name (const WCHAR *, UINT) DECLSPEC_HIDDEN
 
void set_variant (VARTYPE, LONGLONG, void *, VARIANT *) DECLSPEC_HIDDEN
 
HRESULT create_signature (const WCHAR *, const WCHAR *, enum param_direction, IWbemClassObject **) DECLSPEC_HIDDEN
 
HRESULT WbemLocator_create (LPVOID *) DECLSPEC_HIDDEN
 
HRESULT WbemServices_create (const WCHAR *, LPVOID *) DECLSPEC_HIDDEN
 
HRESULT create_class_object (const WCHAR *, IEnumWbemClassObject *, UINT, struct record *, IWbemClassObject **) DECLSPEC_HIDDEN
 
HRESULT EnumWbemClassObject_create (struct query *, LPVOID *) DECLSPEC_HIDDEN
 
HRESULT WbemQualifierSet_create (const WCHAR *, const WCHAR *, LPVOID *) DECLSPEC_HIDDEN
 
HRESULT process_get_owner (IWbemClassObject *, IWbemClassObject *, IWbemClassObject **) DECLSPEC_HIDDEN
 
HRESULT reg_create_key (IWbemClassObject *, IWbemClassObject *, IWbemClassObject **) DECLSPEC_HIDDEN
 
HRESULT reg_enum_key (IWbemClassObject *, IWbemClassObject *, IWbemClassObject **) DECLSPEC_HIDDEN
 
HRESULT reg_enum_values (IWbemClassObject *, IWbemClassObject *, IWbemClassObject **) DECLSPEC_HIDDEN
 
HRESULT reg_get_stringvalue (IWbemClassObject *, IWbemClassObject *, IWbemClassObject **) DECLSPEC_HIDDEN
 
HRESULT service_pause_service (IWbemClassObject *, IWbemClassObject *, IWbemClassObject **) DECLSPEC_HIDDEN
 
HRESULT service_resume_service (IWbemClassObject *, IWbemClassObject *, IWbemClassObject **) DECLSPEC_HIDDEN
 
HRESULT service_start_service (IWbemClassObject *, IWbemClassObject *, IWbemClassObject **) DECLSPEC_HIDDEN
 
HRESULT service_stop_service (IWbemClassObject *, IWbemClassObject *, IWbemClassObject **) DECLSPEC_HIDDEN
 
HRESULT security_get_sd (IWbemClassObject *, IWbemClassObject *, IWbemClassObject **) DECLSPEC_HIDDEN
 
HRESULT security_set_sd (IWbemClassObject *, IWbemClassObject *, IWbemClassObject **) DECLSPEC_HIDDEN
 
static WCHARheap_strdupW (const WCHAR *src)
 

Variables

IClientSecurity client_security DECLSPEC_HIDDEN
 
enum param_direction helpstring
 
static const WCHAR class_processW [] = {'W','i','n','3','2','_','P','r','o','c','e','s','s',0}
 
static const WCHAR class_serviceW [] = {'W','i','n','3','2','_','S','e','r','v','i','c','e',0}
 
static const WCHAR class_stdregprovW [] = {'S','t','d','R','e','g','P','r','o','v',0}
 
static const WCHAR class_systemsecurityW [] = {'_','_','S','y','s','t','e','m','S','e','c','u','r','i','t','y',0}
 
static const WCHAR prop_nameW [] = {'N','a','m','e',0}
 
static const WCHAR method_createkeyW [] = {'C','r','e','a','t','e','K','e','y',0}
 
static const WCHAR method_enumkeyW [] = {'E','n','u','m','K','e','y',0}
 
static const WCHAR method_enumvaluesW [] = {'E','n','u','m','V','a','l','u','e','s',0}
 
static const WCHAR method_getownerW [] = {'G','e','t','O','w','n','e','r',0}
 
static const WCHAR method_getsdW [] = {'G','e','t','S','D',0}
 
static const WCHAR method_getstringvalueW [] = {'G','e','t','S','t','r','i','n','g','V','a','l','u','e',0}
 
static const WCHAR method_pauseserviceW [] = {'P','a','u','s','e','S','e','r','v','i','c','e',0}
 
static const WCHAR method_resumeserviceW [] = {'R','e','s','u','m','e','S','e','r','v','i','c','e',0}
 
static const WCHAR method_setsdW [] = {'S','e','t','S','D',0}
 
static const WCHAR method_startserviceW [] = {'S','t','a','r','t','S','e','r','v','i','c','e',0}
 
static const WCHAR method_stopserviceW [] = {'S','t','o','p','S','e','r','v','i','c','e',0}
 
static const WCHAR param_defkeyW [] = {'h','D','e','f','K','e','y',0}
 
static const WCHAR param_domainW [] = {'D','o','m','a','i','n',0}
 
static const WCHAR param_namesW [] = {'s','N','a','m','e','s',0}
 
static const WCHAR param_returnvalueW [] = {'R','e','t','u','r','n','V','a','l','u','e',0}
 
static const WCHAR param_sdW [] = {'S','D',0}
 
static const WCHAR param_subkeynameW [] = {'s','S','u','b','K','e','y','N','a','m','e',0}
 
static const WCHAR param_typesW [] = {'T','y','p','e','s',0}
 
static const WCHAR param_userW [] = {'U','s','e','r',0}
 
static const WCHAR param_valueW [] = {'s','V','a','l','u','e',0}
 
static const WCHAR param_valuenameW [] = {'s','V','a','l','u','e','N','a','m','e',0}
 

Macro Definition Documentation

◆ CIM_TYPE_MASK

#define CIM_TYPE_MASK   0x00000fff

Definition at line 36 of file wbemprox_private.h.

◆ COL_FLAG_DYNAMIC

#define COL_FLAG_DYNAMIC   0x00010000

Definition at line 39 of file wbemprox_private.h.

◆ COL_FLAG_KEY

#define COL_FLAG_KEY   0x00020000

Definition at line 40 of file wbemprox_private.h.

◆ COL_FLAG_METHOD

#define COL_FLAG_METHOD   0x00040000

Definition at line 41 of file wbemprox_private.h.

◆ COL_TYPE_MASK

#define COL_TYPE_MASK   0x0000ffff

Definition at line 38 of file wbemprox_private.h.

◆ TABLE_FLAG_DYNAMIC

#define TABLE_FLAG_DYNAMIC   0x00000001

Definition at line 105 of file wbemprox_private.h.

Typedef Documentation

◆ class_method

typedef HRESULT() class_method(IWbemClassObject *, IWbemClassObject *, IWbemClassObject **)

Definition at line 43 of file wbemprox_private.h.

Enumeration Type Documentation

◆ expr_type

Enumerator
EXPR_COMPLEX 
EXPR_UNARY 
EXPR_PROPVAL 
EXPR_SVAL 
EXPR_IVAL 
EXPR_BVAL 
EXPR_VOID 
EXPR_NUM 
EXPR_HEXNUM 
EXPR_DOUBLE 
EXPR_IDENTIFIER 
EXPR_NEG 
EXPR_NOT 
EXPR_PPTR 
EXPR_CAST 
EXPR_SIZEOF 
EXPR_SHL 
EXPR_SHR 
EXPR_MUL 
EXPR_DIV 
EXPR_ADD 
EXPR_SUB 
EXPR_AND 
EXPR_OR 
EXPR_COND 
EXPR_TRUEFALSE 
EXPR_ADDRESSOF 
EXPR_MEMBER 
EXPR_ARRAY 
EXPR_MOD 
EXPR_LOGOR 
EXPR_LOGAND 
EXPR_XOR 
EXPR_EQUALITY 
EXPR_INEQUALITY 
EXPR_GTR 
EXPR_LESS 
EXPR_GTREQL 
EXPR_LESSEQL 
EXPR_LOGNOT 
EXPR_POS 
EXPR_STRLIT 
EXPR_WSTRLIT 
EXPR_CHARCONST 

Definition at line 69 of file wbemprox_private.h.

◆ fill_status

Enumerator
FILL_STATUS_FAILED 
FILL_STATUS_UNFILTERED 
FILL_STATUS_FILTERED 

Definition at line 98 of file wbemprox_private.h.

◆ operator

Enumerator
OP_EQ 
OP_AND 
OP_OR 
OP_GT 
OP_LT 
OP_LE 
OP_GE 
OP_NE 
OP_ISNULL 
OP_NOTNULL 
OP_LIKE 
OP_NOT 

Definition at line 45 of file wbemprox_private.h.

46 {
47  OP_EQ = 1,
48  OP_AND = 2,
49  OP_OR = 3,
50  OP_GT = 4,
51  OP_LT = 5,
52  OP_LE = 6,
53  OP_GE = 7,
54  OP_NE = 8,
55  OP_ISNULL = 9,
56  OP_NOTNULL = 10,
57  OP_LIKE = 11,
58  OP_NOT = 12
59 };

◆ param_direction

Enumerator
PARAM_OUT 
PARAM_INOUT 
PARAM_IN 

Definition at line 29 of file wbemprox_private.h.

30 {
31  PARAM_OUT = -1,
32  PARAM_INOUT = 0,
33  PARAM_IN = 1
34 };

Function Documentation

◆ add_table()

BOOL add_table ( struct table )

Definition at line 389 of file table.c.

390 {
391  struct table *iter;
392 
393  LIST_FOR_EACH_ENTRY( iter, table_list, struct table, entry )
394  {
395  if (!strcmpiW( iter->name, table->name ))
396  {
397  TRACE("table %s already exists\n", debugstr_w(table->name));
398  return FALSE;
399  }
400  }
401  list_add_tail( table_list, &table->entry );
402  TRACE("added %p\n", table);
403  return TRUE;
404 }
#define TRUE
Definition: types.h:120
const WCHAR * name
__WINE_SERVER_LIST_INLINE void list_add_tail(struct list *list, struct list *elem)
Definition: list.h:102
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
#define debugstr_w
Definition: kernel32.h:32
struct list entry
#define TRACE(s)
Definition: solgame.cpp:4
uint32_t entry
Definition: isohybrid.c:63
#define strcmpiW(s1, s2)
Definition: unicode.h:39

Referenced by create_signature_table().

◆ addref_query()

struct query* addref_query ( struct query )

Definition at line 460 of file query.c.

461 {
463  return query;
464 }
#define InterlockedIncrement
Definition: armddk.h:53
GLenum query
Definition: glext.h:7781

Referenced by EnumWbemClassObject_create().

◆ addref_table()

struct table* addref_table ( struct table )

Definition at line 348 of file table.c.

349 {
351  return table;
352 }
GLenum GLsizei GLenum GLenum const GLvoid * table
Definition: glext.h:5644
#define InterlockedIncrement
Definition: armddk.h:53

Referenced by create_record(), and grab_table().

◆ clear_table()

void clear_table ( struct table )

Definition at line 303 of file table.c.

304 {
305  UINT i;
306 
307  if (!table->data) return;
308 
309  for (i = 0; i < table->num_rows; i++) free_row_values( table, i );
310  if (table->fill)
311  {
312  table->num_rows = 0;
314  heap_free( table->data );
315  table->data = NULL;
316  }
317 }
UINT num_rows
enum fill_status(* fill)(struct table *, const struct expr *cond)
void free_row_values(const struct table *table, UINT row)
Definition: table.c:281
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
smooth NULL
Definition: ftsmooth.c:416
UINT num_rows_allocated
BYTE * data
unsigned int UINT
Definition: ndis.h:50
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by execute_view(), and free_table().

◆ create_class_object()

HRESULT create_class_object ( const WCHAR ,
IEnumWbemClassObject ,
UINT  ,
struct record ,
IWbemClassObject **   
)

Definition at line 1020 of file class.c.

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 }
IWbemClassObject IWbemClassObject_iface
Definition: class.c:270
static const IWbemClassObjectVtbl class_object_vtbl
Definition: class.c:989
LONG refs
Definition: class.c:271
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static WCHAR * heap_strdupW(const WCHAR *str)
Definition: propsheet.c:178
#define debugstr_w
Definition: kernel32.h:32
smooth NULL
Definition: ftsmooth.c:416
IEnumWbemClassObject * iter
Definition: class.c:273
UINT index_property
Definition: class.c:276
#define TRACE(s)
Definition: solgame.cpp:4
WCHAR * name
Definition: class.c:272
#define index(s, c)
Definition: various.h:29
struct record * record
Definition: class.c:277
UINT index_method
Definition: class.c:275
#define S_OK
Definition: intsafe.h:59
Definition: name.c:36
UINT index
Definition: class.c:274
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by class_object_SpawnInstance(), enum_class_object_Next(), get_object(), get_qualifier_value(), wbem_services_ExecMethod(), and wbem_services_GetObject().

◆ create_query()

struct query* create_query ( void  )

Definition at line 440 of file query.c.

441 {
442  struct query *query;
443 
444  if (!(query = heap_alloc( sizeof(*query) ))) return NULL;
445  list_init( &query->mem );
446  query->refs = 1;
447  return query;
448 }
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
smooth NULL
Definition: ftsmooth.c:416
struct list mem
__WINE_SERVER_LIST_INLINE void list_init(struct list *list)
Definition: list.h:149
GLenum query
Definition: glext.h:7781

Referenced by exec_query().

◆ create_signature()

HRESULT create_signature ( const WCHAR ,
const WCHAR ,
enum  param_direction,
IWbemClassObject **   
)

Definition at line 818 of file class.c.

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 }
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
HRESULT hr
Definition: shlfolder.c:183
static IDispatch * get_object(jsval_t v)
Definition: jsval.h:219
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
static HRESULT create_signature_table(IEnumWbemClassObject *iter, WCHAR *name)
Definition: class.c:784
static UINT count_instances(IEnumWbemClassObject *iter)
Definition: class.c:696
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
smooth NULL
Definition: ftsmooth.c:416
unsigned int dir
Definition: maze.c:112
const char name[9]
Definition: class.c:929
static const WCHAR selectW[]
Definition: htmlelem.c:38
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
method
Definition: dragdrop.c:53
GLenum GLsizei len
Definition: glext.h:6722
#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
#define ARRAY_SIZE(a)
Definition: main.h:24
#define sprintfW
Definition: unicode.h:58
HRESULT exec_query(const WCHAR *str, IEnumWbemClassObject **result)
Definition: query.c:471
unsigned int UINT
Definition: ndis.h:50
Definition: name.c:36
GLenum query
Definition: glext.h:7781
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by class_object_GetMethod(), class_object_NextMethod(), process_get_owner(), reg_create_key(), reg_enum_key(), reg_enum_values(), reg_get_stringvalue(), security_get_sd(), security_set_sd(), service_pause_service(), service_resume_service(), service_start_service(), and service_stop_service().

◆ create_table()

struct table* create_table ( const WCHAR ,
UINT  ,
const struct column ,
UINT  ,
UINT  ,
BYTE ,
enum   fill_status*)(struct table *, const struct expr * 
)

◆ create_view()

HRESULT create_view ( const struct property ,
const WCHAR ,
const struct expr ,
struct view **   
)

Definition at line 33 of file query.c.

35 {
36  struct view *view = heap_alloc( sizeof(struct view) );
37 
38  if (!view) return E_OUTOFMEMORY;
40  view->table = grab_table( class );
41  view->cond = cond;
42  view->result = NULL;
43  view->count = 0;
44  *ret = view;
45  return S_OK;
46 }
UINT count
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
const struct expr * cond
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
UINT * result
smooth NULL
Definition: ftsmooth.c:416
struct table * table
struct table * grab_table(const WCHAR *name)
Definition: table.c:354
const struct property * proplist
int ret
#define S_OK
Definition: intsafe.h:59
static IOleDocumentView * view
Definition: activex.c:1749

◆ destroy_array()

void destroy_array ( struct array ,
CIMTYPE   
)

Definition at line 237 of file class.c.

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 }
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
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
GLsizeiptr size
Definition: glext.h:5919
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned int get_type_size(ULONG *pFlags, VARTYPE vt)
Definition: usrmarshal.c:209
void * ptr
unsigned int UINT
Definition: ndis.h:50
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by destroy_record(), free_row_values(), and to_array().

◆ destroy_view()

void destroy_view ( struct view )

Definition at line 48 of file query.c.

49 {
50  if (!view) return;
51  if (view->table) release_table( view->table );
52  heap_free( view->result );
53  heap_free( view );
54 }
UINT * result
struct table * table
void release_table(struct table *table)
Definition: table.c:343
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by free_query(), and parse_query().

◆ EnumWbemClassObject_create()

HRESULT EnumWbemClassObject_create ( struct query ,
LPVOID  
)

Definition at line 195 of file class.c.

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 }
struct query * query
Definition: class.c:38
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
IEnumWbemClassObject IEnumWbemClassObject_iface
Definition: class.c:36
#define TRACE(s)
Definition: solgame.cpp:4
static const IEnumWbemClassObjectVtbl enum_class_object_vtbl
Definition: class.c:183
struct query * addref_query(struct query *query)
Definition: query.c:460
#define S_OK
Definition: intsafe.h:59

Referenced by enum_class_object_Clone(), exec_query(), and wbem_services_ExecMethod().

◆ eval_cond()

HRESULT eval_cond ( const struct table ,
UINT  ,
const struct expr ,
LONGLONG ,
UINT  
)

Definition at line 364 of file query.c.

365 {
366  if (!cond)
367  {
368  *val = 1;
369  *type = CIM_UINT64;
370  return S_OK;
371  }
372  switch (cond->type)
373  {
374  case EXPR_COMPLEX:
375  return eval_binary( table, row, &cond->u.expr, val, type );
376 
377  case EXPR_UNARY:
378  return eval_unary( table, row, &cond->u.expr, val, type );
379 
380  case EXPR_PROPVAL:
381  return eval_propval( table, row, cond->u.propval, val, type );
382 
383  case EXPR_SVAL:
384  *val = (INT_PTR)cond->u.sval;
385  *type = CIM_STRING;
386  return S_OK;
387 
388  case EXPR_IVAL:
389  *val = cond->u.ival;
390  *type = CIM_UINT64;
391  return S_OK;
392 
393  case EXPR_BVAL:
394  *val = cond->u.ival;
395  *type = CIM_BOOLEAN;
396  return S_OK;
397 
398  default:
399  ERR("invalid expression type\n");
400  break;
401  }
402  return WBEM_E_INVALID_QUERY;
403 }
static HRESULT eval_unary(const struct table *table, UINT row, const struct complex_expr *expr, LONGLONG *val, UINT *type)
Definition: query.c:307
static HRESULT eval_binary(const struct table *table, UINT row, const struct complex_expr *expr, LONGLONG *val, UINT *type)
Definition: query.c:245
static HRESULT eval_propval(const struct table *table, UINT row, const struct property *propval, LONGLONG *val, UINT *type)
Definition: query.c:349
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
int32_t INT_PTR
Definition: typedefs.h:62
GLuint GLfloat * val
Definition: glext.h:7180
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59
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

Referenced by eval_binary(), eval_unary(), execute_view(), and match_row().

◆ exec_query()

HRESULT exec_query ( const WCHAR ,
IEnumWbemClassObject **   
)

Definition at line 471 of file query.c.

472 {
473  HRESULT hr;
474  struct query *query;
475 
476  *result = NULL;
477  if (!(query = create_query())) return E_OUTOFMEMORY;
478  hr = parse_query( str, &query->view, &query->mem );
479  if (hr != S_OK) goto done;
480  hr = execute_view( query->view );
481  if (hr != S_OK) goto done;
482  hr = EnumWbemClassObject_create( query, (void **)result );
483 
484 done:
485  release_query( query );
486  return hr;
487 }
HRESULT hr
Definition: shlfolder.c:183
HRESULT EnumWbemClassObject_create(struct query *query, LPVOID *ppObj)
Definition: class.c:195
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static BOOL parse_query(const WCHAR **ptr, parse_data *data, DWORD flags)
Definition: uri.c:2045
const WCHAR * str
void release_query(struct query *query)
Definition: query.c:466
smooth NULL
Definition: ftsmooth.c:416
HRESULT execute_view(struct view *view)
Definition: query.c:405
LONG HRESULT
Definition: typedefs.h:77
struct list mem
#define S_OK
Definition: intsafe.h:59
struct view * view
GLuint64EXT * result
Definition: glext.h:11304
GLenum query
Definition: glext.h:7781
struct query * create_query(void)
Definition: query.c:440

Referenced by async_exec_query(), create_instance_enum(), create_qualifier_enum(), create_signature(), test_associators(), test_select(), and wbem_services_ExecQuery().

◆ execute_view()

HRESULT execute_view ( struct view )

Definition at line 405 of file query.c.

406 {
407  UINT i, j = 0, len;
408 
409  if (!view->table) return S_OK;
410  if (view->table->fill)
411  {
412  clear_table( view->table );
413  view->table->fill( view->table, view->cond );
414  }
415  if (!view->table->num_rows) return S_OK;
416 
417  len = min( view->table->num_rows, 16 );
418  if (!(view->result = heap_alloc( len * sizeof(UINT) ))) return E_OUTOFMEMORY;
419 
420  for (i = 0; i < view->table->num_rows; i++)
421  {
422  HRESULT hr;
423  LONGLONG val = 0;
424  UINT type;
425 
426  if (j >= len)
427  {
428  UINT *tmp;
429  len *= 2;
430  if (!(tmp = heap_realloc( view->result, len * sizeof(UINT) ))) return E_OUTOFMEMORY;
431  view->result = tmp;
432  }
433  if ((hr = eval_cond( view->table, i, view->cond, &val, &type )) != S_OK) return hr;
434  if (val) view->result[j++] = i;
435  }
436  view->count = j;
437  return S_OK;
438 }
HRESULT hr
Definition: shlfolder.c:183
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
static void * heap_realloc(void *mem, size_t len)
Definition: appwiz.h:70
UINT count
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
const struct expr * cond
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
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
UINT * result
struct table * table
GLuint GLfloat * val
Definition: glext.h:7180
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 GLint GLint j
Definition: glfuncs.h:250
int64_t LONGLONG
Definition: typedefs.h:66
LONG HRESULT
Definition: typedefs.h:77
void clear_table(struct table *table)
Definition: table.c:303
GLenum GLsizei len
Definition: glext.h:6722
#define S_OK
Definition: intsafe.h:59
#define min(a, b)
Definition: monoChain.cc:55
unsigned int UINT
Definition: ndis.h:50
HRESULT eval_cond(const struct table *table, UINT row, const struct expr *cond, LONGLONG *val, UINT *type)
Definition: query.c:364

Referenced by exec_query(), and wbem_services_ExecMethod().

◆ free_columns()

void free_columns ( struct column ,
UINT   
)

Definition at line 319 of file table.c.

320 {
321  UINT i;
322 
323  for (i = 0; i < num_cols; i++) { heap_free( (WCHAR *)columns[i].name ); }
324  heap_free( columns );
325 }
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
__wchar_t WCHAR
Definition: xmlstorage.h:180
int JSAMPARRAY int int JDIMENSION num_cols
Definition: jpegint.h:412
unsigned int UINT
Definition: ndis.h:50
Definition: name.c:36
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by create_signature_table(), and free_table().

◆ free_query()

void free_query ( struct query )

Definition at line 450 of file query.c.

451 {
452  struct list *mem, *next;
453 
454  if (!query) return;
455  destroy_view( query->view );
457  heap_free( query );
458 }
#define LIST_FOR_EACH_SAFE(cursor, cursor2, list)
Definition: list.h:192
void destroy_view(struct view *view)
Definition: query.c:48
Definition: _list.h:228
struct list mem
static unsigned __int64 next
Definition: rand_nt.c:6
struct view * view
Definition: mem.c:156
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by release_query(), and wbem_services_ExecMethod().

◆ free_row_values()

void free_row_values ( const struct table ,
UINT   
)

Definition at line 281 of file table.c.

282 {
283  UINT i, type;
284  LONGLONG val;
285 
286  for (i = 0; i < table->num_cols; i++)
287  {
288  if (!(table->columns[i].type & COL_FLAG_DYNAMIC)) continue;
289 
290  type = table->columns[i].type & COL_TYPE_MASK;
291  if (type == CIM_STRING || type == CIM_DATETIME)
292  {
293  if (get_value( table, row, i, &val ) == S_OK) heap_free( (void *)(INT_PTR)val );
294  }
295  else if (type & CIM_FLAG_ARRAY)
296  {
297  if (get_value( table, row, i, &val ) == S_OK)
298  destroy_array( (void *)(INT_PTR)val, type & CIM_TYPE_MASK );
299  }
300  }
301 }
UINT num_cols
const struct column * columns
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
int32_t INT_PTR
Definition: typedefs.h:62
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
#define CIM_TYPE_MASK
void destroy_array(struct array *array, CIMTYPE type)
Definition: class.c:237
#define COL_TYPE_MASK
GLuint GLfloat * val
Definition: glext.h:7180
int64_t LONGLONG
Definition: typedefs.h:66
#define COL_FLAG_DYNAMIC
#define S_OK
Definition: intsafe.h:59
HRESULT get_value(const struct table *table, UINT row, UINT column, LONGLONG *val)
Definition: table.c:94
unsigned int UINT
Definition: ndis.h:50
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

Referenced by clear_table(), fill_cdromdrive(), fill_compsys(), fill_compsysproduct(), fill_datafile(), fill_directory(), fill_diskdrive(), fill_diskpartition(), fill_ip4routetable(), fill_logicaldisk(), fill_networkadapter(), fill_networkadapterconfig(), fill_os(), fill_physicalmemory(), fill_pnpentity(), fill_printer(), fill_process(), fill_processor(), fill_service(), and fill_videocontroller().

◆ free_table()

void free_table ( struct table )

Definition at line 327 of file table.c.

328 {
329  if (!table) return;
330 
331  clear_table( table );
333  {
334  TRACE("destroying %p\n", table);
335  heap_free( (WCHAR *)table->name );
336  free_columns( (struct column *)table->columns, table->num_cols );
337  heap_free( table->data );
338  list_remove( &table->entry );
339  heap_free( table );
340  }
341 }
UINT num_cols
void free_columns(struct column *columns, UINT num_cols)
Definition: table.c:319
const WCHAR * name
const struct column * columns
struct list entry
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define TABLE_FLAG_DYNAMIC
void clear_table(struct table *table)
Definition: table.c:303
BYTE * data
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by release_table().

◆ get_column_index()

HRESULT get_column_index ( const struct table ,
const WCHAR ,
UINT  
)

Definition at line 33 of file table.c.

34 {
35  UINT i;
36  for (i = 0; i < table->num_cols; i++)
37  {
38  if (!strcmpiW( table->columns[i].name, name ))
39  {
40  *column = i;
41  return S_OK;
42  }
43  }
44  return WBEM_E_INVALID_QUERY;
45 }
UINT num_cols
const struct column * columns
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
#define strcmpiW(s1, s2)
Definition: unicode.h:39
#define S_OK
Definition: intsafe.h:59
unsigned int UINT
Definition: ndis.h:50
Definition: name.c:36

Referenced by class_object_Get(), class_object_Put(), eval_propval(), eval_unary(), get_propval(), and put_propval().

◆ get_method()

HRESULT get_method ( const struct table ,
const WCHAR ,
class_method **   
)

Definition at line 258 of file table.c.

259 {
260  UINT i, j;
261 
262  for (i = 0; i < table->num_rows; i++)
263  {
264  for (j = 0; j < table->num_cols; j++)
265  {
266  if (table->columns[j].type & COL_FLAG_METHOD && !strcmpW( table->columns[j].name, name ))
267  {
268  HRESULT hr;
269  LONGLONG val;
270 
271  if ((hr = get_value( table, i, j, &val )) != S_OK) return hr;
272  *func = (class_method *)(INT_PTR)val;
273  return S_OK;
274  }
275  }
276  }
277  return WBEM_E_INVALID_METHOD;
278 
279 }
GLenum func
Definition: glext.h:6028
UINT num_cols
HRESULT hr
Definition: shlfolder.c:183
UINT num_rows
const struct column * columns
int32_t INT_PTR
Definition: typedefs.h:62
#define COL_FLAG_METHOD
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
GLuint GLfloat * val
Definition: glext.h:7180
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 GLint GLint j
Definition: glfuncs.h:250
int64_t LONGLONG
Definition: typedefs.h:66
LONG HRESULT
Definition: typedefs.h:77
HRESULT() class_method(IWbemClassObject *, IWbemClassObject *, IWbemClassObject **)
#define S_OK
Definition: intsafe.h:59
HRESULT get_value(const struct table *table, UINT row, UINT column, LONGLONG *val)
Definition: table.c:94
unsigned int UINT
Definition: ndis.h:50
Definition: name.c:36
WINE_UNICODE_INLINE int strcmpW(const WCHAR *str1, const WCHAR *str2)
Definition: unicode.h:229

Referenced by wbem_services_ExecMethod().

◆ get_method_name()

BSTR get_method_name ( const WCHAR ,
UINT   
)

Definition at line 406 of file table.c.

407 {
408  struct table *table;
409  UINT i, count = 0;
410  BSTR ret;
411 
412  if (!(table = grab_table( class ))) return NULL;
413 
414  for (i = 0; i < table->num_cols; i++)
415  {
416  if (table->columns[i].type & COL_FLAG_METHOD)
417  {
418  if (index == count)
419  {
420  ret = SysAllocString( table->columns[i].name );
421  release_table( table );
422  return ret;
423  }
424  count++;
425  }
426  }
427  release_table( table );
428  return NULL;
429 }
UINT num_cols
GLuint GLuint GLsizei count
Definition: gl.h:1545
const struct column * columns
GLenum GLsizei GLenum GLenum const GLvoid * table
Definition: glext.h:5644
OLECHAR * BSTR
Definition: compat.h:1934
#define COL_FLAG_METHOD
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
smooth NULL
Definition: ftsmooth.c:416
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:241
GLuint index
Definition: glext.h:6031
struct table * grab_table(const WCHAR *name)
Definition: table.c:354
void release_table(struct table *table)
Definition: table.c:343
int ret
unsigned int UINT
Definition: ndis.h:50

Referenced by class_object_NextMethod().

◆ get_object()

HRESULT get_object ( const WCHAR ,
IWbemClassObject **   
)

Definition at line 448 of file services.c.

449 {
450  IEnumWbemClassObject *iter;
451  struct path *path;
452  HRESULT hr;
453 
454  hr = parse_path( object_path, &path );
455  if (hr != S_OK) return hr;
456 
457  hr = create_instance_enum( path, &iter );
458  if (hr != S_OK)
459  {
460  free_path( path );
461  return hr;
462  }
463  hr = create_class_object( path->class, iter, 0, NULL, obj );
464  IEnumWbemClassObject_Release( iter );
465  free_path( path );
466  return hr;
467 }
HRESULT hr
Definition: shlfolder.c:183
GLsizei const GLchar ** path
Definition: glext.h:7234
static HRESULT parse_path(const WCHAR *str, struct path **ret)
Definition: services.c:333
smooth NULL
Definition: ftsmooth.c:416
static HRESULT create_instance_enum(const struct path *path, IEnumWbemClassObject **iter)
Definition: services.c:437
WCHAR * class
Definition: services.c:327
LONG HRESULT
Definition: typedefs.h:77
#define S_OK
Definition: intsafe.h:59
HRESULT create_class_object(const WCHAR *name, IEnumWbemClassObject *iter, UINT index, struct record *record, IWbemClassObject **obj)
Definition: class.c:1020
Definition: services.c:325
static void free_path(struct path *path)
Definition: services.c:404

Referenced by wbem_services_GetObject().

◆ get_properties()

HRESULT get_properties ( const struct view ,
LONG  ,
SAFEARRAY **   
)

Definition at line 1067 of file query.c.

1068 {
1069  SAFEARRAY *sa;
1070  BSTR str;
1071  UINT i, num_props = count_selected_properties( view );
1072  LONG j;
1073 
1074  if (!(sa = SafeArrayCreateVector( VT_BSTR, 0, num_props ))) return E_OUTOFMEMORY;
1075 
1076  for (i = 0, j = 0; i < view->table->num_cols; i++)
1077  {
1078  BOOL is_system;
1079 
1080  if (is_method( view->table, i )) continue;
1081  if (!is_selected_prop( view, view->table->columns[i].name )) continue;
1082 
1083  is_system = is_system_prop( view->table->columns[i].name );
1084  if ((flags & WBEM_FLAG_NONSYSTEM_ONLY) && is_system) continue;
1085  else if ((flags & WBEM_FLAG_SYSTEM_ONLY) && !is_system) continue;
1086 
1087  str = SysAllocString( view->table->columns[i].name );
1088  if (!str || SafeArrayPutElement( sa, &j, str ) != S_OK)
1089  {
1090  SysFreeString( str );
1091  SafeArrayDestroy( sa );
1092  return E_OUTOFMEMORY;
1093  }
1094  SysFreeString( str );
1095  j++;
1096  }
1097  *props = sa;
1098  return S_OK;
1099 }
OLECHAR * BSTR
Definition: compat.h:1934
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
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
static BOOL is_system_prop(const WCHAR *name)
Definition: query.c:502
const WCHAR * str
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:241
struct table * table
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 GLint GLint j
Definition: glfuncs.h:250
BOOL is_selected_prop(const struct view *view, const WCHAR *name)
Definition: query.c:489
GLbitfield flags
Definition: glext.h:7161
HRESULT WINAPI SafeArrayDestroy(SAFEARRAY *psa)
Definition: safearray.c:1349
SAFEARRAY *WINAPI SafeArrayCreateVector(VARTYPE vt, LONG lLbound, ULONG cElements)
Definition: safearray.c:679
#define S_OK
Definition: intsafe.h:59
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:274
unsigned int UINT
Definition: ndis.h:50
static UINT count_selected_properties(const struct view *view)
Definition: query.c:644
static const WCHAR props[]
Definition: wbemdisp.c:288
HRESULT WINAPI SafeArrayPutElement(SAFEARRAY *psa, LONG *rgIndices, void *pvData)
Definition: safearray.c:866
BOOL is_method(const struct table *table, UINT column)
Definition: query.c:628
static struct sockaddr_in sa
Definition: adnsresfilter.c:69

Referenced by class_object_GetNames().

◆ get_propval()

HRESULT get_propval ( const struct view ,
UINT  ,
const WCHAR ,
VARIANT ,
CIMTYPE ,
LONG  
)

Definition at line 840 of file query.c.

842 {
843  HRESULT hr;
844  UINT column, row;
846  void *val_ptr = NULL;
847  LONGLONG val;
848 
849  if (is_system_prop( name )) return get_system_propval( view, index, name, ret, type, flavor );
850  if (!view->count || !is_selected_prop( view, name )) return WBEM_E_NOT_FOUND;
851 
853  if (hr != S_OK || is_method( view->table, column )) return WBEM_E_NOT_FOUND;
854 
855  row = view->result[index];
856  hr = get_value( view->table, row, column, &val );
857  if (hr != S_OK) return hr;
858 
859  if (type) *type = view->table->columns[column].type & COL_TYPE_MASK;
860  if (flavor) *flavor = 0;
861 
862  if (!ret) return S_OK;
863 
864  vartype = view->table->columns[column].vartype;
865  if (view->table->columns[column].type & CIM_FLAG_ARRAY)
866  {
867  CIMTYPE basetype = view->table->columns[column].type & CIM_TYPE_MASK;
868 
869  val_ptr = to_safearray( (const struct array *)(INT_PTR)val, basetype );
870  if (!val_ptr) vartype = VT_NULL;
871  else if (!vartype) vartype = to_vartype( basetype ) | VT_ARRAY;
872  set_variant( vartype, val, val_ptr, ret );
873  return S_OK;
874  }
875 
876  switch (view->table->columns[column].type & COL_TYPE_MASK)
877  {
878  case CIM_BOOLEAN:
879  if (!vartype) vartype = VT_BOOL;
880  break;
881  case CIM_STRING:
882  case CIM_DATETIME:
883  if (val)
884  {
885  vartype = VT_BSTR;
886  val_ptr = SysAllocString( (const WCHAR *)(INT_PTR)val );
887  }
888  else
889  vartype = VT_NULL;
890  break;
891  case CIM_SINT8:
892  if (!vartype) vartype = VT_I1;
893  break;
894  case CIM_UINT8:
895  if (!vartype) vartype = VT_UI1;
896  break;
897  case CIM_SINT16:
898  if (!vartype) vartype = VT_I2;
899  break;
900  case CIM_UINT16:
901  if (!vartype) vartype = VT_UI2;
902  break;
903  case CIM_SINT32:
904  if (!vartype) vartype = VT_I4;
905  break;
906  case CIM_UINT32:
907  if (!vartype) vartype = VT_UI4;
908  break;
909  case CIM_SINT64:
910  vartype = VT_BSTR;
911  val_ptr = get_value_bstr( view->table, row, column );
912  break;
913  case CIM_UINT64:
914  vartype = VT_BSTR;
915  val_ptr = get_value_bstr( view->table, row, column );
916  break;
917  default:
918  ERR("unhandled column type %u\n", view->table->columns[column].type);
919  return WBEM_E_FAILED;
920  }
921 
922  set_variant( vartype, val, val_ptr, ret );
923  return S_OK;
924 }
HRESULT get_column_index(const struct table *table, const WCHAR *name, UINT *column)
Definition: table.c:33
Definition: compat.h:1939
HRESULT hr
Definition: shlfolder.c:183
Definition: compat.h:1951
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
VARTYPE to_vartype(CIMTYPE type)
Definition: query.c:743
int32_t INT_PTR
Definition: typedefs.h:62
BSTR get_value_bstr(const struct table *table, UINT row, UINT column)
Definition: table.c:149
UINT count
#define CIM_TYPE_MASK
static BOOL is_system_prop(const WCHAR *name)
Definition: query.c:502
UINT * result
#define COL_TYPE_MASK
smooth NULL
Definition: ftsmooth.c:416
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:241
void set_variant(VARTYPE type, LONGLONG val, void *val_ptr, VARIANT *ret)
Definition: query.c:797
GLuint index
Definition: glext.h:6031
struct table * table
GLuint GLfloat * val
Definition: glext.h:7180
int64_t LONGLONG
Definition: typedefs.h:66
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
BOOL is_selected_prop(const struct view *view, const WCHAR *name)
Definition: query.c:489
int ret
#define index(s, c)
Definition: various.h:29
long CIMTYPE
Definition: wbemcli.idl:258
SAFEARRAY * to_safearray(const struct array *array, CIMTYPE type)
Definition: query.c:765
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59
HRESULT get_value(const struct table *table, UINT row, UINT column, LONGLONG *val)
Definition: table.c:94
unsigned short VARTYPE
Definition: compat.h:1895
unsigned int UINT
Definition: ndis.h:50
Definition: name.c:36
BOOL is_method(const struct table *table, UINT column)
Definition: query.c:628
GLenum GLenum GLvoid GLvoid * column
Definition: glext.h:5664
static HRESULT get_system_propval(const struct view *view, UINT index, const WCHAR *name, VARIANT *ret, CIMTYPE *type, LONG *flavor)
Definition: query.c:656
Definition: compat.h:1938
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

Referenced by class_object_Get(), and class_object_Next().

◆ get_type_size()

UINT get_type_size ( CIMTYPE  )

Definition at line 47 of file table.c.

48 {
49  if (type & CIM_FLAG_ARRAY) return sizeof(void *);
50 
51  switch (type)
52  {
53  case CIM_BOOLEAN:
54  return sizeof(int);
55  case CIM_SINT8:
56  case CIM_UINT8:
57  return sizeof(INT8);
58  case CIM_SINT16:
59  case CIM_UINT16:
60  return sizeof(INT16);
61  case CIM_SINT32:
62  case CIM_UINT32:
63  return sizeof(INT32);
64  case CIM_SINT64:
65  case CIM_UINT64:
66  return sizeof(INT64);
67  case CIM_DATETIME:
68  case CIM_STRING:
69  return sizeof(WCHAR *);
70  default:
71  ERR("unhandled type %u\n", type);
72  break;
73  }
74  return sizeof(LONGLONG);
75 }
signed char INT8
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
int64_t LONGLONG
Definition: typedefs.h:66
__wchar_t WCHAR
Definition: xmlstorage.h:180
signed long long INT64
#define ERR(fmt,...)
Definition: debug.h:109
signed int INT32
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
signed short INT16

Referenced by get_column_size().

◆ get_value()

HRESULT get_value ( const struct table ,
UINT  ,
UINT  ,
LONGLONG  
)

Definition at line 94 of file table.c.

95 {
96  UINT col_offset, row_size;
97  const BYTE *ptr;
98 
99  col_offset = get_column_offset( table, column );
100  row_size = get_row_size( table );
101  ptr = table->data + row * row_size + col_offset;
102 
103  if (table->columns[column].type & CIM_FLAG_ARRAY)
104  {
105  *val = (INT_PTR)*(const void **)ptr;
106  return S_OK;
107  }
108  switch (table->columns[column].type & COL_TYPE_MASK)
109  {
110  case CIM_BOOLEAN:
111  *val = *(const int *)ptr;
112  break;
113  case CIM_DATETIME:
114  case CIM_STRING:
115  *val = (INT_PTR)*(const WCHAR **)ptr;
116  break;
117  case CIM_SINT8:
118  *val = *(const INT8 *)ptr;
119  break;
120  case CIM_UINT8:
121  *val = *(const UINT8 *)ptr;
122  break;
123  case CIM_SINT16:
124  *val = *(const INT16 *)ptr;
125  break;
126  case CIM_UINT16:
127  *val = *(const UINT16 *)ptr;
128  break;
129  case CIM_SINT32:
130  *val = *(const INT32 *)ptr;
131  break;
132  case CIM_UINT32:
133  *val = *(const UINT32 *)ptr;
134  break;
135  case CIM_SINT64:
136  *val = *(const INT64 *)ptr;
137  break;
138  case CIM_UINT64:
139  *val = *(const UINT64 *)ptr;
140  break;
141  default:
142  ERR("invalid column type %u\n", table->columns[column].type & COL_TYPE_MASK);
143  *val = 0;
144  break;
145  }
146  return S_OK;
147 }
signed char INT8
const struct column * columns
int32_t INT_PTR
Definition: typedefs.h:62
unsigned int UINT32
static PVOID ptr
Definition: dispmode.c:27
#define COL_TYPE_MASK
GLuint GLfloat * val
Definition: glext.h:7180
__wchar_t WCHAR
Definition: xmlstorage.h:180
signed long long INT64
unsigned char BYTE
Definition: mem.h:68
static UINT get_column_offset(const struct table *table, UINT column)
Definition: table.c:82
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59
BYTE * data
unsigned short UINT16
unsigned int UINT
Definition: ndis.h:50
static UINT get_row_size(const struct table *table)
Definition: table.c:89
signed int INT32
unsigned long long UINT64
unsigned char UINT8
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
signed short INT16

Referenced by eval_propval(), eval_unary(), free_row_values(), get_method(), get_propval(), and get_value_bstr().

◆ get_value_bstr()

BSTR get_value_bstr ( const struct table ,
UINT  ,
UINT   
)

Definition at line 149 of file table.c.

150 {
151  static const WCHAR fmt_signedW[] = {'%','d',0};
152  static const WCHAR fmt_unsignedW[] = {'%','u',0};
153  static const WCHAR fmt_signed64W[] = {'%','I','6','4','d',0};
154  static const WCHAR fmt_unsigned64W[] = {'%','I','6','4','u',0};
155  static const WCHAR fmt_strW[] = {'\"','%','s','\"',0};
156  static const WCHAR trueW[] = {'T','R','U','E',0};
157  static const WCHAR falseW[] = {'F','A','L','S','E',0};
158  LONGLONG val;
159  BSTR ret;
160  WCHAR number[22];
161  UINT len;
162 
163  if (table->columns[column].type & CIM_FLAG_ARRAY)
164  {
165  FIXME("array to string conversion not handled\n");
166  return NULL;
167  }
168  if (get_value( table, row, column, &val ) != S_OK) return NULL;
169 
170  switch (table->columns[column].type & COL_TYPE_MASK)
171  {
172  case CIM_BOOLEAN:
173  if (val) return SysAllocString( trueW );
174  else return SysAllocString( falseW );
175 
176  case CIM_DATETIME:
177  case CIM_STRING:
178  if (!val) return NULL;
179  len = strlenW( (const WCHAR *)(INT_PTR)val ) + 2;
180  if (!(ret = SysAllocStringLen( NULL, len ))) return NULL;
181  sprintfW( ret, fmt_strW, (const WCHAR *)(INT_PTR)val );
182  return ret;
183 
184  case CIM_SINT16:
185  case CIM_SINT32:
186  sprintfW( number, fmt_signedW, val );
187  return SysAllocString( number );
188 
189  case CIM_UINT16:
190  case CIM_UINT32:
191  sprintfW( number, fmt_unsignedW, val );
192  return SysAllocString( number );
193 
194  case CIM_SINT64:
195  wsprintfW( number, fmt_signed64W, val );
196  return SysAllocString( number );
197 
198  case CIM_UINT64:
199  wsprintfW( number, fmt_unsigned64W, val );
200  return SysAllocString( number );
201 
202  default:
203  FIXME("unhandled column type %u\n", table->columns[column].type & COL_TYPE_MASK);
204  break;
205  }
206  return NULL;
207 }
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:342
const struct column * columns
OLECHAR * BSTR
Definition: compat.h:1934
int32_t INT_PTR
Definition: typedefs.h:62
static size_t double number
Definition: printf.c:64
#define FIXME(fmt,...)
Definition: debug.h:110
#define COL_TYPE_MASK
smooth NULL
Definition: ftsmooth.c:416
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:241
GLuint GLfloat * val
Definition: glext.h:7180
int64_t LONGLONG
Definition: typedefs.h:66
__wchar_t WCHAR
Definition: xmlstorage.h:180
static const WCHAR falseW[]
Definition: json.c:35
int ret
GLenum GLsizei len
Definition: glext.h:6722
#define S_OK
Definition: intsafe.h:59
HRESULT get_value(const struct table *table, UINT row, UINT column, LONGLONG *val)
Definition: table.c:94
#define sprintfW
Definition: unicode.h:58
unsigned int UINT
Definition: ndis.h:50
static const WCHAR trueW[]
Definition: json.c:34
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

Referenced by build_proplist(), get_body_text(), and get_propval().

◆ grab_table()

struct table* grab_table ( const WCHAR )

Definition at line 354 of file table.c.

355 {
356  struct table *table;
357 
358  LIST_FOR_EACH_ENTRY( table, table_list, struct table, entry )
359  {
360  if (!strcmpiW( table->name, name ))
361  {
362  TRACE("returning %p\n", table);
363  return addref_table( table );
364  }
365  }
366  return NULL;
367 }
const WCHAR * name
GLenum GLsizei GLenum GLenum const GLvoid * table
Definition: glext.h:5644
struct table * addref_table(struct table *table)
Definition: table.c:348
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
uint32_t entry
Definition: isohybrid.c:63
#define strcmpiW(s1, s2)
Definition: unicode.h:39
Definition: name.c:36

Referenced by create_view(), and get_method_name().

◆ heap_strdupW()

static WCHAR* heap_strdupW ( const WCHAR src)
inlinestatic

Definition at line 232 of file wbemprox_private.h.

233 {
234  WCHAR *dst;
235  if (!src) return NULL;
236  if ((dst = heap_alloc( (strlenW( src ) + 1) * sizeof(WCHAR) ))) strcpyW( dst, src );
237  return dst;
238 }
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
smooth NULL
Definition: ftsmooth.c:416
__wchar_t WCHAR
Definition: xmlstorage.h:180
GLenum src
Definition: glext.h:6340
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:219
GLenum GLenum dst
Definition: glext.h:6340

◆ init_table_list()

void init_table_list ( void  )

Definition at line 3601 of file builtin.c.

3602 {
3603  static struct list tables = LIST_INIT( tables );
3604  UINT i;
3605 
3607  table_list = &tables;
3608 }
__WINE_SERVER_LIST_INLINE void list_add_tail(struct list *list, struct list *elem)
Definition: list.h:102
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 struct table builtin_classes[]
Definition: builtin.c:3562
#define LIST_INIT(head)
Definition: queue.h:197
uint32_t entry
Definition: isohybrid.c:63
Definition: _list.h:228
#define ARRAY_SIZE(a)
Definition: main.h:24
unsigned int UINT
Definition: ndis.h:50
struct nls_table * tables
Definition: nls_base.c:22

Referenced by DllMain().

◆ is_method()

BOOL is_method ( const struct table ,
UINT   
)

Definition at line 628 of file query.c.

629 {
630  return table->columns[column].type & COL_FLAG_METHOD;
631 }
const struct column * columns
#define COL_FLAG_METHOD
GLenum GLenum GLvoid GLvoid * column
Definition: glext.h:5664

Referenced by class_object_Next(), count_properties(), get_properties(), get_propval(), and put_propval().

◆ is_selected_prop()

BOOL is_selected_prop ( const struct view ,
const WCHAR  
)

Definition at line 489 of file query.c.

490 {
491  const struct property *prop = view->proplist;
492 
493  if (!prop) return TRUE;
494  while (prop)
495  {
496  if (!strcmpiW( prop->name, name )) return TRUE;
497  prop = prop->next;
498  }
499  return FALSE;
500 }
#define TRUE
Definition: types.h:120
const struct property * next
const struct property * proplist
#define strcmpiW(s1, s2)
Definition: unicode.h:39
BSTR name
Definition: locator.c:109
Definition: name.c:36

Referenced by class_object_Next(), get_properties(), and get_propval().

◆ parse_query()

HRESULT parse_query ( const WCHAR ,
struct view **  ,
struct list  
)

Definition at line 2086 of file wql.tab.c.

2087 {
2088  struct parser parser;
2089  int ret;
2090 
2091  *view = NULL;
2092 
2093  parser.cmd = str;
2094  parser.idx = 0;
2095  parser.len = 0;
2097  parser.view = view;
2098  parser.mem = mem;
2099 
2100  ret = wql_parse( &parser );
2101  TRACE("wql_parse returned %d\n", ret);
2102  if (ret)
2103  {
2104  if (*parser.view)
2105  {
2106  destroy_view( *parser.view );
2107  *parser.view = NULL;
2108  }
2109  return parser.error;
2110  }
2111  return S_OK;
2112 }
UINT idx
Definition: wql.tab.c:109
struct list * mem
Definition: wql.tab.c:113
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416
const WCHAR * cmd
Definition: wql.tab.c:108
#define TRACE(s)
Definition: solgame.cpp:4
void destroy_view(struct view *view)
Definition: query.c:48
int wql_parse(struct parser *ctx)
unsigned int error
Definition: inffile.c:97
int ret
#define S_OK
Definition: intsafe.h:59
UINT len
Definition: wql.tab.c:110
Definition: import.c:86
static IOleDocumentView * view
Definition: activex.c:1749
struct view ** view
Definition: wql.tab.c:112

◆ process_get_owner()

HRESULT process_get_owner ( IWbemClassObject ,
IWbemClassObject ,
IWbemClassObject **   
)

Definition at line 66 of file process.c.

67 {
68  VARIANT user, domain, retval;
70  HRESULT hr;
71 
72  TRACE("%p, %p, %p\n", obj, in, out);
73 
75  if (hr != S_OK) return hr;
76 
77  if (out)
78  {
79  hr = IWbemClassObject_SpawnInstance( sig, 0, &out_params );
80  if (hr != S_OK)
81  {
82  IWbemClassObject_Release( sig );
83  return hr;
84  }
85  }
86  VariantInit( &user );
87  VariantInit( &domain );
88  hr = get_owner( &user, &domain, &retval );
89  if (hr != S_OK) goto done;
90  if (out_params)
91  {
92  if (!V_UI4( &retval ))
93  {
94  hr = IWbemClassObject_Put( out_params, param_userW, 0, &user, CIM_STRING );
95  if (hr != S_OK) goto done;
96  hr = IWbemClassObject_Put( out_params, param_domainW, 0, &domain, CIM_STRING );
97  if (hr != S_OK) goto done;
98  }
99  hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 );
100  }
101 
102 done:
103  VariantClear( &user );
104  VariantClear( &domain );
105  IWbemClassObject_Release( sig );
106  if (hr == S_OK && out)
107  {
108  *out = out_params;
109  IWbemClassObject_AddRef( out_params );
110  }
111  if (out_params) IWbemClassObject_Release( out_params );
112  return hr;
113 }
HRESULT hr
Definition: shlfolder.c:183
static HRESULT get_owner(VARIANT *user, VARIANT *domain, VARIANT *retval)
Definition: process.c:35
void WINAPI VariantInit(VARIANTARG *pVarg)
Definition: variant.c:571
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static FILE * out
Definition: regtests2xml.c:44
static void out_params(void)
Definition: nanoxwin.c:1413
#define V_UI4(A)
Definition: oleauto.h:270
static const WCHAR method_getownerW[]
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:651
static const WCHAR param_userW[]
static const WCHAR class_processW[]
static const WCHAR param_domainW[]
#define S_OK
Definition: intsafe.h:59
GLuint in
Definition: glext.h:9616
HRESULT create_signature(const WCHAR *class, const WCHAR *method, enum param_direction dir, IWbemClassObject **sig)
Definition: class.c:818
static const WCHAR param_returnvalueW[]
void user(int argc, const char *argv[])
Definition: cmds.c:1350

Referenced by fill_process().

◆ put_propval()

HRESULT put_propval ( const struct view ,
UINT  ,
const WCHAR ,
VARIANT ,
CIMTYPE   
)

Definition at line 1046 of file query.c.

1047 {
1048  HRESULT hr;
1049  UINT column, row = view->result[index];
1050  LONGLONG val;
1051 
1053  if (hr != S_OK)
1054  {
1055  FIXME("no support for creating new properties\n");
1056  return WBEM_E_FAILED;
1057  }
1058  if (is_method( view->table, column ) || !(view->table->columns[column].type & COL_FLAG_DYNAMIC))
1059  return WBEM_E_FAILED;
1060 
1061  hr = to_longlong( var, &val, &type );
1062  if (hr != S_OK) return hr;
1063 
1064  return set_value( view->table, row, column, val, type );
1065 }
HRESULT get_column_index(const struct table *table, const WCHAR *name, UINT *column)
Definition: table.c:33
HRESULT hr
Definition: shlfolder.c:183
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define FIXME(fmt,...)
Definition: debug.h:110
UINT * result
HRESULT set_value(const struct table *table, UINT row, UINT column, LONGLONG val, CIMTYPE type)
Definition: table.c:209
struct table * table
GLuint GLfloat * val
Definition: glext.h:7180
int64_t LONGLONG
Definition: typedefs.h:66
LONG HRESULT
Definition: typedefs.h:77
#define COL_FLAG_DYNAMIC
#define index(s, c)
Definition: various.h:29
#define S_OK
Definition: intsafe.h:59
unsigned int UINT
Definition: ndis.h:50
Definition: name.c:36
HRESULT to_longlong(VARIANT *var, LONGLONG *val, CIMTYPE *type)
Definition: query.c:996
BOOL is_method(const struct table *table, UINT column)
Definition: query.c:628
GLenum GLenum GLvoid GLvoid * column
Definition: glext.h:5664
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

Referenced by class_object_Put().

◆ reg_create_key()

HRESULT reg_create_key ( IWbemClassObject ,
IWbemClassObject ,
IWbemClassObject **   
)

Definition at line 100 of file reg.c.

101 {
102  VARIANT defkey, subkey, retval;
104  HRESULT hr;
105 
106  TRACE("%p, %p\n", in, out);
107 
108  hr = IWbemClassObject_Get( in, param_defkeyW, 0, &defkey, NULL, NULL );
109  if (hr != S_OK) return hr;
110  hr = IWbemClassObject_Get( in, param_subkeynameW, 0, &subkey, NULL, NULL );
111  if (hr != S_OK) return hr;
112 
114  if (hr != S_OK)
115  {
116  VariantClear( &subkey );
117  return hr;
118  }
119  if (out)
120  {
121  hr = IWbemClassObject_SpawnInstance( sig, 0, &out_params );
122  if (hr != S_OK)
123  {
124  VariantClear( &subkey );
125  IWbemClassObject_Release( sig );
126  return hr;
127  }
128  }
129  hr = create_key( (HKEY)(INT_PTR)V_I4(&defkey), V_BSTR(&subkey), &retval );
130  if (hr == S_OK && out_params)
131  hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 );
132 
133  VariantClear( &subkey );
134  IWbemClassObject_Release( sig );
135  if (hr == S_OK && out)
136  {
137  *out = out_params;
138  IWbemClassObject_AddRef( out_params );
139  }
140  if (out_params) IWbemClassObject_Release( out_params );
141  return hr;
142 }
HRESULT hr
Definition: shlfolder.c:183
int32_t INT_PTR
Definition: typedefs.h:62
static const WCHAR param_subkeynameW[]
#define V_I4(A)
Definition: oleauto.h:247
static HRESULT create_key(HKEY root, const WCHAR *subkey, VARIANT *retval)
Definition: reg.c:83
smooth NULL
Definition: ftsmooth.c:416
static const WCHAR class_stdregprovW[]
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static FILE * out
Definition: regtests2xml.c:44
static void out_params(void)
Definition: nanoxwin.c:1413
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:651
static const WCHAR param_defkeyW[]
#define V_BSTR(A)
Definition: oleauto.h:226
#define S_OK
Definition: intsafe.h:59
GLuint in
Definition: glext.h:9616
HRESULT create_signature(const WCHAR *class, const WCHAR *method, enum param_direction dir, IWbemClassObject **sig)
Definition: class.c:818
static const WCHAR method_createkeyW[]
static const WCHAR param_returnvalueW[]

◆ reg_enum_key()

HRESULT reg_enum_key ( IWbemClassObject ,
IWbemClassObject ,
IWbemClassObject **   
)

Definition at line 199 of file reg.c.

200 {
201  VARIANT defkey, subkey, names, retval;
203  HRESULT hr;
204 
205  TRACE("%p, %p\n", in, out);
206 
207  hr = IWbemClassObject_Get( in, param_defkeyW, 0, &defkey, NULL, NULL );
208  if (hr != S_OK) return hr;
209  hr = IWbemClassObject_Get( in, param_subkeynameW, 0, &subkey, NULL, NULL );
210  if (hr != S_OK) return hr;
211 
213  if (hr != S_OK)
214  {
215  VariantClear( &subkey );
216  return hr;
217  }
218  if (out)
219  {
220  hr = IWbemClassObject_SpawnInstance( sig, 0, &out_params );
221  if (hr != S_OK)
222  {
223  VariantClear( &subkey );
224  IWbemClassObject_Release( sig );
225  return hr;
226  }
227  }
228  VariantInit( &names );
229  hr = enum_key( (HKEY)(INT_PTR)V_I4(&defkey), V_BSTR(&subkey), &names, &retval );
230  if (hr != S_OK) goto done;
231  if (out_params)
232  {
233  if (!V_UI4( &retval ))
234  {
235  hr = IWbemClassObject_Put( out_params, param_namesW, 0, &names, CIM_STRING|CIM_FLAG_ARRAY );
236  if (hr != S_OK) goto done;
237  }
238  hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 );
239  }
240 
241 done:
242  VariantClear( &names );
243  VariantClear( &subkey );
244  IWbemClassObject_Release( sig );
245  if (hr == S_OK && out)
246  {
247  *out = out_params;
248  IWbemClassObject_AddRef( out_params );
249  }
250  if (out_params) IWbemClassObject_Release( out_params );
251  return hr;
252 }
static HRESULT enum_key(HKEY root, const WCHAR *subkey, VARIANT *names, VARIANT *retval)
Definition: reg.c:144
HRESULT hr
Definition: shlfolder.c:183
void WINAPI VariantInit(VARIANTARG *pVarg)
Definition: variant.c:571
int32_t INT_PTR
Definition: typedefs.h:62
static const WCHAR param_subkeynameW[]
static const WCHAR method_enumkeyW[]
#define V_I4(A)
Definition: oleauto.h:247
GLuint GLuint * names
Definition: glext.h:11545
static const WCHAR param_namesW[]
smooth NULL
Definition: ftsmooth.c:416
static const WCHAR class_stdregprovW[]
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static FILE * out
Definition: regtests2xml.c:44
static void out_params(void)
Definition: nanoxwin.c:1413
#define V_UI4(A)
Definition: oleauto.h:270
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:651
static const WCHAR param_defkeyW[]
#define V_BSTR(A)
Definition: oleauto.h:226
#define S_OK
Definition: intsafe.h:59
GLuint in
Definition: glext.h:9616
HRESULT create_signature(const WCHAR *class, const WCHAR *method, enum param_direction dir, IWbemClassObject **sig)
Definition: class.c:818
static const WCHAR param_returnvalueW[]

◆ reg_enum_values()

HRESULT reg_enum_values ( IWbemClassObject ,
IWbemClassObject ,
IWbemClassObject **   
)

Definition at line 309 of file reg.c.

310 {
311  VARIANT defkey, subkey, names, types, retval;
313  HRESULT hr;
314 
315  TRACE("%p, %p\n", in, out);
316 
317  hr = IWbemClassObject_Get( in, param_defkeyW, 0, &defkey, NULL, NULL );
318  if (hr != S_OK) return hr;
319  hr = IWbemClassObject_Get( in, param_subkeynameW, 0, &subkey, NULL, NULL );
320  if (hr != S_OK) return hr;
321 
323  if (hr != S_OK)
324  {
325  VariantClear( &subkey );
326  return hr;
327  }
328  if (out)
329  {
330  hr = IWbemClassObject_SpawnInstance( sig, 0, &out_params );
331  if (hr != S_OK)
332  {
333  VariantClear( &subkey );
334  IWbemClassObject_Release( sig );
335  return hr;
336  }
337  }
338  VariantInit( &names );
339  VariantInit( &types );
340  hr = enum_values( (HKEY)(INT_PTR)V_I4(&defkey), V_BSTR(&subkey), &names, &types, &retval );
341  if (hr != S_OK) goto done;
342  if (out_params)
343  {
344  if (!V_UI4( &retval ))
345  {
346  hr = IWbemClassObject_Put( out_params, param_namesW, 0, &names, CIM_STRING|CIM_FLAG_ARRAY );
347  if (hr != S_OK) goto done;
348  hr = IWbemClassObject_Put( out_params, param_typesW, 0, &types, CIM_SINT32|CIM_FLAG_ARRAY );
349  if (hr != S_OK) goto done;
350  }
351  hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 );
352  }
353 
354 done:
355  VariantClear( &types );
356  VariantClear( &names );
357  VariantClear( &subkey );
358  IWbemClassObject_Release( sig );
359  if (hr == S_OK && out)
360  {
361  *out = out_params;
362  IWbemClassObject_AddRef( out_params );
363  }
364  if (out_params) IWbemClassObject_Release( out_params );
365  return hr;
366 }
HRESULT hr
Definition: shlfolder.c:183
static const WCHAR method_enumvaluesW[]
GLsizei GLenum GLenum * types
Definition: glext.h:7753
void WINAPI VariantInit(VARIANTARG *pVarg)
Definition: variant.c:571
int32_t INT_PTR
Definition: typedefs.h:62
static const WCHAR param_subkeynameW[]
#define V_I4(A)
Definition: oleauto.h:247
GLuint GLuint * names
Definition: glext.h:11545
static const WCHAR param_typesW[]
static const WCHAR param_namesW[]
smooth NULL
Definition: ftsmooth.c:416
static const WCHAR class_stdregprovW[]
#define TRACE(s)
Definition: solgame.cpp:4
Definition: cmds.c:130
LONG HRESULT
Definition: typedefs.h:77
static FILE * out
Definition: regtests2xml.c:44
static void out_params(void)
Definition: nanoxwin.c:1413
static HRESULT enum_values(HKEY root, const WCHAR *subkey, VARIANT *names, VARIANT *types, VARIANT *retval)
Definition: reg.c:254
#define V_UI4(A)
Definition: oleauto.h:270
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:651
static const WCHAR param_defkeyW[]
#define V_BSTR(A)
Definition: oleauto.h:226
#define S_OK
Definition: intsafe.h:59
GLuint in
Definition: glext.h:9616
HRESULT create_signature(const WCHAR *class, const WCHAR *method, enum param_direction dir, IWbemClassObject **sig)
Definition: class.c:818
static const WCHAR param_returnvalueW[]

◆ reg_get_stringvalue()

HRESULT reg_get_stringvalue ( IWbemClassObject ,
IWbemClassObject ,
IWbemClassObject **   
)

Definition at line 392 of file reg.c.

393 {
394  VARIANT defkey, subkey, name, value, retval;
396  HRESULT hr;
397 
398  TRACE("%p, %p\n", in, out);
399 
400  hr = IWbemClassObject_Get( in, param_defkeyW, 0, &defkey, NULL, NULL );
401  if (hr != S_OK) return hr;
402  hr = IWbemClassObject_Get( in, param_subkeynameW, 0, &subkey, NULL, NULL );
403  if (hr != S_OK) return hr;
404  hr = IWbemClassObject_Get( in, param_valuenameW, 0, &name, NULL, NULL );
405  if (hr != S_OK) return hr;
406 
408  if (hr != S_OK)
409  {
410  VariantClear( &name );
411  VariantClear( &subkey );
412  return hr;
413  }
414  if (out)
415  {
416  hr = IWbemClassObject_SpawnInstance( sig, 0, &out_params );
417  if (hr != S_OK)
418  {
419  VariantClear( &name );
420  VariantClear( &subkey );
421  IWbemClassObject_Release( sig );
422  return hr;
423  }
424  }
425  VariantInit( &value );
426  hr = get_stringvalue( (HKEY)(INT_PTR)V_I4(&defkey), V_BSTR(&subkey), V_BSTR(&name), &value, &retval );
427  if (hr != S_OK) goto done;
428  if (out_params)
429  {
430  if (!V_UI4( &retval ))
431  {
432  hr = IWbemClassObject_Put( out_params, param_valueW, 0, &value, CIM_STRING );
433  if (hr != S_OK) goto done;
434  }
435  hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 );
436  }
437 
438 done:
439  VariantClear( &name );
440  VariantClear( &subkey );
441  IWbemClassObject_Release( sig );
442  if (hr == S_OK && out)
443  {
444  *out = out_params;
445  IWbemClassObject_AddRef( out_params );
446  }
447  if (out_params) IWbemClassObject_Release( out_params );
448  return hr;
449 }
HRESULT hr
Definition: shlfolder.c:183
void WINAPI VariantInit(VARIANTARG *pVarg)
Definition: variant.c:571
int32_t INT_PTR
Definition: typedefs.h:62
static const WCHAR param_subkeynameW[]
#define V_I4(A)
Definition: oleauto.h:247
smooth NULL
Definition: ftsmooth.c:416
static const WCHAR class_stdregprovW[]
static const WCHAR param_valuenameW[]
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static FILE * out
Definition: regtests2xml.c:44
static void out_params(void)
Definition: nanoxwin.c:1413
#define V_UI4(A)
Definition: oleauto.h:270
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:651
static const WCHAR method_getstringvalueW[]
static const WCHAR param_defkeyW[]
GLsizei const GLfloat * value
Definition: glext.h:6069
#define V_BSTR(A)
Definition: oleauto.h:226
#define S_OK
Definition: intsafe.h:59
GLuint in
Definition: glext.h:9616
static HRESULT get_stringvalue(HKEY root, const WCHAR *subkey, const WCHAR *name, VARIANT *value, VARIANT *retval)
Definition: reg.c:368
static const WCHAR param_valueW[]
HRESULT create_signature(const WCHAR *class, const WCHAR *method, enum param_direction dir, IWbemClassObject **sig)
Definition: class.c:818
Definition: name.c:36
static const WCHAR param_returnvalueW[]
const WCHAR * name
Definition: reg.c:67

◆ release_query()

void release_query ( struct query query)

Definition at line 466 of file query.c.

467 {
469 }
void free_query(struct query *query)
Definition: query.c:450
#define InterlockedDecrement
Definition: armddk.h:52

Referenced by enum_class_object_Release(), and exec_query().

◆ release_table()

void release_table ( struct table )

Definition at line 343 of file table.c.

344 {
346 }
void free_table(struct table *table)
Definition: table.c:327
#define InterlockedDecrement
Definition: armddk.h:52

Referenced by destroy_record(), destroy_view(), and get_method_name().

◆ security_get_sd()

HRESULT security_get_sd ( IWbemClassObject ,
IWbemClassObject ,
IWbemClassObject **   
)

Definition at line 133 of file security.c.

134 {
135  VARIANT var_sd, retval;
137  HRESULT hr, ret;
139  DWORD sd_size;
140 
141  TRACE("%p, %p\n", in, out);
142 
144 
145  if (SUCCEEDED(hr))
146  {
147  hr = IWbemClassObject_SpawnInstance( sig, 0, &out_params );
148 
149  IWbemClassObject_Release( sig );
150  }
151 
152  if (SUCCEEDED(hr))
153  {
154  ret = get_sd( &sd, &sd_size );
155 
156  if (SUCCEEDED(ret))
157  {
158  VariantInit( &var_sd );
159 
160  hr = to_byte_array( sd, sd_size, &var_sd );
161 
162  if (SUCCEEDED(hr))
163  hr = IWbemClassObject_Put( out_params, param_sdW, 0, &var_sd, CIM_UINT8|CIM_FLAG_ARRAY );
164 
165  HeapFree( GetProcessHeap(), 0, sd );
166  VariantClear( &var_sd );
167  }
168 
169  if (SUCCEEDED(hr))
170  {
171  set_variant( VT_UI4, ret, NULL, &retval );
172  hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 );
173  }
174 
175  if (SUCCEEDED(hr) && out)
176  {
177  *out = out_params;
178  IWbemClassObject_AddRef( out_params );
179  }
180 
181  IWbemClassObject_Release( out_params );
182  }
183 
184  return hr;
185 }
static HRESULT get_sd(SECURITY_DESCRIPTOR **sd, DWORD *size)
Definition: security.c:62
static const WCHAR method_getsdW[]
HRESULT hr
Definition: shlfolder.c:183
static const WCHAR class_systemsecurityW[]
static HRESULT to_byte_array(void *data, DWORD size, VARIANT *var)
Definition: security.c:36
void WINAPI VariantInit(VARIANTARG *pVarg)
Definition: variant.c:571
smooth NULL
Definition: ftsmooth.c:416
void set_variant(VARTYPE type, LONGLONG val, void *val_ptr, VARIANT *ret)
Definition: query.c:797
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
LONG HRESULT
Definition: typedefs.h:77
static FILE * out
Definition: regtests2xml.c:44
static void out_params(void)
Definition: nanoxwin.c:1413
unsigned long DWORD
Definition: ntddk_ex.h:95
static const WCHAR sd[]
Definition: suminfo.c:287
int ret
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:651
static const WCHAR param_sdW[]
GLuint in
Definition: glext.h:9616
HRESULT create_signature(const WCHAR *class, const WCHAR *method, enum param_direction dir, IWbemClassObject **sig)
Definition: class.c:818
static const WCHAR param_returnvalueW[]
#define HeapFree(x, y, z)
Definition: compat.h:394
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ security_set_sd()

HRESULT security_set_sd ( IWbemClassObject ,
IWbemClassObject ,
IWbemClassObject **   
)

Definition at line 188 of file security.c.

189 {
190  VARIANT retval;
192  HRESULT hr;
193 
194  FIXME("stub\n");
195 
197 
198  if (SUCCEEDED(hr))
199  {
200  hr = IWbemClassObject_SpawnInstance( sig, 0, &out_params );
201 
202  IWbemClassObject_Release( sig );
203  }
204 
205  if (SUCCEEDED(hr))
206  {
207  set_variant( VT_UI4, S_OK, NULL, &retval );
208  hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 );
209 
210  if (SUCCEEDED(hr) && out)
211  {
212  *out = out_params;
213  IWbemClassObject_AddRef( out_params );
214  }
215 
216  IWbemClassObject_Release( out_params );
217  }
218 
219  return hr;
220 }
HRESULT hr
Definition: shlfolder.c:183
static const WCHAR class_systemsecurityW[]
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
void set_variant(VARTYPE type, LONGLONG val, void *val_ptr, VARIANT *ret)
Definition: query.c:797
static const WCHAR method_setsdW[]
LONG HRESULT
Definition: typedefs.h:77
static FILE * out
Definition: regtests2xml.c:44
static void out_params(void)
Definition: nanoxwin.c:1413
#define S_OK
Definition: intsafe.h:59
HRESULT create_signature(const WCHAR *class, const WCHAR *method, enum param_direction dir, IWbemClassObject **sig)
Definition: class.c:818
static const WCHAR param_returnvalueW[]
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ service_pause_service()

HRESULT service_pause_service ( IWbemClassObject ,
IWbemClassObject ,
IWbemClassObject **   
)

Definition at line 80 of file service.c.

81 {
82  VARIANT name, retval;
84  HRESULT hr;
85 
86  TRACE("%p, %p, %p\n", obj, in, out);
87 
88  hr = IWbemClassObject_Get( obj, prop_nameW, 0, &name, NULL, NULL );
89  if (hr != S_OK) return hr;
90 
92  if (hr != S_OK)
93  {
94  VariantClear( &name );
95  return hr;
96  }
97  if (out)
98  {
99  hr = IWbemClassObject_SpawnInstance( sig, 0, &out_params );
100  if (hr != S_OK)
101  {
102  VariantClear( &name );
103  IWbemClassObject_Release( sig );
104  return hr;
105  }
106  }
108  if (hr != S_OK) goto done;
109 
110  if (out_params)
111  hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 );
112 
113 done:
114  VariantClear( &name );
115  IWbemClassObject_Release( sig );
116  if (hr == S_OK && out)
117  {
118  *out = out_params;
119  IWbemClassObject_AddRef( out_params );
120  }
121  if (out_params) IWbemClassObject_Release( out_params );
122  return hr;
123 }
HRESULT hr
Definition: shlfolder.c:183
static const WCHAR method_pauseserviceW[]
smooth NULL
Definition: ftsmooth.c:416
static const WCHAR prop_nameW[]
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT control_service(const WCHAR *name, DWORD control, VARIANT *retval)
Definition: service.c:55
LONG HRESULT
Definition: typedefs.h:77
static const WCHAR class_serviceW[]
static FILE * out
Definition: regtests2xml.c:44
static void out_params(void)
Definition: nanoxwin.c:1413
#define SERVICE_CONTROL_PAUSE
Definition: winsvc.h:37
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:651
#define V_BSTR(A)
Definition: oleauto.h:226
#define S_OK
Definition: intsafe.h:59
GLuint in
Definition: glext.h:9616
HRESULT create_signature(const WCHAR *class, const WCHAR *method, enum param_direction dir, IWbemClassObject **sig)
Definition: class.c:818
Definition: name.c:36
static const WCHAR param_returnvalueW[]
GLuint const GLchar * name
Definition: glext.h:6031

Referenced by fill_service().

◆ service_resume_service()

HRESULT service_resume_service ( IWbemClassObject ,
IWbemClassObject ,
IWbemClassObject **   
)

Definition at line 125 of file service.c.

126 {
127  VARIANT name, retval;
129  HRESULT hr;
130 
131  TRACE("%p, %p, %p\n", obj, in, out);
132 
133  hr = IWbemClassObject_Get( obj, prop_nameW, 0, &name, NULL, NULL );
134  if (hr != S_OK) return hr;
135 
137  if (hr != S_OK)
138  {
139  VariantClear( &name );
140  return hr;
141  }
142  if (out)
143  {
144  hr = IWbemClassObject_SpawnInstance( sig, 0, &out_params );
145  if (hr != S_OK)
146  {
147  VariantClear( &name );
148  IWbemClassObject_Release( sig );
149  return hr;
150  }
151  }
153  if (hr != S_OK) goto done;
154 
155  if (out_params)
156  hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 );
157 
158 done:
159  VariantClear( &name );
160  IWbemClassObject_Release( sig );
161  if (hr == S_OK && out)
162  {
163  *out = out_params;
164  IWbemClassObject_AddRef( out_params );
165  }
166  if (out_params) IWbemClassObject_Release( out_params );
167  return hr;
168 }
HRESULT hr
Definition: shlfolder.c:183
static const WCHAR method_resumeserviceW[]
smooth NULL
Definition: ftsmooth.c:416
static const WCHAR prop_nameW[]
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT control_service(const WCHAR *name, DWORD control, VARIANT *retval)
Definition: service.c:55
LONG HRESULT
Definition: typedefs.h:77
static const WCHAR class_serviceW[]
static FILE * out
Definition: regtests2xml.c:44
static void out_params(void)
Definition: nanoxwin.c:1413
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:651
#define V_BSTR(A)
Definition: oleauto.h:226
#define S_OK
Definition: intsafe.h:59
GLuint in
Definition: glext.h:9616
#define SERVICE_CONTROL_CONTINUE
Definition: winsvc.h:38
HRESULT create_signature(const WCHAR *class, const WCHAR *method, enum param_direction dir, IWbemClassObject **sig)
Definition: class.c:818
Definition: name.c:36
static const WCHAR param_returnvalueW[]
GLuint const GLchar * name
Definition: glext.h:6031

Referenced by fill_service().

◆ service_start_service()

HRESULT service_start_service ( IWbemClassObject ,
IWbemClassObject ,
IWbemClassObject **   
)

Definition at line 194 of file service.c.

195 {
196  VARIANT name, retval;
198  HRESULT hr;
199 
200  TRACE("%p, %p, %p\n", obj, in, out);
201 
202  hr = IWbemClassObject_Get( obj, prop_nameW, 0, &name, NULL, NULL );
203  if (hr != S_OK) return hr;
204 
206  if (hr != S_OK)
207  {
208  VariantClear( &name );
209  return hr;
210  }
211  if (out)
212  {
213  hr = IWbemClassObject_SpawnInstance( sig, 0, &out_params );
214  if (hr != S_OK)
215  {
216  VariantClear( &name );
217  IWbemClassObject_Release( sig );
218  return hr;
219  }
220  }
221  hr = start_service( V_BSTR(&name), &retval );
222  if (hr != S_OK) goto done;
223 
224  if (out_params)
225  hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 );
226 
227 done:
228  VariantClear( &name );
229  IWbemClassObject_Release( sig );
230  if (hr == S_OK && out)
231  {
232  *out = out_params;
233  IWbemClassObject_AddRef( out_params );
234  }
235  if (out_params) IWbemClassObject_Release( out_params );
236  return hr;
237 }
HRESULT hr
Definition: shlfolder.c:183
smooth NULL
Definition: ftsmooth.c:416
static HRESULT start_service(const WCHAR *name, VARIANT *retval)
Definition: service.c:170
static const WCHAR prop_nameW[]
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static const WCHAR class_serviceW[]
static FILE * out
Definition: regtests2xml.c:44
static void out_params(void)
Definition: nanoxwin.c:1413
static const WCHAR method_startserviceW[]
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:651
#define V_BSTR(A)
Definition: oleauto.h:226
#define S_OK
Definition: intsafe.h:59
GLuint in
Definition: glext.h:9616
HRESULT create_signature(const WCHAR *class, const WCHAR *method, enum param_direction dir, IWbemClassObject **sig)
Definition: class.c:818
Definition: name.c:36
static const WCHAR param_returnvalueW[]
GLuint const GLchar * name
Definition: glext.h:6031

Referenced by fill_service().

◆ service_stop_service()

HRESULT service_stop_service ( IWbemClassObject ,
IWbemClassObject ,
IWbemClassObject **   
)

Definition at line 239 of file service.c.

240 {
241  VARIANT name, retval;
243  HRESULT hr;
244 
245  TRACE("%p, %p, %p\n", obj, in, out);
246 
247  hr = IWbemClassObject_Get( obj, prop_nameW, 0, &name, NULL, NULL );
248  if (hr != S_OK) return hr;
249 
251  if (hr != S_OK)
252  {
253  VariantClear( &name );
254  return hr;
255  }
256  if (out)
257  {
258  hr = IWbemClassObject_SpawnInstance( sig, 0, &out_params );
259  if (hr != S_OK)
260  {
261  VariantClear( &name );
262  IWbemClassObject_Release( sig );
263  return hr;
264  }
265  }
267  if (hr != S_OK) goto done;
268 
269  if (out_params)
270  hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 );
271 
272 done:
273  VariantClear( &name );
274  IWbemClassObject_Release( sig );
275  if (hr == S_OK && out)
276  {
277  *out = out_params;
278  IWbemClassObject_AddRef( out_params );
279  }
280  if (out_params) IWbemClassObject_Release( out_params );
281  return hr;
282 }
HRESULT hr
Definition: shlfolder.c:183
smooth NULL
Definition: ftsmooth.c:416
static const WCHAR prop_nameW[]
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT control_service(const WCHAR *name, DWORD control, VARIANT *retval)
Definition: service.c:55
LONG HRESULT
Definition: typedefs.h:77
static const WCHAR class_serviceW[]
static FILE * out
Definition: regtests2xml.c:44
static void out_params(void)
Definition: nanoxwin.c:1413
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:651
#define V_BSTR(A)
Definition: oleauto.h:226
static const WCHAR method_stopserviceW[]
#define S_OK
Definition: intsafe.h:59
GLuint in
Definition: glext.h:9616
HRESULT create_signature(const WCHAR *class, const WCHAR *method, enum param_direction dir, IWbemClassObject **sig)
Definition: class.c:818
Definition: name.c:36
static const WCHAR param_returnvalueW[]
#define SERVICE_CONTROL_STOP
Definition: winsvc.h:36
GLuint const GLchar * name
Definition: glext.h:6031

Referenced by fill_service().

◆ set_value()

HRESULT set_value ( const struct table ,
UINT  ,
UINT  ,
LONGLONG  ,
CIMTYPE   
)

Definition at line 209 of file table.c.

211 {
212  UINT col_offset, row_size;
213  BYTE *ptr;
214 
215  if ((table->columns[column].type & COL_TYPE_MASK) != type) return WBEM_E_TYPE_MISMATCH;
216 
217  col_offset = get_column_offset( table, column );
218  row_size = get_row_size( table );
219  ptr = table->data + row * row_size + col_offset;
220 
221  switch (table->columns[column].type & COL_TYPE_MASK)
222  {
223  case CIM_DATETIME:
224  case CIM_STRING:
225  *(WCHAR **)ptr = (WCHAR *)(INT_PTR)val;
226  break;
227  case CIM_SINT8:
228  *(INT8 *)ptr = val;
229  break;
230  case CIM_UINT8:
231  *(UINT8 *)ptr = val;
232  break;
233  case CIM_SINT16:
234  *(INT16 *)ptr = val;
235  break;
236  case CIM_UINT16:
237  *(UINT16 *)ptr = val;
238  break;
239  case CIM_SINT32:
240  *(INT32 *)ptr = val;
241  break;
242  case CIM_UINT32:
243  *(UINT32 *)ptr = val;
244  break;
245  case CIM_SINT64:
246  *(INT64 *)ptr = val;
247  break;
248  case CIM_UINT64:
249  *(UINT64 *)ptr = val;
250  break;
251  default:
252  FIXME("unhandled column type %u\n", type);
253  return WBEM_E_FAILED;
254  }
255  return S_OK;
256 }
signed char INT8
const struct column * columns
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
int32_t INT_PTR
Definition: typedefs.h:62
unsigned int UINT32
#define FIXME(fmt,...)
Definition: debug.h:110
static PVOID ptr
Definition: dispmode.c:27
#define COL_TYPE_MASK
GLuint GLfloat * val
Definition: glext.h:7180
__wchar_t WCHAR
Definition: xmlstorage.h:180
signed long long INT64
unsigned char BYTE
Definition: mem.h:68
static UINT get_column_offset(const struct table *table, UINT column)
Definition: table.c:82
#define S_OK
Definition: intsafe.h:59
BYTE * data
unsigned short UINT16
unsigned int UINT
Definition: ndis.h:50
static UINT get_row_size(const struct table *table)
Definition: table.c:89
signed int INT32
unsigned long long UINT64
unsigned char UINT8
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
signed short INT16

Referenced by hex_data_state(), and put_propval().

◆ set_variant()

void set_variant ( VARTYPE  ,
LONGLONG  ,
void ,
VARIANT  
)

Definition at line 797 of file query.c.

798 {
799  if (type & VT_ARRAY)
800  {
801  V_VT( ret ) = type;
802  V_ARRAY( ret ) = val_ptr;
803  return;
804  }
805  switch (type)
806  {
807  case VT_BOOL:
808  V_BOOL( ret ) = val;
809  break;
810  case VT_BSTR:
811  V_BSTR( ret ) = val_ptr;
812  break;
813  case VT_I1:
814  V_I1( ret ) = val;
815  break;
816  case VT_UI1:
817  V_UI1( ret ) = val;
818  break;
819  case VT_I2:
820  V_I2( ret ) = val;
821  break;
822  case VT_UI2:
823  V_UI2( ret ) = val;
824  break;
825  case VT_I4:
826  V_I4( ret ) = val;
827  break;
828  case VT_UI4:
829  V_UI4( ret ) = val;
830  break;
831  case VT_NULL:
832  break;
833  default:
834  ERR("unhandled variant type %u\n", type);
835  return;
836  }
837  V_VT( ret ) = type;
838 }
Definition: compat.h:1939
Definition: compat.h:1951
#define V_ARRAY(A)
Definition: oleauto.h:222
#define V_I2(A)
Definition: oleauto.h:245
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define V_I4(A)
Definition: oleauto.h:247
#define V_UI2(A)
Definition: oleauto.h:268
#define V_I1(A)
Definition: oleauto.h:243
GLuint GLfloat * val
Definition: glext.h:7180
#define V_UI1(A)
Definition: oleauto.h:266
#define V_BOOL(A)
Definition: oleauto.h:224
#define V_UI4(A)
Definition: oleauto.h:270
int ret
#define V_VT(A)
Definition: oleauto.h:211
#define V_BSTR(A)
Definition: oleauto.h:226
#define ERR(fmt,...)
Definition: debug.h:109
Definition: compat.h:1938

Referenced by control_service(), create_key(), enum_key(), enum_values(), get_owner(), get_propval(), get_stringvalue(), security_get_sd(), security_set_sd(), start_service(), to_bstr_array(), to_byte_array(), and to_i4_array().

◆ to_longlong()

HRESULT to_longlong ( VARIANT ,
LONGLONG ,
CIMTYPE  
)

Definition at line 996 of file query.c.

997 {
998  if (!var)
999  {
1000  *val = 0;
1001  return S_OK;
1002  }
1003  if (V_VT( var ) & VT_ARRAY)
1004  {
1005  *val = (INT_PTR)to_array( var, type );
1006  if (!*val) return E_OUTOFMEMORY;
1007  return S_OK;
1008  }
1009  switch (V_VT( var ))
1010  {
1011  case VT_BOOL:
1012  *val = V_BOOL( var );
1013  *type = CIM_BOOLEAN;
1014  break;
1015  case VT_BSTR:
1016  *val = (INT_PTR)heap_strdupW( V_BSTR( var ) );
1017  if (!*val) return E_OUTOFMEMORY;
1018  *type = CIM_STRING;
1019  break;
1020  case VT_I2:
1021  *val = V_I2( var );
1022  *type = CIM_SINT16;
1023  break;
1024  case VT_UI2:
1025  *val = V_UI2( var );
1026  *type = CIM_UINT16;
1027  break;
1028  case VT_I4:
1029  *val = V_I4( var );
1030  *type = CIM_SINT32;
1031  break;
1032  case VT_UI4:
1033  *val = V_UI4( var );
1034  *type = CIM_UINT32;
1035  break;
1036  case VT_NULL:
1037  *val = 0;
1038  break;
1039  default:
1040  ERR("unhandled type %u\n", V_VT( var ));
1041  return WBEM_E_FAILED;
1042  }
1043  return S_OK;
1044 }
Definition: compat.h:1939
#define V_I2(A)
Definition: oleauto.h:245
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
int32_t INT_PTR
Definition: typedefs.h:62
#define V_I4(A)
Definition: oleauto.h:247
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static WCHAR * heap_strdupW(const WCHAR *str)
Definition: propsheet.c:178
#define V_UI2(A)
Definition: oleauto.h:268
GLuint GLfloat * val
Definition: glext.h:7180
static struct array * to_array(VARIANT *var, CIMTYPE *type)
Definition: query.c:947
#define V_BOOL(A)
Definition: oleauto.h:224
#define V_UI4(A)
Definition: oleauto.h:270
#define V_VT(A)
Definition: oleauto.h:211
#define V_BSTR(A)
Definition: oleauto.h:226
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59
Definition: compat.h:1938

Referenced by put_propval(), and record_set_value().

◆ to_safearray()

SAFEARRAY* to_safearray ( const struct array ,
CIMTYPE   
)

Definition at line 765 of file query.c.

766 {
767  SAFEARRAY *ret;
770  LONG i;
771 
772  if (!array || !(ret = SafeArrayCreateVector( vartype, 0, array->count ))) return NULL;
773 
774  for (i = 0; i < array->count; i++)
775  {
776  void *ptr = (char *)array->ptr + i * size;
777  if (vartype == VT_BSTR)
778  {
779  BSTR str = SysAllocString( *(const WCHAR **)ptr );
780  if (!str || SafeArrayPutElement( ret, &i, str ) != S_OK)
781  {
782  SysFreeString( str );
784  return NULL;
785  }
786  SysFreeString( str );
787  }
788  else if (SafeArrayPutElement( ret, &i, ptr ) != S_OK)
789  {
791  return NULL;
792  }
793  }
794  return ret;
795 }
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
VARTYPE to_vartype(CIMTYPE type)
Definition: query.c:743
OLECHAR * BSTR
Definition: compat.h:1934
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
long LONG
Definition: pedump.c:60
static PVOID ptr
Definition: dispmode.c:27
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:241
GLsizeiptr size
Definition: glext.h:5919
if(!(yy_init))
Definition: macro.lex.yy.c:714
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned int get_type_size(ULONG *pFlags, VARTYPE vt)
Definition: usrmarshal.c:209
HRESULT WINAPI SafeArrayDestroy(SAFEARRAY *psa)
Definition: safearray.c:1349
SAFEARRAY *WINAPI SafeArrayCreateVector(VARTYPE vt, LONG lLbound, ULONG cElements)
Definition: safearray.c:679
int ret
#define S_OK
Definition: intsafe.h:59
void * ptr
unsigned short VARTYPE
Definition: compat.h:1895
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:274
unsigned int UINT
Definition: ndis.h:50
HRESULT WINAPI SafeArrayPutElement(SAFEARRAY *psa, LONG *rgIndices, void *pvData)
Definition: safearray.c:866

Referenced by get_propval(), and record_get_value().

◆ to_vartype()

VARTYPE to_vartype ( CIMTYPE  )

Definition at line 743 of file query.c.

744 {
745  switch (type)
746  {
747  case CIM_BOOLEAN: return VT_BOOL;
748  case CIM_STRING:
749  case CIM_DATETIME: return VT_BSTR;
750  case CIM_SINT8: return VT_I1;
751  case CIM_UINT8: return VT_UI1;
752  case CIM_SINT16: return VT_I2;
753  case CIM_UINT16: return VT_UI2;
754  case CIM_SINT32: return VT_I4;
755  case CIM_UINT32: return VT_UI4;
756  case CIM_SINT64: return VT_I8;
757  case CIM_UINT64: return VT_UI8;
758  default:
759  ERR("unhandled type %u\n", type);
760  break;
761  }
762  return 0;
763 }
Definition: compat.h:1939
Definition: compat.h:1955
Definition: compat.h:1951
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define ERR(fmt,...)
Definition: debug.h:109
Definition: compat.h:1938

Referenced by get_propval(), record_get_value(), and to_safearray().

◆ WbemLocator_create()

HRESULT WbemLocator_create ( LPVOID )

Definition at line 215 of file wbemlocator.c.

216 {
217  wbem_locator *wl;
218 
219  TRACE("(%p)\n", ppObj);
220 
221  wl = heap_alloc( sizeof(*wl) );
222  if (!wl) return E_OUTOFMEMORY;
223 
225  wl->refs = 1;
226 
227  *ppObj = &wl->IWbemLocator_iface;
228 
229  TRACE("returning iface %p\n", *ppObj);
230  return S_OK;
231 }
IWbemLocator IWbemLocator_iface
Definition: wbemlocator.c:37
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static const IWbemLocatorVtbl wbem_locator_vtbl
Definition: wbemlocator.c:207
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59

◆ WbemQualifierSet_create()

HRESULT WbemQualifierSet_create ( const WCHAR ,
const WCHAR ,
LPVOID  
)

Definition at line 250 of file qualifier.c.

251 {
252  struct qualifier_set *set;
253 
254  TRACE("%p\n", ppObj);
255 
256  if (!(set = heap_alloc( sizeof(*set) ))) return E_OUTOFMEMORY;
257 
258  set->IWbemQualifierSet_iface.lpVtbl = &qualifier_set_vtbl;
259  if (!(set->class = heap_strdupW( class )))
260  {
261  heap_free( set );
262  return E_OUTOFMEMORY;
263  }
264  if (!member) set->member = NULL;
265  else if (!(set->member = heap_strdupW( member )))
266  {
267  heap_free( set->class );
268  heap_free( set );
269  return E_OUTOFMEMORY;
270  }
271  set->refs = 1;
272 
273  *ppObj = &set->IWbemQualifierSet_iface;
274 
275  TRACE("returning iface %p\n", *ppObj);
276  return S_OK;
277 }
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static WCHAR * heap_strdupW(const WCHAR *str)
Definition: propsheet.c:178
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
static UINT set(struct ID3DXConstantTableImpl *table, IDirect3DDevice9 *device, struct ctab_constant *constant, const void **indata, D3DXPARAMETER_TYPE intype, UINT *size, UINT incol, D3DXPARAMETER_CLASS inclass, UINT index, BOOL is_pointer)
Definition: shader.c:1095
static const IWbemQualifierSetVtbl qualifier_set_vtbl
Definition: qualifier.c:236
#define S_OK
Definition: intsafe.h:59
Definition: _set.h:46
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by class_object_GetPropertyQualifierSet().

◆ WbemServices_create()

HRESULT WbemServices_create ( const WCHAR ,
LPVOID  
)

Definition at line 913 of file services.c.

914 {
915  struct wbem_services *ws;
916 
917  TRACE("(%p)\n", ppObj);
918 
919  ws = heap_alloc( sizeof(*ws) );
920  if (!ws) return E_OUTOFMEMORY;
921 
922  ws->IWbemServices_iface.lpVtbl = &wbem_services_vtbl;
923  ws->refs = 1;
924  ws->namespace = heap_strdupW( namespace );
925  ws->async = NULL;
927  ws->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": wbemprox_services.cs");
928 
929  *ppObj = &ws->IWbemServices_iface;
930 
931  TRACE("returning iface %p\n", *ppObj);
932  return S_OK;
933 }
const char * ws
Definition: skip_ws.cpp:7
#define DWORD_PTR
Definition: treelist.c:76
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static WCHAR * heap_strdupW(const WCHAR *str)
Definition: propsheet.c:178
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
Definition: synch.c:751
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
static const IWbemServicesVtbl wbem_services_vtbl
Definition: services.c:883
#define S_OK
Definition: