Thank you for the help, that worked. I don't want to use cgo directly because of the compile overhead and because cgo prevents debugging on Windows.
Another question, if there is a C function with the declaration: void returnOutCString(char ** out) I can call the function using: var retPtr unsafe.Pointer proc.Call(uintptr(retPtr)) But how do I convert retPtr to a Go String? On Tuesday, September 6, 2016 at 4:13:01 PM UTC-5, Andy Balholm wrote: > If you use cgo, there is a helper function C.CString to do this. > > You can convert the string to a []byte, append 0 (for a null-terminated > string), and take the address of the first byte. > > Andy -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.