I suposuse you have to pass the memory address of the long variable, not the value itself. It may be interpretating the value of the LONG as an address to a unsigned long value. Use pointers or even the memory address of your LONG variable when calling the API.
Task icon in Windows
BlitzMax Forums/BlitzMax Programming/Task icon in WindowsThe forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.