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 the unique PROGID string (text) associated with a unique CLSID string of a COM object or component.
Syntax
s = PROGID$(ClassId)
Returns
String
Parameters
Name |
Type |
Optional |
Meaning |
ClassId |
String |
No |
A string or a GUID variable representing the GUID of a COM object/component |
Remarks
You convert the 16-byte (128-bit) binary class ID of a COM object/component into a PROGID string with the PROGID$ function.
PROGID$ takes the (16-byte) binary string ClassID$ representing the GUID or UUID of a COM object/component, and examines the system registry in order to determine the PROGID string associated with the ClassID$ string. ClassID$ may be a dynamic string or fixed-length string of at least 16 bytes, or (typically) a GUID variable.
If the ClassID cannot be found, or any error occurs in the lookup process, PROGID$ will return an empty string.
PROGID$ is the complement to the CLSID$ function. Using these two functions together, it is possible to extract the precise capitalization of the PROGID from the system registry. See the example below.
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