Guidance
指路人
g.yi.org
Guidance Forums / Reginald Rexx / Share Memory across Reginald scripts

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. Share Memory across Reginald scripts
#13098
Posted by: PeterJ 2009-08-08 14:38:46 Last edited by: PeterJ 2009-08-08 14:40:07 (Total edited 1 time)
I attach a small DLL, which makes use of Windows Shared Memory.
You can use it to pass information between independant Reginald scripts.

for setting a shared memory array you use:

 putshr("array-name",element-number,"record contents")  

for getting it:

 getshr("array-name",element-number)

as soon as an application ends which has set the array, it will automatically removed, and is no longer available for other rexx scripts.

As we use the Windows System resources it is not infinite. In my environment I got a "system resources exhausted" when I add more than 32000 elements.

You find 2 Test scripts WriteShared and ReadShared which illustrates the usage.
Start WriteShared first, and then run ReadShared.
SharedDLL.zip
Message2. What was the problem
#13099
Posted by: Michael S 2009-08-08 18:48:53
you had Peter, that prompted you to write this s/w ?
Message3.
#13100
Posted by: PeterJ 2009-08-08 21:10:55 Last edited by: PeterJ 2009-08-08 21:12:35 (Total edited 2 times)
nothing in the moment: I found a solution, which is looking for a problem.
As an mainframer who has been involved in development of servers/started tasks, I possibly suffer from selective perception. I saw the windows function and couldn't resist!
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Tue 2024-5-21  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0