This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.
This version is copyright and may only be used for local testing purposes. It may not be distributed.
Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.
Description
Return a 16-byte GUID string (128-bit GUID format string) containing a CLSID associated with a unique ProgramID string of a COM object or component.
Syntax
s = CLSID$(ProgramId)
Returns
String
Parameters
Name |
Type |
Optional |
Meaning |
ProgramId |
String |
No |
A string representing the program id of a COM object/component.
The ProgramID parameter is not case-sensitive, so "MSAGENT.CONTROL.2", "MSAgent.Control.2" and "msagent.control.2" all refer to the same COM object/component. |
Remarks
A CLSID string is a 128-bit (16-byte) binary string representing the GUID or UUID of a COM object/component.
A CLSID string is not in a human-readable format.
To convert the binary CLSID string into human-readable GUID/UUID format, use the GUIDTXT$ function.
CLSID$ is the complement to the PROGID$ function.
If the ProgramID cannot be found, or if any error occurs during the lookup and conversion process, CLSID$ will return an empty string.
Restrictions
See also
Examples
uses "Console"
DIM MSWordClassID AS GUID
MSWordClassID = CLSID$("Word.Application")
IF TRIM$(MSWordClassID, $NUL) <> "" THEN
'---Success getting the CLSID$ of MSWord
Printl "ProgID:", PROGID$(MSWordClassID)
'---
PrintL "ClsId: ", GUIDTXT$(MSWordClassID)
Else
printl "It seems Microsoft Word is not installed."
END IF
printl "---Al done press a key to end---"
WaitKey