veeramani
asked on
Windows 9x User defined global variable
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]
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]
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.
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Martin. I got the solution from your clu, thanks a lot.
veeramani
veeramani
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