Platforms to show: All Mac Windows Linux Cross-Platform

Back to DeclareFunctionMBS class.

DeclareFunctionMBS.CallCount as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property DynamicDeclares MBS Util Plugin 20.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The call counter.

We call how often the function is called.
(Read only property)

DeclareFunctionMBS.CallMode as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property DynamicDeclares MBS Util Plugin 20.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The calling convention mode to use.

Default is to use default mode for the given platform.
(Read and Write property)

DeclareFunctionMBS.FunctionPtr as Ptr

Type Topic Plugin Version macOS Windows Linux iOS Targets
property DynamicDeclares MBS Util Plugin 20.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The pointer for the C function.
Example
// change path if you like to try this on Windows or Linux
Dim d As New DeclareLibraryMBS("/usr/lib/libz.1.dylib")

// zlibVersion
// ZEXTERN Const char * ZEXPORT zlibVersion Of((void));

Dim p As ptr = d.Symbol("zlibVersion")

// call via delegate
' define delgate like this:
' Public Function zlibVersionDelegate() As CString

Dim z As New zlibVersionDelegate(p)
Dim v As String = z.Invoke
MsgBox "zlibVersion: "+v

(Read and Write property)

DeclareFunctionMBS.Name as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property DynamicDeclares MBS Util Plugin 20.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The name of the function.

(Read and Write property)

DeclareFunctionMBS.ParameterCount as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property DynamicDeclares MBS Util Plugin 20.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries number of parameters.

We currently limit this to 32 parameters.
(Read only property)

DeclareFunctionMBS.Parameters as Dictionary

Type Topic Plugin Version macOS Windows Linux iOS Targets
property DynamicDeclares MBS Util Plugin 20.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries all parameters.

Mainly to inspect parameters in debugger.
Keys are indexes and values are the parameter values.
(Read only property)

DeclareFunctionMBS.Signature as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property DynamicDeclares MBS Util Plugin 20.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The signature used to initialize this object.

(Read only property)

DeclareFunctionMBS.SignatureParameters as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property DynamicDeclares MBS Util Plugin 20.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The signature part for the parameters.

(Read only property)

DeclareFunctionMBS.SignatureReturn as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property DynamicDeclares MBS Util Plugin 20.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The signature part for the return value.

(Read only property)

DeclareFunctionMBS.StackSize as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property DynamicDeclares MBS Util Plugin 20.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The stack size to use.

Defaults to 4096 bytes.
(Read and Write property)

DeclareFunctionMBS.Tag as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
property DynamicDeclares MBS Util Plugin 20.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The tag value.

Store whatever you need to keep referenced.
(Read and Write property)

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


The biggest plugin in space...