Fixed Share Memory Issue

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Dec 2, 2008
209
2
Canada
#1
Does anyone have an idea why the following happens:

[49] (3377456K) c:\jpsoft\startup > SET Hndl=%@SMOPEN[32,Mem1]

[50] (3403628K) c:\jpsoft\startup > SET RtnH=%@SMPOKE[%Hndl,0,4,579]

[51] (3421824K) c:\jpsoft\startup > SET RtnH=%@SMPOKE[%Hndl,0,4,580]
TCC: (Sys) The handle is invalid.
"%@SMPOKE[576,0,4,580]"

[52] (3564368K) c:\jpsoft\startup > SET RtnH=%@SMPOKE[%Hndl,0,4,543]
TCC: (Sys) The handle is invalid.
"%@SMPOKE[576,0,4,543]"

[53] (3564156K) c:\jpsoft\startup > SET RtnH=%@SMPOKE[%Hndl,0,4,544]

What is being changed between "[50]" and [51] is the value being put into memory and not the handle, so why am I getting a handle error? What is magic about the range 544 to 579 that it works. The range 400-403 works too.
 
Dec 2, 2008
209
2
Canada
#3
Yes, I even rebooted.

SET Hndl=%@SMOPEN[32,Mem1]
SET RtnH=%@SMPOKE[%Hndl,0,4,579]
SET RtnH=%@SMPOKE[%Hndl,0,4,580]
SET RtnH=%@SMPOKE[%Hndl,0,4,543]
SET RtnH=%@SMPOKE[%Hndl,0,4,544]

Produce the same thing every time.

All my share memory .BTM, functions, and aliases that use shared memory are now failing.