PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Properties associated with the COMObjet type
  • Functions that use the COMObject variables
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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: See Declaring a variable for more details
Example
// 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", ...
"F490EB00-1240-11D1-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))
END
Remarks

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.
Note: This property is intended for an advanced use only. We do not advise you to handle it directly.

Functions that use the COMObject variables

Versions 15 and later
COMCallMethod
New in version 15
COMCallMethod
COMCallMethod
Runs a method of an interface of a COM object instantiated by COMCreateInstance.
Versions 15 and later
COMCreateInstance
New in version 15
COMCreateInstance
COMCreateInstance
Instantiates a COM object (Component Object Model).
Versions 17 and later
COMQueryInterface
New in version 17
COMQueryInterface
COMQueryInterface
Calls 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 required version
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment