It is not possible to call Win32 API functions that spawn new threads because the callback wrapper generated by syscall.NewCallback does not perform the needed steps to set up the call stack as needed by the Go runtime for a new thread. Attempting to call such functions will cause the new thread to hang forever. This can be easily reproduced with the following simple test program:
If you try to implement a Windows service in Go, calling StartServiceCtrlDispatcher will invoke the service main callback in a new thread. That's the motivating case for this issue. I used CreateThread in the example code because it's the simplest way to reproduce the issue.
Not exactly. It looks like #227 involves forking a separate process, which you can do on Windows without an issue by calling CreateProcess. This is an issue with using Win32 API calls that spawn a new thread within the current process.