Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Miscellaneous Windows functions
  • Properties associated with the COMObjet type
  • Functions that use COMObject variables
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
The COMObject type is used to represent an interface of a COM object. This type of variable is initialized by COMCreateInstance.
Then, the methods of this interface can be called by COMCallMethod.
Remark: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable
// Initialize a Unicode string containing 260 characters
WallPaper is UNICODE string
WallPaper = AnsiToUnicode(RepeatString(" ", 260))
// Declare a COMObject variable
ActiveDesktop is COMObject
// Retrieve the interface for handling the desktop
ActiveDesktop = COMCreateInstance("75048700-EF1F-11D0-9888-006097DEACF9", ...
IF ErrorOccurred = False THEN
// Retrieve the image of the desktop wallpaper
COMCallMethod(ActiveDesktop, 4, &WallPaper, 260, 1)
Info("The image of the desktop is: " + UnicodeToAnsi(WallPaper))

Properties associated with the COMObjet type

The following properties can be used to handle a COMObject variable:
NameType usedEffect
AddressSystem intAddress in memory of the interface pointer of the COM object.
Remark: This property is intended for an advanced use only. We do not advise you to handle it directly.

Functions that use COMObject variables

COMCallMethodRuns a method of an interface of a COM object instantiated by COMCreateInstance.
COMCreateInstanceInstantiates a COM object (Component Object Model).
COMQueryInterfaceCalls the QueryInterface method of the specified COM object to get a specific interface of this object so that it can be used with COMCallMethod.
Minimum version required
  • Version 15
This page is also available for…
Click [Add] to post a comment

Last update: 01/26/2023

Send a report | Local help