Global Atoms

BlitzMax Forums/BlitzMax Programming/Global Atoms

plash(Posted 2007) [#1]
Is there an equivalent to 'Global Atoms' in Max?
(For the record, I'm trying to send one to another program, using SendMessage.)


LarsG(Posted 2007) [#2]
it might be easier for people to help you if you explained what exactly you mean by "Global Atoms"...


Brucey(Posted 2007) [#3]
Oooh, I used one of those to add a "secret" keyboard shortcut to a windows app.
No idea what they are, mind, I just trawled Google til I found a method to do what I needed..

;-)


plash(Posted 2007) [#4]
I've been Googling, but i haven't found a thing yet.

It's supposedly a system-wide variable that another program can use, if it knows the pointer. I sent the variable pointer to the program but got no results.

Global Distxt:Byte Ptr = "Successfully Initialized.".ToCString ( )
If SendMessage(RZR_Wnd_Main, WM_USER + 200, 0, distxt) = 0 Then Notify "Failed to send message"



plash(Posted 2007) [#5]
Ive noticed "GlobalAddAtom" and "GlobalDeleteAtom" in kernel32.

But I get this error from my Extern block:
C:/Documents and Settings/Administrator/Desktop/Other/Bmax/.bmx/Nja_Map.bmx.console.debug.win32.x86.o(code+0x28b): undefined reference to `GlobalAddAtom@4'
Build Error: Failed to link C:/Documents and Settings/Administrator/Desktop/Other/Bmax/Nja_Map.debug.exe


EDIT: Just noticed, MSDN only shows support for w95, w98 and ME :/


Damien Sturdy(Posted 2007) [#6]
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/dataexchange/atoms.asp


Grey Alien(Posted 2007) [#7]
haha nice quote.


Damien Sturdy(Posted 2007) [#8]
Hey dude- It's been in my sig for months :))

As for this Atom thing- they seem to be completely useless???


plash(Posted 2007) [#9]
I got the declaration working correctly, but the other application isn't reading the string inside the atom correctly.

They may be completely useless, but I don't have the source code to this other application, so I have to go with this.