Share via


Guid Property (Automation Only)

Guid Property (Automation Only)

Gets the globally unique identifier (GUID) of the IInkExtendedProperty object.

Declaration

[C++]

[propget] HRESULT get_Guid ([out,retval] BSTR* Guid);

[Microsoft® Visual Basic® 6.0]

Public Property Get Guid() As String

Property Value

BSTR Returns the GUID of the extended property.

This property is read-only.

For more information about the BSTR data type, see Using the Automation Library.

Return Value

HRESULT value Description
S_OK Success.
E_POINTER The GUID parameter is an invalid pointer.
E_FAIL An unspecified error occurred.
E_OUTOFMEMORY Not enough memory to allocate string buffer.
E_INK_EXCEPTION An exception occurred inside the method.

Remarks

Note: When using managed code, use the Id property; when using Automation, use the Guid property.

Example

[Visual Basic 6.0]

This Visual Basic 6.0 example function uses the Guid property to determine whether a particular extended property is present in an IInkExtendedProperties collection.

'Return the presence of an extended property represented
'by theGuid in the ExtendedProperties collection.
Private Function HasExtendedProperty( _
ByVal theExtendedProperties As IInkExtendedProperties, _
ByVal theGuid As String) As Boolean
    HasExtendedProperty = False
    Dim theExtendedProperty As IInkExtendedProperty
    For Each theExtendedProperty In theExtendedProperties
        If theExtendedProperty.Guid = theGuid Then
            HasExtendedProperty = True
        End If
    Next
End Function

Applies To