Article View: borland.public.cppbuilder.nativeapi
Article #9583Access to a global variable in a dll
From: sam
Date: Mon, 21 Jun 2004 16:40
Date: Mon, 21 Jun 2004 16:40
20 lines
1571 bytes
1571 bytes
My goal is to access a global variable inside a Dll with the same value from
2 different executables.
I explain:
I have a Dll that contains a variable globale named g_IntegerData.
This Dll export a function named ChangeData(int
iValue){g_IntegerData=iValue;}.
An executable named FirstUsing, get a pointer to the ChangeData function,
and call ChangeData with a iValue. This iValue is then stored in
g_IntegerData. But when the second executable named AfterYou call
ChangeData, normally g_IntegerData contains the precedent setting value, but
NOT !
In fact the contains of g_IntegerData is not shared between the 2
executables.
So what is the way for sharing data between processes ?
Thanks.
Sam
Technical Details
Message-ID:
<40d70f65$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,a265033192cc429d,start X-Google-Attributes: gid10cc67,public Reply-To: "sam" <skneife3@wanadoo.fr> From: "sam" <skneife3@wanadoo.fr> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Access to a global variable in a dll Date: Mon, 21 Jun 2004 18:40:05 +0200 Lines: 23 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 62.23.237.242 Message-ID: <40d70f65$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1087836005 62.23.237.242 (21 Jun 2004 09:40:05 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail