Kbase 20440: ACTIVEX - WMI Property Object's Value Attribute Returns '?'
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  2/24/2010 |
|
Status: Unverified
SYMPTOM(s):
Problem when using Microsoft Windows Management Instrumentation (WMI)
When attempting to access the 'Value' attribute of the SWbemProperty object an unknown value is always returned.
CAUSE:
The following code properly returns the name of the property that has been retrieved but the value of the property is the unknown value:
DEFINE VARIABLE oLocator AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE oService AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE oDesktop AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE oProperty AS COM-HANDLE NO-UNDO.
CREATE "WbemScripting.SWbemLocator" oLocator.
oService = oLocator:ConnectServer(,,,,,,,).
oDesktop = oService:Get("Win32_Desktop",,).
oProperty = oDesktop:Properties_:Item("BorderWidth",0).
MESSAGE oProperty:Name SKIP oProperty:Value VIEW-AS ALERT-BOX.
RELEASE OBJECT oProperty.
RELEASE OBJECT oDesktop.
RELEASE OBJECT oService.
RELEASE OBJECT oLocator.
FIX:
None at this time