Function
Creates an object representing a globally unique identifier (GUID).
make-GUID l w1 w2 b1 b2 b3 b4 b5 b6 b7 b8 => ID
<machine-word> or <double-integer>. (32 bits.)
<integer>. (16 bits.)
<integer>. (16 bits.)
<integer>. (8 bits.)
<integer>. (8 bits.)
<integer>. (8 bits.)
<integer>. (8 bits.)
<integer>. (8 bits.)
<integer>. (8 bits.)
<integer>. (8 bits.)
<integer>. (8 bits.)
<REFGUID>.
COM
COM
Creates an object representing a globally unique identifier (GUID) from the arguments.
This function creates and initializes a C structure and returns a Dylan object representing it. The structure is in the form that the Microsoft COM libraries expect to see when passing GUIDs around as arguments or return values.
This function does not create the GUID value itself. You create the GUID's value with a separate utility, create-id. (See below.)
All argument values are hexadecimal literals. The first argument is a 32-bit value, the second and third are 16-bit values, and the remaining eight are 8-bit (single byte) values.
You will need this function whenever you need to represent GUID values. For instance, OLE server applications and controls must be registered in the Windows Registry with a unique (and fixed) COM Class ID, so that clients can invoke them. Class IDs are GUIDs. To give your application its Class ID, you must generate a GUID for it. Other items, such as Automation dispinterfaces, also require GUIDs.
This function returns the value ID, which is an instance of the class <REFGUID> (which has the alias <REFCLSID>).
The make-GUID function creates the C structure necessary to represent a GUID. However, it does not create the unique hexadecimal values that constitute the GUID. You must do that with a once-only invocation of a special utility program provided with Functional Developer called create-id. You can find the create-id utility in your Functional Developer installation's Bin folder.
To create a GUID value, run the create-id utility at an MS-DOS prompt. The utility takes a single integer argument, which is the number of GUIDs to generate. (The default is one GUID.)
The utility writes the GUIDs it generates to the standard output in the form of string literals that can be pasted into Dylan source code. For example, given the following value from create-id:
MS-DOS> create-id
"{113f2c00-f87b-11cf-89fd-02070119f639}" you need to split the value into parts as follows, adding the prefix #x to each. Then you call make-GUID on those values:
define constant $my-class-ID =
make-GUID(#x113f2c00, #xf87b, #x11cf, #x89, #xfd,
#x02, #x07, #x01, #x19, #xf6, #x39); See "GUIDs: Globally unique identifiers" on page 123 for more on GUIDs and when to use make-GUID.