winterm/api.go
func WaitForSingleObject(handle uintptr, msWait uint32) (bool, error) {
	r1, _, err := waitForSingleObjectProc.Call(handle, uintptr(uint32(msWait)))
	switch r1 {
	case WAIT_ABANDONED, WAIT_TIMEOUT:
		return false, nil
	case WAIT_SIGNALED:
		return true, nil
	}
	use(msWait)
	return false, err
}
func WaitForSingleObject(handle uintptr, msWait uint32) (bool, error) {
	r1, _, err := waitForSingleObjectProc.Call(handle, uintptr(uint32(msWait)))
	switch r1 {
	case WAIT_ABANDONED, WAIT_TIMEOUT:
		return false, nil
	case WAIT_SIGNALED:
		return true, nil
	}
	use(msWait)
	return false, err
}
func WaitForSingleObject ( handle uintptr , msWait uint32 ) ( bool , error ) { r1 , _ , err := waitForSingleObjectProc . Call ( handle , uintptr ( uint32 ( msWait ) ) ) switch r1 { case WAIT_ABANDONED , WAIT_TIMEOUT : return false , nil case WAIT_SIGNALED : return true , nil } use ( msWait ) return false , err }
// WaitForSingleObject waits for the passed handle to be signaled.
// It returns true if the handle was signaled; false otherwise.
// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms687032(v=vs.85).aspx.
WaitForSingleObject waits for the passed handle to be signaled . It returns true if the handle was signaled ; false otherwise . See https : // msdn . microsoft . com / en - us / library / windows / desktop / ms687032 ( v = vs . 85 ) . aspx .