Share via


IGenID::GenBase5GUIDString Method [C++]

Use this method to generate a base5 Globally Unique Identifier (GUID) string.

Definition

[C++]

HRESULT IGenID::GenBase5GUIDString(BSTR*pbstrBase5GuidString);

[Visual Basic]

Function GenBase5GUIDString() As String

Parameters

  • pbstrBase5GuidString[C++]
    [out, retval] A pointer to a BSTR used to return the base5 GUID string.

[Visual Basic] None.

Return Values

[C++] This method returns an HRESULT indicating whether it completed successfully. See the Error Values section for more details.

[Visual Basic] If this method completes successfully, it returns a String that contains the base5 GUID.

Error Values

[C++] This method returns S_OK (0x00000000) to indicate success and standard COM HRESULT error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object, which can be accessed using the API function GetErrorInfo. In particular, the GetDescription method of the IErrorInfo interface may return a text description of the error.

[Visual Basic] This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to standard COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.

Remarks

A base5 GUID is used to store a slightly more compact version of the traditional GUID. The 128 binary digits are divided into groups of 5 instead of 4 with each group represented by the characters 0-9, and 22 characters of the alphabet. This results in a 26-digit representation for the GUID rather than the customary 32-digit representation.

[C++]

The pbstrBase5GuidString parameter contains valid data only if the method completes successfully.

For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.

See Also

[C++]GenID Object

[Visual Basic]GenID Object

Copyright © 2005 Microsoft Corporation.
All rights reserved.