Platforms to show: All Mac Windows Linux Cross-Platform

NewCFObjectMBS(handle as Integer) as CFObjectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
global method CoreFoundation MBS MacCF Plugin ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a CFObjectMBS object for the given handle.
Example
dim d as CFMutableDictionaryMBS
dim s as CFStringMBS
dim o as CFObjectMBS
dim t as CFStringMBS

d=NewCFMutableDictionaryMBS
s=NewCFStringMBS("Hello")

d.Add s,s

o=d.Value(s) // uses NewCFObjectMBS internally

t=cfstringMBS(o) // Now you can cast here in v5.2!

MsgBox t.str

Handle is just a CFTypeRef.
If release is true, the destructor of the CFObjectMBS will release the handle later.
In Version 5.2 this function can return objects which may be casted to CFURL, CFDictionary, CFString, CFNumber, CFCharacterSet, CFBag, CFArray, CFBoolean, CFBinaryData or CFSet.

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


The biggest plugin in space...