Platforms to show: All Mac Windows Linux Cross-Platform

Back to CFUUIDMBS class.

CFUUIDMBS.Bytes as Memoryblock

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the value of a UUID object as raw bytes.
Example
// create new UUID

dim u as new CFUUIDMBS

// get raw data

dim m as MemoryBlock = u.Bytes

// display

MsgBox EncodingToHexMBS(m)+EndOfLine+u.StringValue

Returns the value of uuid represented as raw bytes.

CFUUIDMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a Universally Unique Identifier (UUID) object.
Example
dim u as new CFUUIDMBS
MsgBox u.StringValue

Returns a new CFUUID object or nil on any failure.

See also:

CFUUIDMBS.Constructor(Bytes as Memoryblock)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a CFUUID object from raw UUID bytes.
Example
// create new UUID

dim u as new CFUUIDMBS

// get raw data

dim m as MemoryBlock = u.Bytes

// create new UUID with this bytes

dim v as new CFUUIDMBS(m)

// display UUIDs:

MsgBox u.StringValue+EndOfLine+v.StringValue

if u.Equal(v) then
MsgBox "equal"
else
MsgBox "not equal"
end if

bytes: Raw UUID bytes to use to create the CFUUID object.

Rerturns a new CFUUID object or nil on any error.

See also:

CFUUIDMBS.Constructor(uuidStr as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a CFUUID object for a specified string.
Example
// create new UUID

dim u as new CFUUIDMBS

// get string

dim s as string = u.StringValue

// create new UUID with this string

dim v as new CFUUIDMBS(s)

// display UUIDs:

MsgBox u.StringValue+EndOfLine+v.StringValue

if u.Equal(v) then
MsgBox "equal"
else
MsgBox "not equal"
end if

uuidStr: A string containing a UUID. The standard format for UUIDs represented in ASCII is a string punctuated by hyphens, for example 68753A44-4D6F-1226-9C60-0050E4C00067.

Returns a new CFUUID object, or if a CFUUID object of the same value already exists, the existing instance with its reference count incremented. Returns nil on any error.

If you need to validate a GUID or UUID, please check the IsGUID function in our FAQ.

See also:

CFUUIDMBS.StringValue as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the string representation of a specified CFUUID object.
Example
dim u as new CFUUIDMBS
MsgBox u.StringValue

The items on this page are in the following plugins: MBS MacCF Plugin.


The biggest plugin in space...