Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Class Instance Support for 64-Bit Values

You can use a 64-bit key value as part of a path, with the following restrictions:

  • As long as you do not exceed the 32-bit range, you can assign and retrieve values from the key as you would a 32-bit property.
  • After you exceed the integer value of 0x7FFFFFFF (for signed types), 0x80000000 (for unsigned types), or 32 bits, you must use quotation marks.
  • The only valid path for a 64-bit value is located in the __RELPATH or __PATH properties of the instance. As such, WMI does not support the hexadecimal notation for the equivalent value.
  • If WMI records the instance key as a negative number, then you must use the original number to retrieve the instance.

Query semantics are unaffected and behave as expected. This behavior only affects the object path, GetObject, and GetObjectAsync operations.

The following example shows that class instances can have 64-bit key values.

class MyBig
{
  [key] sint64 k;
  sint64 p;
};

instance of MyBig
{
  k = 2;
  p = 3;
};

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.