Required plugins for this example: MBS MacCF Plugin, MBS Util Plugin, MBS Main Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Util/softDeclares/SoftDeclare with SCDynamicStoreCopyProxies
Class Window1 Inherits Window
Control EditField1 Inherits TextArea
ControlInstance EditField1 Inherits TextArea
End Control
EventHandler Sub Open()
dim s as SoftDeclareMBS
dim d as CFDictionaryMBS
dim n as MemoryBlock
// CFDictionaryRef proxyDict = SCDynamicStoreCopyProxies(NULL);
s=new softDeclareMBS
if s.loadlibrary("SystemConfiguration.framework") then
if s.loadfunction("SCDynamicStoreCopyProxies") then
n=newmemoryBlock(16)
if s.callFunction(1,n) then
d=new CFDictionaryMBS
d.handle=s.Result
editfield1.text= d.XML.str
end if
end if
end if
End EventHandler
End Class
MenuBar Menu
MenuItem UntitledMenu3 = ""
MenuItem UntitledMenu2 = "File"
MenuItem FileQuit = "Quit"
MenuItem UntitledMenu0 = "Edit"
MenuItem EditUndo = "Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cut"
MenuItem EditCopy = "Copy"
MenuItem EditPaste = "Paste"
MenuItem EditClear = "Clear"
End MenuBar
Class App Inherits Application
End Class