vdsmem.dll extension Memory Mapping 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 blocks of physical memory. If the memory on the users system is limited then Windows will allocate a page file to map the blocks of memory to it. This extension will by default allocate 4 kb (4096 bytes) of memory per map file but can be changed and only one map file can be opened at a time. This allows a large amount of new variables to be used within visual dialogscript and a method to provide global variables between applications. 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:
[+] MEMORYMAP CLOSE
[+] MEMORYMAP OPEN,<mapname>
[+] MEMORYMAP SET,<variable>,<value>


[ Command Explanation ] :

[-] MEMORYMAP CLOSE

Closes the memory map file that you may have opened and free's the allocated memory. If another application has this same map opened then the map is only closed to your application and the memory is not freed until the other application also closes the map. The map should always be closed before termination of your application. The dll itself will try to de-allocate the memory as long as another application is not using the same map, however you should use this command as a safety precaution.



[-] MEMORYMAP OPEN,<mapname>,<size>

This command opens a memory map file. The mapname must be a unique name that does not contain the \ character and can only be 256 characters long. You must open a map file before you can set, or get any information. If you do not want other applications to communicate and change memorymap variables then you should set the mapname to something unique.

<mapname> - this is the name of the map file to open. This should be unique if you do not want other applications to communicate with your application. You can share the mapfile name with others and they will now be able to openly communicate with your application, which means they can set and get any memorymap variable for your mapfile.
<size> - this sets the maximum size in bytes of the memory map file. Remember this uses physical ram so do not set a very high value or large amounts of physical ram are allocated to your application until you close the map file. If the amount of memory is not available on the users system then Windows will allocate the rest of the block into a page file. Page file access is slower then using physical memory. If you leave this parameter null then the default value is 4096 bytes. No more then the maximum amount of data can be entered then allocated. Dividing the bytes by 1024 will return the kilobyte value.



[-] MEMORYMAP SET,<variable>,<value>

This command sets a variable and its value within the map file. This allows you to have near unlimited variables within your application and also communication with other applications via the use of simple memory mapped variables. The value should only contain ascii information.

<variable> - this is a unique variable name to define. You can reassign variables by using the same variable name and setting a different value. Also other applications that know the mapfile name can set this variable and read it. You should not set more text/data then the amount allocated, if you do so an error may occur.
<value> - this is the actual value of the variable. This value should be ascii only. Values can be set by other applications only if they know the mapfile name.





Functions:
[+] @MEMORYMAP(GET,<variable>)
[+] @MEMORYMAP(GETALL)


[ Function Explanation ] :

[-] @MEMORYMAP(GET,<variable>)

This function returns the value of the variable you defined earlier. Or the value of the variable defined by another application. You should open a map file before trying to use this function.

<variable> - this is the name of the variable set earlier by your application or by another application. The returned value by this function will be the value of this variable.



[-] @MEMORYMAP(GETALL)

This function returns all of the variables and values in the form of VARIABLE=VALUE. If there is more then one variable assigned then the variable=value parameters are returned on the next line. This is useful to open communication with another application. This allows the other application to determine all variable names and values before communication and changes are made.





Events:
[+] MEMORYMAPCHANGED


[ Event Explanation ] :

[-] MEMORYMAPCHANGED

This event only occurs when two applications share the same memory mapped file. If another application or the host application changes one of the variables then the other application will trigger the event MEMORYMAPCHANGED and then should use the @MEMORYMAP(GET) function to retrieve the new variable values. If the other application does not set new values to the current variables then no event is triggered. This event does not occur when a single application uses the map file.




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.