Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SharedMemory, create filemapping path
#1
Below I have a macro "A" and a function "B".
B needs to output "TEST", which it does.
But if I change the the path in the 'create' command to "GlobalXYZ", B outputs empty an line.
Is "Global" a required string for this to work?

Macro A
Code:
Copy      Help
__SharedMemory sm1
lpstr m=sm1.Create("Global\123" 1000) ;; 'Global' required?
str r="TEST"
int dwMemSize=1000
lstrcpyn m r dwMemSize
B

Function B
Code:
Copy      Help
__SharedMemory sm2
lpstr m=sm2.Open("Global\123")
out m


Within QM there is another example
Code:
Copy      Help
assume this code is running in process A
__SharedMemory sm1
byte* m1=sm1.Create("QM test" 4096)
m1[0]=5

assume this code is running in process B
__SharedMemory sm2
byte* m2=sm2.Open("QM test")
out m2[0]

As soon as I add a ""\" backslash within "QM test", for example "QM\test" the example doesnt work either. Does this mean that you can use:
- any string without backslashes?
- or a path BUT it must begin with "Global"?

Note that I change the file mapping paths in BOTH items (A and B, also in the QM example).


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)