Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Fixed Share Memory Issue

Dec
231
2
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.
 
Can you reproduce that? I couldn't. But in my playing around, I saw similar inexplicable errors from @SMPEEK which I could not reproduce later.
 
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.
 

Similar threads

Back
Top