ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Miscellaneous Windows functions
  • Properties associated with the COMObject type
  • Functions that use COMObject variables
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
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.
Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable
Example
// Initialisation d'une chaîne Unicode de 260 caractères
PapierPeint is string Unicode
PapierPeint = AnsiToUnicode(RepeatString(" ", 260))

// Déclaration d'une variable de type COMObjet
ActiveDesktop is COMObject

// Récupération de l'interface de manipulation du bureau
ActiveDesktop = COMCreateInstance("75048700-EF1F-11D0-9888-006097DEACF9", ...
				"F490EB00-1240-11D1-9888-006097DEACF9")
IF ErrorOccurred = False THEN
	// Récupération de l'image de papier peint du bureau
	COMCallMethod(ActiveDesktop, 4, &PapierPeint, 260, 1)
	Info("L'image du bureau est : " + UnicodeToAnsi(PapierPeint))
END
Properties

Properties associated with the COMObject type

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

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…
Comments
Click [Add] to post a comment

Last update: 03/28/2025

Send a report | Local help