I'm not sure if there is something wrong here or not. If I have this code:
Code: Select all
XIncludeFile "COMate.pbi"
XIncludeFile "VariantHelper_Include.pbi"
Procedure OS_Version()
Define.COMateObject objWMIService, Version
colOS.COMateEnumObject
strComputer.s = "." 
objWMIService = COMate_GetObject("winmgmts:\\" + strComputer + "\root\cimv2", "") 
If objWMIService 
  colOS = objWMIService\CreateEnumeration("ExecQuery('Select * from Win32_OperatingSystem')")
  If colOS 
    Version = colOS\GetNextObject() 
    While Version
      
      Debug Version\GetStringProperty("OSLanguage")
            
      Version\Release() 
      Version = colOS\GetNextObject()
    Wend
    colOS\Release() 
  EndIf
  objWMIService\Release()  
EndIf
EndProcedure
The language version code is returned properly, however, the issue i'm not sure about is the use of GetStringProperty for this. Heres why; The MSDN at 
http://msdn.microsoft.com/en-us/library/aa394239.aspx for the Win32_OperatingSystem class says that OSLanguage is listed As:
Data type: uint32
Access type: Read-only
In this case both GetIntegerProperty AND GetStringProperty work to retrieve the unit32 property and both return the correct value.
Why are both of them working to retrieve this property value with the latest version of Comate ? Is this a bug with Comate? Should it not be one or the other but not both?
I came across this accidently during a copy and paste when changing from GetStringProperty to GetIntegerProperty for something else and left the OSLanguage in place by accident.