GlobalGetAtomName could work. Only problem I see with that is, that you would have to itterate through 49151 cases, to get all the possible atoms.
You have to give the GlobalGetAtomName an Integer that represents the atom, which can range from 1 to 49151.
If you still want to use that, here is, how I got it to work
Code:
#IFNDEF GlobalAddAtom
External_Function GlobalGetAtomName "GlobalGetAtomNameA" KERNEL32.DLL Integer iAtom Pointer lpsOutString Integer iSize Returns Integer
#ENDIF
Function GetAtomName Integer iAtom Returns String
Pointer lpsValue
Integer iSizeValue iReturn
String sOut
Move 2048 to iSizeValue
Pad " " to sOut iSizeValue
GetAddress of sOut to lpsValue
Move (GlobalGetAtomName(iAtom,lpsValue,iSizeValue)) to iReturn
If (iReturn) Begin
Move (ToOEM(CString(sOut))) to sOut
End
Else Begin
Move (GetLastError()) to iReturn
If (iReturn<>0) Begin
Error 999 ("GlobalGetAtomName returned an error. Errorcode:"*String(iReturn))
Function_Return ""
End
End
Function_Return sOut
End_Function
But I think it would be easier, to just keep all the atoms you generally use in an array und just search for them with szGlobalFindAtom and then delete them.