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