Platforms to show: All Mac Windows Linux Cross-Platform
SoftDeclareMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Declare | MBS Util Plugin | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Deprecated. Please move to newer DeclareLibraryMBS and DeclareFunctionMBS classes.
You can make a declare like this:
Declare Function SpeakString lib "SpeechLib" (SpeakString as pstring) as Integer
But what if the SpeechLib is not installed?
Simple, but your application won't even launch on this machine.
Now you can of course use this MBS Plugin using the SpeechMBS functions, which are all week linked.
But you can also use this class to weak link to the SpeechMBS library like this:
dim b as boolean, m,p as memoryblock, c as SoftDeclareMBS
c=new SoftDeclareMBS
p=newmemoryBlock(256) // make the string for the first parameter
p.pstring(0)="Hello World!"
m=newmemoryBlock(4) // make the memoryblock for the parameters
m.long(0)=p.Address(0) // set the first parameter to the address of the string buffer
if c.loadlibrary("SpeechLib") then // Load librarys
if c.loadfunction("SpeakString") then // Load function
b=c.Call(1,m)
end if
end if
This way your application will be loaded, you can call the function, but people who don't have the SpeechLib will also here it.
- 15 properties
- property CallingMode as Integer
- property ConstantFound as boolean
- property ConstantName as string
- property ConstantPointer as Integer
- property FunctionFound as boolean
- property FunctionName as string
- property FunctionPointer as Integer
- property Lasterror as Integer
- property Liberror as string
- property Libfound as boolean
- property Libhandle as Integer
- property Libname as string
- property Result as Integer
- property ResultDouble as Double
- property ResultInt64 as MemoryBlock
- 19 methods
- method CallFunction(param as string,data as memoryblock) as boolean
- method CallFunction(paramcount as Integer,data as memoryblock) as boolean
- method CallFunctionDouble(param as string,data as memoryblock) as boolean
- method CallFunctionDouble(paramcount as Integer,data as memoryblock) as boolean
- method CallFunctionInteger64(param as string,data as memoryblock) as boolean
- method CallFunctionInteger64(paramcount as Integer,data as memoryblock) as boolean
- method CallMethod(param as string,data as memoryblock) as boolean
- method CallMethod(paramcount as Integer,data as memoryblock) as boolean
- method CopyLibrary(byref target as SoftDeclareMBS)
- method FreeLibrary as boolean
- method LoadConstant(constname as string) as boolean
- method LoadDLL(libname as string) as boolean
- method LoadDLLfromMemory(data as string) as boolean
- method LoadDylib(path as string) as boolean
- method LoadFramework(frameworkfilename as string) as boolean
- method LoadFrameworkFile(frameworkpath as folderitem) as boolean
- method LoadFunction(funcname as string) as boolean
- method LoadLibrary(libname as string) as boolean
- method ParametersSupported(param as string) as boolean
This class has no sub classes.
Some examples using this class:
- /SQL/Microsoft SQL via ODBC on Linux
- /SQL/Microsoft SQL via ODBC on Mac
- /Util/IOMasterPort via SoftDeclare
- /Util/softDeclares/Softdeclare Linux
- /Util/softDeclares/SoftDeclare with SCDynamicStoreCopyProxies
- /VLC/Play audio
- /VLC/Show two videos
- /VLC/Show video sample
- /VLC/Thumbnailer Console
- /VLC/Thumbnailer GUI
Blog Entries
Xojo Developer Magazine
The items on this page are in the following plugins: MBS Util Plugin.