Solved

Windows 9x User defined global variable

Posted on 2000-04-25
4
151 Views
Last Modified: 2010-04-04
I need to create user variables in Windows memory to which i have to store some values.Then, that variable should be accessed or modified by other programs.
ex. 1)Application A is running and keep on changing the Windows Global Variable X,Y,Z
    2)Application B is running and keep on changing the Windows Global Variable X,Y,Z
    3)Application c is running and keep on changing the Windows Global Variable X,Y
Here, Application A,Application B,Application C are independent applications.
How to achieve this? [How to create the Varriable and How to modify the varriable]


0
Comment
Question by:veeramani
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 15

Expert Comment

by:simonet
ID: 2750222
Why not use a Registry key instead? It's much easier than dealing with shared memory (mapped memory), and the like.

By using the Registry, with just a few lines you're able to read/write a variable. Besides, Delphi provides built-in support (TRegIniFile and TRegistry) to easily handle the Registry.

Alex
0
 
LVL 20

Expert Comment

by:Madshi
ID: 2750264
Alex is right. The registry is the most convenient way of doing stuff like that.
But if you want to go the "official" way, you should use CreateFileMapping(-1, ...) & MapViewOfFile. I think there was a component here:

http://www.jgsoftware.com/nt.htm

But if I remember right, the component had one or two minor bugs.

Regards, Madshi.
0
 
LVL 1

Accepted Solution

by:
msedi earned 100 total points
ID: 2750718
Hello,
maybe you can use Atoms to achieve this.
Just convert the values into string values and reconvert them after access into the specified value. The functions are GlobalAddAtom, FindAtom,...

Good luck,
Martin
0
 
LVL 1

Author Comment

by:veeramani
ID: 2750756
Thanks Martin. I got the solution from your clu, thanks a lot.
veeramani
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Suggested Courses
Course of the Month4 days, 8 hours left to enroll

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question