Page 1 of 1

How to use Shared Memory ?

Posted: Sun Jul 02, 2017 12:05 pm
by Wolfram
Can somebody give me an example how to build shared memory?
I want to send an integer between to programs. Or better to share a structure.

Re: How to use Shared Memory ?

Posted: Sun Jul 02, 2017 12:31 pm
by wilbert
Maybe you can use CFNotificationCenter ?
http://www.purebasic.fr/english/viewtop ... 19&t=68047

Re: How to use Shared Memory ?

Posted: Sun Jul 02, 2017 12:43 pm
by Wolfram
wilbert wrote:Maybe you can use CFNotificationCenter ?
http://www.purebasic.fr/english/viewtop ... 19&t=68047
Hi Wilbert, I notes it already, but it it looks to complicated to me because I want to send a integer only and the CFNotificationCenter works with strings.
So every integer must be converted.

I hope there is an more efficient way.

Re: How to use Shared Memory ?

Posted: Sun Jul 02, 2017 12:49 pm
by wilbert
Wolfram wrote:I hope there is an more efficient way.
There are other ways; don't know if you like those better
http://nshipster.com/inter-process-communication/