DLLs, callbacks, and the GC that loves them

BlitzMax Forums/BlitzMax Programming/DLLs, callbacks, and the GC that loves them

I am finding that it has to be done like this, but it would be nice to have some more information on what the GC commands actually do and how they should be used:
Function MyFunction( callback:Int() ) "win32"
GCEnter()

GCLeave()
callback()
GCEnter()

EndFunction