Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with wmi
#6
ok, found this:


wbemFlagForwardOnly
32 (0x20)
Causes a forward-only enumerator to be returned. Use this flag in combination with wbemFlagReturnImmediately to request semisynchronous access. For more information, see Calling a Method.
You can only iterate (as in a VBScript For Each statement) through a forward-only enumerator one time. The memory containing the instances is released by WMI so that the enumerator cannot be rewound. Therefore, the SWbemObjectSet.Count method cannot be used since it requires rewinding the enumerator.

Just to end this, how to use the IDispatch col variable through it's only method? is it not supposed do the same?

GetTypeInfoCount

int o=col.GetTypeInfoCount(&_i)
out _i (outs 1)
out o (outs 0)


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)