Retaining the value of the variable across dynamic library

K

Karthikeyan

Hello ,

I have three components :

a (binary)
b (library)
c ( binary)

From a , I want to set a value of a variable in b .

From c, I want to access this variable .

The library is dynamically loaded. So far , I have tried using an
external variable in library b . However , the value I store is not
persistant across accesses in a and also in c. I get the same
initialized value . Any suggestion .

The problem looks more like an interprocess communication . But my
question is this dynamic library is used by both the processes and can
it be used to store persistancy ?

My friend actually told me to write to file in a and read from it in
'c' . I just wanted to ask the 'c' experts before using this file or
any IPC technique.
 
G

Guest

Subject: Retaining the value of the variable across dynamic library


this is highly platform specific and hence not on topic to
comp.lang.c. You need a platform (Unix or Windows etc.) news group
for this.
 I have three components :

a (binary)
b  (library)
c ( binary)

From a , I want to set a value of a variable in b .

From c, I want to access this variable .

The library is dynamically loaded.

this all sounds straightforward...

So far , I have tried using an
external variable in library b . However , the value I store is not
persistant across accesses in a and also in c. I get the same
initialized value . Any suggestion .

The problem looks more like an interprocess communication . But my
question is this dynamic library is used by both the processes and can
it be used to store persistancy ?

what?! Are A and C in two different processes (programs)?
Because if so you need IPC.
My friend actually told me to write to file in a and read from it in
'c' . I just wanted to ask the 'c' experts before using this file or
any IPC technique.

if you're communicating between processes I think you're going
to need IPC of some sort.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top