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
  • The GUIDs
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Instantiates a COM object (Component Object Model). A specific interface of the object is retrieved so that it can be used with COMCallMethod.
Example
WINDEVWindows
// Initialisation des appels COM
API("ole32", "CoInitialize", 0)

// 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
Syntax
<Result> = COMCreateInstance(<Class Identifier> , <Interface Identifier>)
<Result>: COMObject variable
COMObject variable corresponding to the interface that will be used by COMCallMethod.
<Class Identifier>: Character string
GUID (globally unique identifier) of the class of the COM object to instantiate.
<Interface Identifier>: Character string
GUID (globally unique identifier) of interface of object to retrieve.
Remarks

The GUIDs

GUIDs are strings of 32 hexadecimal characters separated or not by hyphens (for example: 265EBF50-D4A0-448D-ADC6-EAD971CFB537). The case has no importance.
Component: wd300vm.dll
Minimum version required
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/25/2025

Send a report | Local help