vdsdde.dll extension
DDE Server Extension for Visual DialogScript
Version: 1.7.30.2000
Copyright © 2000 PGWARE
All rights reserved
Description:
This is an extension that provides Visual DialogScript the ability to provide intercommunication between applications. The applications can communicate with each other through the use of DDE. This extension provides the ability to setup and maintain your application as a DDE SERVER. Visual DialogScript itself already provides the client side protocal, however now you can setup your applications as dde servers. Most programming langauges will now be able to communicate with your application as long as they have a means to access a dde server as a dde client. Also please read the important information at the bottom of this documentation which explains things you should know about this extension and how to setup a dde server. This extension is freeware for any type of usage. The dll comes with the source code so you can make modifications if you would like to. The source code was compiled in Borland Delphi 5. Please drop by PGWARE.COM and purchase some of our products in appreciation of this free extension.
Commands:
[+] DDESERVER ALLOWPOKE,<yes|no>
[+] DDESERVER ESTABLISH,<topicname>
[+] DDESERVER ITEM,<itemnumber>,<itemname>
[+] DDESERVER POKE,<itemnumber>,<value>
[ Command Explanation ] :
[-] DDESERVER ALLOWPOKE,<yes|no>
This command is optional. It allows you to specify whether the dde client has the ability to poke and set item values. The default is to have this on. You should only allow poking of items if you need user input from an external application. This command should be used after you use the command DDESERVER ESTABLISH and before any other DDESERVER command. If you set this command after already setting item's and their values then the poke will/will not work on every item previously established to this command being executed.
<yes|no> - you should only set a value of YES or NO. The default is to allow applications to poke dde items and set new values.
[-] DDESERVER ESTABLISH,<topicname>
This command establishes and opens the dde server for communication. You should use this this command before any other ddeserver commands. The value of topicname is just as it means. In Visual DialogScript to connect to a server you use the command : DDE LINK,<servername>,<topicname>. The servername is the name of the ddeserver exefile name without the .exe extension. The topicname is what you set here.
<topicname> - this is the topic name of the dde server. You must set this value or the command will not work. Dde clients need this value to link correctly with the server.
[-] DDESERVER ITEM,<itemnumber>,<itemname>
This command sets a ITEMNUMBER with an ITEMNAME. The itemnumber is always in the form of : ITEM## ; where ## is any number from 1-9999. The itemname is assigned to this itemnumber. The reason for the itemnumbers is so the extension can provide more then one item. You will use this itemnumber in other functions and commands within this extension. The itemname can be anything you like, just as long as its not empty. In Visual DialogScript to poke data to an item you use : DDE POKE,<itemname>,<value> where itemname is the itemname you set with this ddeserver command
<itemnumber> - this must be in the form of : ITEM## ; where ## is any number from 1-9999. You must use the words 'ITEM' and then follow it with a number or this command will not work. This allows setting each itemname with a unique number for other commands and functions to use within this extension.
<itemname> - this can be anything you choose, so long as its not empty. It should be a logical word so others can easily understand what it does.
[-] DDESERVER POKE,<itemnumber>,<value>
This command is similar to the Visual DialogScript command DDE POKE. However notice that it uses the itemnumber rather then the itemname. Also this command allows you to set a value to each item. You should use this command after you have used the DDESERVER ITEM command, as you cannot assign a value to a item if it does not exist first.
<itemnumber> - this must be in the form of : ITEM## ; where ## is any number from 1-9999. You must use the words 'ITEM' and then follow it with a number or this command will not work. This must also be a itemnumber you have already created with the DDESERVER ITEM command.
<value> - this can be any value you choose. It should contain information that the dde client seems as important.
Functions:
[+] @DDESERVER(GETITEM,<itemnumber>)
[+] @DDESERVER(GETMACRO)
[ Function Explanation ] :
[-] @DDESERVER(GETITEM,<itemnumber>)
This function returns the value of the itemnumber you specify. You should use this if the dde client has poked the server and changed its value. The event DDEPOKED occurs when a client has poked any item.
<itemnumber> - this must be in the form of : ITEM## ; where ## is any number from 1-9999. You must use the words 'ITEM' and then follow it with a number or this command will not work. This must also be a itemnumber you have already created with the DDESERVER ITEM command.
[-] @DDESERVER(GETMACRO)
This function should only be used after the DDEMACRO event has occurred, or it will return a null value. This function holds the macro that the dde client has sent to the server. Macro's allow the server to perform various operations, and the number of macro's a client can send to a server is unlimited. This function will hold the macro name until a new macro is sent.
Events:
[+] DDELINKED
[+] DDEMACRO
[+] DDEPOKED
[+] DDETERMINATED
[ Event Explanation ] :
[-] DDELINKED
This event only occurs when a dde client connects/links to the dde server. The event occurs each time a client connects and if multiple clients connect.
[-] DDEMACRO
This event only occurs when a dde client sends a macro to the server. You should follow this event by the function @DDESERVER(GETMACRO) which holds the macro the dde client sent.
[-] DDEPOKED
This event only occurs when a dde client poked an item within the dde server. This event will not occur if you set the DDESERVER ALLOWPOKE command to no, since poke's will not be allowed. You should check all item's to see which item was poked.
[-] DDETERMINATED
This event only occurs when a dde client has terminated a link with the dde server. It will occur for each client that disconnects from the server.
Important:
The information provided here is important when creating a dde server application. You must before closing your dde server application make sure all other applications that are linked to it have terminated the link. If not then your application will cause an exception error and may cause Windows to freeze up. This is caused because Windows has created a link between the applications and is waiting for for the clients to disconnect from the server before the server can terminate. Inorder to know if a client is still connected you should set a variable each time the DDESERVERLINKED event is executed, and then check this variable before exiting your application, if a client is still linked to your server you should prompt a message that they should all disconnect before your application closes. Also remember that the EXENAME without the extension of your application is the SERVERNAME when you use the DDE LINK command in Visual DialogScript. For instance if you used the command DDESERVER ESTABLISH,mydde and compiled this application as TEST.EXE then in Visual DialogScript to link to the server you would use : DDE LINK,TEST,mydde . Finally you should never try to execute two ddeserver commands/functions one after the other, as Windows creates a small delay between communication and will only pass the last command/function you issued and none of the previous ones.
Support:
Please note that this extension is freeware and support is not provided. However bug fixes will be made as they are found but are not top priority. Report bugs at [ support@vdsworld.com ].
Copyright © 2000 PGWARE / All rights reserved.