1/**
   2 * This file has no copyright assigned and is placed in the Public Domain.
   3 * This file is part of the mingw-w64 runtime package.
   4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
   5 */
   6
   7#include <winapifamily.h>
   8
   9#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
  10
  11#ifndef _MI_h
  12#define _MI_h
  13
  14#include <stddef.h>
  15#include <stdio.h>
  16#include <string.h>
  17
  18#pragma pack(push, 8)
  19
  20#if defined(MI_CHAR_TYPE)
  21#if (MI_CHAR_TYPE != 1) && (MI_CHAR_TYPE != 2)
  22#error "MI_CHAR_TYPE must be 1 or 2"
  23#endif
  24#else
  25#define MI_CHAR_TYPE 2
  26#endif
  27
  28#if (MI_CHAR_TYPE == 2)
  29#define MI_USE_WCHAR
  30#endif
  31
  32#ifndef MI_CONST
  33#define MI_CONST const
  34#endif
  35
  36#define MI_MAJOR ((MI_Uint32)1)
  37#define MI_MINOR ((MI_Uint32)0)
  38#define MI_REVISON ((MI_Uint32)0)
  39#define MI_MAKE_VERSION(MAJ, MIN, REV) ((MAJ << 16) | (MIN << 8) | REV)
  40#define MI_VERSION MI_MAKE_VERSION(MI_MAJOR, MI_MINOR, MI_REVISON)
  41
  42#define MI_UNREFERENCED_PARAMETER(P) (P)
  43
  44#define MI_EXPORT __declspec(dllexport)
  45
  46#define MI_MAIN_CALL __cdecl
  47
  48#define MI_CALL __stdcall
  49
  50#ifdef _MANAGED_PURE
  51#define MI_INLINE_CALL
  52#else
  53#define MI_INLINE_CALL MI_CALL
  54#endif
  55
  56#define MI_INLINE static __inline
  57
  58#define MI_OFFSETOF(STRUCT,FIELD) (((ptrdiff_t)&(((STRUCT*)1)->FIELD))-1)
  59
  60#ifdef __cplusplus
  61#define MI_EXTERN_C extern "C"
  62#else
  63#define MI_EXTERN_C extern
  64#endif
  65
  66#define MI_COUNT(X) (sizeof(X)/sizeof(X[0]))
  67
  68#if (MI_CHAR_TYPE == 1)
  69#define MI_T(STR) STR
  70#else
  71#define MI_T(STR) L##STR
  72#endif
  73
  74#define MI_LL(X) X##i64
  75#define MI_ULL(X) X##ui64
  76
  77typedef struct _MI_Server MI_Server;
  78typedef struct _MI_Context MI_Context;
  79typedef struct _MI_ClassDecl MI_ClassDecl;
  80typedef struct _MI_Instance MI_Instance;
  81typedef struct _MI_Filter MI_Filter;
  82typedef struct _MI_PropertySet MI_PropertySet;
  83typedef struct _MI_Qualifier MI_Qualifier;
  84typedef struct _MI_Session MI_Session;
  85typedef struct _MI_ServerFT MI_ServerFT;
  86typedef struct _MI_ProviderFT MI_ProviderFT;
  87typedef struct _MI_PropertySetFT MI_PropertySetFT;
  88typedef struct _MI_InstanceFT MI_InstanceFT;
  89typedef struct _MI_ContextFT MI_ContextFT;
  90typedef struct _MI_FilterFT MI_FilterFT;
  91typedef struct _MI_Class MI_Class;
  92typedef struct _MI_InstanceExFT MI_InstanceExFT;
  93
  94typedef enum _MI_Result {
  95  MI_RESULT_OK = 0,
  96  MI_RESULT_FAILED = 1,
  97  MI_RESULT_ACCESS_DENIED = 2,
  98  MI_RESULT_INVALID_NAMESPACE = 3,
  99  MI_RESULT_INVALID_PARAMETER = 4,
 100  MI_RESULT_INVALID_CLASS = 5,
 101  MI_RESULT_NOT_FOUND = 6,
 102  MI_RESULT_NOT_SUPPORTED = 7,
 103  MI_RESULT_CLASS_HAS_CHILDREN = 8,
 104  MI_RESULT_CLASS_HAS_INSTANCES = 9,
 105  MI_RESULT_INVALID_SUPERCLASS = 10,
 106  MI_RESULT_ALREADY_EXISTS = 11,
 107  MI_RESULT_NO_SUCH_PROPERTY = 12,
 108  MI_RESULT_TYPE_MISMATCH = 13,
 109  MI_RESULT_QUERY_LANGUAGE_NOT_SUPPORTED = 14,
 110  MI_RESULT_INVALID_QUERY = 15,
 111  MI_RESULT_METHOD_NOT_AVAILABLE = 16,
 112  MI_RESULT_METHOD_NOT_FOUND = 17,
 113  MI_RESULT_NAMESPACE_NOT_EMPTY = 20,
 114  MI_RESULT_INVALID_ENUMERATION_CONTEXT = 21,
 115  MI_RESULT_INVALID_OPERATION_TIMEOUT = 22,
 116  MI_RESULT_PULL_HAS_BEEN_ABANDONED = 23,
 117  MI_RESULT_PULL_CANNOT_BE_ABANDONED = 24,
 118  MI_RESULT_FILTERED_ENUMERATION_NOT_SUPPORTED = 25,
 119  MI_RESULT_CONTINUATION_ON_ERROR_NOT_SUPPORTED = 26,
 120  MI_RESULT_SERVER_LIMITS_EXCEEDED = 27,
 121  MI_RESULT_SERVER_IS_SHUTTING_DOWN = 28
 122} MI_Result;
 123
 124typedef enum _MI_ErrorCategory {
 125  MI_ERRORCATEGORY_NOT_SPECIFIED = 0,
 126  MI_ERRORCATEGORY_OPEN_ERROR = 1,
 127  MI_ERRORCATEGORY_CLOS_EERROR = 2,
 128  MI_ERRORCATEGORY_DEVICE_ERROR = 3,
 129  MI_ERRORCATEGORY_DEADLOCK_DETECTED = 4,
 130  MI_ERRORCATEGORY_INVALID_ARGUMENT = 5,
 131  MI_ERRORCATEGORY_INVALID_DATA = 6,
 132  MI_ERRORCATEGORY_INVALID_OPERATION = 7,
 133  MI_ERRORCATEGORY_INVALID_RESULT = 8,
 134  MI_ERRORCATEGORY_INVALID_TYPE = 9,
 135  MI_ERRORCATEGORY_METADATA_ERROR = 10,
 136  MI_ERRORCATEGORY_NOT_IMPLEMENTED = 11,
 137  MI_ERRORCATEGORY_NOT_INSTALLED = 12,
 138  MI_ERRORCATEGORY_OBJECT_NOT_FOUND = 13,
 139  MI_ERRORCATEGORY_OPERATION_STOPPED = 14,
 140  MI_ERRORCATEGORY_OPERATION_TIMEOUT = 15,
 141  MI_ERRORCATEGORY_SYNTAX_ERROR = 16,
 142  MI_ERRORCATEGORY_PARSER_ERROR = 17,
 143  MI_ERRORCATEGORY_ACCESS_DENIED = 18,
 144  MI_ERRORCATEGORY_RESOURCE_BUSY = 19,
 145  MI_ERRORCATEGORY_RESOURCE_EXISTS = 20,
 146  MI_ERRORCATEGORY_RESOURCE_UNAVAILABLE = 21,
 147  MI_ERRORCATEGORY_READ_ERROR = 22,
 148  MI_ERRORCATEGORY_WRITE_ERROR = 23,
 149  MI_ERRORCATEGORY_FROM_STDERR = 24,
 150  MI_ERRORCATEGORY_SECURITY_ERROR = 25,
 151  MI_ERRORCATEGORY_PROTOCOL_ERROR = 26,
 152  MI_ERRORCATEGORY_CONNECTION_ERROR = 27,
 153  MI_ERRORCATEGORY_AUTHENTICATION_ERROR = 28,
 154  MI_ERRORCATEGORY_LIMITS_EXCEEDED = 29,
 155  MI_ERRORCATEGORY_QUOTA_EXCEEDED = 30,
 156  MI_ERRORCATEGORY_NOT_ENABLED = 31
 157} MI_ErrorCategory;
 158
 159typedef enum _MI_PromptType {
 160  MI_PROMPTTYPE_NORMAL,
 161  MI_PROMPTTYPE_CRITICAL
 162} MI_PromptType;
 163
 164typedef enum _MI_CallbackMode {
 165  MI_CALLBACKMODE_REPORT,
 166  MI_CALLBACKMODE_INQUIRE,
 167  MI_CALLBACKMODE_IGNORE
 168} MI_CallbackMode;
 169
 170typedef enum _MI_ProviderArchitecture {
 171  MI_PROVIDER_ARCHITECTURE_32BIT,
 172  MI_PROVIDER_ARCHITECTURE_64BIT
 173} MI_ProviderArchitecture;
 174
 175#define MI_FLAG_CLASS (1 << 0)
 176#define MI_FLAG_METHOD (1 << 1)
 177#define MI_FLAG_PROPERTY (1 << 2)
 178#define MI_FLAG_PARAMETER (1 << 3)
 179#define MI_FLAG_ASSOCIATION (1 << 4)
 180#define MI_FLAG_INDICATION (1 << 5)
 181#define MI_FLAG_REFERENCE (1 << 6)
 182#define MI_FLAG_ANY (1|2|4|8|16|32|64)
 183
 184#define MI_FLAG_ENABLEOVERRIDE (1 << 7)
 185#define MI_FLAG_DISABLEOVERRIDE (1 << 8)
 186#define MI_FLAG_RESTRICTED (1 << 9)
 187#define MI_FLAG_TOSUBCLASS (1 << 10)
 188#define MI_FLAG_TRANSLATABLE (1 << 11)
 189
 190#define MI_FLAG_KEY (1 << 12)
 191#define MI_FLAG_IN (1 << 13)
 192#define MI_FLAG_OUT (1 << 14)
 193#define MI_FLAG_REQUIRED (1 << 15)
 194#define MI_FLAG_STATIC (1 << 16)
 195#define MI_FLAG_ABSTRACT (1 << 17)
 196#define MI_FLAG_TERMINAL (1 << 18)
 197#define MI_FLAG_EXPENSIVE (1 << 19)
 198#define MI_FLAG_STREAM (1 << 20)
 199#define MI_FLAG_READONLY (1 << 21)
 200
 201#define MI_FLAG_EXTENDED (1 << 12)
 202#define MI_FLAG_NOT_MODIFIED (1 << 25)
 203#define MI_FLAG_VERSION (1<<26|1<<27|1<<28)
 204#define MI_FLAG_NULL (1 << 29)
 205#define MI_FLAG_BORROW (1 << 30)
 206#define MI_FLAG_ADOPT ((MI_Uint32)(1 << 31))
 207
 208typedef enum _MI_Type {
 209  MI_BOOLEAN = 0,
 210  MI_UINT8 = 1,
 211  MI_SINT8 = 2,
 212  MI_UINT16 = 3,
 213  MI_SINT16 = 4,
 214  MI_UINT32 = 5,
 215  MI_SINT32 = 6,
 216  MI_UINT64 = 7,
 217  MI_SINT64 = 8,
 218  MI_REAL32 = 9,
 219  MI_REAL64 = 10,
 220  MI_CHAR16 = 11,
 221  MI_DATETIME = 12,
 222  MI_STRING = 13,
 223  MI_REFERENCE = 14,
 224  MI_INSTANCE = 15,
 225  MI_BOOLEANA = 16,
 226  MI_UINT8A = 17,
 227  MI_SINT8A = 18,
 228  MI_UINT16A = 19,
 229  MI_SINT16A = 20,
 230  MI_UINT32A = 21,
 231  MI_SINT32A = 22,
 232  MI_UINT64A = 23,
 233  MI_SINT64A = 24,
 234  MI_REAL32A = 25,
 235  MI_REAL64A = 26,
 236  MI_CHAR16A = 27,
 237  MI_DATETIMEA = 28,
 238  MI_STRINGA = 29,
 239  MI_REFERENCEA = 30,
 240  MI_INSTANCEA = 31,
 241  MI_ARRAY = 16
 242} MI_Type;
 243
 244typedef unsigned char MI_Boolean;
 245typedef unsigned char MI_Uint8;
 246typedef signed char MI_Sint8;
 247typedef unsigned short MI_Uint16;
 248typedef signed short MI_Sint16;
 249typedef unsigned int MI_Uint32;
 250typedef signed int MI_Sint32;
 251
 252typedef unsigned __int64 MI_Uint64;
 253typedef signed __int64 MI_Sint64;
 254
 255typedef float MI_Real32;
 256typedef double MI_Real64;
 257typedef unsigned short MI_Char16;
 258
 259#if (MI_CHAR_TYPE == 1)
 260typedef char MI_Char;
 261#else
 262typedef wchar_t MI_Char;
 263#endif
 264
 265typedef MI_Char* MI_StringPtr;
 266typedef const MI_Char* MI_ConstStringPtr;
 267
 268#define MI_TRUE ((MI_Boolean)1)
 269#define MI_FALSE ((MI_Boolean)0)
 270
 271typedef struct _MI_Timestamp {
 272  MI_Uint32 year;
 273  MI_Uint32 month;
 274  MI_Uint32 day;
 275  MI_Uint32 hour;
 276  MI_Uint32 minute;
 277  MI_Uint32 second;
 278  MI_Uint32 microseconds;
 279  MI_Sint32 utc;
 280} MI_Timestamp;
 281
 282typedef struct _MI_Interval {
 283  MI_Uint32 days;
 284  MI_Uint32 hours;
 285  MI_Uint32 minutes;
 286  MI_Uint32 seconds;
 287  MI_Uint32 microseconds;
 288  MI_Uint32 __padding1;
 289  MI_Uint32 __padding2;
 290  MI_Uint32 __padding3;
 291} MI_Interval;
 292
 293typedef struct _MI_Datetime {
 294  MI_Uint32 isTimestamp;
 295  union {
 296    MI_Timestamp timestamp;
 297    MI_Interval interval;
 298  } u;
 299} MI_Datetime;
 300
 301typedef struct _MI_BooleanA {
 302  MI_Boolean* data;
 303  MI_Uint32 size;
 304} MI_BooleanA;
 305
 306typedef struct _MI_Uint8A {
 307  MI_Uint8* data;
 308  MI_Uint32 size;
 309} MI_Uint8A;
 310
 311typedef struct _MI_Sint8A {
 312  MI_Sint8* data;
 313  MI_Uint32 size;
 314} MI_Sint8A;
 315
 316typedef struct _MI_Uint16A {
 317  MI_Uint16* data;
 318  MI_Uint32 size;
 319} MI_Uint16A;
 320
 321typedef struct _MI_Sint16A {
 322  MI_Sint16* data;
 323  MI_Uint32 size;
 324} MI_Sint16A;
 325
 326typedef struct _MI_Uint32A {
 327  MI_Uint32* data;
 328  MI_Uint32 size;
 329} MI_Uint32A;
 330
 331typedef struct _MI_Sint32A {
 332  MI_Sint32* data;
 333  MI_Uint32 size;
 334} MI_Sint32A;
 335
 336typedef struct _MI_Uint64A {
 337  MI_Uint64* data;
 338  MI_Uint32 size;
 339} MI_Uint64A;
 340
 341typedef struct _MI_Sint64A {
 342  MI_Sint64* data;
 343  MI_Uint32 size;
 344} MI_Sint64A;
 345
 346typedef struct _MI_Real32A {
 347  MI_Real32* data;
 348  MI_Uint32 size;
 349} MI_Real32A;
 350
 351typedef struct _MI_Real64A {
 352  MI_Real64* data;
 353  MI_Uint32 size;
 354} MI_Real64A;
 355
 356typedef struct _MI_Char16A {
 357  MI_Char16* data;
 358  MI_Uint32 size;
 359} MI_Char16A;
 360
 361typedef struct _MI_DatetimeA {
 362  MI_Datetime* data;
 363  MI_Uint32 size;
 364} MI_DatetimeA;
 365
 366typedef struct _MI_StringA {
 367  MI_Char** data;
 368  MI_Uint32 size;
 369} MI_StringA;
 370
 371typedef struct _MI_ReferenceA {
 372  struct _MI_Instance** data;
 373  MI_Uint32 size;
 374} MI_ReferenceA;
 375
 376typedef struct _MI_InstanceA {
 377  MI_Instance** data;
 378  MI_Uint32 size;
 379} MI_InstanceA;
 380
 381typedef struct _MI_Array {
 382  void* data;
 383  MI_Uint32 size;
 384} MI_Array;
 385
 386typedef struct _MI_ConstBooleanA {
 387  MI_CONST MI_Boolean* data;
 388  MI_Uint32 size;
 389} MI_ConstBooleanA;
 390
 391typedef struct _MI_ConstUint8A {
 392  MI_CONST MI_Uint8* data;
 393  MI_Uint32 size;
 394} MI_ConstUint8A;
 395
 396typedef struct _MI_ConstSint8A {
 397  MI_CONST MI_Sint8* data;
 398  MI_Uint32 size;
 399} MI_ConstSint8A;
 400
 401typedef struct _MI_ConstUint16A {
 402  MI_CONST MI_Uint16* data;
 403  MI_Uint32 size;
 404} MI_ConstUint16A;
 405
 406typedef struct _MI_ConstSint16A {
 407  MI_CONST MI_Sint16* data;
 408  MI_Uint32 size;
 409} MI_ConstSint16A;
 410
 411typedef struct _MI_ConstUint32A {
 412  MI_CONST MI_Uint32* data;
 413  MI_Uint32 size;
 414} MI_ConstUint32A;
 415
 416typedef struct _MI_ConstSint32A {
 417  MI_CONST MI_Sint32* data;
 418  MI_Uint32 size;
 419} MI_ConstSint32A;
 420
 421typedef struct _MI_ConstUint64A {
 422  MI_CONST MI_Uint64* data;
 423  MI_Uint32 size;
 424} MI_ConstUint64A;
 425
 426typedef struct _MI_ConstSint64A {
 427  MI_CONST MI_Sint64* data;
 428  MI_Uint32 size;
 429} MI_ConstSint64A;
 430
 431typedef struct _MI_ConstReal32A {
 432  MI_CONST MI_Real32* data;
 433  MI_Uint32 size;
 434} MI_ConstReal32A;
 435
 436typedef struct _MI_ConstReal64A {
 437  MI_CONST MI_Real64* data;
 438  MI_Uint32 size;
 439} MI_ConstReal64A;
 440
 441typedef struct _MI_ConstChar16A {
 442  MI_CONST MI_Char16* data;
 443  MI_Uint32 size;
 444} MI_ConstChar16A;
 445
 446typedef struct _MI_ConstDatetimeA {
 447  MI_CONST MI_Datetime* data;
 448  MI_Uint32 size;
 449} MI_ConstDatetimeA;
 450
 451typedef struct _MI_ConstStringA {
 452  MI_CONST MI_Char* MI_CONST* data;
 453  MI_Uint32 size;
 454} MI_ConstStringA;
 455
 456typedef struct _MI_ConstReferenceA {
 457  MI_CONST MI_Instance* MI_CONST* data;
 458  MI_Uint32 size;
 459} MI_ConstReferenceA;
 460
 461typedef struct _MI_ConstInstanceA {
 462  MI_CONST MI_Instance* MI_CONST* data;
 463  MI_Uint32 size;
 464} MI_ConstInstanceA;
 465
 466typedef union _MI_Value {
 467  MI_Boolean boolean;
 468  MI_Uint8 uint8;
 469  MI_Sint8 sint8;
 470  MI_Uint16 uint16;
 471  MI_Sint16 sint16;
 472  MI_Uint32 uint32;
 473  MI_Sint32 sint32;
 474  MI_Uint64 uint64;
 475  MI_Sint64 sint64;
 476  MI_Real32 real32;
 477  MI_Real64 real64;
 478  MI_Char16 char16;
 479  MI_Datetime datetime;
 480  MI_Char* string;
 481  MI_Instance* instance;
 482  MI_Instance* reference;
 483  MI_BooleanA booleana;
 484  MI_Uint8A uint8a;
 485  MI_Sint8A sint8a;
 486  MI_Uint16A uint16a;
 487  MI_Sint16A sint16a;
 488  MI_Uint32A uint32a;
 489  MI_Sint32A sint32a;
 490  MI_Uint64A uint64a;
 491  MI_Sint64A sint64a;
 492  MI_Real32A real32a;
 493  MI_Real64A real64a;
 494  MI_Char16A char16a;
 495  MI_DatetimeA datetimea;
 496  MI_StringA stringa;
 497  MI_ReferenceA referencea;
 498  MI_InstanceA instancea;
 499  MI_Array array;
 500} MI_Value;
 501
 502typedef struct _MI_BooleanField {
 503  MI_Boolean value;
 504  MI_Boolean exists;
 505  MI_Uint8 flags;
 506} MI_BooleanField;
 507
 508typedef struct _MI_Sint8Field {
 509  MI_Sint8 value;
 510  MI_Boolean exists;
 511  MI_Uint8 flags;
 512} MI_Sint8Field;
 513
 514typedef struct _MI_Uint8Field {
 515  MI_Uint8 value;
 516  MI_Boolean exists;
 517  MI_Uint8 flags;
 518} MI_Uint8Field;
 519
 520typedef struct _MI_Sint16Field {
 521  MI_Sint16 value;
 522  MI_Boolean exists;
 523  MI_Uint8 flags;
 524} MI_Sint16Field;
 525
 526typedef struct _MI_Uint16Field {
 527  MI_Uint16 value;
 528  MI_Boolean exists;
 529  MI_Uint8 flags;
 530} MI_Uint16Field;
 531
 532typedef struct _MI_Sint32Field {
 533  MI_Sint32 value;
 534  MI_Boolean exists;
 535  MI_Uint8 flags;
 536} MI_Sint32Field;
 537
 538typedef struct _MI_Uint32Field {
 539  MI_Uint32 value;
 540  MI_Boolean exists;
 541  MI_Uint8 flags;
 542} MI_Uint32Field;
 543
 544typedef struct _MI_Sint64Field {
 545  MI_Sint64 value;
 546  MI_Boolean exists;
 547  MI_Uint8 flags;
 548} MI_Sint64Field;
 549
 550typedef struct _MI_Uint64Field {
 551  MI_Uint64 value;
 552  MI_Boolean exists;
 553  MI_Uint8 flags;
 554} MI_Uint64Field;
 555
 556typedef struct _MI_Real32Field {
 557  MI_Real32 value;
 558  MI_Boolean exists;
 559  MI_Uint8 flags;
 560} MI_Real32Field;
 561
 562typedef struct _MI_Real64Field {
 563  MI_Real64 value;
 564  MI_Boolean exists;
 565  MI_Uint8 flags;
 566} MI_Real64Field;
 567
 568typedef struct _MI_Char16Field {
 569  MI_Char16 value;
 570  MI_Boolean exists;
 571  MI_Uint8 flags;
 572} MI_Char16Field;
 573
 574typedef struct _MI_DatetimeField {
 575  MI_Datetime value;
 576  MI_Boolean exists;
 577  MI_Uint8 flags;
 578} MI_DatetimeField;
 579
 580typedef struct _MI_StringField {
 581  MI_Char* value;
 582  MI_Boolean exists;
 583  MI_Uint8 flags;
 584} MI_StringField;
 585
 586typedef struct _MI_ReferenceField {
 587  MI_Instance* value;
 588  MI_Boolean exists;
 589  MI_Uint8 flags;
 590} MI_ReferenceField;
 591
 592typedef struct _MI_InstanceField {
 593  MI_Instance* value;
 594  MI_Boolean exists;
 595  MI_Uint8 flags;
 596} MI_InstanceField;
 597
 598typedef struct _MI_BooleanAField {
 599  MI_BooleanA value;
 600  MI_Boolean exists;
 601  MI_Uint8 flags;
 602} MI_BooleanAField;
 603
 604typedef struct _MI_Uint8AField {
 605  MI_Uint8A value;
 606  MI_Boolean exists;
 607  MI_Uint8 flags;
 608} MI_Uint8AField;
 609
 610typedef struct _MI_Sint8AField {
 611  MI_Sint8A value;
 612  MI_Boolean exists;
 613  MI_Uint8 flags;
 614} MI_Sint8AField;
 615
 616typedef struct _MI_Uint16AField {
 617  MI_Uint16A value;
 618  MI_Boolean exists;
 619  MI_Uint8 flags;
 620} MI_Uint16AField;
 621
 622typedef struct _MI_Sint16AField {
 623  MI_Sint16A value;
 624  MI_Boolean exists;
 625  MI_Uint8 flags;
 626} MI_Sint16AField;
 627
 628typedef struct _MI_Uint32AField {
 629  MI_Uint32A value;
 630  MI_Boolean exists;
 631  MI_Uint8 flags;
 632} MI_Uint32AField;
 633
 634typedef struct _MI_Sint32AField {
 635  MI_Sint32A value;
 636  MI_Boolean exists;
 637  MI_Uint8 flags;
 638} MI_Sint32AField;
 639
 640typedef struct _MI_Uint64AField {
 641  MI_Uint64A value;
 642  MI_Boolean exists;
 643  MI_Uint8 flags;
 644} MI_Uint64AField;
 645
 646typedef struct _MI_Sint64AField {
 647  MI_Sint64A value;
 648  MI_Boolean exists;
 649  MI_Uint8 flags;
 650} MI_Sint64AField;
 651
 652typedef struct _MI_Real32AField {
 653  MI_Real32A value;
 654  MI_Boolean exists;
 655  MI_Uint8 flags;
 656} MI_Real32AField;
 657
 658typedef struct _MI_Real64AField {
 659  MI_Real64A value;
 660  MI_Boolean exists;
 661  MI_Uint8 flags;
 662} MI_Real64AField;
 663
 664typedef struct _MI_Char16AField {
 665  MI_Char16A value;
 666  MI_Boolean exists;
 667  MI_Uint8 flags;
 668} MI_Char16AField;
 669
 670typedef struct _MI_DatetimeAField {
 671  MI_DatetimeA value;
 672  MI_Boolean exists;
 673  MI_Uint8 flags;
 674} MI_DatetimeAField;
 675
 676typedef struct _MI_StringAField {
 677  MI_StringA value;
 678  MI_Boolean exists;
 679  MI_Uint8 flags;
 680} MI_StringAField;
 681
 682typedef struct _MI_ReferenceAField {
 683  MI_ReferenceA value;
 684  MI_Boolean exists;
 685  MI_Uint8 flags;
 686} MI_ReferenceAField;
 687
 688typedef struct _MI_InstanceAField {
 689  MI_InstanceA value;
 690  MI_Boolean exists;
 691  MI_Uint8 flags;
 692} MI_InstanceAField;
 693
 694typedef struct _MI_ArrayField {
 695  MI_Array value;
 696  MI_Boolean exists;
 697  MI_Uint8 flags;
 698} MI_ArrayField;
 699
 700typedef struct _MI_ConstBooleanField {
 701  MI_Boolean value;
 702  MI_Boolean exists;
 703  MI_Uint8 flags;
 704} MI_ConstBooleanField;
 705
 706typedef struct _MI_ConstSint8Field {
 707  MI_Sint8 value;
 708  MI_Boolean exists;
 709  MI_Uint8 flags;
 710} MI_ConstSint8Field;
 711
 712typedef struct _MI_ConstUint8Field {
 713  MI_Uint8 value;
 714  MI_Boolean exists;
 715  MI_Uint8 flags;
 716} MI_ConstUint8Field;
 717
 718typedef struct _MI_ConstSint16Field {
 719  MI_Sint16 value;
 720  MI_Boolean exists;
 721  MI_Uint8 flags;
 722} MI_ConstSint16Field;
 723
 724typedef struct _MI_ConstUint16Field {
 725  MI_Uint16 value;
 726  MI_Boolean exists;
 727  MI_Uint8 flags;
 728} MI_ConstUint16Field;
 729
 730typedef struct _MI_ConstSint32Field {
 731  MI_Sint32 value;
 732  MI_Boolean exists;
 733  MI_Uint8 flags;
 734} MI_ConstSint32Field;
 735
 736typedef struct _MI_ConstUint32Field {
 737  MI_Uint32 value;
 738  MI_Boolean exists;
 739  MI_Uint8 flags;
 740} MI_ConstUint32Field;
 741
 742typedef struct _MI_ConstSint64Field {
 743  MI_Sint64 value;
 744  MI_Boolean exists;
 745  MI_Uint8 flags;
 746} MI_ConstSint64Field;
 747
 748typedef struct _MI_ConstUint64Field {
 749  MI_Uint64 value;
 750  MI_Boolean exists;
 751  MI_Uint8 flags;
 752} MI_ConstUint64Field;
 753
 754typedef struct _MI_ConstReal32Field {
 755  MI_Real32 value;
 756  MI_Boolean exists;
 757  MI_Uint8 flags;
 758} MI_ConstReal32Field;
 759
 760typedef struct _MI_ConstReal64Field {
 761  MI_Real64 value;
 762  MI_Boolean exists;
 763  MI_Uint8 flags;
 764} MI_ConstReal64Field;
 765
 766typedef struct _MI_ConstChar16Field {
 767  MI_Char16 value;
 768  MI_Boolean exists;
 769  MI_Uint8 flags;
 770} MI_ConstChar16Field;
 771
 772typedef struct _MI_ConstDatetimeField {
 773  MI_Datetime value;
 774  MI_Boolean exists;
 775  MI_Uint8 flags;
 776} MI_ConstDatetimeField;
 777
 778typedef struct _MI_ConstStringField {
 779  MI_CONST MI_Char* value;
 780  MI_Boolean exists;
 781  MI_Uint8 flags;
 782} MI_ConstStringField;
 783
 784typedef struct _MI_ConstReferenceField {
 785  MI_CONST MI_Instance* value;
 786  MI_Boolean exists;
 787  MI_Uint8 flags;
 788} MI_ConstReferenceField;
 789
 790typedef struct _MI_ConstInstanceField {
 791  MI_CONST MI_Instance* value;
 792  MI_Boolean exists;
 793  MI_Uint8 flags;
 794} MI_ConstInstanceField;
 795
 796typedef struct _MI_ConstBooleanAField {
 797  MI_ConstBooleanA value;
 798  MI_Boolean exists;
 799  MI_Uint8 flags;
 800} MI_ConstBooleanAField;
 801
 802typedef struct _MI_ConstUint8AField {
 803  MI_ConstUint8A value;
 804  MI_Boolean exists;
 805  MI_Uint8 flags;
 806} MI_ConstUint8AField;
 807
 808typedef struct _MI_ConstSint8AField {
 809  MI_ConstSint8A value;
 810  MI_Boolean exists;
 811  MI_Uint8 flags;
 812} MI_ConstSint8AField;
 813
 814typedef struct _MI_ConstUint16AField {
 815  MI_ConstUint16A value;
 816  MI_Boolean exists;
 817  MI_Uint8 flags;
 818} MI_ConstUint16AField;
 819
 820typedef struct _MI_ConstSint16AField {
 821  MI_ConstSint16A value;
 822  MI_Boolean exists;
 823  MI_Uint8 flags;
 824} MI_ConstSint16AField;
 825
 826typedef struct _MI_ConstUint32AField {
 827  MI_ConstUint32A value;
 828  MI_Boolean exists;
 829  MI_Uint8 flags;
 830} MI_ConstUint32AField;
 831
 832typedef struct _MI_ConstSint32AField {
 833  MI_ConstSint32A value;
 834  MI_Boolean exists;
 835  MI_Uint8 flags;
 836} MI_ConstSint32AField;
 837
 838typedef struct _MI_ConstUint64AField {
 839  MI_ConstUint64A value;
 840  MI_Boolean exists;
 841  MI_Uint8 flags;
 842} MI_ConstUint64AField;
 843
 844typedef struct _MI_ConstSint64AField {
 845  MI_ConstSint64A value;
 846  MI_Boolean exists;
 847  MI_Uint8 flags;
 848} MI_ConstSint64AField;
 849
 850typedef struct _MI_ConstReal32AField {
 851  MI_ConstReal32A value;
 852  MI_Boolean exists;
 853  MI_Uint8 flags;
 854} MI_ConstReal32AField;
 855
 856typedef struct _MI_ConstReal64AField {
 857  MI_ConstReal64A value;
 858  MI_Boolean exists;
 859  MI_Uint8 flags;
 860} MI_ConstReal64AField;
 861
 862typedef struct _MI_ConstChar16AField {
 863  MI_ConstChar16A value;
 864  MI_Boolean exists;
 865  MI_Uint8 flags;
 866} MI_ConstChar16AField;
 867
 868typedef struct _MI_ConstDatetimeAField {
 869  MI_ConstDatetimeA value;
 870  MI_Boolean exists;
 871  MI_Uint8 flags;
 872} MI_ConstDatetimeAField;
 873
 874typedef struct _MI_ConstStringAField {
 875  MI_ConstStringA value;
 876  MI_Boolean exists;
 877  MI_Uint8 flags;
 878} MI_ConstStringAField;
 879
 880typedef struct _MI_ConstReferenceAField {
 881  MI_ConstReferenceA value;
 882  MI_Boolean exists;
 883  MI_Uint8 flags;
 884} MI_ConstReferenceAField;
 885
 886typedef struct _MI_ConstInstanceAField {
 887  MI_ConstInstanceA value;
 888  MI_Boolean exists;
 889  MI_Uint8 flags;
 890} MI_ConstInstanceAField;
 891
 892struct _MI_ServerFT {
 893  MI_Result (MI_CALL *GetVersion)(MI_Uint32* version);
 894  MI_Result (MI_CALL *GetSystemName)(const MI_Char** systemName);
 895};
 896
 897struct _MI_Server {
 898  const MI_ServerFT* serverFT;
 899  const MI_ContextFT* contextFT;
 900  const MI_InstanceFT* instanceFT;
 901  const MI_PropertySetFT* propertySetFT;
 902  const MI_FilterFT* filterFT;
 903};
 904
 905MI_Result MI_CALL MI_Server_GetVersion(MI_Uint32* version);
 906MI_Result MI_CALL MI_Server_GetSystemName(const MI_Char** systemName);
 907
 908struct _MI_FilterFT {
 909  MI_Result (MI_CALL *Evaluate)(const MI_Filter* self, const MI_Instance* instance, MI_Boolean* result);
 910  MI_Result (MI_CALL *GetExpression)(const MI_Filter* self, const MI_Char** queryLang, const MI_Char** queryExpr);
 911};
 912
 913struct _MI_Filter {
 914  const MI_FilterFT* ft;
 915  ptrdiff_t reserved[3];
 916};
 917
 918MI_INLINE MI_Result MI_INLINE_CALL MI_Filter_Evaluate(const MI_Filter* self, const MI_Instance* instance, MI_Boolean* result) {
 919  if (self && self->ft) {
 920    return self->ft->Evaluate(self, instance, result);
 921  } else {
 922    return MI_RESULT_INVALID_PARAMETER;
 923  }
 924}
 925
 926MI_INLINE MI_Result MI_INLINE_CALL MI_Filter_GetExpression(const MI_Filter* self, const MI_Char** queryLang, const MI_Char** queryExpr) {
 927  if (self && self->ft) {
 928    return self->ft->GetExpression(self, queryLang, queryExpr);
 929  } else {
 930    return MI_RESULT_INVALID_PARAMETER;
 931  }
 932}
 933
 934struct _MI_PropertySetFT {
 935  MI_Result (MI_CALL *GetElementCount)(const MI_PropertySet* self, MI_Uint32* count);
 936  MI_Result (MI_CALL *ContainsElement)(const MI_PropertySet* self, const MI_Char* name, MI_Boolean* flag);
 937  MI_Result (MI_CALL *AddElement)(MI_PropertySet* self, const MI_Char* name);
 938  MI_Result (MI_CALL *GetElementAt)(const MI_PropertySet* self, MI_Uint32 index, const MI_Char** name);
 939  MI_Result (MI_CALL *Clear)(MI_PropertySet* self);
 940  MI_Result (MI_CALL *Destruct)(MI_PropertySet* self);
 941  MI_Result (MI_CALL *Delete)(MI_PropertySet* self);
 942  MI_Result (MI_CALL *Clone)(const MI_PropertySet* self, MI_PropertySet** newPropertySet);
 943};
 944
 945struct _MI_PropertySet {
 946  const MI_PropertySetFT* ft;
 947  ptrdiff_t reserved[3];
 948};
 949
 950MI_INLINE MI_Result MI_INLINE_CALL MI_PropertySet_GetElementCount(const MI_PropertySet* self, MI_Uint32* count) {
 951  if (self && self->ft) {
 952    return self->ft->GetElementCount(self, count);
 953  } else {
 954    return MI_RESULT_INVALID_PARAMETER;
 955  }
 956}
 957
 958MI_INLINE MI_Result MI_INLINE_CALL MI_PropertySet_ContainsElement(const MI_PropertySet* self, const MI_Char* name, MI_Boolean* flag) {
 959  if (self && self->ft) {
 960    return self->ft->ContainsElement(self, name, flag);
 961  } else {
 962    return MI_RESULT_INVALID_PARAMETER;
 963  }
 964}
 965
 966MI_INLINE MI_Result MI_INLINE_CALL MI_PropertySet_AddElement(MI_PropertySet* self, const MI_Char* name) {
 967  if (self && self->ft) {
 968    return self->ft->AddElement(self, name);
 969  } else {
 970    return MI_RESULT_INVALID_PARAMETER;
 971  }
 972}
 973
 974MI_INLINE MI_Result MI_INLINE_CALL MI_PropertySet_GetElementAt(const MI_PropertySet* self, MI_Uint32 index, const MI_Char** name) {
 975  if (self && self->ft) {
 976    return self->ft->GetElementAt(self, index, name);
 977  } else {
 978    return MI_RESULT_INVALID_PARAMETER;
 979  }
 980}
 981
 982MI_INLINE MI_Result MI_INLINE_CALL MI_PropertySet_Clear(MI_PropertySet* self) {
 983  if (self && self->ft) {
 984    return self->ft->Clear(self);
 985  } else {
 986    return MI_RESULT_INVALID_PARAMETER;
 987  }
 988}
 989
 990MI_INLINE MI_Result MI_INLINE_CALL MI_PropertySet_Destruct(MI_PropertySet* self) {
 991  if (self && self->ft) {
 992    return self->ft->Destruct(self);
 993  } else {
 994    return MI_RESULT_INVALID_PARAMETER;
 995  }
 996}
 997
 998MI_INLINE MI_Result MI_INLINE_CALL MI_PropertySet_Delete(MI_PropertySet* self) {
 999  if (self && self->ft) {
1000    return self->ft->Delete(self);
1001  } else {
1002    return MI_RESULT_INVALID_PARAMETER;
1003  }
1004}
1005
1006MI_INLINE MI_Result MI_INLINE_CALL MI_PropertySet_Clone(const MI_PropertySet* self, MI_PropertySet** newPropertySet) {
1007  if (self && self->ft) {
1008    return self->ft->Clone(self, newPropertySet);
1009  } else {
1010    return MI_RESULT_INVALID_PARAMETER;
1011  }
1012}
1013
1014typedef struct _MI_ObjectDecl {
1015  MI_Uint32 flags;
1016  MI_Uint32 code;
1017  MI_CONST MI_Char* name;
1018  MI_Qualifier MI_CONST* MI_CONST* qualifiers;
1019  MI_Uint32 numQualifiers;
1020  struct _MI_PropertyDecl MI_CONST* MI_CONST* properties;
1021  MI_Uint32 numProperties;
1022  MI_Uint32 size;
1023} MI_ObjectDecl;
1024
1025struct _MI_ClassDecl {
1026  MI_Uint32 flags;
1027  MI_Uint32 code;
1028  MI_CONST MI_Char* name;
1029  struct _MI_Qualifier MI_CONST* MI_CONST* qualifiers;
1030  MI_Uint32 numQualifiers;
1031  struct _MI_PropertyDecl MI_CONST* MI_CONST* properties;
1032  MI_Uint32 numProperties;
1033  MI_Uint32 size;
1034  MI_CONST MI_Char* superClass;
1035  MI_ClassDecl MI_CONST* superClassDecl;
1036  struct _MI_MethodDecl MI_CONST* MI_CONST* methods;
1037  MI_Uint32 numMethods;
1038  struct _MI_SchemaDecl MI_CONST* schema;
1039  MI_CONST MI_ProviderFT* providerFT;
1040  MI_Class *owningClass;
1041};
1042
1043typedef struct _MI_FeatureDecl {
1044  MI_Uint32 flags;
1045  MI_Uint32 code;
1046  MI_CONST MI_Char* name;
1047  MI_Qualifier MI_CONST* MI_CONST * qualifiers;
1048  MI_Uint32 numQualifiers;
1049} MI_FeatureDecl;
1050
1051typedef struct _MI_ParameterDecl {
1052  MI_Uint32 flags;
1053  MI_Uint32 code;
1054  MI_CONST MI_Char* name;
1055  MI_Qualifier MI_CONST* MI_CONST* qualifiers;
1056  MI_Uint32 numQualifiers;
1057  MI_Uint32 type;
1058  MI_CONST MI_Char* className;
1059  MI_Uint32 subscript;
1060  MI_Uint32 offset;
1061} MI_ParameterDecl;
1062
1063typedef struct _MI_PropertyDecl {
1064  MI_Uint32 flags;
1065  MI_Uint32 code;
1066  MI_CONST MI_Char* name;
1067  MI_Qualifier MI_CONST* MI_CONST* qualifiers;
1068  MI_Uint32 numQualifiers;
1069  MI_Uint32 type;
1070  MI_CONST MI_Char* className;
1071  MI_Uint32 subscript;
1072  MI_Uint32 offset;
1073  MI_CONST MI_Char* origin;
1074  MI_CONST MI_Char* propagator;
1075  MI_CONST void* value;
1076} MI_PropertyDecl;
1077
1078typedef void (MI_CALL *MI_MethodDecl_Invoke)(void* self, MI_Context* context, const MI_Char* nameSpace, const MI_Char* className, const MI_Char* methodName, const MI_Instance* instanceName, const MI_Instance* parameters);
1079
1080typedef struct _MI_MethodDecl {
1081  MI_Uint32 flags;
1082  MI_Uint32 code;
1083  MI_CONST MI_Char* name;
1084  struct _MI_Qualifier MI_CONST* MI_CONST* qualifiers;
1085  MI_Uint32 numQualifiers;
1086  struct _MI_ParameterDecl MI_CONST* MI_CONST* parameters;
1087  MI_Uint32 numParameters;
1088  MI_Uint32 size;
1089  MI_Uint32 returnType;
1090  MI_CONST MI_Char* origin;
1091  MI_CONST MI_Char* propagator;
1092  struct _MI_SchemaDecl MI_CONST* schema;
1093  MI_MethodDecl_Invoke function;
1094} MI_MethodDecl;
1095
1096typedef struct _MI_QualifierDecl {
1097  MI_CONST MI_Char* name;
1098  MI_Uint32 type;
1099  MI_Uint32 scope;
1100  MI_Uint32 flavor;
1101  MI_Uint32 subscript;
1102  MI_CONST void* value;
1103} MI_QualifierDecl;
1104
1105struct _MI_Qualifier {
1106  MI_CONST MI_Char* name;
1107  MI_Uint32 type;
1108  MI_Uint32 flavor;
1109  MI_CONST void* value;
1110};
1111
1112typedef struct _MI_SchemaDecl {
1113  MI_QualifierDecl MI_CONST* MI_CONST* qualifierDecls;
1114  MI_Uint32 numQualifierDecls;
1115  MI_ClassDecl MI_CONST* MI_CONST* classDecls;
1116  MI_Uint32 numClassDecls;
1117} MI_SchemaDecl;
1118
1119typedef struct _MI_Module_Self MI_Module_Self;
1120
1121typedef void (MI_CALL *MI_ProviderFT_Load)(void** self, MI_Module_Self* selfModule, MI_Context* context);
1122typedef void (MI_CALL *MI_ProviderFT_Unload)(void* self, MI_Context* context);
1123typedef void (MI_CALL *MI_ProviderFT_GetInstance)(void* self, MI_Context* context, const MI_Char* nameSpace, const MI_Char* className, const MI_Instance* instanceName, const MI_PropertySet* propertySet);
1124typedef void (MI_CALL *MI_ProviderFT_EnumerateInstances)(void* self, MI_Context* context, const MI_Char* nameSpace, const MI_Char* className, const MI_PropertySet* propertySet, MI_Boolean keysOnly, const MI_Filter* filter);
1125typedef void (MI_CALL *MI_ProviderFT_CreateInstance)(void* self, MI_Context* context, const MI_Char* nameSpace, const MI_Char* className, const MI_Instance* newInstance);
1126typedef void (MI_CALL *MI_ProviderFT_ModifyInstance)(void* self, MI_Context* context, const MI_Char* nameSpace, const MI_Char* className, const MI_Instance* modifiedInstance, const MI_PropertySet* propertySet);
1127typedef void (MI_CALL *MI_ProviderFT_DeleteInstance)(void* self, MI_Context* context, const MI_Char* nameSpace, const MI_Char* className, const MI_Instance* instanceName);
1128typedef void (MI_CALL *MI_ProviderFT_AssociatorInstances)(void* self, MI_Context* context, const MI_Char* nameSpace, const MI_Char* className, const MI_Instance* instanceName, const MI_Char* resultClass, const MI_Char* role, const MI_Char* resultRole, const MI_PropertySet* propertySet, MI_Boolean keysOnly, const MI_Filter* filter);
1129typedef void (MI_CALL *MI_ProviderFT_ReferenceInstances)(void* self, MI_Context* context, const MI_Char* nameSpace, const MI_Char* className, const MI_Instance* instanceName, const MI_Char* role, const MI_PropertySet* propertySet, MI_Boolean keysOnly, const MI_Filter* filter);
1130typedef void (MI_CALL *MI_ProviderFT_EnableIndications)(void* self, MI_Context* indicationsContext, const MI_Char* nameSpace, const MI_Char* className);
1131typedef void (MI_CALL *MI_ProviderFT_DisableIndications)(void* self, MI_Context* indicationsContext, const MI_Char* nameSpace, const MI_Char* className);
1132typedef void (MI_CALL *MI_ProviderFT_Subscribe)(void* self, MI_Context* context, const MI_Char* nameSpace, const MI_Char* className, const MI_Filter* filter, const MI_Char* bookmark, MI_Uint64 subscriptionID, void** subscriptionSelf);
1133typedef void (MI_CALL *MI_ProviderFT_Unsubscribe)(void* self, MI_Context* context, const MI_Char* nameSpace, const MI_Char* className, MI_Uint64 subscriptionID, void* subscriptionSelf);
1134typedef void (MI_CALL *MI_ProviderFT_Invoke)(void* self, MI_Context* context, const MI_Char* nameSpace, const MI_Char* className, const MI_Char* methodName, const MI_Instance* instanceName, const MI_Instance* inputParameters);
1135
1136struct _MI_ProviderFT {
1137  MI_ProviderFT_Load Load;
1138  MI_ProviderFT_Unload Unload;
1139  MI_ProviderFT_GetInstance GetInstance;
1140  MI_ProviderFT_EnumerateInstances EnumerateInstances;
1141  MI_ProviderFT_CreateInstance CreateInstance;
1142  MI_ProviderFT_ModifyInstance ModifyInstance;
1143  MI_ProviderFT_DeleteInstance DeleteInstance;
1144  MI_ProviderFT_AssociatorInstances AssociatorInstances;
1145  MI_ProviderFT_ReferenceInstances ReferenceInstances;
1146  MI_ProviderFT_EnableIndications EnableIndications;
1147  MI_ProviderFT_DisableIndications DisableIndications;
1148  MI_ProviderFT_Subscribe Subscribe;
1149  MI_ProviderFT_Unsubscribe Unsubscribe;
1150  MI_ProviderFT_Invoke Invoke;
1151};
1152
1153#define MI_MODULE_FLAG_STANDARD_QUALIFIERS (1 << 0)
1154#define MI_MODULE_FLAG_DESCRIPTIONS (1 << 1)
1155#define MI_MODULE_FLAG_VALUES (1 << 2)
1156#define MI_MODULE_FLAG_MAPPING_STRINGS (1 << 3)
1157#define MI_MODULE_FLAG_BOOLEANS (1 << 4)
1158#define MI_MODULE_FLAG_CPLUSPLUS (1 << 5)
1159#define MI_MODULE_FLAG_LOCALIZED (1 << 6)
1160#define MI_MODULE_FLAG_FILTER_SUPPORT (1 << 7)
1161
1162typedef void (MI_CALL *MI_Module_Load)(MI_Module_Self** self, MI_Context* context);
1163typedef void (MI_CALL *MI_Module_Unload)(MI_Module_Self* self, MI_Context* context);
1164
1165typedef struct _MI_Module {
1166  MI_Uint32 version;
1167  MI_Uint32 generatorVersion;
1168  MI_Uint32 flags;
1169  MI_Uint32 charSize;
1170  MI_SchemaDecl* schemaDecl;
1171  MI_Module_Load Load;
1172  MI_Module_Unload Unload;
1173  const MI_ProviderFT* dynamicProviderFT;
1174} MI_Module;
1175
1176struct _MI_InstanceFT {
1177  MI_Result (MI_CALL *Clone)(const MI_Instance* self, MI_Instance** newInstance);
1178  MI_Result (MI_CALL *Destruct)(MI_Instance* self);
1179  MI_Result (MI_CALL *Delete)(MI_Instance* self);
1180  MI_Result (MI_CALL *IsA)(const MI_Instance* self, const MI_ClassDecl* classDecl, MI_Boolean* flag);
1181  MI_Result (MI_CALL *GetClassName)(const MI_Instance* self, const MI_Char** className);
1182  MI_Result (MI_CALL *SetNameSpace)(MI_Instance* self, const MI_Char* nameSpace);
1183  MI_Result (MI_CALL *GetNameSpace)(const MI_Instance* self, const MI_Char** nameSpace);
1184  MI_Result (MI_CALL *GetElementCount)(const MI_Instance* self, MI_Uint32* count);
1185  MI_Result (MI_CALL *AddElement)(MI_Instance* self, const MI_Char* name, const MI_Value* value, MI_Type type, MI_Uint32 flags);
1186  MI_Result (MI_CALL *SetElement)(MI_Instance* self, const MI_Char* name, const MI_Value* value, MI_Type type, MI_Uint32 flags);
1187  MI_Result (MI_CALL *SetElementAt)(MI_Instance* self, MI_Uint32 index, const MI_Value* value, MI_Type type, MI_Uint32 flags);
1188  MI_Result (MI_CALL *GetElement)(const MI_Instance* self, const MI_Char* name, MI_Value* value, MI_Type* type, MI_Uint32* flags, MI_Uint32* index);
1189  MI_Result (MI_CALL *GetElementAt)(const MI_Instance* self, MI_Uint32 index, const MI_Char** name, MI_Value* value, MI_Type* type, MI_Uint32* flags);
1190  MI_Result (MI_CALL *ClearElement)(MI_Instance* self, const MI_Char* name);
1191  MI_Result (MI_CALL *ClearElementAt)(MI_Instance* self, MI_Uint32 index);
1192  MI_Result (MI_CALL *GetServerName)(const MI_Instance* self, const MI_Char** name);
1193  MI_Result (MI_CALL *SetServerName)(MI_Instance* self, const MI_Char* name);
1194  MI_Result (MI_CALL *GetClass)(const MI_Instance* self, MI_Class** instanceClass);
1195};
1196
1197struct _MI_InstanceExFT {
1198  MI_InstanceFT parent;
1199  MI_Result (MI_CALL *Normalize)(MI_Instance** self);
1200};
1201
1202struct _MI_Instance {
1203  const MI_InstanceFT* ft;
1204  const MI_ClassDecl* classDecl;
1205  const MI_Char* serverName;
1206  const MI_Char* nameSpace;
1207  ptrdiff_t reserved[4];
1208};
1209
1210MI_INLINE MI_Result MI_INLINE_CALL MI_Instance_Clone(const MI_Instance* self, MI_Instance** newInstance) {
1211  if (self && self->ft) {
1212    return self->ft->Clone(self, newInstance);
1213  } else {
1214    return MI_RESULT_INVALID_PARAMETER;
1215  }
1216}
1217
1218MI_INLINE MI_Result MI_INLINE_CALL MI_Instance_Destruct(MI_Instance* self) {
1219  if (self && self->ft) {
1220    return self->ft->Destruct(self);
1221  } else {
1222    return MI_RESULT_INVALID_PARAMETER;
1223  }
1224}
1225
1226MI_INLINE MI_Result MI_INLINE_CALL MI_Instance_Delete(MI_Instance* self) {
1227  if (self && self->ft) {
1228    return self->ft->Delete(self);
1229  } else {
1230    return MI_RESULT_INVALID_PARAMETER;
1231  }
1232}
1233
1234MI_INLINE MI_Result MI_INLINE_CALL MI_Instance_IsA(const MI_Instance* self, const MI_ClassDecl* classDecl, MI_Boolean* flag) {
1235  if (self && self->ft) {
1236    return self->ft->IsA(self, classDecl, flag);
1237  } else {
1238    return MI_RESULT_INVALID_PARAMETER;
1239  }
1240}
1241
1242MI_INLINE MI_Result MI_INLINE_CALL MI_Instance_GetClassName(const MI_Instance* self, const MI_Char** className) {
1243  if (self && self->ft) {
1244    return self->ft->GetClassName(self, className);
1245  } else {
1246    return MI_RESULT_INVALID_PARAMETER;
1247  }
1248}
1249
1250MI_INLINE MI_Result MI_INLINE_CALL MI_Instance_SetNameSpace(MI_Instance* self, const MI_Char* nameSpace) {
1251  if (self && self->ft) {
1252    return self->ft->SetNameSpace(self, nameSpace);
1253  } else {
1254    return MI_RESULT_INVALID_PARAMETER;
1255  }
1256}
1257
1258MI_INLINE MI_Result MI_INLINE_CALL MI_Instance_GetNameSpace(const MI_Instance* self, const MI_Char** nameSpace) {
1259  if (self && self->ft) {
1260    return self->ft->GetNameSpace(self, nameSpace);
1261  } else {
1262    return MI_RESULT_INVALID_PARAMETER;
1263  }
1264}
1265
1266MI_INLINE MI_Result MI_INLINE_CALL MI_Instance_GetElementCount(const MI_Instance* self, MI_Uint32* count) {
1267  if (self && self->ft) {
1268    return self->ft->GetElementCount(self, count);
1269  } else {
1270    return MI_RESULT_INVALID_PARAMETER;
1271  }
1272}
1273
1274MI_INLINE MI_Result MI_INLINE_CALL MI_Instance_AddElement(MI_Instance* self, const MI_Char* name, const MI_Value* value, MI_Type type, MI_Uint32 flags) {
1275  if (self && self->ft) {
1276    return self->ft->AddElement(self, name, value, type, flags);
1277  } else {
1278    return MI_RESULT_INVALID_PARAMETER;
1279  }
1280}
1281
1282MI_INLINE MI_Result MI_INLINE_CALL MI_Instance_SetElementAt(MI_Instance* self, MI_Uint32 index, const MI_Value* value, MI_Type type, MI_Uint32 flags) {
1283  if (self && self->ft) {
1284    return self->ft->SetElementAt(self, index, value, type, flags);
1285  } else {
1286    return MI_RESULT_INVALID_PARAMETER;
1287  }
1288}
1289
1290MI_INLINE MI_Result MI_INLINE_CALL MI_Instance_SetElement(MI_Instance* self, const MI_Char* name, const MI_Value* value, MI_Type type, MI_Uint32 flags) {
1291  if (self && self->ft) {
1292    return self->ft->SetElement(self, name, value, type, flags);
1293  } else {
1294    return MI_RESULT_INVALID_PARAMETER;
1295  }
1296}
1297
1298MI_INLINE MI_Result MI_INLINE_CALL MI_Instance_GetElement(const MI_Instance* self, const MI_Char* name, MI_Value* value, MI_Type* type, MI_Uint32* flags, MI_Uint32* index) {
1299  if (self && self->ft) {
1300    return self->ft->GetElement(self, name, value, type, flags, index);
1301  } else {
1302    return MI_RESULT_INVALID_PARAMETER;
1303  }
1304}
1305
1306MI_INLINE MI_Result MI_INLINE_CALL MI_Instance_GetElementAt(const MI_Instance* self, MI_Uint32 index, const MI_Char** name, MI_Value* value, MI_Type* type, MI_Uint32* flags) {
1307  if (self && self->ft) {
1308    return self->ft->GetElementAt(self, index, name, value, type, flags);
1309  } else {
1310    return MI_RESULT_INVALID_PARAMETER;
1311  }
1312}
1313
1314MI_INLINE MI_Result MI_INLINE_CALL MI_Instance_ClearElement(MI_Instance* self, const MI_Char* name) {
1315  if (self && self->ft) {
1316    return self->ft->ClearElement(self, name);
1317  } else {
1318    return MI_RESULT_INVALID_PARAMETER;
1319  }
1320}
1321
1322MI_INLINE MI_Result MI_INLINE_CALL MI_Instance_ClearElementAt(MI_Instance* self, MI_Uint32 index) {
1323  if (self && self->ft) {
1324    return self->ft->ClearElementAt(self, index);
1325  } else {
1326    return MI_RESULT_INVALID_PARAMETER;
1327  }
1328}
1329
1330MI_INLINE MI_Result MI_INLINE_CALL MI_Instance_GetServerName(const MI_Instance* self, const MI_Char** name) {
1331  if (self && self->ft) {
1332    return self->ft->GetServerName(self, name);
1333  } else {
1334    return MI_RESULT_INVALID_PARAMETER;
1335  }
1336}
1337
1338MI_INLINE MI_Result MI_INLINE_CALL MI_Instance_SetServerName(MI_Instance* self, const MI_Char* name) {
1339  if (self && self->ft) {
1340    return self->ft->SetServerName(self, name);
1341  } else {
1342    return MI_RESULT_INVALID_PARAMETER;
1343  }
1344}
1345
1346MI_INLINE MI_Result MI_INLINE_CALL MI_Instance_GetClass(const MI_Instance* self, MI_Class** instanceClass) {
1347  if (self && self->ft) {
1348    return self->ft->GetClass(self, instanceClass);
1349  } else {
1350    return MI_RESULT_INVALID_PARAMETER;
1351  }
1352}
1353
1354MI_INLINE MI_Result MI_INLINE_CALL MI_Instance_Normalize(MI_Instance** self) {
1355  MI_Instance* inst = *self;
1356  if (inst && inst->ft) {
1357    if (inst->classDecl->flags & MI_FLAG_EXTENDED) {
1358      MI_InstanceExFT* ft = (MI_InstanceExFT*)inst->ft;
1359      return ft->Normalize(self);
1360    } else {
1361      return MI_RESULT_OK;
1362    }
1363  } else {
1364    return MI_RESULT_INVALID_PARAMETER;
1365  }
1366}
1367
1368#define MI_MAX_LOCALE_SIZE 128
1369
1370typedef enum _MI_LocaleType {
1371  MI_LOCALE_TYPE_REQUESTED_UI,
1372  MI_LOCALE_TYPE_REQUESTED_DATA,
1373  MI_LOCALE_TYPE_CLOSEST_UI,
1374  MI_LOCALE_TYPE_CLOSEST_DATA
1375} MI_LocaleType;
1376
1377typedef enum _MI_CancellationReason {
1378  MI_REASON_NONE,
1379  MI_REASON_TIMEOUT,
1380  MI_REASON_SHUTDOWN,
1381  MI_REASON_SERVICESTOP
1382} MI_CancellationReason;
1383
1384typedef void (MI_CALL *MI_CancelCallback)(MI_CancellationReason reason, void* callbackData);
1385
1386#define MI_WRITEMESSAGE_CHANNEL_WARNING 0
1387#define MI_WRITEMESSAGE_CHANNEL_VERBOSE 1
1388#define MI_WRITEMESSAGE_CHANNEL_DEBUG 2
1389
1390#define MI_RESULT_TYPE_MI MI_T("MI")
1391#define MI_RESULT_TYPE_HRESULT MI_T("HRESULT")
1392#define MI_RESULT_TYPE_WIN32 MI_T("WIN32")
1393#define MI_RESULT_TYPE_ERRNO MI_T("ERRNO")
1394
1395struct _MI_ContextFT {
1396  MI_Result (MI_CALL *PostResult)(MI_Context* context, MI_Result result);
1397  MI_Result (MI_CALL *PostInstance)(MI_Context* context, const MI_Instance* instance);
1398  MI_Result (MI_CALL *PostIndication)(MI_Context* context, const MI_Instance* indication, MI_Uint32 subscriptionIDCount, const MI_Char* bookmark);
1399  MI_Result (MI_CALL *ConstructInstance)(MI_Context* context, const MI_ClassDecl* classDecl, MI_Instance* instance);
1400  MI_Result (MI_CALL *ConstructParameters)(MI_Context* context, const MI_MethodDecl* methodDecl, MI_Instance* instance);
1401  MI_Result (MI_CALL *NewInstance)(MI_Context* context, const MI_ClassDecl* classDecl, MI_Instance** instance);
1402  MI_Result (MI_CALL *NewDynamicInstance)(MI_Context* context, const MI_Char* className, MI_Uint32 flags, MI_Instance** instance);
1403  MI_Result (MI_CALL *NewParameters)(MI_Context* context, const MI_MethodDecl* methodDecl, MI_Instance** instance);
1404  MI_Result (MI_CALL *Canceled)(const MI_Context* context, MI_Boolean* flag);
1405  MI_Result (MI_CALL *GetLocale)(const MI_Context* context, MI_LocaleType localeType, MI_Char locale[MI_MAX_LOCALE_SIZE]);
1406  MI_Result (MI_CALL *RegisterCancel)(MI_Context* context, MI_CancelCallback callback, void* callbackData);
1407  MI_Result (MI_CALL *RequestUnload)(MI_Context* context);
1408  MI_Result (MI_CALL *RefuseUnload)(MI_Context* context);
1409  MI_Result (MI_CALL *GetLocalSession)(const MI_Context* context, MI_Session* session);
1410  MI_Result (MI_CALL *SetStringOption)(MI_Context* context, const MI_Char* name, const MI_Char* value);
1411  MI_Result (MI_CALL *GetStringOption)(MI_Context* context, const MI_Char* name, const MI_Char** value);
1412  MI_Result (MI_CALL *GetNumberOption)(MI_Context* context, const MI_Char *name, MI_Uint32* value);
1413  MI_Result (MI_CALL *GetCustomOption)(MI_Context* context, const MI_Char* name, MI_Type* valueType, MI_Value* value);
1414  MI_Result (MI_CALL *GetCustomOptionCount)(MI_Context* context, MI_Uint32* count);
1415  MI_Result (MI_CALL *GetCustomOptionAt)(MI_Context* context, MI_Uint32 index, const MI_Char** name, MI_Type* valueType, MI_Value* value);
1416  MI_Result (MI_CALL *WriteMessage)(MI_Context* context, MI_Uint32 channel, const MI_Char* message);
1417  MI_Result (MI_CALL *WriteProgress)(MI_Context* context, const MI_Char* activity, const MI_Char* currentOperation, const MI_Char* statusDescription, MI_Uint32 percentComplete, MI_Uint32 secondsRemaining);
1418  MI_Result (MI_CALL *WriteStreamParameter)(MI_Context* context, const MI_Char* name, const MI_Value* value, MI_Type type, MI_Uint32 flags);
1419  MI_Result (MI_CALL *WriteCimError)(MI_Context* context, const MI_Instance *error, MI_Boolean *flag);
1420  MI_Result (MI_CALL *PromptUser)(MI_Context* context, const MI_Char* message, MI_PromptType promptType, MI_Boolean* result );
1421  MI_Result (MI_CALL *ShouldProcess)(MI_Context* context, const MI_Char* target, const MI_Char* action, MI_Boolean* result);
1422  MI_Result (MI_CALL *ShouldContinue)(MI_Context* context, const MI_Char* message, MI_Boolean* result);
1423  MI_Result (MI_CALL *PostError)(MI_Context* context, MI_Uint32 resultCode, const MI_Char* resultType, const MI_Char* errorMessage);
1424  MI_Result (MI_CALL *PostCimError)(MI_Context* context, const MI_Instance *error);
1425  MI_Result (MI_CALL *WriteError)(MI_Context* context, MI_Uint32 resultCode, const MI_Char* resultType, const MI_Char* errorMessage, MI_Boolean *flag);
1426};
1427
1428struct _MI_Context {
1429  const MI_ContextFT* ft;
1430  ptrdiff_t reserved[3];
1431};
1432
1433MI_INLINE MI_Result MI_INLINE_CALL MI_Context_PostResult(MI_Context* context, MI_Result result) {
1434  if (context && context->ft) {
1435    return context->ft->PostResult(context, result);
1436  } else {
1437    return MI_RESULT_INVALID_PARAMETER;
1438  }
1439}
1440
1441MI_INLINE MI_Result MI_INLINE_CALL MI_Context_PostCimError(MI_Context* context, const MI_Instance *error) {
1442  if (context && context->ft) {
1443    return context->ft->PostCimError(context, error);
1444  } else {
1445    return MI_RESULT_INVALID_PARAMETER;
1446  }
1447}
1448
1449MI_INLINE MI_Result MI_INLINE_CALL MI_Context_PostError(MI_Context* context, MI_Uint32 resultCode, const MI_Char* resultType, const MI_Char* errorMessage) {
1450  if (context && context->ft) {
1451    return context->ft->PostError(context, resultCode, resultType, errorMessage);
1452  } else {
1453    return MI_RESULT_INVALID_PARAMETER;
1454  }
1455}
1456
1457MI_INLINE MI_Result MI_INLINE_CALL MI_Context_PostInstance(MI_Context* context, const MI_Instance* instance) {
1458  if (context && context->ft) {
1459    return context->ft->PostInstance(context, instance);
1460  } else {
1461    return MI_RESULT_INVALID_PARAMETER;
1462  }
1463}
1464
1465MI_INLINE MI_Result MI_INLINE_CALL MI_Context_PostIndication(MI_Context* context, const MI_Instance* indication, MI_Uint32 subscriptionIDCount, const MI_Char* bookmark) {
1466  if (context && context->ft) {
1467    return context->ft->PostIndication(context, indication, subscriptionIDCount, bookmark);
1468  } else {
1469    return MI_RESULT_INVALID_PARAMETER;
1470  }
1471}
1472
1473MI_INLINE MI_Result MI_INLINE_CALL MI_Context_ConstructInstance(MI_Context* context, const MI_ClassDecl* classDecl, MI_Instance* instance) {
1474  if (context && context->ft) {
1475    return context->ft->ConstructInstance(context, classDecl, instance);
1476  } else {
1477    return MI_RESULT_INVALID_PARAMETER;
1478  }
1479}
1480
1481MI_INLINE MI_Result MI_INLINE_CALL MI_Context_ConstructParameters(MI_Context* context, const MI_MethodDecl* methodDecl, MI_Instance* instance) {
1482  if (context && context->ft) {
1483    return context->ft->ConstructParameters(context, methodDecl, instance);
1484  } else {
1485    return MI_RESULT_INVALID_PARAMETER;
1486  }
1487}
1488
1489MI_INLINE MI_Result MI_INLINE_CALL MI_Context_NewInstance(MI_Context* context, const MI_ClassDecl* classDecl, MI_Instance** instance) {
1490  if (context && context->ft) {
1491    return context->ft->NewInstance(context, classDecl, instance);
1492  } else {
1493    return MI_RESULT_INVALID_PARAMETER;
1494  }
1495}
1496
1497MI_INLINE MI_Result MI_INLINE_CALL MI_Context_NewDynamicInstance(MI_Context* context, const MI_Char* className, MI_Uint32 flags, MI_Instance** instance) {
1498  if (context && context->ft) {
1499    return context->ft->NewDynamicInstance(context, className, flags, instance);
1500  } else {
1501    return MI_RESULT_INVALID_PARAMETER;
1502  }
1503}
1504
1505MI_INLINE MI_Result MI_INLINE_CALL MI_Context_NewParameters(MI_Context* context, const MI_MethodDecl* methodDecl, MI_Instance** instance) {
1506  if (context && context->ft) {
1507    return context->ft->NewParameters(context, methodDecl, instance);
1508  } else {
1509    return MI_RESULT_INVALID_PARAMETER;
1510  }
1511}
1512
1513MI_INLINE MI_Result MI_INLINE_CALL MI_Context_Canceled(const MI_Context* context, MI_Boolean* flag) {
1514  if (context && context->ft) {
1515    return context->ft->Canceled(context, flag);
1516  } else {
1517    return MI_RESULT_INVALID_PARAMETER;
1518  }
1519}
1520
1521MI_INLINE MI_Result MI_INLINE_CALL MI_Context_GetLocale(const MI_Context* context, MI_LocaleType localeType, MI_Char locale[MI_MAX_LOCALE_SIZE]) {
1522  if (locale) {
1523    locale[0] = L'\0';
1524  }
1525  if (context && context->ft) {
1526    return context->ft->GetLocale(context, localeType, locale);
1527  } else {
1528    return MI_RESULT_INVALID_PARAMETER;
1529  }
1530}
1531
1532MI_INLINE MI_Result MI_INLINE_CALL MI_Context_RegisterCancel(MI_Context* context, MI_CancelCallback callback, void* callbackData) {
1533  if (context && context->ft) {
1534    return context->ft->RegisterCancel(context, callback, callbackData);
1535  } else {
1536    return MI_RESULT_INVALID_PARAMETER;
1537  }
1538}
1539
1540MI_INLINE MI_Result MI_INLINE_CALL MI_Context_RequestUnload(MI_Context* context) {
1541  if (context && context->ft) {
1542    return context->ft->RequestUnload(context);
1543  } else {
1544    return MI_RESULT_INVALID_PARAMETER;
1545  }
1546}
1547
1548MI_INLINE MI_Result MI_INLINE_CALL MI_Context_RefuseUnload(MI_Context* context) {
1549  if (context && context->ft) {
1550    return context->ft->RefuseUnload(context);
1551  } else {
1552    return MI_RESULT_INVALID_PARAMETER;
1553  }
1554};
1555
1556MI_INLINE MI_Result MI_INLINE_CALL MI_Context_GetLocalSession(const MI_Context* context, MI_Session* session) {
1557  if (context && context->ft) {
1558    return context->ft->GetLocalSession(context, session);
1559  } else {
1560    return MI_RESULT_INVALID_PARAMETER;
1561  }
1562}
1563
1564MI_INLINE MI_Result MI_INLINE_CALL MI_Context_SetStringOption(MI_Context* context, const MI_Char* name, const MI_Char* value) {
1565  if (context && context->ft) {
1566    return context->ft->SetStringOption(context, name, value);
1567  } else {
1568    return MI_RESULT_INVALID_PARAMETER;
1569  }
1570}
1571
1572MI_INLINE MI_Result MI_INLINE_CALL MI_Context_GetStringOption(MI_Context* context, const MI_Char* name, const MI_Char** value) {
1573  if (context && context->ft) {
1574    return context->ft->GetStringOption(context, name, value);
1575  } else {
1576    return MI_RESULT_INVALID_PARAMETER;
1577  }
1578}
1579
1580MI_INLINE MI_Result MI_INLINE_CALL MI_Context_GetNumberOption(MI_Context* context, const MI_Char* name, MI_Uint32* value) {
1581  if (context && context->ft) {
1582    return context->ft->GetNumberOption(context, name, value);
1583  } else {
1584    return MI_RESULT_INVALID_PARAMETER;
1585  }
1586}
1587
1588MI_INLINE MI_Result MI_INLINE_CALL MI_Context_GetCustomOption(MI_Context* context, const MI_Char* name, MI_Type* valueType, MI_Value* value) {
1589  if (context && context->ft) {
1590    return context->ft->GetCustomOption(context, name, valueType,value);
1591  } else {
1592    return MI_RESULT_INVALID_PARAMETER;
1593  }
1594}
1595
1596MI_INLINE MI_Result MI_INLINE_CALL MI_Context_GetCustomOptionCount(MI_Context* context, MI_Uint32* count) {
1597  if (context && context->ft) {
1598    return context->ft->GetCustomOptionCount(context, count);
1599  } else {
1600    return MI_RESULT_INVALID_PARAMETER;
1601  }
1602}
1603
1604MI_INLINE MI_Result MI_INLINE_CALL MI_Context_GetCustomOptionAt(MI_Context* context, MI_Uint32 index, const MI_Char** name, MI_Type* valueType, MI_Value* value) {
1605  if (context && context->ft) {
1606    return context->ft->GetCustomOptionAt(context, index, name, valueType,value);
1607  } else {
1608    return MI_RESULT_INVALID_PARAMETER;
1609  }
1610}
1611
1612MI_INLINE MI_Result MI_INLINE_CALL MI_Context_ShouldProcess(MI_Context* context, const MI_Char *target, const MI_Char* action, MI_Boolean* flag) {
1613  if (context && context->ft) {
1614    return context->ft->ShouldProcess(context, target, action , flag);
1615  } else {
1616    return MI_RESULT_INVALID_PARAMETER;
1617  }
1618}
1619
1620MI_INLINE MI_Result MI_INLINE_CALL MI_Context_ShouldContinue(MI_Context* context, const MI_Char* message, MI_Boolean* flag) {
1621  if (context && context->ft) {
1622    return context->ft->ShouldContinue(context, message, flag);
1623  } else {
1624    return MI_RESULT_INVALID_PARAMETER;
1625  }
1626}
1627
1628MI_INLINE MI_Result MI_INLINE_CALL MI_Context_PromptUser(MI_Context* context, const MI_Char* message, MI_PromptType promptType, MI_Boolean*flag ) {
1629  if (context && context->ft) {
1630    return context->ft->PromptUser(context, message, promptType, flag);
1631  } else {
1632    return MI_RESULT_INVALID_PARAMETER;
1633  }
1634}
1635
1636MI_INLINE MI_Result MI_INLINE_CALL MI_Context_WriteError(MI_Context* context, MI_Uint32 resultCode, const MI_Char* resultType, const MI_Char* errorMessage, MI_Boolean *flag) {
1637  if (context && context->ft) {
1638    return context->ft->WriteError(context, resultCode, resultType, errorMessage, flag);
1639  } else {
1640    return MI_RESULT_INVALID_PARAMETER;
1641  }
1642}
1643
1644MI_INLINE MI_Result MI_INLINE_CALL MI_Context_WriteCimError(MI_Context* context, const MI_Instance *error, MI_Boolean *flag) {
1645  if (context && context->ft) {
1646    return context->ft->WriteCimError(context, error, flag);
1647  } else {
1648    return MI_RESULT_INVALID_PARAMETER;
1649  }
1650}
1651
1652MI_INLINE MI_Result MI_INLINE_CALL MI_Context_WriteMessage(MI_Context* context, MI_Uint32 channel, const MI_Char* message) {
1653  if (context && context->ft) {
1654    return context->ft->WriteMessage(context, channel, message);
1655  } else {
1656    return MI_RESULT_INVALID_PARAMETER;
1657  }
1658}
1659
1660MI_INLINE MI_Result MI_INLINE_CALL MI_Context_WriteProgress(MI_Context* context, const MI_Char* activity, const MI_Char* currentOperation, const MI_Char* statusDescription, MI_Uint32 percentComplete, MI_Uint32 secondsRemaining) {
1661  if (context && context->ft) {
1662    return context->ft->WriteProgress(context, activity, currentOperation, statusDescription, percentComplete, secondsRemaining);
1663  } else {
1664    return MI_RESULT_INVALID_PARAMETER;
1665  }
1666}
1667
1668MI_INLINE MI_Result MI_INLINE_CALL MI_Context_WriteStreamParameter(MI_Context* self, const MI_Char* name, const MI_Value* value, MI_Type type, MI_Uint32 flags) {
1669  if (self && self->ft) {
1670    return self->ft->WriteStreamParameter(self, name, value, type, flags);
1671  } else {
1672    return MI_RESULT_INVALID_PARAMETER;
1673  }
1674}
1675
1676MI_INLINE MI_Result MI_INLINE_CALL MI_Context_WriteWarning(MI_Context* context, const MI_Char* message) {
1677  if (context && context->ft) {
1678    return context->ft->WriteMessage(context, MI_WRITEMESSAGE_CHANNEL_WARNING, message);
1679  } else {
1680    return MI_RESULT_INVALID_PARAMETER;
1681  }
1682}
1683
1684MI_INLINE MI_Result MI_INLINE_CALL MI_Context_WriteVerbose(MI_Context* context, const MI_Char* message) {
1685  if (context && context->ft) {
1686    return context->ft->WriteMessage(context, MI_WRITEMESSAGE_CHANNEL_VERBOSE, message);
1687  } else {
1688    return MI_RESULT_INVALID_PARAMETER;
1689  }
1690}
1691
1692MI_INLINE MI_Result MI_INLINE_CALL MI_Context_WriteDebug(MI_Context* context, const MI_Char* message) {
1693  if (context && context->ft) {
1694    return context->ft->WriteMessage(context, MI_WRITEMESSAGE_CHANNEL_DEBUG, message);
1695  } else {
1696    return MI_RESULT_INVALID_PARAMETER;
1697  }
1698}
1699
1700#define MI_InstanceOf(inst) (&(inst)->__instance)
1701
1702# pragma pack(pop)
1703
1704#endif /* _MI_h */
1705
1706#ifndef __MI_C_API_H
1707#define __MI_C_API_H
1708
1709#ifndef MI_CALL_VERSION
1710#define MI_CALL_VERSION 1
1711#endif
1712
1713#if (MI_CALL_VERSION > 1)
1714#error "Unsupported version of MI_CALL_VERSION. This SDK only supports version 1."
1715#endif
1716
1717#ifdef __cplusplus
1718extern "C" {
1719#endif
1720
1721typedef MI_Module* (MI_MAIN_CALL *MI_MainFunction)(MI_Server* server);
1722
1723typedef struct _MI_QualifierSet MI_QualifierSet;
1724
1725typedef struct _MI_QualifierSetFT {
1726  MI_Result (MI_CALL *GetQualifierCount)(const MI_QualifierSet *self, MI_Uint32 *count);
1727  MI_Result (MI_CALL *GetQualifierAt)(const MI_QualifierSet *self, MI_Uint32 index, const MI_Char **name, MI_Type *qualifierType, MI_Uint32 *qualifierFlags, MI_Value *qualifierValue);
1728  MI_Result (MI_CALL *GetQualifier)(const MI_QualifierSet *self, const MI_Char *name, MI_Type *qualifierType, MI_Uint32 *qualifierFlags, MI_Value *qualifierValue, MI_Uint32 *index);
1729} MI_QualifierSetFT;
1730
1731struct _MI_QualifierSet {
1732  MI_Uint64 reserved1;
1733  ptrdiff_t reserved2;
1734  const MI_QualifierSetFT *ft;
1735};
1736
1737typedef struct _MI_ParameterSet MI_ParameterSet;
1738
1739typedef struct _MI_ParameterSetFT {
1740  MI_Result (MI_CALL *GetMethodReturnType)(const MI_ParameterSet *self, MI_Type *returnType, MI_QualifierSet *qualifierSet);
1741  MI_Result (MI_CALL *GetParameterCount)(const MI_ParameterSet *self, MI_Uint32 *count);
1742  MI_Result (MI_CALL *GetParameterAt)(const MI_ParameterSet *self, MI_Uint32 index, const MI_Char **name, MI_Type *parameterType, MI_Char **referenceClass, MI_QualifierSet *qualifierSet);
1743  MI_Result (MI_CALL *GetParameter)(const MI_ParameterSet *self, const MI_Char *name, MI_Type *parameterType, MI_Char **referenceClass, MI_QualifierSet *qualifierSet, MI_Uint32 *index);
1744} MI_ParameterSetFT;
1745
1746struct _MI_ParameterSet {
1747  MI_Uint64 reserved1;
1748  ptrdiff_t reserved2;
1749  const MI_ParameterSetFT * ft;
1750};
1751
1752typedef struct _MI_ClassFT {
1753  MI_Result (MI_CALL *GetClassName)(const MI_Class* self, const MI_Char** className);
1754  MI_Result (MI_CALL *GetNameSpace)(const MI_Class* self, const MI_Char** nameSpace);
1755  MI_Result (MI_CALL *GetServerName)(const MI_Class* self, const MI_Char** serverName);
1756  MI_Result (MI_CALL *GetElementCount)(const MI_Class* self, MI_Uint32* count);
1757  MI_Result (MI_CALL *GetElement)(const MI_Class* self, const MI_Char* name, MI_Value* value, MI_Boolean* valueExists, MI_Type* type, MI_Char **referenceClass, MI_QualifierSet *qualifierSet, MI_Uint32* flags, MI_Uint32* index);
1758  MI_Result (MI_CALL *GetElementAt)(const MI_Class* self, MI_Uint32 index, const MI_Char** name, MI_Value* value, MI_Boolean* valueExists, MI_Type* type, MI_Char **referenceClass, MI_QualifierSet *qualifierSet, MI_Uint32* flags);
1759  MI_Result (MI_CALL *GetClassQualifierSet)(const MI_Class* self, MI_QualifierSet *qualifierSet);
1760  MI_Result (MI_CALL *GetMethodCount)(const MI_Class* self, MI_Uint32* count);
1761  MI_Result (MI_CALL *GetMethodAt)(const MI_Class *self, MI_Uint32 index, const MI_Char **name, MI_QualifierSet *qualifierSet, MI_ParameterSet *parameterSet);
1762  MI_Result (MI_CALL *GetMethod)(const MI_Class *self, const MI_Char *name, MI_QualifierSet *qualifierSet, MI_ParameterSet *parameterSet, MI_Uint32 *index);
1763  MI_Result (MI_CALL *GetParentClassName)(const MI_Class *self, const MI_Char **name);
1764  MI_Result (MI_CALL *GetParentClass)(const MI_Class *self, MI_Class **parentClass);
1765  MI_Result (MI_CALL *Delete)(MI_Class* self);
1766  MI_Result (MI_CALL *Clone)(const MI_Class* self, MI_Class** newClass);
1767} MI_ClassFT;
1768
1769struct _MI_Class {
1770  const MI_ClassFT *ft;
1771  MI_CONST MI_ClassDecl *classDecl;
1772  MI_CONST MI_Char *namespaceName;
1773  MI_CONST MI_Char *serverName;
1774  ptrdiff_t reserved[4];
1775};
1776
1777typedef struct _MI_Application MI_Application;
1778typedef struct _MI_Session MI_Session;
1779typedef struct _MI_Operation MI_Operation;
1780typedef struct _MI_HostedProvider MI_HostedProvider;
1781typedef struct _MI_DestinationOptions MI_DestinationOptions;
1782typedef struct _MI_OperationOptions MI_OperationOptions;
1783
1784typedef enum _MI_OperationCallback_ResponseType {
1785  MI_OperationCallback_ResponseType_No,
1786  MI_OperationCallback_ResponseType_Yes,
1787  MI_OperationCallback_ResponseType_NoToAll,
1788  MI_OperationCallback_ResponseType_YesToAll
1789} MI_OperationCallback_ResponseType;
1790
1791typedef void (MI_CALL *MI_OperationCallback_PromptUser)(MI_Operation *operation, void *callbackContext, const MI_Char *message, MI_PromptType promptType, MI_Result (MI_CALL * promptUserResult)(MI_Operation *operation, MI_OperationCallback_ResponseType response));
1792typedef void (MI_CALL *MI_OperationCallback_WriteError)(MI_Operation *operation, void *callbackContext, MI_Instance*instance, MI_Result (MI_CALL * writeErrorResult)(MI_Operation *operation, MI_OperationCallback_ResponseType response));
1793
1794#define MI_WRITEMESSAGE_CHANNEL_WARNING 0
1795#define MI_WRITEMESSAGE_CHANNEL_VERBOSE 1
1796#define MI_WRITEMESSAGE_CHANNEL_DEBUG 2
1797
1798typedef void (MI_CALL *MI_OperationCallback_WriteMessage)(MI_Operation *operation, void *callbackContext, MI_Uint32 channel, const MI_Char *message);
1799typedef void (MI_CALL *MI_OperationCallback_WriteProgress)(MI_Operation *operation, void *callbackContext, const MI_Char *activity, const MI_Char *currentOperation, const MI_Char *statusDescription, MI_Uint32 percentageComplete, MI_Uint32 secondsRemaining);
1800typedef void (MI_CALL *MI_OperationCallback_Instance)(MI_Operation *operation, void *callbackContext, const MI_Instance *instance, MI_Boolean moreResults, MI_Result resultCode, const MI_Char *errorString, const MI_Instance *errorDetails, MI_Result (MI_CALL * resultAcknowledgement)(MI_Operation *operation));
1801typedef void (MI_CALL *MI_OperationCallback_StreamedParameter)(MI_Operation *operation, void *callbackContext, const MI_Char *parameterName, MI_Type resultType, const MI_Value *result, MI_Result (MI_CALL * resultAcknowledgement)(MI_Operation *operation));
1802typedef void (MI_CALL *MI_OperationCallback_Indication)(MI_Operation *operation, void *callbackContext, const MI_Instance *instance, const MI_Char *bookmark, const MI_Char *machineID, MI_Boolean moreResults, MI_Result resultCode, const MI_Char *errorString, const MI_Instance *errorDetails, MI_Result (MI_CALL * resultAcknowledgement)(MI_Operation *operation));
1803typedef void (MI_CALL *MI_OperationCallback_Class)(MI_Operation *operation, void *callbackContext, const MI_Class *classResult, MI_Boolean moreResults, MI_Result resultCode, const MI_Char *errorString, const MI_Instance *errorDetails, MI_Result (MI_CALL * resultAcknowledgement)(MI_Operation *operation));
1804
1805typedef struct _MI_OperationCallbacks {
1806  void *callbackContext;
1807  MI_OperationCallback_PromptUser promptUser;
1808  MI_OperationCallback_WriteError writeError;
1809  MI_OperationCallback_WriteMessage writeMessage;
1810  MI_OperationCallback_WriteProgress writeProgress;
1811  MI_OperationCallback_Instance instanceResult;
1812  MI_OperationCallback_Indication indicationResult;
1813  MI_OperationCallback_Class classResult;
1814  MI_OperationCallback_StreamedParameter streamedParameterResult;
1815} MI_OperationCallbacks;
1816
1817#define MI_OPERATIONCALLBACKS_NULL {NULL}
1818
1819typedef struct _MI_SessionCallbacks {
1820  void *callbackContext;
1821  void (MI_CALL *writeMessage)(MI_Application *application, void *callbackContext, MI_Uint32 channel, const MI_Char * message);
1822  void (MI_CALL *writeError)(MI_Application *application, void *callbackContext, MI_Instance *instance);
1823} MI_SessionCallbacks;
1824
1825#define MI_SESSIONCALLBACKS_NULL {NULL}
1826
1827#define MI_OPERATIONFLAGS_AUTOMATIC_ACK_RESULTS 0x0000
1828#define MI_OPERATIONFLAGS_MANUAL_ACK_RESULTS 0x0001
1829#define MI_OPERATIONFLAGS_NO_RTTI 0x0400
1830#define MI_OPERATIONFLAGS_BASIC_RTTI 0x0002
1831#define MI_OPERATIONFLAGS_STANDARD_RTTI 0x0800
1832#define MI_OPERATIONFLAGS_FULL_RTTI 0x0004
1833#define MI_OPERATIONFLAGS_DEFAULT_RTTI 0
1834#define MI_OPERATIONFLAGS_NON_LOCALIZED_QUALIFIERS 0x0000
1835#define MI_OPERATIONFLAGS_LOCALIZED_QUALIFIERS 0x0008
1836#define MI_OPERATIONFLAGS_NON_EXPENSIVE_PROPERTIES_ONLY 0x0040
1837#define MI_OPERATIONFLAGS_EXPENSIVE_PROPERTIES 0x0040
1838#define MI_OPERATIONFLAGS_POLYMORPHISM_DEEP 0x0000
1839#define MI_OPERATIONFLAGS_POLYMORPHISM_SHALLOW 0x0080
1840#define MI_OPERATIONFLAGS_POLYMORPHISM_DEEP_BASE_PROPS_ONLY 0x0180
1841#define MI_OPERATIONFLAGS_REPORT_OPERATION_STARTED 0x0200
1842#define MI_AUTH_TYPE_DEFAULT MI_T("Default")
1843#define MI_AUTH_TYPE_NONE MI_T("None")
1844#define MI_AUTH_TYPE_DIGEST MI_T("Digest")
1845#define MI_AUTH_TYPE_NEGO_WITH_CREDS MI_T("NegoWithCreds")
1846#define MI_AUTH_TYPE_NEGO_NO_CREDS MI_T("NegoNoCreds")
1847#define MI_AUTH_TYPE_BASIC MI_T("Basic")
1848#define MI_AUTH_TYPE_KERBEROS MI_T("Kerberos")
1849#define MI_AUTH_TYPE_CLIENT_CERTS MI_T("ClientCerts")
1850#define MI_AUTH_TYPE_NTLM MI_T("Ntlmdomain")
1851#if (WINVER >= 0x600)
1852#define MI_AUTH_TYPE_CREDSSP MI_T("CredSSP")
1853#endif
1854#define MI_AUTH_TYPE_ISSUER_CERT MI_T("IssuerCert")
1855
1856typedef struct _MI_UsernamePasswordCreds {
1857  const MI_Char *domain;
1858  const MI_Char *username;
1859  const MI_Char *password;
1860} MI_UsernamePasswordCreds;
1861
1862typedef struct _MI_UserCredentials {
1863  const MI_Char *authenticationType;
1864  union {
1865    MI_UsernamePasswordCreds usernamePassword;
1866    const MI_Char *certificateThumbprint;
1867  } credentials;
1868} MI_UserCredentials;
1869
1870typedef enum _MI_SubscriptionDeliveryType {
1871  MI_SubscriptionDeliveryType_Pull = 1,
1872  MI_SubscriptionDeliveryType_Push = 2
1873} MI_SubscriptionDeliveryType;
1874
1875typedef struct _MI_SubscriptionDeliveryOptions MI_SubscriptionDeliveryOptions;
1876
1877typedef struct _MI_SubscriptionDeliveryOptionsFT {
1878  MI_Result (MI_CALL *SetString)(MI_SubscriptionDeliveryOptions *options, const MI_Char *optionName, const MI_Char *value, MI_Uint32 flags);
1879  MI_Result (MI_CALL *SetNumber)(MI_SubscriptionDeliveryOptions *options, const MI_Char *optionName, MI_Uint32 value, MI_Uint32 flags);
1880  MI_Result (MI_CALL *SetDateTime)(MI_SubscriptionDeliveryOptions *options, const MI_Char *optionName, const MI_Datetime *value, MI_Uint32 flags);
1881  MI_Result (MI_CALL *SetInterval)(MI_SubscriptionDeliveryOptions *options, const MI_Char *optionName, const MI_Interval *value, MI_Uint32 flags);
1882  MI_Result (MI_CALL *AddCredentials)(MI_SubscriptionDeliveryOptions *options, const MI_Char *optionName, const MI_UserCredentials *credentials, MI_Uint32 flags);
1883  MI_Result (MI_CALL *Delete)(MI_SubscriptionDeliveryOptions* self);
1884  MI_Result (MI_CALL *GetString)(MI_SubscriptionDeliveryOptions *options, const MI_Char *optionName, const MI_Char **value, MI_Uint32 *index, MI_Uint32 *flags);
1885  MI_Result (MI_CALL *GetNumber)(MI_SubscriptionDeliveryOptions *options, const MI_Char *optionName, MI_Uint32 *value, MI_Uint32 *index, MI_Uint32 *flags);
1886  MI_Result (MI_CALL *GetDateTime)(MI_SubscriptionDeliveryOptions *options, const MI_Char *optionName, MI_Datetime *value, MI_Uint32 *index, MI_Uint32 *flags);
1887  MI_Result (MI_CALL *GetInterval)(MI_SubscriptionDeliveryOptions *options, const MI_Char *optionName, MI_Interval *value, MI_Uint32 *index, MI_Uint32 *flags);
1888  MI_Result (MI_CALL *GetOptionCount)(MI_SubscriptionDeliveryOptions *options, MI_Uint32 *count);
1889  MI_Result (MI_CALL *GetOptionAt)(MI_SubscriptionDeliveryOptions *options, MI_Uint32 index, const MI_Char **optionName, MI_Value *value, MI_Type *type, MI_Uint32 *flags);
1890  MI_Result (MI_CALL *GetOption)(MI_SubscriptionDeliveryOptions *options, const MI_Char *optionName, MI_Value *value, MI_Type *type, MI_Uint32 *index, MI_Uint32 *flags);
1891  MI_Result (MI_CALL *GetCredentialsCount)(MI_SubscriptionDeliveryOptions *options, MI_Uint32 *count);
1892  MI_Result (MI_CALL *GetCredentialsAt)(MI_SubscriptionDeliveryOptions *options, MI_Uint32 index, const MI_Char **optionName, MI_UserCredentials *credentials, MI_Uint32 *flags);
1893  MI_Result (MI_CALL *GetCredentialsPasswordAt)(MI_SubscriptionDeliveryOptions *options, MI_Uint32 index, const MI_Char **optionName, MI_Char *password, MI_Uint32 bufferLength, MI_Uint32 *passwordLength, MI_Uint32 *flags);
1894  MI_Result (MI_CALL *Clone)(const MI_SubscriptionDeliveryOptions* self, MI_SubscriptionDeliveryOptions* newSubscriptionDeliveryOptions);
1895} MI_SubscriptionDeliveryOptionsFT;
1896
1897typedef struct _MI_SubscriptionDeliveryOptions {
1898  MI_Uint64 reserved1;
1899  ptrdiff_t reserved2;
1900  const MI_SubscriptionDeliveryOptionsFT * ft;
1901} MI_SubscriptionDeliveryOptions;
1902
1903#define MI_SUBSCRIPTIONDELIVERYOPTIONS_NULL { 0, 0, NULL }
1904
1905typedef struct _MI_Serializer MI_Serializer;
1906typedef struct _MI_SerializerFT MI_SerializerFT;
1907typedef struct _MI_Deserializer MI_Deserializer;
1908typedef struct _MI_DeserializerFT MI_DeserializerFT;
1909
1910struct _MI_Serializer {
1911  MI_Uint64 reserved1;
1912  ptrdiff_t reserved2;
1913};
1914
1915struct _MI_Deserializer {
1916  MI_Uint64 reserved1;
1917  ptrdiff_t reserved2;
1918};
1919
1920struct _MI_SerializerFT {
1921  MI_Result (MI_CALL *Close)(MI_Serializer *serializer);
1922  MI_Result (MI_CALL *SerializeClass)(MI_Serializer *serializer, MI_Uint32 flags, const MI_Class *classObject, MI_Uint8 *clientBuffer, MI_Uint32 clientBufferLength, MI_Uint32 *clientBufferNeeded);
1923  MI_Result (MI_CALL *SerializeInstance)(MI_Serializer *serializer, MI_Uint32 flags, const MI_Instance *instanceObject, MI_Uint8 *clientBuffer, MI_Uint32 clientBufferLength, MI_Uint32 *clientBufferNeeded);
1924};
1925
1926typedef MI_Result (MI_CALL *MI_Deserializer_ClassObjectNeeded)(void *context, const MI_Char *serverName, const MI_Char *namespaceName, const MI_Char *className, MI_Class **requestedClassObject);
1927
1928struct _MI_DeserializerFT {
1929  MI_Result (MI_CALL *Close)(MI_Deserializer *deserializer);
1930  MI_Result (MI_CALL *DeserializeClass)(MI_Deserializer *deserializer, MI_Uint32 flags, MI_Uint8 *serializedBuffer, MI_Uint32 serializedBufferLength, MI_Class *parentClass, const MI_Char *serverName, const MI_Char *namespaceName, MI_Deserializer_ClassObjectNeeded classObjectNeeded, void *classObjectNeededContext, MI_Uint32 *serializedBufferRead, MI_Class **classObject, MI_Instance **cimErrorDetails);
1931  MI_Result (MI_CALL *Class_GetClassName)(MI_Deserializer *deserializer, MI_Uint8 *serializedBuffer, MI_Uint32 serializedBufferLength, MI_Char *className, MI_Uint32 *classNameLength, MI_Instance **cimErrorDetails);
1932  MI_Result (MI_CALL *Class_GetParentClassName)(MI_Deserializer *deserializer, MI_Uint8 *serializedBuffer, MI_Uint32 serializedBufferLength, MI_Char *parentClassName, MI_Uint32 *parentClassNameLength, MI_Instance **cimErrorDetails);
1933  MI_Result (MI_CALL *DeserializeInstance)(MI_Deserializer *deserializer, MI_Uint32 flags, MI_Uint8 *serializedBuffer, MI_Uint32 serializedBufferLength, MI_Class **classObjects, MI_Uint32 numberClassObjects, MI_Deserializer_ClassObjectNeeded classObjectNeeded, void *classObjectNeededContext, MI_Uint32 *serializedBufferRead, MI_Instance **instanceObject, MI_Instance **cimErrorDetails);
1934  MI_Result (MI_CALL *Instance_GetClassName)(MI_Deserializer *deserializer, MI_Uint8 *serializedBuffer, MI_Uint32 serializedBufferLength, MI_Char *className, MI_Uint32 *classNameLength, MI_Instance **cimErrorDetails);
1935};
1936
1937typedef struct _MI_ApplicationFT {
1938  MI_Result (MI_CALL *Close)(MI_Application *application);
1939  MI_Result (MI_CALL *NewSession)(MI_Application *application, const MI_Char *protocol, const MI_Char *destination, MI_DestinationOptions *options, MI_SessionCallbacks *callbacks, MI_Instance **extendedError, MI_Session *session);
1940  MI_Result (MI_CALL *NewHostedProvider)(MI_Application *application, const MI_Char *namespaceName, const MI_Char *providerName, MI_MainFunction mi_Main, MI_Instance **extendedError, MI_HostedProvider *provider);
1941  MI_Result (MI_CALL *NewInstance)(MI_Application *application, const MI_Char *className, const MI_ClassDecl *classRTTI, MI_Instance **instance);
1942  MI_Result (MI_CALL *NewDestinationOptions)(MI_Application *application, MI_DestinationOptions *options);
1943  MI_Result (MI_CALL *NewOperationOptions)(MI_Application *application, MI_Boolean customOptionsMustUnderstand, MI_OperationOptions *options);
1944  MI_Result (MI_CALL *NewSubscriptionDeliveryOptions)(MI_Application *application, MI_SubscriptionDeliveryType deliveryType, MI_SubscriptionDeliveryOptions *deliveryOptions);
1945  MI_Result (MI_CALL *NewSerializer)(MI_Application *application, MI_Uint32 flags, MI_Char *format, MI_Serializer *serializer);
1946  MI_Result (MI_CALL *NewDeserializer)(MI_Application *application, MI_Uint32 flags, MI_Char *format, MI_Deserializer *deserializer);
1947  MI_Result (MI_CALL *NewInstanceFromClass)(MI_Application *application, const MI_Char *className, const MI_Class *classObject, MI_Instance **instance);
1948  MI_Result (MI_CALL *NewClass)(MI_Application *application, const MI_ClassDecl* classDecl, const MI_Char *namespaceName, const MI_Char *serverName, MI_Class** classObject);
1949} MI_ApplicationFT;
1950
1951typedef struct _MI_HostedProviderFT {
1952  MI_Result (MI_CALL *Close)(MI_HostedProvider *hostedProvider);
1953  MI_Result (MI_CALL *GetApplication)(MI_HostedProvider *hostedProvider, MI_Application *application);
1954} MI_HostedProviderFT;
1955
1956typedef struct _MI_SessionFT {
1957  MI_Result (MI_CALL *Close)(MI_Session *session, void *completionContext, void (MI_CALL *completionCallback)(void *completionContext));
1958  MI_Result (MI_CALL *GetApplication)(MI_Session *session, MI_Application *application);
1959  void (MI_CALL *GetInstance)(MI_Session *session, MI_Uint32 flags, MI_OperationOptions *options, const MI_Char *namespaceName, const MI_Instance *inboundInstance, MI_OperationCallbacks *callbacks, MI_Operation *operation);
1960  void (MI_CALL *ModifyInstance)(MI_Session *session, MI_Uint32 flags, MI_OperationOptions *options, const MI_Char *namespaceName, const MI_Instance *inboundInstance, MI_OperationCallbacks *callbacks, MI_Operation *operation);
1961  void (MI_CALL *CreateInstance)(MI_Session *session, MI_Uint32 flags, MI_OperationOptions *options, const MI_Char *namespaceName, const MI_Instance *inboundInstance, MI_OperationCallbacks *callbacks, MI_Operation *operation);
1962  void (MI_CALL *DeleteInstance)(MI_Session *session, MI_Uint32 flags, MI_OperationOptions *options, const MI_Char *namespaceName, const MI_Instance *inboundInstance, MI_OperationCallbacks *callbacks, MI_Operation *operation);
1963  void (MI_CALL *Invoke)(MI_Session *session, MI_Uint32 flags, MI_OperationOptions *options, const MI_Char *namespaceName, const MI_Char *className, const MI_Char *methodName, const MI_Instance *inboundInstance, const MI_Instance *inboundProperties, MI_OperationCallbacks *callbacks, MI_Operation *operation);
1964  void (MI_CALL *EnumerateInstances)(MI_Session *session, MI_Uint32 flags, MI_OperationOptions *options, const MI_Char *namespaceName, const MI_Char *className, MI_Boolean keysOnly, MI_OperationCallbacks *callbacks, MI_Operation *operation);
1965  void (MI_CALL *QueryInstances)(MI_Session *session, MI_Uint32 flags, MI_OperationOptions *options, const MI_Char *namespaceName, const MI_Char *queryDialect, const MI_Char *queryExpression, MI_OperationCallbacks *callbacks, MI_Operation *operation);
1966  void (MI_CALL *AssociatorInstances)(MI_Session *session, MI_Uint32 flags, MI_OperationOptions *options, const MI_Char *namespaceName, const MI_Instance *instanceKeys, const MI_Char *assocClass, const MI_Char *resultClass, const MI_Char *role, const MI_Char *resultRole, MI_Boolean keysOnly, MI_OperationCallbacks *callbacks, MI_Operation *operation);
1967  void (MI_CALL *ReferenceInstances)(MI_Session *session, MI_Uint32 flags, MI_OperationOptions *options, const MI_Char *namespaceName, const MI_Instance *instanceKeys, const MI_Char *resultClass, const MI_Char *role, MI_Boolean keysOnly, MI_OperationCallbacks *callbacks, MI_Operation *operation);
1968  void (MI_CALL *Subscribe)(MI_Session *session, MI_Uint32 flags, MI_OperationOptions *options, const MI_Char *namespaceName, const MI_Char *queryDialect, const MI_Char *queryExpression, const MI_SubscriptionDeliveryOptions *deliverOptions, MI_OperationCallbacks *callbacks, MI_Operation *operation);
1969  void (MI_CALL *GetClass)(MI_Session *session, MI_Uint32 flags, MI_OperationOptions *options, const MI_Char *namespaceName, const MI_Char *className, MI_OperationCallbacks *callbacks, MI_Operation *operation);
1970  void (MI_CALL *EnumerateClasses)(MI_Session *session, MI_Uint32 flags, MI_OperationOptions *options, const MI_Char *namespaceName, const MI_Char *className, MI_Boolean classNamesOnly, MI_OperationCallbacks *callbacks, MI_Operation *operation);
1971  void (MI_CALL *TestConnection)(MI_Session *session, MI_Uint32 flags, MI_OperationCallbacks *callbacks, MI_Operation *operation);
1972} MI_SessionFT;
1973
1974typedef struct _MI_OperationFT {
1975  MI_Result (MI_CALL *Close)(MI_Operation *operation);
1976  MI_Result (MI_CALL *Cancel)(MI_Operation *operation, MI_CancellationReason reason);
1977  MI_Result (MI_CALL *GetSession)(MI_Operation *operation, MI_Session *session);
1978  MI_Result (MI_CALL *GetInstance)(MI_Operation *operation, const MI_Instance **instance, MI_Boolean *moreResults, MI_Result *result, const MI_Char **errorMessage, const MI_Instance **completionDetails);
1979  MI_Result (MI_CALL *GetIndication)(MI_Operation *operation, const MI_Instance **instance, const MI_Char **bookmark, const MI_Char **machineID, MI_Boolean *moreResults, MI_Result *result, const MI_Char **errorMessage, const MI_Instance **completionDetails);
1980  MI_Result (MI_CALL *GetClass)(MI_Operation *operation, const MI_Class **classResult, MI_Boolean *moreResults, MI_Result *result, const MI_Char **errorMessage, const MI_Instance **completionDetails);
1981} MI_OperationFT;
1982
1983typedef struct _MI_DestinationOptionsFT {
1984  void (MI_CALL *Delete)(MI_DestinationOptions *options);
1985  MI_Result (MI_CALL *SetString)(MI_DestinationOptions *options, const MI_Char *optionName, const MI_Char *value, MI_Uint32 flags);
1986  MI_Result (MI_CALL *SetNumber)(MI_DestinationOptions *options, const MI_Char *optionName, MI_Uint32 value, MI_Uint32 flags);
1987  MI_Result (MI_CALL *AddCredentials)(MI_DestinationOptions *options, const MI_Char *optionName, const MI_UserCredentials *credentials, MI_Uint32 flags);
1988  MI_Result (MI_CALL *GetString)(MI_DestinationOptions *options, const MI_Char *optionName, const MI_Char **value, MI_Uint32 *index, MI_Uint32 *flags);
1989  MI_Result (MI_CALL *GetNumber)(MI_DestinationOptions *options, const MI_Char *optionName, MI_Uint32 *value, MI_Uint32 *index, MI_Uint32 *flags);
1990  MI_Result (MI_CALL *GetOptionCount)(MI_DestinationOptions *options, MI_Uint32 *count);
1991  MI_Result (MI_CALL *GetOptionAt)(MI_DestinationOptions *options, MI_Uint32 index, const MI_Char **optionName, MI_Value *value, MI_Type *type, MI_Uint32 *flags);
1992  MI_Result (MI_CALL *GetOption)(MI_DestinationOptions *options, const MI_Char *optionName, MI_Value *value, MI_Type *type, MI_Uint32 *index, MI_Uint32 *flags);
1993  MI_Result (MI_CALL *GetCredentialsCount)(MI_DestinationOptions *options, MI_Uint32 *count);
1994  MI_Result (MI_CALL *GetCredentialsAt)(MI_DestinationOptions *options, MI_Uint32 index, const MI_Char **optionName, MI_UserCredentials *credentials, MI_Uint32 *flags);
1995  MI_Result (MI_CALL *GetCredentialsPasswordAt)(MI_DestinationOptions *options, MI_Uint32 index, const MI_Char **optionName, MI_Char *password, MI_Uint32 bufferLength, MI_Uint32 *passwordLength, MI_Uint32 *flags);
1996  MI_Result (MI_CALL *Clone)(const MI_DestinationOptions* self, MI_DestinationOptions* newDestinationOptions);
1997  MI_Result (MI_CALL *SetInterval)(MI_DestinationOptions *options, const MI_Char *optionName, const MI_Interval *value, MI_Uint32 flags);
1998  MI_Result (MI_CALL *GetInterval)(MI_DestinationOptions *options, const MI_Char *optionName, MI_Interval *value, MI_Uint32 *index, MI_Uint32 *flags);
1999} MI_DestinationOptionsFT;
2000
2001typedef struct _MI_OperationOptionsFT {
2002  void (MI_CALL *Delete)(MI_OperationOptions *options);
2003  MI_Result (MI_CALL *SetString)(MI_OperationOptions *options, const MI_Char *optionName, const MI_Char *value, MI_Uint32 flags);
2004  MI_Result (MI_CALL *SetNumber)(MI_OperationOptions *options, const MI_Char *optionName, MI_Uint32 value, MI_Uint32 flags);
2005  MI_Result (MI_CALL *SetCustomOption)(MI_OperationOptions *options, const MI_Char *optionName, MI_Type valueType, const MI_Value *value, MI_Boolean mustComply, MI_Uint32 flags);
2006  MI_Result (MI_CALL *GetString)(MI_OperationOptions *options, const MI_Char *optionName, const MI_Char **value, MI_Uint32 *index, MI_Uint32 *flags);
2007  MI_Result (MI_CALL *GetNumber)(MI_OperationOptions *options, const MI_Char *optionName, MI_Uint32 *value, MI_Uint32 *index, MI_Uint32 *flags);
2008  MI_Result (MI_CALL *GetOptionCount)(MI_OperationOptions *options, MI_Uint32 *count);
2009  MI_Result (MI_CALL *GetOptionAt)(MI_OperationOptions *options, MI_Uint32 index, const MI_Char **optionName, MI_Value *value, MI_Type *type, MI_Uint32 *flags);
2010  MI_Result (MI_CALL *GetOption)(MI_OperationOptions *options, const MI_Char *optionName, MI_Value *value, MI_Type *type, MI_Uint32 *index, MI_Uint32 *flags);
2011  MI_Result (MI_CALL *GetEnabledChannels)(MI_OperationOptions *options, const MI_Char *optionName, MI_Uint32 *channels, MI_Uint32 bufferLength, MI_Uint32 *channelCount, MI_Uint32 *flags);
2012  MI_Result (MI_CALL *Clone)(const MI_OperationOptions* self, MI_OperationOptions* newOperationOptions);
2013  MI_Result (MI_CALL *SetInterval)(MI_OperationOptions *options, const MI_Char *optionName, const MI_Interval *value, MI_Uint32 flags);
2014  MI_Result (MI_CALL *GetInterval)(MI_OperationOptions *options, const MI_Char *optionName, MI_Interval *value, MI_Uint32 *index, MI_Uint32 *flags);
2015} MI_OperationOptionsFT;
2016
2017struct _MI_Application {
2018  MI_Uint64 reserved1;
2019  ptrdiff_t reserved2;
2020  const MI_ApplicationFT *ft;
2021};
2022
2023#define MI_APPLICATION_NULL { 0, 0, NULL }
2024
2025struct _MI_Session {
2026  MI_Uint64 reserved1;
2027  ptrdiff_t reserved2;
2028  const MI_SessionFT *ft;
2029};
2030
2031#define MI_SESSION_NULL { 0, 0, NULL }
2032
2033struct _MI_Operation {
2034  MI_Uint64 reserved1;
2035  ptrdiff_t reserved2;
2036  const MI_OperationFT *ft;
2037};
2038
2039#define MI_OPERATION_NULL { 0, 0, NULL }
2040
2041struct _MI_HostedProvider {
2042  MI_Uint64 reserved1;
2043  ptrdiff_t reserved2;
2044  const MI_HostedProviderFT *ft;
2045};
2046
2047#define MI_HOSTEDPROVIDER_NULL { 0, 0, NULL }
2048
2049struct _MI_DestinationOptions {
2050  MI_Uint64 reserved1;
2051  ptrdiff_t reserved2;
2052  const MI_DestinationOptionsFT *ft;
2053};
2054
2055#define MI_DESTINATIONOPTIONS_NULL { 0, 0, NULL }
2056
2057struct _MI_OperationOptions {
2058  MI_Uint64 reserved1;
2059  ptrdiff_t reserved2;
2060  const MI_OperationOptionsFT *ft;
2061};
2062
2063#define MI_OPERATIONOPTIONS_NULL { 0, 0, NULL }
2064
2065typedef struct _MI_UtilitiesFT {
2066  MI_ErrorCategory (MI_CALL *MapErrorToMiErrorCategory)(MI_Char *errorType, MI_Uint32 error);
2067  MI_Result (MI_CALL *CimErrorFromErrorCode)(MI_Uint32 error, const MI_Char *errorType, const MI_Char* errorMessage, MI_Instance **cimError);
2068} MI_UtilitiesFT;
2069
2070typedef struct _MI_ClientFT_V1 {
2071  const MI_ApplicationFT *applicationFT;
2072  const MI_SessionFT *sessionFT;
2073  const MI_OperationFT *operationFT;
2074  const MI_HostedProviderFT *hostedProviderFT;
2075  const MI_SerializerFT *serializerFT;
2076  const MI_DeserializerFT *deserializerFT;
2077  const MI_SubscriptionDeliveryOptionsFT *subscribeDeliveryOptionsFT;
2078  const MI_DestinationOptionsFT *destinationOptionsFT;
2079  const MI_OperationOptionsFT *operationOptionsFT;
2080  const MI_UtilitiesFT *utilitiesFT;
2081} MI_ClientFT_V1;
2082
2083#ifndef _MANAGED_PURE
2084__declspec(dllimport) const MI_ClientFT_V1 *mi_clientFT_V1;
2085#endif
2086
2087#if (MI_CALL_VERSION == 1)
2088#define mi_clientFT mi_clientFT_V1
2089#endif
2090
2091MI_Result MI_MAIN_CALL MI_Application_InitializeV1(MI_Uint32 flags, const MI_Char *applicationID, MI_Instance **extendedError, MI_Application *application);
2092
2093#if MI_CALL_VERSION == 1
2094#define MI_Application_Initialize MI_Application_InitializeV1
2095#endif
2096
2097MI_INLINE MI_Result MI_Application_Close(MI_Application *application) {
2098  if (application && application->ft) {
2099    return application->ft->Close(application);
2100  } else {
2101    return MI_RESULT_INVALID_PARAMETER;
2102  }
2103}
2104
2105MI_INLINE MI_Result MI_Application_NewInstance(MI_Application *application, const MI_Char *className, const MI_ClassDecl *classRTTI, MI_Instance **instance) {
2106  if (application && application->ft) {
2107    return application->ft->NewInstance(application, className, classRTTI, instance);
2108  } else {
2109    if (instance) {
2110      *instance = NULL;
2111    }
2112    return MI_RESULT_INVALID_PARAMETER;
2113  }
2114}
2115
2116MI_INLINE MI_Result MI_Application_NewInstanceFromClass(MI_Application *application, const MI_Char *className, const MI_Class *classObject, MI_Instance **instance) {
2117  if (application && application->ft) {
2118    return application->ft->NewInstanceFromClass(application, className, classObject, instance);
2119  } else {
2120    if (instance) {
2121      *instance = NULL;
2122    }
2123    return MI_RESULT_INVALID_PARAMETER;
2124  }
2125}
2126
2127MI_INLINE MI_Result MI_Application_NewClass(MI_Application *application, const MI_ClassDecl* classDecl, const MI_Char *namespaceName, const MI_Char *serverName, MI_Class** classObject) {
2128  if (application && application->ft) {
2129    return application->ft->NewClass(application, classDecl, namespaceName, serverName, classObject);
2130  } else {
2131    if (classObject) {
2132      *classObject = NULL;
2133    }
2134    return MI_RESULT_INVALID_PARAMETER;
2135  }
2136}
2137
2138MI_INLINE MI_Result MI_Application_NewParameterSet(MI_Application *application, const MI_ClassDecl *classRTTI, MI_Instance **instance) {
2139  if (application && application->ft) {
2140    return application->ft->NewInstance(application, MI_T("Parameters"), classRTTI, instance);
2141  } else {
2142    if (instance) {
2143      *instance = NULL;
2144    }
2145    return MI_RESULT_INVALID_PARAMETER;
2146  }
2147}
2148
2149MI_INLINE MI_Result MI_Application_NewDestinationOptions(MI_Application *application, MI_DestinationOptions *options) {
2150  if (application && application->ft) {
2151    return application->ft->NewDestinationOptions(application, options);
2152  } else {
2153    if (options) {
2154      memset(options, 0, sizeof(MI_DestinationOptions));
2155    }
2156    return MI_RESULT_INVALID_PARAMETER;
2157  }
2158}
2159
2160MI_INLINE MI_Result MI_Application_NewOperationOptions(MI_Application *application, MI_Boolean mustUnderstand, MI_OperationOptions *options) {
2161  if (application && application->ft) {
2162    return application->ft->NewOperationOptions(application, mustUnderstand, options);
2163  } else {
2164    if (options) {
2165      memset(options, 0, sizeof(MI_OperationOptions));
2166    }
2167    return MI_RESULT_INVALID_PARAMETER;
2168  }
2169}
2170
2171MI_INLINE MI_Result MI_Application_NewSubscriptionDeliveryOptions(MI_Application *application, MI_SubscriptionDeliveryType deliveryType, MI_SubscriptionDeliveryOptions *deliveryOptions) {
2172  if (application && application->ft) {
2173    return application->ft->NewSubscriptionDeliveryOptions(application, deliveryType, deliveryOptions);
2174  } else {
2175    if (deliveryOptions) {
2176      memset(deliveryOptions, 0, sizeof(MI_SubscriptionDeliveryOptions));
2177    }
2178    return MI_RESULT_INVALID_PARAMETER;
2179  }
2180}
2181
2182MI_INLINE MI_Result MI_Application_NewSession(MI_Application *application, const MI_Char *protocol, const MI_Char *destination, MI_DestinationOptions *options, MI_SessionCallbacks *callbacks, MI_Instance **extendedError, MI_Session *session) {
2183  if (application && application->ft) {
2184    return application->ft->NewSession(application, protocol, destination, options, callbacks, extendedError, session);
2185  } else {
2186    if (session) {
2187      memset(session, 0, sizeof(MI_Session));
2188    }
2189    return MI_RESULT_INVALID_PARAMETER;
2190  }
2191}
2192
2193MI_INLINE MI_Result MI_Application_NewHostedProvider(MI_Application *application, const MI_Char *namespaceName, const MI_Char *providerName, MI_MainFunction mi_Main, MI_Instance **extendedError, MI_HostedProvider *hostedProvider) {
2194  if (application && application->ft) {
2195    return application->ft->NewHostedProvider(application, namespaceName, providerName, mi_Main, extendedError, hostedProvider);
2196  } else {
2197    if (hostedProvider) {
2198      memset(hostedProvider, 0, sizeof(MI_HostedProvider));
2199    }
2200    return MI_RESULT_INVALID_PARAMETER;
2201  }
2202}
2203
2204MI_INLINE MI_Result MI_Application_NewSerializer(MI_Application *application, MI_Uint32 flags, MI_Char *format, MI_Serializer *serializer) {
2205  if (application && application->ft) {
2206    return application->ft->NewSerializer(application, flags, format, serializer);
2207  } else {
2208    if (serializer) {
2209      memset(serializer, 0, sizeof(MI_Serializer));
2210    }
2211    return MI_RESULT_INVALID_PARAMETER;
2212  }
2213}
2214
2215MI_INLINE MI_Result MI_Application_NewDeserializer(MI_Application *application, MI_Uint32 flags, MI_Char *format, MI_Deserializer *deserializer) {
2216  if (application && application->ft) {
2217    return application->ft->NewDeserializer(application, flags, format, deserializer);
2218  } else {
2219    if (deserializer) {
2220      memset(deserializer, 0, sizeof(MI_Deserializer));
2221    }
2222    return MI_RESULT_INVALID_PARAMETER;
2223  }
2224}
2225
2226MI_INLINE MI_Result MI_HostedProvider_Close(MI_HostedProvider *hostedProvider) {
2227  if (hostedProvider && hostedProvider->ft) {
2228    return hostedProvider->ft->Close(hostedProvider);
2229  } else {
2230    return MI_RESULT_INVALID_PARAMETER;
2231  }
2232}
2233
2234MI_INLINE MI_Result MI_HostedProvider_GetApplication(MI_HostedProvider *hostedProvider, MI_Application *application) {
2235  if (hostedProvider && hostedProvider->ft) {
2236    return hostedProvider->ft->GetApplication(hostedProvider, application);
2237  } else if (application) {
2238    memset(application, 0, sizeof(MI_Application));
2239  }
2240  return MI_RESULT_INVALID_PARAMETER;
2241}
2242
2243MI_INLINE MI_Result MI_Session_Close(MI_Session *session, void *completionContext, void (MI_CALL *completionCallback)(void *completionContext)) {
2244  if (session && session->ft) {
2245    return session->ft->Close(session, completionContext, completionCallback);
2246  } else if (completionCallback) {
2247    completionCallback(completionContext);
2248    return MI_RESULT_OK;
2249  } else {
2250    return MI_RESULT_INVALID_PARAMETER;
2251  }
2252}
2253
2254MI_INLINE MI_Result MI_Session_GetApplication(MI_Session *session, MI_Application *application) {
2255  if (session && session->ft) {
2256    return session->ft->GetApplication(session, application);
2257  }
2258  if (application) {
2259    memset(application, 0, sizeof(MI_Application));
2260  }
2261  return MI_RESULT_INVALID_PARAMETER;
2262}
2263
2264MI_INLINE void MI_Session_GetInstance(MI_Session *session, MI_Uint32 flags, MI_OperationOptions *options, const MI_Char *namespaceName, const MI_Instance *inboundInstance, MI_OperationCallbacks *callbacks, MI_Operation *operation) {
2265  if (session && session->ft) {
2266    session->ft->GetInstance(session, flags, options, namespaceName, inboundInstance, callbacks, operation);
2267  } else {
2268    if (operation) {
2269      memset(operation, 0, sizeof(*operation));
2270    }
2271    if (callbacks && callbacks->instanceResult) {
2272      callbacks->instanceResult(NULL, callbacks->callbackContext, NULL, MI_FALSE, MI_RESULT_INVALID_PARAMETER, NULL, NULL, NULL);
2273    }
2274  }
2275}
2276
2277MI_INLINE void MI_Session_ModifyInstance(MI_Session *session, MI_Uint32 flags, MI_OperationOptions *options, const MI_Char *namespaceName, const MI_Instance *inboundInstance, MI_OperationCallbacks *callbacks, MI_Operation *operation) {
2278  if (session && session->ft) {
2279    session->ft->ModifyInstance(session, flags, options, namespaceName, inboundInstance, callbacks, operation);
2280  } else {
2281    if (operation) {
2282      memset(operation, 0, sizeof(*operation));
2283    }
2284    if (callbacks && callbacks->instanceResult) {
2285      callbacks->instanceResult(NULL, callbacks->callbackContext, NULL, MI_FALSE, MI_RESULT_INVALID_PARAMETER, NULL, NULL, NULL);
2286    }
2287  }
2288}
2289
2290MI_INLINE void MI_Session_CreateInstance(MI_Session *session, MI_Uint32 flags, MI_OperationOptions *options, const MI_Char *namespaceName, const MI_Instance *inboundInstance, MI_OperationCallbacks *callbacks, MI_Operation *operation) {
2291  if (session && session->ft) {
2292    session->ft->CreateInstance(session, flags, options, namespaceName, inboundInstance, callbacks, operation);
2293  } else {
2294    if (operation) {
2295      memset(operation, 0, sizeof(*operation));
2296    }
2297    if (callbacks && callbacks->instanceResult) {
2298      callbacks->instanceResult(NULL, callbacks->callbackContext, NULL, MI_FALSE, MI_RESULT_INVALID_PARAMETER, NULL, NULL, NULL);
2299    }
2300  }
2301}
2302
2303MI_INLINE void MI_Session_DeleteInstance(MI_Session *session, MI_Uint32 flags, MI_OperationOptions *options, const MI_Char *namespaceName, const MI_Instance *inboundInstance, MI_OperationCallbacks *callbacks, MI_Operation *operation) {
2304  if (session && session->ft) {
2305    session->ft->DeleteInstance(session, flags, options, namespaceName, inboundInstance, callbacks, operation);
2306  } else {
2307    if (operation) {
2308      memset(operation, 0, sizeof(*operation));
2309    }
2310    if (callbacks && callbacks->instanceResult) {
2311      callbacks->instanceResult(NULL, callbacks->callbackContext, NULL, MI_FALSE, MI_RESULT_INVALID_PARAMETER, NULL, NULL, NULL);
2312    }
2313  }
2314}
2315
2316MI_INLINE void MI_Session_Invoke(MI_Session *session, MI_Uint32 flags, MI_OperationOptions *options, const MI_Char *namespaceName, const MI_Char *className, const MI_Char *methodName, const MI_Instance *inboundInstance, const MI_Instance *inboundProperties, MI_OperationCallbacks *callbacks, MI_Operation *operation) {
2317  if (session && session->ft) {
2318    session->ft->Invoke(session, flags, options, namespaceName, className, methodName, inboundInstance, inboundProperties, callbacks, operation);
2319  } else {
2320    if (operation) {
2321      memset(operation, 0, sizeof(*operation));
2322    }
2323    if (callbacks && callbacks->instanceResult) {
2324      callbacks->instanceResult(NULL, callbacks->callbackContext, NULL, MI_FALSE, MI_RESULT_INVALID_PARAMETER, NULL, NULL, NULL);
2325    }
2326  }
2327}
2328
2329MI_INLINE void MI_Session_EnumerateInstances(MI_Session *session, MI_Uint32 flags, MI_OperationOptions *options, const MI_Char *namespaceName, const MI_Char *className, MI_Boolean keysOnly, MI_OperationCallbacks *callbacks, MI_Operation *operation) {
2330  if (session && session->ft) {
2331    session->ft->EnumerateInstances(session, flags, options, namespaceName, className, keysOnly, callbacks, operation);
2332  } else {
2333    if (operation) {
2334      memset(operation, 0, sizeof(*operation));
2335    }
2336    if (callbacks && callbacks->instanceResult) {
2337      callbacks->instanceResult(NULL, callbacks->callbackContext, NULL, MI_FALSE, MI_RESULT_INVALID_PARAMETER, NULL, NULL, NULL);
2338    }
2339  }
2340}
2341
2342MI_INLINE void MI_Session_QueryInstances(MI_Session *session, MI_Uint32 flags, MI_OperationOptions *options, const MI_Char *namespaceName, const MI_Char *queryDialect, const MI_Char *queryExpression, MI_OperationCallbacks *callbacks, MI_Operation *operation) {
2343  if (session && session->ft) {
2344    session->ft->QueryInstances(session, flags, options, namespaceName, queryDialect, queryExpression, callbacks, operation);
2345  } else {
2346    if (operation) {
2347      memset(operation, 0, sizeof(*operation));
2348    }
2349    if (callbacks && callbacks->instanceResult) {
2350      callbacks->instanceResult(NULL, callbacks->callbackContext, NULL, MI_FALSE, MI_RESULT_INVALID_PARAMETER, NULL, NULL, NULL);
2351    }
2352  }
2353}
2354
2355MI_INLINE void MI_Session_AssociatorInstances(MI_Session *session, MI_Uint32 flags, MI_OperationOptions *options, const MI_Char *namespaceName, const MI_Instance *instanceKey, const MI_Char *assocClass, const MI_Char *resultClass, const MI_Char *role, const MI_Char *resultRole, MI_Boolean keysOnly, MI_OperationCallbacks *callbacks, MI_Operation *operation) {
2356  if (session && session->ft) {
2357    session->ft->AssociatorInstances(session, flags, options, namespaceName, instanceKey, assocClass, resultClass, role, resultRole, keysOnly, callbacks, operation);
2358  } else {
2359    if (operation) {
2360      memset(operation, 0, sizeof(*operation));
2361    }
2362    if (callbacks && callbacks->instanceResult) {
2363      callbacks->instanceResult(NULL, callbacks->callbackContext, NULL, MI_FALSE, MI_RESULT_INVALID_PARAMETER, NULL, NULL, NULL);
2364    }
2365  }
2366}
2367
2368MI_INLINE void MI_Session_ReferenceInstances(MI_Session *session, MI_Uint32 flags, MI_OperationOptions *options, const MI_Char *namespaceName, const MI_Instance *instanceKey, const MI_Char *resultClass, const MI_Char *role, MI_Boolean keysOnly, MI_OperationCallbacks *callbacks, MI_Operation *operation) {
2369  if (session && session->ft) {
2370    session->ft->ReferenceInstances(session, flags, options, namespaceName, instanceKey, resultClass, role, keysOnly, callbacks, operation);
2371  } else {
2372    if (operation) {
2373      memset(operation, 0, sizeof(*operation));
2374    }
2375    if (callbacks && callbacks->instanceResult) {
2376      callbacks->instanceResult(NULL, callbacks->callbackContext, NULL, MI_FALSE, MI_RESULT_INVALID_PARAMETER, NULL, NULL, NULL);
2377    }
2378  }
2379}
2380
2381MI_INLINE void MI_Session_Subscribe(MI_Session *session, MI_Uint32 flags, MI_OperationOptions *options, const MI_Char *namespaceName, const MI_Char *queryDialect, const MI_Char *queryExpression, const MI_SubscriptionDeliveryOptions *deliverOptions, MI_OperationCallbacks *callbacks, MI_Operation *operation) {
2382  if (session && session->ft) {
2383    session->ft->Subscribe(session, flags, options, namespaceName, queryDialect, queryExpression, deliverOptions, callbacks, operation);
2384  } else {
2385    if (operation) {
2386      memset(operation, 0, sizeof(*operation));
2387    }
2388    if (callbacks && callbacks->indicationResult) {
2389      callbacks->indicationResult(NULL, callbacks->callbackContext, NULL, NULL, NULL, MI_FALSE, MI_RESULT_INVALID_PARAMETER, NULL, NULL, NULL);
2390    }
2391  }
2392}
2393
2394MI_INLINE void MI_Session_GetClass(MI_Session *session, MI_Uint32 flags, MI_OperationOptions *options, const MI_Char *namespaceName, const MI_Char *className, MI_OperationCallbacks *callbacks, MI_Operation *operation) {
2395  if (session && session->ft) {
2396    session->ft->GetClass(session, flags, options, namespaceName, className, callbacks, operation);
2397  } else {
2398    if (operation) {
2399      memset(operation, 0, sizeof(*operation));
2400    }
2401    if (callbacks && callbacks->classResult) {
2402      callbacks->classResult(NULL, callbacks->callbackContext, NULL, MI_FALSE, MI_RESULT_INVALID_PARAMETER, NULL, NULL, NULL);
2403    }
2404  }
2405}
2406
2407MI_INLINE void MI_Session_EnumerateClasses(MI_Session *session, MI_Uint32 flags, MI_OperationOptions *options, const MI_Char *namespaceName, const MI_Char *className, MI_Boolean classNamesOnly, MI_OperationCallbacks *callbacks, MI_Operation *operation) {
2408  if (session && session->ft) {
2409    session->ft->EnumerateClasses(session, flags, options, namespaceName, className, classNamesOnly, callbacks, operation);
2410  } else {
2411    if (operation) {
2412      memset(operation, 0, sizeof(*operation));
2413    }
2414    if (callbacks && callbacks->classResult) {
2415      callbacks->classResult(NULL, callbacks->callbackContext, NULL, MI_FALSE, MI_RESULT_INVALID_PARAMETER, NULL, NULL, NULL);
2416    }
2417  }
2418}
2419
2420MI_INLINE void MI_Session_TestConnection(MI_Session *session, MI_Uint32 flags, MI_OperationCallbacks *callbacks, MI_Operation *operation) {
2421  if (session && session->ft) {
2422    session->ft->TestConnection(session, flags, callbacks, operation);
2423  } else {
2424    if (operation) {
2425      memset(operation, 0, sizeof(*operation));
2426    }
2427    if (callbacks && callbacks->instanceResult) {
2428      callbacks->instanceResult(NULL, callbacks->callbackContext, NULL, MI_FALSE, MI_RESULT_INVALID_PARAMETER, NULL, NULL, NULL);
2429    }
2430  }
2431}
2432
2433MI_INLINE MI_Result MI_Operation_GetInstance(MI_Operation *operation, const MI_Instance **instance, MI_Boolean *moreResults, MI_Result *result, const MI_Char **errorMessage, const MI_Instance **completionDetails) {
2434  if (operation && operation->ft) {
2435    return operation->ft->GetInstance(operation, instance, moreResults, result, errorMessage, completionDetails);
2436  }
2437  if (result)
2438    *result = MI_RESULT_INVALID_PARAMETER;
2439  if (moreResults)
2440    *moreResults = MI_FALSE;
2441  return MI_RESULT_INVALID_PARAMETER;
2442}
2443
2444MI_INLINE MI_Result MI_Operation_GetIndication(MI_Operation *operation, const MI_Instance **instance, const MI_Char **bookmark, const MI_Char **machineID, MI_Boolean *moreResults, MI_Result *result, const MI_Char **errorMessage, const MI_Instance **completionDetails) {
2445  if (operation && operation->ft) {
2446    return operation->ft->GetIndication(operation, instance, bookmark, machineID, moreResults, result, errorMessage, completionDetails);
2447  }
2448  if (result)
2449    *result = MI_RESULT_INVALID_PARAMETER;
2450  if (moreResults)
2451    *moreResults = MI_FALSE;
2452  return  MI_RESULT_INVALID_PARAMETER;
2453}
2454
2455MI_INLINE MI_Result MI_Operation_GetClass(MI_Operation *operation, const MI_Class **classResult, MI_Boolean *moreResults, MI_Result *result, const MI_Char **errorMessage, const MI_Instance **completionDetails) {
2456  if (operation && operation->ft) {
2457    return operation->ft->GetClass(operation, classResult, moreResults, result, errorMessage, completionDetails);
2458  }
2459  if (result)
2460    *result = MI_RESULT_INVALID_PARAMETER;
2461  if (moreResults)
2462    *moreResults = MI_FALSE;
2463  return MI_RESULT_INVALID_PARAMETER;
2464}
2465
2466MI_INLINE MI_Result MI_Operation_Close(MI_Operation *operation) {
2467  if (operation && operation->ft) {
2468    return operation->ft->Close(operation);
2469  }
2470  return MI_RESULT_INVALID_PARAMETER;
2471}
2472
2473MI_INLINE MI_Result MI_Operation_Cancel(MI_Operation *operation, MI_CancellationReason reason) {
2474  if (operation && operation->ft) {
2475    return operation->ft->Cancel(operation, reason);
2476  }
2477  return MI_RESULT_INVALID_PARAMETER;
2478}
2479
2480MI_INLINE MI_Result MI_Operation_GetSession(MI_Operation *operation, MI_Session *session) {
2481  if (session) {
2482    memset(session, 0, sizeof(MI_Session));
2483  }
2484  if (operation && operation->ft) {
2485    return operation->ft->GetSession(operation, session);
2486  }
2487  return MI_RESULT_INVALID_PARAMETER;
2488}
2489
2490MI_INLINE void MI_DestinationOptions_Delete(MI_DestinationOptions *options) {
2491  if (options && options->ft) {
2492    options->ft->Delete(options);
2493  }
2494}
2495
2496MI_INLINE MI_Result MI_DestinationOptions_SetTimeout(MI_DestinationOptions *options, const MI_Interval *timeout) {
2497  if (options && options->ft) {
2498    return options->ft->SetInterval(options, MI_T("__MI_DESTINATIONOPTIONS_TIMEOUT"), timeout, 0);
2499  } else {
2500    return MI_RESULT_INVALID_PARAMETER;
2501  }
2502}
2503
2504MI_INLINE MI_Result MI_DestinationOptions_GetTimeout(MI_DestinationOptions *options, MI_Interval *timeout) {
2505  if (options && options->ft) {
2506    return options->ft->GetInterval(options, MI_T("__MI_DESTINATIONOPTIONS_TIMEOUT"), timeout, 0, 0);
2507  } else {
2508    return MI_RESULT_INVALID_PARAMETER;
2509  }
2510}
2511
2512MI_INLINE MI_Result MI_DestinationOptions_SetCertCACheck(MI_DestinationOptions *options, MI_Boolean check) {
2513  if (options && options->ft) {
2514    return options->ft->SetNumber(options, MI_T("__MI_DESTINATIONOPTIONS_CERT_CA_CHECK"), check, 0);
2515  } else {
2516    return MI_RESULT_INVALID_PARAMETER;
2517  }
2518}
2519
2520MI_INLINE MI_Result MI_DestinationOptions_GetCertCACheck(MI_DestinationOptions *options, MI_Boolean *check) {
2521  if (options && options->ft) {
2522    MI_Uint32 value;
2523    MI_Result result = options->ft->GetNumber(options, MI_T("__MI_DESTINATIONOPTIONS_CERT_CA_CHECK"), &value, 0, 0);
2524    if (result == MI_RESULT_OK)
2525      *check = (MI_Boolean) value;
2526    return result;
2527  } else {
2528    return MI_RESULT_INVALID_PARAMETER;
2529  }
2530}
2531
2532MI_INLINE MI_Result MI_DestinationOptions_SetCertCNCheck(MI_DestinationOptions *options, MI_Boolean check) {
2533  if (options && options->ft) {
2534    return options->ft->SetNumber(options, MI_T("__MI_DESTINATIONOPTIONS_CERT_CN_CHECK"), check, 0);
2535  } else {
2536    return MI_RESULT_INVALID_PARAMETER;
2537  }
2538}
2539
2540MI_INLINE MI_Result MI_DestinationOptions_GetCertCNCheck(MI_DestinationOptions *options, MI_Boolean *check) {
2541  if (options && options->ft) {
2542    MI_Uint32 value;
2543    MI_Result result = options->ft->GetNumber(options, MI_T("__MI_DESTINATIONOPTIONS_CERT_CN_CHECK"), &value, 0, 0);
2544    if (result == MI_RESULT_OK)
2545      *check = (MI_Boolean) value;
2546    return result;
2547  } else {
2548    return MI_RESULT_INVALID_PARAMETER;
2549  }
2550}
2551
2552MI_INLINE MI_Result MI_DestinationOptions_SetCertRevocationCheck(MI_DestinationOptions *options, MI_Boolean check) {
2553  if (options && options->ft) {
2554    return options->ft->SetNumber(options, MI_T("__MI_DESTINATIONOPTIONS_CERT_REVOCATION_CHECK"), check, 0);
2555  } else {
2556    return MI_RESULT_INVALID_PARAMETER;
2557  }
2558}
2559
2560MI_INLINE MI_Result MI_DestinationOptions_GetCertRevocationCheck(MI_DestinationOptions *options, MI_Boolean *check) {
2561  if (options && options->ft) {
2562    MI_Uint32 value;
2563    MI_Result result = options->ft->GetNumber(options, MI_T("__MI_DESTINATIONOPTIONS_CERT_REVOCATION_CHECK"), &value, 0, 0);
2564    if (result == MI_RESULT_OK)
2565      *check = (MI_Boolean) value;
2566    return result;
2567  } else {
2568    return MI_RESULT_INVALID_PARAMETER;
2569  }
2570}
2571
2572MI_INLINE MI_Result MI_DestinationOptions_SetPacketPrivacy(MI_DestinationOptions *options, MI_Boolean privacy) {
2573  if (options && options->ft) {
2574    return options->ft->SetNumber(options, MI_T("__MI_DESTINATIONOPTIONS_PACKET_PRIVACY"), privacy, 0);
2575  } else {
2576    return MI_RESULT_INVALID_PARAMETER;
2577  }
2578}
2579
2580MI_INLINE MI_Result MI_DestinationOptions_GetPacketPrivacy(MI_DestinationOptions *options, MI_Boolean *privacy) {
2581  if (options && options->ft) {
2582    MI_Uint32 value;
2583    MI_Result result = options->ft->GetNumber(options, MI_T("__MI_DESTINATIONOPTIONS_PACKET_PRIVACY"), &value, 0, 0);
2584    if (result == MI_RESULT_OK)
2585      *privacy = (MI_Boolean) value;
2586    return result;
2587  } else {
2588    return MI_RESULT_INVALID_PARAMETER;
2589  }
2590}
2591
2592MI_INLINE MI_Result MI_DestinationOptions_SetPacketIntegrity(MI_DestinationOptions *options, MI_Boolean integrity) {
2593  if (options && options->ft) {
2594    return options->ft->SetNumber(options, MI_T("__MI_DESTINATIONOPTIONS_PACKET_INTEGRITY"), integrity, 0);
2595  } else {
2596    return MI_RESULT_INVALID_PARAMETER;
2597  }
2598}
2599
2600MI_INLINE MI_Result MI_DestinationOptions_GetPacketIntegrity(MI_DestinationOptions *options, MI_Boolean *integrity) {
2601  if (options && options->ft) {
2602    MI_Uint32 value;
2603    MI_Result result = options->ft->GetNumber(options, MI_T("__MI_DESTINATIONOPTIONS_PACKET_INTEGRITY"), &value, 0, 0);
2604    if (result == MI_RESULT_OK)
2605      *integrity = (MI_Boolean) value;
2606    return result;
2607  } else {
2608    return MI_RESULT_INVALID_PARAMETER;
2609  }
2610}
2611
2612#define MI_DESTINATIONOPTIONS_PACKET_ENCODING_DEFAULT MI_T("default")
2613#define MI_DESTINATIONOPTIONS_PACKET_ENCODING_UTF8 MI_T("UTF8")
2614#define MI_DESTINATIONOPTIONS_PACKET_ENCODING_UTF16 MI_T("UTF16")
2615
2616MI_INLINE MI_Result MI_DestinationOptions_SetPacketEncoding(MI_DestinationOptions *options, const MI_Char *encoding) {
2617  if (options && options->ft) {
2618    return options->ft->SetString(options, MI_T("__MI_DESTINATIONOPTIONS_PACKET_ENCODING"), encoding, 0);
2619  } else {
2620    return MI_RESULT_INVALID_PARAMETER;
2621  }
2622}
2623
2624MI_INLINE MI_Result MI_DestinationOptions_GetPacketEncoding(MI_DestinationOptions *options, const MI_Char **encoding) {
2625  if (options && options->ft) {
2626    return options->ft->GetString(options, MI_T("__MI_DESTINATIONOPTIONS_PACKET_ENCODING"), encoding, 0, 0);
2627  } else {
2628    return MI_RESULT_INVALID_PARAMETER;
2629  }
2630}
2631
2632MI_INLINE MI_Result MI_DestinationOptions_SetDataLocale(MI_DestinationOptions *options, const MI_Char *locale) {
2633  if (options && options->ft) {
2634    return options->ft->SetString(options, MI_T("__MI_DESTINATIONOPTIONS_DATA_LOCALE"), locale, 0);
2635  } else {
2636    return MI_RESULT_INVALID_PARAMETER;
2637  }
2638}
2639
2640MI_INLINE MI_Result MI_DestinationOptions_GetDataLocale(MI_DestinationOptions *options, const MI_Char **locale) {
2641  if (options && options->ft) {
2642    return options->ft->GetString(options, MI_T("__MI_DESTINATIONOPTIONS_DATA_LOCALE"), locale, 0, 0);
2643  } else {
2644    return MI_RESULT_INVALID_PARAMETER;
2645  }
2646}
2647
2648MI_INLINE MI_Result MI_DestinationOptions_SetUILocale(MI_DestinationOptions *options, const MI_Char *locale) {
2649  if (options && options->ft) {
2650    return options->ft->SetString(options, MI_T("__MI_DESTINATIONOPTIONS_UI_LOCALE"), locale, 0);
2651  } else {
2652    return MI_RESULT_INVALID_PARAMETER;
2653  }
2654}
2655
2656MI_INLINE MI_Result MI_DestinationOptions_GetUILocale(MI_DestinationOptions *options, const MI_Char **locale) {
2657  if (options && options->ft) {
2658    return options->ft->GetString(options, MI_T("__MI_DESTINATIONOPTIONS_UI_LOCALE"), locale, 0, 0);
2659  } else {
2660    return MI_RESULT_INVALID_PARAMETER;
2661  }
2662}
2663
2664MI_INLINE MI_Result MI_DestinationOptions_SetMaxEnvelopeSize(MI_DestinationOptions *options, MI_Uint32 sizeInKB) {
2665  if (options && options->ft) {
2666    return options->ft->SetNumber(options, MI_T("__MI_DESTINATIONOPTIONS_MAX_ENVELOPE_SIZE"), sizeInKB, 0);
2667  } else {
2668    return MI_RESULT_INVALID_PARAMETER;
2669  }
2670}
2671
2672MI_INLINE MI_Result MI_DestinationOptions_GetMaxEnvelopeSize(MI_DestinationOptions *options, MI_Uint32 *sizeInKB) {
2673  if (options && options->ft) {
2674    return options->ft->GetNumber(options, MI_T("__MI_DESTINATIONOPTIONS_MAX_ENVELOPE_SIZE"), sizeInKB, 0, 0);
2675  } else {
2676    return MI_RESULT_INVALID_PARAMETER;
2677  }
2678}
2679
2680MI_INLINE MI_Result MI_DestinationOptions_SetEncodePortInSPN(MI_DestinationOptions *options, MI_Boolean encodePort) {
2681  if (options && options->ft) {
2682    return options->ft->SetNumber(options, MI_T("__MI_DESTINATIONOPTIONS_ENCODE_PORT_IN_SPN"), encodePort, 0);
2683  } else {
2684    return MI_RESULT_INVALID_PARAMETER;
2685  }
2686}
2687
2688MI_INLINE MI_Result MI_DestinationOptions_GetEncodePortInSPN(MI_DestinationOptions *options, MI_Boolean *encodePort) {
2689  if (options && options->ft) {
2690    MI_Uint32 value;
2691    MI_Result result = options->ft->GetNumber(options, MI_T("__MI_DESTINATIONOPTIONS_ENCODE_PORT_IN_SPN"), &value, 0, 0);
2692    if (result == MI_RESULT_OK)
2693      *encodePort = (MI_Boolean) value;
2694    return result;
2695  } else {
2696    return MI_RESULT_INVALID_PARAMETER;
2697  }
2698}
2699
2700MI_INLINE MI_Result MI_DestinationOptions_SetHttpUrlPrefix(MI_DestinationOptions *options, const MI_Char *prefix) {
2701  if (options && options->ft) {
2702    return options->ft->SetString(options, MI_T("__MI_DESTINATIONOPTIONS_HTTP_URL_PREFIX"), prefix, 0);
2703  } else {
2704    return MI_RESULT_INVALID_PARAMETER;
2705  }
2706}
2707
2708MI_INLINE MI_Result MI_DestinationOptions_GetHttpUrlPrefix(MI_DestinationOptions *options, const MI_Char **prefix) {
2709  if (options && options->ft) {
2710    return options->ft->GetString(options, MI_T("__MI_DESTINATIONOPTIONS_HTTP_URL_PREFIX"), prefix, 0, 0);
2711  } else {
2712    return MI_RESULT_INVALID_PARAMETER;
2713  }
2714}
2715
2716MI_INLINE MI_Result MI_DestinationOptions_SetDestinationPort(MI_DestinationOptions *options, MI_Uint32 port) {
2717  if (options && options->ft) {
2718    return options->ft->SetNumber(options, MI_T("__MI_DESTINATIONOPTIONS_DESTINATION_PORT"), port, 0);
2719  } else {
2720    return MI_RESULT_INVALID_PARAMETER;
2721  }
2722}
2723
2724MI_INLINE MI_Result MI_DestinationOptions_GetDestinationPort(MI_DestinationOptions *options, MI_Uint32 *port) {
2725  if (options && options->ft) {
2726    return options->ft->GetNumber(options, MI_T("__MI_DESTINATIONOPTIONS_DESTINATION_PORT"), port, 0, 0);
2727  } else {
2728    return MI_RESULT_INVALID_PARAMETER;
2729  }
2730}
2731
2732#define MI_DESTINATIONOPTIONS_TRANSPORT_HTTP MI_T("HTTP")
2733#define MI_DESTINATIONOPTIONS_TRANPSORT_HTTPS MI_T("HTTPS")
2734
2735MI_INLINE MI_Result MI_DestinationOptions_SetTransport(MI_DestinationOptions *options, const MI_Char *transport) {
2736  if (options && options->ft) {
2737    return options->ft->SetString(options, MI_T("__MI_DESTINATIONOPTIONS_TRANSPORT"), transport, 0);
2738  } else {
2739    return MI_RESULT_INVALID_PARAMETER;
2740  }
2741}
2742
2743MI_INLINE MI_Result MI_DestinationOptions_GetTransport(MI_DestinationOptions *options, const MI_Char **transport) {
2744  if (options && options->ft) {
2745    return options->ft->GetString(options, MI_T("__MI_DESTINATIONOPTIONS_TRANSPORT"), transport, 0, 0);
2746  } else {
2747    return MI_RESULT_INVALID_PARAMETER;
2748  }
2749}
2750
2751#define MI_DESTINATIONOPTIONS_PROXY_TYPE_IE MI_T("IE")
2752#define MI_DESTINATIONOPTIONS_PROXY_TYPE_WINHTTP MI_T("WinHTTP")
2753#define MI_DESTINATIONOPTIONS_PROXY_TYPE_AUTO MI_T("Auto")
2754#define MI_DESTINATIONOPTIONS_PROXY_TYPE_NONE MI_T("None")
2755
2756MI_INLINE MI_Result MI_DestinationOptions_SetProxyType(MI_DestinationOptions *options, const MI_Char *proxyType) {
2757  if (options && options->ft) {
2758    return options->ft->SetString(options, MI_T("__MI_DESTINATIONOPTIONS_PROXY_TYPE"), proxyType, 0);
2759  } else {
2760    return MI_RESULT_INVALID_PARAMETER;
2761  }
2762}
2763
2764MI_INLINE MI_Result MI_DestinationOptions_GetProxyType(MI_DestinationOptions *options, const MI_Char **proxyType) {
2765  if (options && options->ft) {
2766    return options->ft->GetString(options, MI_T("__MI_DESTINATIONOPTIONS_PROXY_TYPE"), proxyType, 0, 0);
2767  } else {
2768    return MI_RESULT_INVALID_PARAMETER;
2769  }
2770}
2771
2772MI_INLINE MI_Result MI_DestinationOptions_AddProxyCredentials(MI_DestinationOptions *options, const MI_UserCredentials *credentials) {
2773  if (options && options->ft) {
2774    return options->ft->AddCredentials(options, MI_T("__MI_DESTINATIONOPTIONS_PROXY_CREDENTIALS"), credentials, 0);
2775  } else {
2776    return MI_RESULT_INVALID_PARAMETER;
2777  }
2778}
2779
2780MI_INLINE MI_Result MI_DestinationOptions_AddDestinationCredentials(MI_DestinationOptions *options, const MI_UserCredentials *credentials) {
2781  if (options && options->ft) {
2782    return options->ft->AddCredentials(options, MI_T("__MI_DESTINATIONOPTIONS_DESTINATION_CREDENTIALS"), credentials, 0);
2783  } else {
2784    return MI_RESULT_INVALID_PARAMETER;
2785  }
2786}
2787
2788typedef enum _MI_DestinationOptions_ImpersonationType {
2789  MI_DestinationOptions_ImpersonationType_Default = 0,
2790  MI_DestinationOptions_ImpersonationType_None = 1,
2791  MI_DestinationOptions_ImpersonationType_Identify = 2,
2792  MI_DestinationOptions_ImpersonationType_Impersonate = 3,
2793  MI_DestinationOptions_ImpersonationType_Delegate = 4
2794} MI_DestinationOptions_ImpersonationType;
2795
2796MI_INLINE MI_Result MI_DestinationOptions_SetImpersonationType(MI_DestinationOptions *options, MI_DestinationOptions_ImpersonationType impersonationType) {
2797  if (options && options->ft) {
2798    return options->ft->SetNumber(options, MI_T("__MI_DESTINATIONOPTIONS_IMPERSONATION_TYPE"), impersonationType, 0);
2799  } else {
2800    return MI_RESULT_INVALID_PARAMETER;
2801  }
2802}
2803
2804MI_INLINE MI_Result MI_DestinationOptions_GetImpersonationType(MI_DestinationOptions *options, MI_DestinationOptions_ImpersonationType * impersonationType) {
2805  if (options && options->ft) {
2806    MI_Uint32 value;
2807    MI_Result result = options->ft->GetNumber(options, MI_T("__MI_DESTINATIONOPTIONS_IMPERSONATION_TYPE"), &value, 0, 0);
2808    if (result == MI_RESULT_OK)
2809      *impersonationType = (MI_DestinationOptions_ImpersonationType) value;
2810    return result;
2811  } else {
2812    return MI_RESULT_INVALID_PARAMETER;
2813  }
2814}
2815
2816MI_INLINE MI_Result MI_DestinationOptions_SetString(MI_DestinationOptions *options, const MI_Char *optionName, const MI_Char *optionValue) {
2817  if (options && options->ft) {
2818    return options->ft->SetString(options, optionName, optionValue, 0);
2819  } else {
2820    return MI_RESULT_INVALID_PARAMETER;
2821  }
2822}
2823
2824MI_INLINE MI_Result MI_DestinationOptions_GetString(MI_DestinationOptions *options, const MI_Char *optionName, const MI_Char **optionValue, MI_Uint32 *index) {
2825  if (options && options->ft) {
2826    return options->ft->GetString(options, optionName, optionValue, index, 0);
2827  } else {
2828    return MI_RESULT_INVALID_PARAMETER;
2829  }
2830}
2831
2832MI_INLINE MI_Result MI_DestinationOptions_SetNumber(MI_DestinationOptions *options, const MI_Char *optionName, MI_Uint32 optionValue) {
2833  if (options && options->ft) {
2834    return options->ft->SetNumber(options, optionName, optionValue, 0);
2835  } else {
2836    return MI_RESULT_INVALID_PARAMETER;
2837  }
2838}
2839
2840MI_INLINE MI_Result MI_DestinationOptions_GetNumber(MI_DestinationOptions *options, const MI_Char *optionName, MI_Uint32 *optionValue, MI_Uint32 *index) {
2841  if (options && options->ft) {
2842    return options->ft->GetNumber(options, optionName, optionValue, index, 0);
2843  } else {
2844    return MI_RESULT_INVALID_PARAMETER;
2845  }
2846}
2847
2848MI_INLINE MI_Result MI_DestinationOptions_GetOptionCount(MI_DestinationOptions *options, MI_Uint32 *count) {
2849  if (options && options->ft) {
2850    return options->ft->GetOptionCount(options, count);
2851  } else {
2852    return MI_RESULT_INVALID_PARAMETER;
2853  }
2854}
2855
2856MI_INLINE MI_Result MI_DestinationOptions_GetOptionAt(MI_DestinationOptions *options, MI_Uint32 index, const MI_Char **optionName, MI_Value *value, MI_Type *type, MI_Uint32 *flags) {
2857  if (options && options->ft) {
2858    return options->ft->GetOptionAt(options, index, optionName, value, type, flags);
2859  } else {
2860    return MI_RESULT_INVALID_PARAMETER;
2861  }
2862}
2863
2864MI_INLINE MI_Result MI_DestinationOptions_GetOption(MI_DestinationOptions *options, const MI_Char *optionName, MI_Value *value, MI_Type *type, MI_Uint32 *index, MI_Uint32 *flags) {
2865  if (options && options->ft) {
2866    return options->ft->GetOption(options, optionName, value, type, index, flags);
2867  } else {
2868    return MI_RESULT_INVALID_PARAMETER;
2869  }
2870}
2871
2872MI_INLINE MI_Result MI_DestinationOptions_GetCredentialsCount(MI_DestinationOptions *options, MI_Uint32 *count) {
2873  if (options && options->ft) {
2874    return options->ft->GetCredentialsCount(options, count);
2875  } else {
2876    return MI_RESULT_INVALID_PARAMETER;
2877  }
2878}
2879
2880MI_INLINE MI_Result MI_DestinationOptions_GetCredentialsAt(MI_DestinationOptions *options, MI_Uint32 index, const MI_Char **optionName, MI_UserCredentials *credentials, MI_Uint32 *flags) {
2881  if (options && options->ft) {
2882    return options->ft->GetCredentialsAt(options, index, optionName, credentials, flags);
2883  } else {
2884    return MI_RESULT_INVALID_PARAMETER;
2885  }
2886}
2887
2888MI_INLINE MI_Result MI_DestinationOptions_GetCredentialsPasswordAt(MI_DestinationOptions *options, MI_Uint32 index, const MI_Char **optionName, MI_Char *password, MI_Uint32 bufferLength, MI_Uint32 *passwordLength, MI_Uint32 *flags) {
2889  if (options && options->ft) {
2890    return options->ft->GetCredentialsPasswordAt(options, index, optionName, password, bufferLength, passwordLength, flags);
2891  } else {
2892    return MI_RESULT_INVALID_PARAMETER;
2893  }
2894}
2895
2896MI_INLINE MI_Result MI_INLINE_CALL MI_DestinationOptions_Clone(const MI_DestinationOptions* self, MI_DestinationOptions* newDestinationOptions) {
2897  if (self && self->ft) {
2898    return self->ft->Clone(self, newDestinationOptions);
2899  } else {
2900    return MI_RESULT_INVALID_PARAMETER;
2901  }
2902}
2903
2904MI_INLINE void MI_OperationOptions_Delete(MI_OperationOptions *options) {
2905  if (options && options->ft) {
2906    options->ft->Delete(options);
2907  }
2908}
2909
2910MI_INLINE MI_Result MI_OperationOptions_SetWriteErrorMode(MI_OperationOptions *options, MI_CallbackMode mode) {
2911  if (options && options->ft) {
2912    return options->ft->SetNumber(options, MI_T("__MI_OPERATIONOPTIONS_WRITEERRORMODE"), mode, 0);
2913  } else {
2914    return MI_RESULT_INVALID_PARAMETER;
2915  }
2916}
2917
2918MI_INLINE MI_Result MI_OperationOptions_GetWriteErrorMode(MI_OperationOptions *options, MI_CallbackMode *mode) {
2919  if (options && options->ft) {
2920    MI_Uint32 value;
2921    MI_Result result = options->ft->GetNumber(options, MI_T("__MI_OPERATIONOPTIONS_WRITEERRORMODE"), &value, 0, 0);
2922    if (result == MI_RESULT_OK)
2923      *mode = (MI_CallbackMode) value;
2924    return result;
2925  } else {
2926    return MI_RESULT_INVALID_PARAMETER;
2927  }
2928}
2929
2930MI_INLINE MI_Result MI_OperationOptions_SetPromptUserMode(MI_OperationOptions *options, MI_CallbackMode mode) {
2931  if (options && options->ft) {
2932    return options->ft->SetNumber(options, MI_T("__MI_OPERATIONOPTIONS_PROMPTUSERMODE"), mode, 0);
2933  } else {
2934    return MI_RESULT_INVALID_PARAMETER;
2935  }
2936}
2937
2938MI_INLINE MI_Result MI_OperationOptions_GetPromptUserMode(MI_OperationOptions *options, MI_CallbackMode *mode) {
2939  if (options && options->ft) {
2940    MI_Uint32 value;
2941    MI_Result result = options->ft->GetNumber(options, MI_T("__MI_OPERATIONOPTIONS_PROMPTUSERMODE"), &value, 0, 0);
2942    if (result == MI_RESULT_OK)
2943      *mode = (MI_CallbackMode) value;
2944    return result;
2945  } else {
2946    return MI_RESULT_INVALID_PARAMETER;
2947  }
2948}
2949
2950MI_INLINE MI_Result MI_OperationOptions_SetPromptUserRegularMode(MI_OperationOptions *options, MI_CallbackMode mode, MI_Boolean ackValue) {
2951  if (options && options->ft) {
2952    MI_Result result = options->ft->SetNumber(options, MI_T("__MI_OPERATIONOPTIONS_PROMPTUSERMODE"), mode, 0);
2953    if( result == MI_RESULT_OK)
2954      return options->ft->SetNumber(options, MI_T("__MI_OPERATIONOPTIONS_PROMPTUSERMODEREGULAR_ACKVALUE"), ackValue, 0);
2955    else
2956      return result;
2957  } else {
2958    return MI_RESULT_INVALID_PARAMETER;
2959  }
2960}
2961
2962MI_INLINE MI_Result MI_OperationOptions_GetPromptUserRegularMode(MI_OperationOptions *options, MI_CallbackMode *mode, MI_Boolean *ackValue) {
2963  if (options && options->ft) {
2964    MI_Uint32 _mode;
2965    MI_Result result = options->ft->GetNumber(options, MI_T("__MI_OPERATIONOPTIONS_PROMPTUSERMODE"), &_mode, 0, 0);
2966    if( result == MI_RESULT_OK) {
2967      MI_Uint32 _ackValue;
2968      result = options->ft->GetNumber(options, MI_T("__MI_OPERATIONOPTIONS_PROMPTUSERMODEREGULAR_ACKVALUE"), &_ackValue, 0, 0);
2969      if( result == MI_RESULT_OK) {
2970        *mode = (MI_CallbackMode)_mode;
2971        *ackValue = (MI_Boolean) _ackValue;
2972      }
2973    }
2974    return result;
2975  } else {
2976    return MI_RESULT_INVALID_PARAMETER;
2977  }
2978}
2979
2980MI_INLINE MI_Result MI_OperationOptions_SetProviderArchitecture(MI_OperationOptions *options, MI_ProviderArchitecture architecture, MI_Boolean mustComply) {
2981  if (options && options->ft) {
2982    MI_Result result = options->ft->SetNumber(options, MI_T("__MI_OPERATIONOPTIONS_PROVIDER_ARCHITECTURE"), architecture, 0);
2983    if(result == MI_RESULT_OK)
2984      return options->ft->SetNumber(options, MI_T("__MI_OPERATIONOPTIONS_REQUIRED_ARCHITECTURE"), mustComply, 0);
2985    else
2986      return result;
2987  } else {
2988    return MI_RESULT_INVALID_PARAMETER;
2989  }
2990}
2991
2992MI_INLINE MI_Result MI_OperationOptions_GetProviderArchitecture(MI_OperationOptions *options, MI_ProviderArchitecture *architecture, MI_Boolean *mustComply) {
2993  if (options && options->ft) {
2994    MI_Uint32 _architecture;
2995    MI_Result result = options->ft->GetNumber(options, MI_T("__MI_OPERATIONOPTIONS_PROVIDER_ARCHITECTURE"), &_architecture, 0, 0);
2996    if(result == MI_RESULT_OK) {
2997      MI_Uint32 _mustComply;
2998      result = options->ft->GetNumber(options, MI_T("__MI_OPERATIONOPTIONS_REQUIRED_ARCHITECTURE"), &_mustComply, 0, 0);
2999      if(result == MI_RESULT_OK) {
3000        *architecture = (MI_ProviderArchitecture)_architecture;
3001        *mustComply = (MI_Boolean)_mustComply;
3002      }
3003    }
3004    return result;
3005  } else {
3006    return MI_RESULT_INVALID_PARAMETER;
3007  }
3008}
3009
3010MI_INLINE MI_Result MI_OperationOptions_EnableChannel(MI_OperationOptions *options, MI_Uint32 channel) {
3011  if (options && options->ft) {
3012    return options->ft->SetNumber(options, MI_T("__MI_OPERATIONOPTIONS_CHANNEL"), channel, 0);
3013  } else {
3014    return MI_RESULT_INVALID_PARAMETER;
3015  }
3016}
3017
3018MI_INLINE MI_Result MI_OperationOptions_DisableChannel(MI_OperationOptions *options, MI_Uint32 channel) {
3019  if (options && options->ft) {
3020    return options->ft->SetNumber(options, MI_T("__MI_OPERATIONOPTIONS_CHANNEL"), channel, 1);
3021  } else {
3022    return MI_RESULT_INVALID_PARAMETER;
3023  }
3024}
3025
3026MI_INLINE MI_Result MI_OperationOptions_GetEnabledChannels(MI_OperationOptions *options, MI_Uint32 *channels, MI_Uint32 bufferLength, MI_Uint32 *channelCount, MI_Uint32 *flags) {
3027  if (options && options->ft) {
3028    return options->ft->GetEnabledChannels(options, MI_T("__MI_OPERATIONOPTIONS_CHANNEL"), channels, bufferLength, channelCount, flags);
3029  } else {
3030    return MI_RESULT_INVALID_PARAMETER;
3031  }
3032}
3033
3034MI_INLINE MI_Result MI_OperationOptions_SetTimeout(MI_OperationOptions *options, const MI_Interval *timeout) {
3035  if (options && options->ft) {
3036    return options->ft->SetInterval(options, MI_T("__MI_OPERATIONOPTIONS_TIMEOUT"), timeout, 0);
3037  } else {
3038    return MI_RESULT_INVALID_PARAMETER;
3039  }
3040}
3041
3042MI_INLINE MI_Result MI_OperationOptions_GetTimeout(MI_OperationOptions *options, MI_Interval *timeout) {
3043  if (options && options->ft) {
3044    return options->ft->GetInterval(options, MI_T("__MI_OPERATIONOPTIONS_TIMEOUT"), timeout, 0, 0);
3045  } else {
3046    return MI_RESULT_INVALID_PARAMETER;
3047  }
3048}
3049
3050MI_INLINE MI_Result MI_OperationOptions_SetResourceUriPrefix(MI_OperationOptions *options, const MI_Char *ruriPrefix) {
3051  if (options && options->ft) {
3052    return options->ft->SetString(options, MI_T("__MI_OPERATIONOPTIONS_RESOURCE_URI_PREFIX"), ruriPrefix, 0);
3053  } else {
3054    return MI_RESULT_INVALID_PARAMETER;
3055  }
3056}
3057
3058MI_INLINE MI_Result MI_OperationOptions_GetResourceUriPrefix(MI_OperationOptions *options, const MI_Char **ruriPrefix) {
3059  if (options && options->ft) {
3060    return options->ft->GetString(options, MI_T("__MI_OPERATIONOPTIONS_RESOURCE_URI_PREFIX"), ruriPrefix, 0, 0);
3061  } else {
3062    return MI_RESULT_INVALID_PARAMETER;
3063  }
3064}
3065
3066MI_INLINE MI_Result MI_OperationOptions_SetResourceUri(MI_OperationOptions *options, const MI_Char *rUri) {
3067  if (options && options->ft) {
3068    return options->ft->SetString(options, MI_T("__MI_OPERATIONOPTIONS_RESOURCE_URI"), rUri, 0);
3069  } else {
3070    return MI_RESULT_INVALID_PARAMETER;
3071  }
3072}
3073
3074MI_INLINE MI_Result MI_OperationOptions_GetResourceUri(MI_OperationOptions *options, const MI_Char **rUri) {
3075  if (options && options->ft) {
3076    return options->ft->GetString(options, MI_T("__MI_OPERATIONOPTIONS_RESOURCE_URI"), rUri, 0, 0);
3077  } else {
3078    return MI_RESULT_INVALID_PARAMETER;
3079  }
3080}
3081
3082MI_INLINE MI_Result MI_OperationOptions_SetUseMachineID(MI_OperationOptions *options, MI_Boolean machineID) {
3083  if (options && options->ft) {
3084    return options->ft->SetNumber(options, MI_T("__MI_OPERATIONOPTIONS_USE_MACHINE_ID"), machineID, 0);
3085  } else {
3086    return MI_RESULT_INVALID_PARAMETER;
3087  }
3088}
3089
3090MI_INLINE MI_Result MI_OperationOptions_GetUseMachineID(MI_OperationOptions *options, MI_Boolean *machineID) {
3091  if (options && options->ft) {
3092    MI_Uint32 value;
3093    MI_Result result = options->ft->GetNumber(options, MI_T("__MI_OPERATIONOPTIONS_USE_MACHINE_ID"), &value, 0, 0);
3094    if (result == MI_RESULT_OK)
3095      *machineID = (MI_Boolean) value;
3096    return result;
3097  } else {
3098    return MI_RESULT_INVALID_PARAMETER;
3099  }
3100}
3101
3102MI_INLINE MI_Result MI_OperationOptions_SetCustomOption(MI_OperationOptions *options, const MI_Char *optionName, MI_Type optionValueType, const MI_Value *optionValue, MI_Boolean mustComply) {
3103  if (options && options->ft) {
3104    return options->ft->SetCustomOption(options, optionName, optionValueType, optionValue, mustComply, 0);
3105  } else {
3106    return MI_RESULT_INVALID_PARAMETER;
3107  }
3108}
3109
3110MI_INLINE MI_Result MI_OperationOptions_GetOptionCount(MI_OperationOptions *options, MI_Uint32 *count) {
3111  if (options && options->ft) {
3112    return options->ft->GetOptionCount(options, count);
3113  } else {
3114    return MI_RESULT_INVALID_PARAMETER;
3115  }
3116}
3117
3118MI_INLINE MI_Result MI_OperationOptions_GetOptionAt(MI_OperationOptions *options, MI_Uint32 index, const MI_Char **optionName, MI_Value *value, MI_Type *type, MI_Uint32 *flags) {
3119  if (options && options->ft) {
3120    return options->ft->GetOptionAt(options, index, optionName, value, type, flags);
3121  } else {
3122    return MI_RESULT_INVALID_PARAMETER;
3123  }
3124}
3125
3126MI_INLINE MI_Result MI_OperationOptions_SetString(MI_OperationOptions *options, const MI_Char *optionName, const MI_Char *value, MI_Uint32 flags) {
3127  if (options && options->ft) {
3128    return options->ft->SetString(options, optionName, value, flags);
3129  } else {
3130    return MI_RESULT_INVALID_PARAMETER;
3131  }
3132}
3133
3134MI_INLINE MI_Result MI_OperationOptions_GetString(MI_OperationOptions *options, const MI_Char *optionName, const MI_Char **value, MI_Uint32 *index, MI_Uint32 *flags) {
3135  if (options && options->ft) {
3136    return options->ft->GetString(options, optionName, value, index, flags);
3137  } else {
3138    return MI_RESULT_INVALID_PARAMETER;
3139  }
3140}
3141
3142MI_INLINE MI_Result MI_OperationOptions_SetNumber(MI_OperationOptions *options, const MI_Char *optionName, MI_Uint32 value, MI_Uint32 flags) {
3143  if (options && options->ft) {
3144    return options->ft->SetNumber(options, optionName, value, flags);
3145  } else {
3146    return MI_RESULT_INVALID_PARAMETER;
3147  }
3148}
3149
3150MI_INLINE MI_Result MI_OperationOptions_GetNumber(MI_OperationOptions *options, const MI_Char *optionName, MI_Uint32 *value, MI_Uint32 *index, MI_Uint32 *flags) {
3151  if (options && options->ft) {
3152    return options->ft->GetNumber(options, optionName, value, index, flags);
3153  } else {
3154    return MI_RESULT_INVALID_PARAMETER;
3155  }
3156}
3157
3158MI_INLINE MI_Result MI_OperationOptions_GetOption(MI_OperationOptions *options, const MI_Char *optionName, MI_Value *value, MI_Type *type, MI_Uint32 *index, MI_Uint32 *flags) {
3159  if (options && options->ft) {
3160    return options->ft->GetOption(options, optionName, value, type, index, flags);
3161  } else {
3162    return MI_RESULT_INVALID_PARAMETER;
3163  }
3164}
3165
3166MI_INLINE MI_Result MI_INLINE_CALL MI_OperationOptions_Clone(const MI_OperationOptions* self, MI_OperationOptions* newOperationOptions) {
3167  if (self && self->ft) {
3168    return self->ft->Clone(self, newOperationOptions);
3169  } else {
3170    return MI_RESULT_INVALID_PARAMETER;
3171  }
3172}
3173
3174MI_INLINE MI_Result MI_Class_GetClassName(const MI_Class* self, const MI_Char** className) {
3175  if (self && self->ft) {
3176    return self->ft->GetClassName(self, className);
3177  } else {
3178    return MI_RESULT_INVALID_PARAMETER;
3179  }
3180}
3181
3182MI_INLINE MI_Result MI_Class_GetNameSpace(const MI_Class* self, const MI_Char** nameSpace) {
3183  if (self && self->ft) {
3184    return self->ft->GetNameSpace(self, nameSpace);
3185  } else {
3186    return MI_RESULT_INVALID_PARAMETER;
3187  }
3188}
3189
3190MI_INLINE MI_Result MI_Class_GetServerName(const MI_Class* self, const MI_Char** serverName) {
3191  if (self && self->ft) {
3192    return self->ft->GetServerName(self, serverName);
3193  } else {
3194    return MI_RESULT_INVALID_PARAMETER;
3195  }
3196}
3197
3198MI_INLINE MI_Result MI_Class_GetElementCount(const MI_Class* self, MI_Uint32* count) {
3199  if (self && self->ft) {
3200    return self->ft->GetElementCount(self, count);
3201  } else {
3202    return MI_RESULT_INVALID_PARAMETER;
3203  }
3204}
3205
3206MI_INLINE MI_Result MI_Class_GetElement(const MI_Class* self, const MI_Char* name, MI_Value* value, MI_Boolean* valueExists, MI_Type* type, MI_Char **referenceClass, MI_QualifierSet *qualifierSet, MI_Uint32* flags, MI_Uint32* index) {
3207  if (self && self->ft) {
3208    return self->ft->GetElement(self, name, value, valueExists, type, referenceClass, qualifierSet, flags, index);
3209  } else {
3210    return MI_RESULT_INVALID_PARAMETER;
3211  }
3212}
3213
3214MI_INLINE MI_Result MI_Class_GetElementAt(const MI_Class* self, MI_Uint32 index, const MI_Char** name, MI_Value* value, MI_Boolean* valueExists, MI_Type* type, MI_Char **referenceClass, MI_QualifierSet *qualifierSet, MI_Uint32* flags) {
3215  if (self && self->ft) {
3216    return self->ft->GetElementAt(self, index, name, value, valueExists, type, referenceClass, qualifierSet, flags);
3217  } else {
3218    return MI_RESULT_INVALID_PARAMETER;
3219  }
3220}
3221
3222MI_INLINE MI_Result MI_Class_GetClassQualifierSet(const MI_Class* self, MI_QualifierSet *qualifierSet) {
3223  if (self && self->ft) {
3224    return self->ft->GetClassQualifierSet(self, qualifierSet);
3225  } else {
3226    return MI_RESULT_INVALID_PARAMETER;
3227  }
3228}
3229
3230MI_INLINE MI_Result MI_Class_GetMethodCount(const MI_Class* self, MI_Uint32* count) {
3231  if (self && self->ft) {
3232    return self->ft->GetMethodCount(self, count);
3233  } else {
3234    return MI_RESULT_INVALID_PARAMETER;
3235  }
3236}
3237
3238MI_INLINE MI_Result MI_Class_GetMethodAt(const MI_Class *self, MI_Uint32 index, const MI_Char **name, MI_QualifierSet *qualifierSet, MI_ParameterSet *parameterSet) {
3239  if (self && self->ft) {
3240    return self->ft->GetMethodAt(self, index, name, qualifierSet, parameterSet);
3241  } else {
3242    return MI_RESULT_INVALID_PARAMETER;
3243  }
3244}
3245
3246MI_INLINE MI_Result MI_Class_GetMethod(const MI_Class *self, const MI_Char *name, MI_QualifierSet *qualifierSet, MI_ParameterSet *parameterSet, MI_Uint32 *index) {
3247  if (self && self->ft) {
3248    return self->ft->GetMethod(self, name, qualifierSet, parameterSet, index);
3249  } else {
3250    return MI_RESULT_INVALID_PARAMETER;
3251  }
3252}
3253
3254MI_INLINE MI_Result MI_Class_GetParentClassName(const MI_Class *self, const MI_Char **name) {
3255  if (self && self->ft) {
3256    return self->ft->GetParentClassName(self, name);
3257  } else {
3258    return MI_RESULT_INVALID_PARAMETER;
3259  }
3260}
3261
3262MI_INLINE MI_Result MI_Class_GetParentClass(const MI_Class *self, MI_Class **parentClass) {
3263  if (self && self->ft) {
3264    return self->ft->GetParentClass(self, parentClass);
3265  } else {
3266    return MI_RESULT_INVALID_PARAMETER;
3267  }
3268}
3269
3270MI_INLINE MI_Result MI_Class_Delete(MI_Class* self) {
3271  if (self && self->ft) {
3272    return self->ft->Delete(self);
3273  } else {
3274    return MI_RESULT_INVALID_PARAMETER;
3275  }
3276}
3277
3278MI_INLINE MI_Result MI_INLINE_CALL MI_Class_Clone(const MI_Class* self, MI_Class** newClass) {
3279  if (self && self->ft) {
3280    return self->ft->Clone(self, newClass);
3281  } else {
3282    return MI_RESULT_INVALID_PARAMETER;
3283  }
3284}
3285
3286MI_INLINE MI_Result MI_ParameterSet_GetMethodReturnType(const MI_ParameterSet *self, MI_Type *returnType, MI_QualifierSet *qualifierSet) {
3287  if (self && self->ft) {
3288    return self->ft->GetMethodReturnType(self, returnType, qualifierSet);
3289  } else {
3290    return MI_RESULT_INVALID_PARAMETER;
3291  }
3292}
3293
3294MI_INLINE MI_Result MI_ParameterSet_GetParameterCount(const MI_ParameterSet *self, MI_Uint32 *count) {
3295  if (self && self->ft) {
3296    return self->ft->GetParameterCount(self, count);
3297  } else {
3298    return MI_RESULT_INVALID_PARAMETER;
3299  }
3300}
3301
3302MI_INLINE MI_Result MI_ParameterSet_GetParameterAt(const MI_ParameterSet *self, MI_Uint32 index, const MI_Char **name, MI_Type *parameterType, MI_Char **referenceClass, MI_QualifierSet *qualifierSet) {
3303  if (self && self->ft) {
3304    return self->ft->GetParameterAt(self, index, name, parameterType, referenceClass, qualifierSet);
3305  } else {
3306    return MI_RESULT_INVALID_PARAMETER;
3307  }
3308}
3309
3310MI_INLINE MI_Result MI_ParameterSet_GetParameter(const MI_ParameterSet *self, const MI_Char *name, MI_Type *parameterType, MI_Char **referenceClass, MI_QualifierSet *qualifierSet, MI_Uint32 *index) {
3311  if (self && self->ft) {
3312    return self->ft->GetParameter(self, name, parameterType, referenceClass, qualifierSet, index);
3313  } else {
3314    return MI_RESULT_INVALID_PARAMETER;
3315  }
3316}
3317
3318MI_INLINE MI_Result MI_QualifierSet_GetQualifierCount(const MI_QualifierSet *self, MI_Uint32 *count) {
3319  if (self && self->ft) {
3320    return self->ft->GetQualifierCount(self, count);
3321  } else {
3322    return MI_RESULT_INVALID_PARAMETER;
3323  }
3324}
3325
3326MI_INLINE MI_Result MI_QualifierSet_GetQualifierAt(const MI_QualifierSet *self, MI_Uint32 index, const MI_Char **name, MI_Type *qualifierType, MI_Uint32 *qualifierFlags, MI_Value *qualifierValue) {
3327  if (self && self->ft) {
3328    return self->ft->GetQualifierAt(self, index, name, qualifierType, qualifierFlags, qualifierValue);
3329  } else {
3330    return MI_RESULT_INVALID_PARAMETER;
3331  }
3332}
3333
3334MI_INLINE MI_Result MI_QualifierSet_GetQualifier(const MI_QualifierSet *self, const MI_Char *name, MI_Type *qualifierType, MI_Uint32 *qualifierFlags, MI_Value *qualifierValue, MI_Uint32 *index) {
3335  if (self && self->ft) {
3336    return self->ft->GetQualifier(self, name, qualifierType, qualifierFlags, qualifierValue, index);
3337  } else {
3338    return MI_RESULT_INVALID_PARAMETER;
3339  }
3340}
3341
3342MI_INLINE MI_Result MI_SubscriptionDeliveryOptions_SetMaximumLatency(MI_SubscriptionDeliveryOptions *self, MI_Interval *value) {
3343  if (self && self->ft) {
3344    return self->ft->SetInterval(self, MI_T("__MI_SUBSCRIPTIONDELIVERYOPTIONS_SET_MAXIMUM_LATENCY"), value, 0);
3345  } else {
3346    return MI_RESULT_INVALID_PARAMETER;
3347  }
3348}
3349
3350MI_INLINE MI_Result MI_SubscriptionDeliveryOptions_GetMaximumLatency(MI_SubscriptionDeliveryOptions *self, MI_Interval *value) {
3351  if (self && self->ft) {
3352    return self->ft->GetInterval(self, MI_T("__MI_SUBSCRIPTIONDELIVERYOPTIONS_SET_MAXIMUM_LATENCY"), value, 0, 0);
3353  } else {
3354    return MI_RESULT_INVALID_PARAMETER;
3355  }
3356}
3357
3358MI_INLINE MI_Result MI_SubscriptionDeliveryOptions_SetHeartbeatInterval(MI_SubscriptionDeliveryOptions *self, MI_Interval *value) {
3359  if (self && self->ft) {
3360    return self->ft->SetInterval(self, MI_T("__MI_SUBSCRIPTIONDELIVERYOPTIONS_SET_HEARTBEAT_INTERVAL"), value, 0);
3361  } else {
3362    return MI_RESULT_INVALID_PARAMETER;
3363  }
3364}
3365
3366MI_INLINE MI_Result MI_SubscriptionDeliveryOptions_GetHeartbeatInterval(MI_SubscriptionDeliveryOptions *self, MI_Interval *value) {
3367  if (self && self->ft) {
3368    return self->ft->GetInterval(self, MI_T("__MI_SUBSCRIPTIONDELIVERYOPTIONS_SET_HEARTBEAT_INTERVAL"), value, 0, 0);
3369  } else {
3370    return MI_RESULT_INVALID_PARAMETER;
3371  }
3372}
3373
3374MI_INLINE MI_Result MI_SubscriptionDeliveryOptions_SetExpirationTime(MI_SubscriptionDeliveryOptions *self, MI_Datetime *value) {
3375  if (self && self->ft) {
3376    return self->ft->SetDateTime(self, MI_T("__MI_SUBSCRIPTIONDELIVERYOPTIONS_SET_EXPIRATION_TIME"), value, 0);
3377  } else {
3378    return MI_RESULT_INVALID_PARAMETER;
3379  }
3380}
3381
3382MI_INLINE MI_Result MI_SubscriptionDeliveryOptions_GetExpirationTime(MI_SubscriptionDeliveryOptions *self, MI_Datetime *value) {
3383  if (self && self->ft) {
3384    return self->ft->GetDateTime(self, MI_T("__MI_SUBSCRIPTIONDELIVERYOPTIONS_SET_EXPIRATION_TIME"), value, 0, 0);
3385  } else {
3386    return MI_RESULT_INVALID_PARAMETER;
3387  }
3388}
3389
3390#define MI_SUBSCRIBE_BOOKMARK_OLDEST L"MI_SUBSCRIBE_BOOKMARK_OLDEST"
3391#define MI_SUBSCRIBE_BOOKMARK_NEWEST L"MI_SUBSCRIBE_BOOKMARK_NEWEST"
3392
3393MI_INLINE MI_Result MI_SubscriptionDeliveryOptions_SetBookmark(MI_SubscriptionDeliveryOptions *self, const MI_Char *value) {
3394  if (self && self->ft) {
3395    return self->ft->SetString(self, MI_T("__MI_SUBSCRIPTIONDELIVERYOPTIONS_SET_BOOKMARK"), value, 0);
3396  } else {
3397    return MI_RESULT_INVALID_PARAMETER;
3398  }
3399}
3400
3401MI_INLINE MI_Result MI_SubscriptionDeliveryOptions_GetBookmark(MI_SubscriptionDeliveryOptions *self, const MI_Char **value) {
3402  if (self && self->ft) {
3403    return self->ft->GetString(self, MI_T("__MI_SUBSCRIPTIONDELIVERYOPTIONS_SET_BOOKMARK"), value, 0, 0);
3404  } else {
3405    return MI_RESULT_INVALID_PARAMETER;
3406  }
3407}
3408
3409MI_INLINE MI_Result MI_SubscriptionDeliveryOptions_SetDeliveryDestination(MI_SubscriptionDeliveryOptions *self, const MI_Char *value) {
3410  if (self && self->ft) {
3411    return self->ft->SetString(self, MI_T("__MI_SUBSCRIPTIONDELIVERYOPTIONS_SET_DELIVERY_DESTINATION"), value, 0);
3412  } else {
3413    return MI_RESULT_INVALID_PARAMETER;
3414  }
3415}
3416
3417MI_INLINE MI_Result MI_SubscriptionDeliveryOptions_GetDeliveryDestination(MI_SubscriptionDeliveryOptions *self, const MI_Char **value) {
3418  if (self && self->ft) {
3419    return self->ft->GetString(self, MI_T("__MI_SUBSCRIPTIONDELIVERYOPTIONS_SET_DELIVERY_DESTINATION"), value, 0, 0);
3420  } else {
3421    return MI_RESULT_INVALID_PARAMETER;
3422  }
3423}
3424
3425MI_INLINE MI_Result MI_SubscriptionDeliveryOptions_SetDeliveryPortNumber(MI_SubscriptionDeliveryOptions *self, MI_Uint32 value) {
3426  if (self && self->ft) {
3427    return self->ft->SetNumber(self, MI_T("__MI_SUBSCRIPTIONDELIVERYOPTIONS_SET_DELIVERY_PORT_NUMBER"), value, 0);
3428  } else {
3429    return MI_RESULT_INVALID_PARAMETER;
3430  }
3431}
3432
3433MI_INLINE MI_Result MI_SubscriptionDeliveryOptions_GetDeliveryPortNumber(MI_SubscriptionDeliveryOptions *self, MI_Uint32 *value) {
3434  if (self && self->ft) {
3435    return self->ft->GetNumber(self, MI_T("__MI_SUBSCRIPTIONDELIVERYOPTIONS_SET_DELIVERY_PORT_NUMBER"), value, 0, 0);
3436  } else {
3437    return MI_RESULT_INVALID_PARAMETER;
3438  }
3439}
3440
3441MI_INLINE MI_Result MI_SubscriptionDeliveryOptions_AddDeliveryCredentials(MI_SubscriptionDeliveryOptions *self, const MI_UserCredentials *value) {
3442  if (self && self->ft) {
3443    return self->ft->AddCredentials(self, MI_T("__MI_SUBSCRIPTIONDELIVERYOPTIONS_ADD_DELIVERY_CREDENTIALS"), value, 0);
3444  } else {
3445    return MI_RESULT_INVALID_PARAMETER;
3446  }
3447}
3448
3449MI_INLINE MI_Result MI_SubscriptionDeliveryOptions_SetDeliveryRetryInterval(MI_SubscriptionDeliveryOptions *self, const MI_Interval *value) {
3450  if (self && self->ft) {
3451    return self->ft->SetInterval(self, MI_T("__MI_SUBSCRIPTIONDELIVERYOPTIONS_SET_DELIVERY_RETRY_INTERVAL"), value, 0);
3452  } else {
3453    return MI_RESULT_INVALID_PARAMETER;
3454  }
3455}
3456
3457MI_INLINE MI_Result MI_SubscriptionDeliveryOptions_GetDeliveryRetryInterval(MI_SubscriptionDeliveryOptions *self, MI_Interval *value) {
3458  if (self && self->ft) {
3459    return self->ft->GetInterval(self, MI_T("__MI_SUBSCRIPTIONDELIVERYOPTIONS_SET_DELIVERY_RETRY_INTERVAL"), value, 0, 0);
3460  } else {
3461    return MI_RESULT_INVALID_PARAMETER;
3462  }
3463}
3464
3465MI_INLINE MI_Result MI_SubscriptionDeliveryOptions_SetDeliveryRetryAttempts(MI_SubscriptionDeliveryOptions *self, MI_Uint32 value) {
3466  if (self && self->ft) {
3467    return self->ft->SetNumber(self, MI_T("__MI_SUBSCRIPTIONDELIVERYOPTIONS_SET_DELIVERY_RETRY_ATTEMPTS"), value, 0);
3468  } else {
3469    return MI_RESULT_INVALID_PARAMETER;
3470  }
3471}
3472
3473MI_INLINE MI_Result MI_SubscriptionDeliveryOptions_GetDeliveryRetryAttempts(MI_SubscriptionDeliveryOptions *self, MI_Uint32 *value) {
3474  if (self && self->ft) {
3475    return self->ft->GetNumber(self, MI_T("__MI_SUBSCRIPTIONDELIVERYOPTIONS_SET_DELIVERY_RETRY_ATTEMPTS"), value, 0, 0);
3476  } else {
3477    return MI_RESULT_INVALID_PARAMETER;
3478  }
3479}
3480
3481MI_INLINE MI_Result MI_SubscriptionDeliveryOptions_Delete(MI_SubscriptionDeliveryOptions* self) {
3482  if (self && self->ft) {
3483    return self->ft->Delete(self);
3484  } else {
3485    return MI_RESULT_INVALID_PARAMETER;
3486  }
3487}
3488
3489MI_INLINE MI_Result MI_SubscriptionDeliveryOptions_SetString(MI_SubscriptionDeliveryOptions *self, const MI_Char *optionName, const MI_Char *value, MI_Uint32 flags) {
3490  if (self && self->ft) {
3491    return self->ft->SetString(self, optionName, value, flags);
3492  } else {
3493    return MI_RESULT_INVALID_PARAMETER;
3494  }
3495}
3496
3497MI_INLINE MI_Result MI_SubscriptionDeliveryOptions_SetNumber(MI_SubscriptionDeliveryOptions *self, const MI_Char *optionName, MI_Uint32 value, MI_Uint32 flags) {
3498  if (self && self->ft) {
3499    return self->ft->SetNumber(self, optionName, value, flags);
3500  } else {
3501    return MI_RESULT_INVALID_PARAMETER;
3502  }
3503}
3504
3505MI_INLINE MI_Result MI_SubscriptionDeliveryOptions_SetDateTime(MI_SubscriptionDeliveryOptions *self, const MI_Char *optionName, const MI_Datetime *value, MI_Uint32 flags) {
3506  if (self && self->ft) {
3507    return self->ft->SetDateTime(self, optionName, value, flags);
3508  } else {
3509    return MI_RESULT_INVALID_PARAMETER;
3510  }
3511}
3512
3513MI_INLINE MI_Result MI_SubscriptionDeliveryOptions_SetInterval(MI_SubscriptionDeliveryOptions *self, const MI_Char *optionName, const MI_Interval *value, MI_Uint32 flags) {
3514  if (self && self->ft) {
3515    return self->ft->SetInterval(self, optionName, value, flags);
3516  } else {
3517    return MI_RESULT_INVALID_PARAMETER;
3518  }
3519}
3520
3521MI_INLINE MI_Result MI_SubscriptionDeliveryOptions_GetString(MI_SubscriptionDeliveryOptions *self, const MI_Char *optionName, const MI_Char **value, MI_Uint32 *index, MI_Uint32 *flags) {
3522  if (self && self->ft) {
3523    return self->ft->GetString(self, optionName, value, index, flags);
3524  } else {
3525    return MI_RESULT_INVALID_PARAMETER;
3526  }
3527}
3528
3529MI_INLINE MI_Result MI_SubscriptionDeliveryOptions_GetNumber(MI_SubscriptionDeliveryOptions *self, const MI_Char *optionName, MI_Uint32 *value, MI_Uint32 *index, MI_Uint32 *flags) {
3530  if (self && self->ft) {
3531    return self->ft->GetNumber(self, optionName, value, index, flags);
3532  } else {
3533    return MI_RESULT_INVALID_PARAMETER;
3534  }
3535}
3536
3537MI_INLINE MI_Result MI_SubscriptionDeliveryOptions_GetDateTime(MI_SubscriptionDeliveryOptions *self, const MI_Char *optionName, MI_Datetime *value, MI_Uint32 *index, MI_Uint32 *flags) {
3538  if (self && self->ft) {
3539    return self->ft->GetDateTime(self, optionName, value, index, flags);
3540  } else {
3541    return MI_RESULT_INVALID_PARAMETER;
3542  }
3543}
3544
3545MI_INLINE MI_Result MI_SubscriptionDeliveryOptions_GetInterval(MI_SubscriptionDeliveryOptions *self, const MI_Char *optionName, MI_Interval *value, MI_Uint32 *index, MI_Uint32 *flags) {
3546  if (self && self->ft) {
3547    return self->ft->GetInterval(self, optionName, value, index, flags);
3548  } else {
3549    return MI_RESULT_INVALID_PARAMETER;
3550  }
3551}
3552
3553MI_INLINE MI_Result MI_SubscriptionDeliveryOptions_GetOptionCount( MI_SubscriptionDeliveryOptions *self, MI_Uint32 *count) {
3554  if (self && self->ft) {
3555    return self->ft->GetOptionCount(self, count);
3556  } else {
3557    return MI_RESULT_INVALID_PARAMETER;
3558  }
3559}
3560
3561MI_INLINE MI_Result MI_SubscriptionDeliveryOptions_GetOptionAt(MI_SubscriptionDeliveryOptions *self, MI_Uint32 index, const MI_Char **optionName, MI_Value *value, MI_Type *type, MI_Uint32 *flags) {
3562  if (self && self->ft) {
3563    return self->ft->GetOptionAt(self, index, optionName, value, type, flags);
3564  } else {
3565    return MI_RESULT_INVALID_PARAMETER;
3566  }
3567}
3568
3569MI_INLINE MI_Result MI_SubscriptionDeliveryOptions_GetOption(MI_SubscriptionDeliveryOptions *self, const MI_Char *optionName, MI_Value *value, MI_Type *type, MI_Uint32 *index, MI_Uint32 *flags) {
3570  if (self && self->ft) {
3571    return self->ft->GetOption(self, optionName, value, type, index, flags);
3572  } else {
3573    return MI_RESULT_INVALID_PARAMETER;
3574  }
3575}
3576
3577MI_INLINE MI_Result MI_SubscriptionDeliveryOptions_GetCredentialsCount(MI_SubscriptionDeliveryOptions *self, MI_Uint32 *count) {
3578  if (self && self->ft) {
3579    return self->ft->GetCredentialsCount(self, count);
3580  } else {
3581    return MI_RESULT_INVALID_PARAMETER;
3582  }
3583}
3584
3585MI_INLINE MI_Result MI_SubscriptionDeliveryOptions_GetCredentialsAt(MI_SubscriptionDeliveryOptions *self, MI_Uint32 index, const MI_Char **optionName, MI_UserCredentials *credentials, MI_Uint32 *flags) {
3586  if (self && self->ft) {
3587    return self->ft->GetCredentialsAt(self, index, optionName, credentials, flags);
3588  } else {
3589    return MI_RESULT_INVALID_PARAMETER;
3590  }
3591}
3592
3593MI_INLINE MI_Result MI_SubscriptionDeliveryOptions_GetCredentialsPasswordAt(MI_SubscriptionDeliveryOptions *self, MI_Uint32 index, const MI_Char **optionName, MI_Char *password, MI_Uint32 bufferLength, MI_Uint32 *passwordLength, MI_Uint32 *flags) {
3594  if (self && self->ft) {
3595    return self->ft->GetCredentialsPasswordAt(self, index, optionName, password, bufferLength, passwordLength, flags);
3596  } else {
3597    return MI_RESULT_INVALID_PARAMETER;
3598  }
3599}
3600
3601MI_INLINE MI_Result MI_INLINE_CALL MI_SubscriptionDeliveryOptions_Clone(const MI_SubscriptionDeliveryOptions* self, MI_SubscriptionDeliveryOptions* newSubscriptionDeliveryOptions) {
3602  if (self && self->ft) {
3603    return self->ft->Clone(self, newSubscriptionDeliveryOptions);
3604  } else {
3605    return MI_RESULT_INVALID_PARAMETER;
3606  }
3607}
3608
3609#define MI_SERIALIZER_FLAGS_CLASS_DEEP 1
3610#define MI_SERIALIZER_FLAGS_INSTANCE_WITH_CLASS 1
3611
3612MI_INLINE MI_Result MI_Serializer_Close(MI_Serializer *serializer) {
3613  return mi_clientFT->serializerFT->Close(serializer);
3614}
3615
3616MI_INLINE MI_Result MI_Serializer_SerializeClass(MI_Serializer *serializer, MI_Uint32 flags, const MI_Class *classObject,  MI_Uint8 *clientBuffer, MI_Uint32 clientBufferLength,  MI_Uint32 *clientBufferNeeded) {
3617  return mi_clientFT->serializerFT->SerializeClass(serializer, flags, classObject, clientBuffer, clientBufferLength, clientBufferNeeded);
3618}
3619
3620MI_INLINE MI_Result MI_Serializer_SerializeInstance(MI_Serializer *serializer, MI_Uint32 flags, const MI_Instance *instanceObject, MI_Uint8 *clientBuffer, MI_Uint32 clientBufferLength, MI_Uint32 *clientBufferNeeded) {
3621  return mi_clientFT->serializerFT->SerializeInstance(serializer, flags, instanceObject, clientBuffer, clientBufferLength, clientBufferNeeded);
3622}
3623
3624MI_INLINE MI_Result MI_Deserializer_Close(MI_Deserializer *deserializer) {
3625  const MI_ClientFT_V1 *clientFT = mi_clientFT;
3626  const MI_DeserializerFT *deserializerFT = clientFT->deserializerFT;
3627  return deserializerFT->Close(deserializer);
3628}
3629
3630MI_INLINE MI_Result MI_Deserializer_DeserializeClass(MI_Deserializer *deserializer, MI_Uint32 flags, MI_Uint8 *serializedBuffer, MI_Uint32 serializedBufferLength, MI_Class *parentClass, const MI_Char *serverName, const MI_Char *namespaceName, MI_Deserializer_ClassObjectNeeded classObjectNeeded, void *classObjectNeededContext, MI_Uint32 *serializedBufferRead, MI_Class **classObject, MI_Instance **cimErrorDetails) {
3631  return mi_clientFT->deserializerFT->DeserializeClass(deserializer, flags, serializedBuffer, serializedBufferLength, parentClass, serverName, namespaceName, classObjectNeeded, classObjectNeededContext, serializedBufferRead, classObject, cimErrorDetails);
3632}
3633
3634MI_INLINE MI_Result MI_Deserializer_Class_GetClassName(MI_Deserializer *deserializer, MI_Uint8 *serializedBuffer, MI_Uint32 serializedBufferLength, MI_Char *className, MI_Uint32 *classNameLength, MI_Instance **cimErrorDetails) {
3635  return mi_clientFT->deserializerFT->Class_GetClassName(deserializer, serializedBuffer, serializedBufferLength, className, classNameLength, cimErrorDetails);
3636}
3637
3638MI_INLINE MI_Result MI_Deserializer_Class_GetParentClassName(MI_Deserializer *deserializer, MI_Uint8 *serializedBuffer, MI_Uint32 serializedBufferLength, MI_Char *parentClassName, MI_Uint32 *parentClassNameLength, MI_Instance **cimErrorDetails) {
3639  return mi_clientFT->deserializerFT->Class_GetParentClassName(deserializer, serializedBuffer, serializedBufferLength, parentClassName, parentClassNameLength, cimErrorDetails);
3640}
3641
3642MI_INLINE MI_Result MI_Deserializer_DeserializeInstance(MI_Deserializer *deserializer, MI_Uint32 flags, MI_Uint8 *serializedBuffer, MI_Uint32 serializedBufferLength, MI_Class **classObjects, MI_Uint32 numberClassObjects, MI_Deserializer_ClassObjectNeeded classObjectNeeded, void *classObjectNeededContext, MI_Uint32 *serializedBufferRead, MI_Instance **instanceObject, MI_Instance **cimErrorDetails) {
3643  return mi_clientFT->deserializerFT->DeserializeInstance(deserializer, flags, serializedBuffer, serializedBufferLength, classObjects, numberClassObjects, classObjectNeeded, classObjectNeededContext, serializedBufferRead, instanceObject, cimErrorDetails);
3644}
3645
3646MI_INLINE MI_Result MI_Deserializer_Instance_GetClassName(MI_Deserializer *deserializer, MI_Uint8 *serializedBuffer, MI_Uint32 serializedBufferLength, MI_Char *className, MI_Uint32 *classNameLength, MI_Instance **cimErrorDetails) {
3647  return mi_clientFT->deserializerFT->Instance_GetClassName(deserializer, serializedBuffer, serializedBufferLength, className, classNameLength, cimErrorDetails);
3648}
3649
3650MI_INLINE MI_ErrorCategory MI_Utilities_MapErrorToMiErrorCategory(MI_Char *errorType, MI_Uint32 error) {
3651  return mi_clientFT->utilitiesFT->MapErrorToMiErrorCategory(errorType, error);
3652}
3653
3654MI_INLINE MI_Result MI_Utilities_CimErrorFromErrorCode(MI_Uint32 error, const MI_Char *errorType, const MI_Char* errorMessage, MI_Instance **cimError) {
3655  return mi_clientFT->utilitiesFT->CimErrorFromErrorCode(error, errorType, errorMessage, cimError);
3656}
3657
3658#define MI_CancelationReason MI_CancellationReason
3659#define _MI_CancelationReason _MI_CancellationReason
3660#define MI_PostResult MI_Context_PostResult
3661#define MI_PostCimError MI_Context_PostCimError
3662#define MI_PostError MI_Context_PostError
3663#define MI_PostInstance MI_Context_PostInstance
3664#define MI_PostIndication MI_Context_PostIndication
3665#define MI_ConstructInstance MI_Context_ConstructInstance
3666#define MI_ConstructParameters MI_Context_ConstructParameters
3667#define MI_NewInstance MI_Context_NewInstance
3668#define MI_NewDynamicInstance MI_Context_NewDynamicInstance
3669#define MI_NewParameters MI_Context_NewParameters
3670#define MI_Canceled MI_Context_Canceled
3671#define MI_GetLocale MI_Context_GetLocale
3672#define MI_RegisterCancel MI_Context_RegisterCancel
3673#define MI_RequestUnload MI_Context_RequestUnload
3674#define MI_RefuseUnload MI_Context_RefuseUnload
3675#define MI_GetLocalSession MI_Context_GetLocalSession
3676#define MI_SetStringOption MI_Context_SetStringOption
3677#define MI_GetStringOption MI_Context_GetStringOption
3678#define MI_GetNumberOption MI_Context_GetNumberOption
3679#define MI_GetCustomOption MI_Context_GetCustomOption
3680#define MI_GetCustomOptionCount MI_Context_GetCustomOptionCount
3681#define MI_GetCustomOptionAt MI_Context_GetCustomOptionAt
3682#define MI_ShouldProcess MI_Context_ShouldProcess
3683#define MI_ShouldContinue MI_Context_ShouldContinue
3684#define MI_PromptUser MI_Context_PromptUser
3685#define MI_WriteError MI_Context_WriteError
3686#define MI_WriteCimError MI_Context_WriteCimError
3687#define MI_WriteMessage MI_Context_WriteMessage
3688#define MI_WriteProgress MI_Context_WriteProgress
3689#define MI_WriteStreamParameter MI_Context_WriteStreamParameter
3690#define MI_WriteWarning MI_Context_WriteWarning
3691#define MI_WriteVerbose MI_Context_WriteVerbose
3692#define MI_WriteDebug MI_Context_WriteDebug
3693#define MI_SubscriptionDeliveryOptions__SetExpirationTime MI_SubscriptionDeliveryOptions_SetExpirationTime
3694#define MI_SubscriptionDeliveryOptions__GetExpirationTime MI_SubscriptionDeliveryOptions_GetExpirationTime
3695
3696#ifdef __cplusplus
3697}
3698#endif
3699
3700#endif /* __MI_C_API_H */
3701
3702#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */