I am calling GetRemote to an ILX function.
This is working when I do the GetRemote directly in my main function but
fails when I call it in a function that I wrote that does the GetRemote.
I have the handle to my main window as a long declared in Global variables
and have the correct value in it.

Any ideas why?

Mark