SharedMemory Windows

hi all,i dont know if this is the right forum to post that, anyway:

I’m using SharedMemory (windows) to retrieve a string from a shared memory, i wrote the shared memory using this code, in c++.
but i can read only the first letter of string, instead if i compile another console program i can retrieve the correct string, am I doing wrong or there is some limitation about it ?

alo,

if you have a little demo program to test, gimme pls.

it’s this, if i do compile also the client it work well, anyway now i tried to include that code into another project and i can see the whole string, cant really get where is the clue, anyway the little test is attached, thank you.

Memorytest3.exe (29.7 kB)

k, the problem is caused by different string formats: SharedMemory (Windows) assumes 8bit strings, while your program writes 16bit strings, like:
k#0e#0k#0o#0i#0o#0n#0s#0
for every character it writes 2 bytes and the first #0 encountered by vvvv tells it this is the end of the string. so for now you’ll have to tell your program to use only 8bit strings, like telling it to not use unicode or something like that…

ok thanks for the solution, i will get more knowledge about it and apply :)