|
|
@@ -112,12 +112,14 @@ func Getpagesize() int { return 4096 }
|
|
|
|
|
|
// NewCallback converts a Go function to a function pointer conforming to the stdcall calling convention.
|
|
|
// This is useful when interoperating with Windows code requiring callbacks.
|
|
|
+// The argument is expected to be a function with with one uintptr-sized result. The function must not have arguments with size larger than the size of uintptr.
|
|
|
func NewCallback(fn interface{}) uintptr {
|
|
|
return syscall.NewCallback(fn)
|
|
|
}
|
|
|
|
|
|
// NewCallbackCDecl converts a Go function to a function pointer conforming to the cdecl calling convention.
|
|
|
// This is useful when interoperating with Windows code requiring callbacks.
|
|
|
+// The argument is expected to be a function with with one uintptr-sized result. The function must not have arguments with size larger than the size of uintptr.
|
|
|
func NewCallbackCDecl(fn interface{}) uintptr {
|
|
|
return syscall.NewCallbackCDecl(fn)
|
|
|
}
|