0

I have an external 64 bit .DLL and I have to pass 22 arguments to one of the functions. Go (go1.16.4 windows/amd64) allows up to 18 arguments. Is there any workaround?

Thanks

kostix
  • 51,517
  • 14
  • 93
  • 176
xc218m
  • 69
  • 6
  • I'd say you could try to copy whatever code Go has in `src/runtime/syscall_windows.go` from `Syscall18` to `Syscall20` and see what happens. Still, I'd ask on [the mailing list](https://groups.google.com/forum/#!forum/golang-nuts) as AFAIK neither core team members reads the `go` tag here on SO. (If you do that, please add the link to your post here as a comment—I'd like to follow.) – kostix Jun 03 '21 at 10:24
  • I've tried to make Syscall22 in dll_windows.go, link it with syscall_Syscall22 in src/runtime/syscall_windows.go and rebuilt: go install -a runtime. But it give me errors when trying to call the function – xc218m Jun 03 '21 at 13:33
  • 1
    I've asked in golang-nuts group also: https://groups.google.com/g/golang-nuts/c/C0iAXvHLTEU/m/wdOALPOEDAAJ – xc218m Jun 03 '21 at 16:16
  • 1
    If someone is interested in this issue I made a proposal, as advised: https://github.com/golang/go/issues/46552 – xc218m Jun 03 '21 at 19:18

0 Answers0