Platforms to show: All Mac Windows Linux Cross-Platform

Back to DDEMBS class.

DDEMBS.clientTransaction(type as Integer,topic as DDEStringMBS) as DDEBinaryDataMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DDE MBS Win Plugin ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Runs a Transaction with the server.

Short version of ClientTransaction with datatype=CF_TEXT and data=nil.

See also:

Some examples using this method:

DDEMBS.clientTransaction(type as Integer,topic as DDEStringMBS, data as DDEBinaryDataMBS) as DDEBinaryDataMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DDE MBS Win Plugin ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Runs a Transaction with the server.

Shortversion of ClientTransaction with datatype=CF_TEXT.

See also:

DDEMBS.clientTransaction(type as Integer,topic as DDEStringMBS, data as DDEBinaryDataMBS, datatype as Integer) as DDEBinaryDataMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DDE MBS Win Plugin ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Runs a Transaction with the server.
Example
// List all Excel Topics

dim d as DDEMBS
dim s,topic as DDEStringMBS
dim g as DDEStringMBS
dim m as DDEBinaryDataMBS
dim t,enter,z as string
dim i,c as Integer

list.deleteAllRows
d=new DDEMBS
if d.InitClient then
s=d.newDDEString("Excel")
topic=d.newDDEString("System")
if topic<>nil and s<>nil and d.ConnectToServer(s,topic) then
g=d.newDDEString("Topics")
if g<>nil then
m=d.ClientTransaction(d.XTYP_REQUEST,g)
if m<>nil then
t=m.str
t=left(t,len(t)-1) // remove chr(0) at end
enter=chr(9)
c=countfields(t,Enter)
for i=1 to c
z=nthfield(t,enter,i)

list.addRow z
next
list.listindex=0
else
msgBox "Failed to transfer."
end if
else
msgBox "Fail to create second string."
end if
g=nil // must be released before close
else
msgBox "Fail to create connect."
end if
s=nil // must be released before close
d.close
else
msgBox "Fail to init for Client."
end if

Use this ClientTransaction if the application returns a value or ClientTransactionBoolean if it returns a boolean.
Data and Datatype are optional. If no datatype is set, the datatype is set to the value of CF_TEXT.

See also:

DDEMBS.clientTransactionBoolean(type as Integer,topic as DDEStringMBS) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DDE MBS Win Plugin ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Runs a Transaction with the server.

Short version of ClientTransactionBoolean with datatype=CF_TEXT and data=nil.

See also:

Some examples using this method:

DDEMBS.clientTransactionBoolean(type as Integer,topic as DDEStringMBS, data as DDEBinaryDataMBS) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DDE MBS Win Plugin ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Runs a Transaction with the server.

Short version of ClientTransactionBoolean with Datatype=CF_TEXT.

See also:

DDEMBS.clientTransactionBoolean(type as Integer,topic as DDEStringMBS, data as DDEBinaryDataMBS, datatype as Integer) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DDE MBS Win Plugin ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Runs a Transaction with the server.

Use this ClientTransaction if the application returns a value or ClientTransactionBoolean if it returns a boolean.
Data and Datatype are optional. If no datatype is set, the datatype is set to the value of CF_TEXT.

See also:

DDEMBS.close

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DDE MBS Win Plugin ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Closes the running connection.
Example
dim d as DDEMBS
// work with dde object

if d<>nil then
d.close
d=nil
end if

RB seems to crash, if the object is not destroyed before application is quit.

DDEMBS.ConnectToServer(appname as DDEStringMBS, topic as DDEStringMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DDE MBS Win Plugin ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Connects to the application for the given topic.
Example
dim a,b as DDEStringMBS
dim d as DDEMBS

d=new DDEMBS
if d.InitClient then
a=d.newDDEString("servicename")
b=d.newDDEString("topicname")
if a<>nil and b<>nil then
if d.ConnectToServer(a,b) then
msgBox "Connected."
return // ok, so leave before closing.
else
msgBox "Failed to connect."
end if
else
msgBox "Unable to make DDE Strings."
end if
d.close // failed

else
msgBox "Failed to initClient."
end if

Using nil for appname or topic you can try to connect to anyone who accepts.
Renamed in v4.3 to ConnectToServer from Connect for better RB 6 compatibility.

Some examples using this method:

DDEMBS.InitClient as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DDE MBS Win Plugin ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Starts DDE, but only for Client stuff.

With plugin version 6.1pr4 and newer you can have eight DDE objects in your application.
With older plugin versions you can only have one instance of the DDEMBS class at all!

Some examples using this method:

DDEMBS.InitServer as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DDE MBS Win Plugin ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Starts DDE for client and server stuff.

With plugin version 6.1pr4 and newer you can have eight DDE objects in your application.
With older plugin versions you can only have one instance of the DDEMBS class at all!

Some examples using this method:

DDEMBS.NewDDEBinaryData(name as DDEStringMBS,data as memoryblock,offset as Integer,length as Integer,dataformat as Integer) as DDEBinaryDataMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DDE MBS Win Plugin ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Creates a new binary data object.

See also:

Some examples using this method:

DDEMBS.NewDDEBinaryData(name as DDEStringMBS,data as string) as DDEBinaryDataMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DDE MBS Win Plugin ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Creates a new binary data object.

A short version of NewDDEBinaryData which takes the whole string.

See also:

DDEMBS.NewDDEBinaryData(name as DDEStringMBS,data as string,offset as Integer,length as Integer) as DDEBinaryDataMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DDE MBS Win Plugin ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Creates a new binary data object.

The offset and length is optional.

See also:

DDEMBS.NewDDEString(ansistring as string) as DDEStringMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DDE MBS Win Plugin ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Creates a new ANSI DDE string.
Example
dim d as DDEMBS // your DDE object
dim a as DDEStringMBS
a=d.newDDEString("servicename")

ANSI is the normal string encoding on Windows.

Some examples using this method:

DDEMBS.NewDDEStringUnicode(unicodestring as string) as DDEStringMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DDE MBS Win Plugin ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Creates a new Unicode DDE string.
Example
dim d as DDEMBS // your DDE object
dim a as DDEStringMBS
a=d.NewDDEStringUnicode("servicename")

Currently this DDE Classes are only tested for ANSI Systems. And I'm not sure if Xojo itself does handle Unicode correctly on Windows.

DDEMBS.RegisterService(name as DDEStringMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DDE MBS Win Plugin ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Registers a service name.
Example
dim d as DDEMBS // your dde object
dim s as DDEStringMBS

if d<>nil then
s=d.newDDEString(editfield1.text)

if s<>nil then
if d.registerService(s) then
msgBox "Registered."
else
msgBox "Register fails."
end if
else
msgBox "Failed on NewDDEString"
end if
else
msgBox "No DDE object!?"
end if

DDEMBS.UnRegisterService(name as DDEStringMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DDE MBS Win Plugin ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Unregisters a service name.
Example
dim d as DDEMBS // your dde object
dim s as DDEStringMBS

if d<>nil then
s=d.newDDEString(editfield1.text)

if s<>nil then
if d.UnRegisterService(s) then
msgBox "Unregistered."
else
msgBox "Unregister fails."
end if
else
msgBox "Failed on NewDDEString"
end if
else
msgBox "No DDE object!?"
end if

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


The biggest plugin in space...