Pregunta

I have a pointer to a COM interface and would like to take the function pointers from its virtual table and make method calls. To do this I need to make stdcall method calls. In Go how do I make a call with convention stdcall or make a call with convention stdcall in cgo?

¿Fue útil?

Solución

See "godoc syscall Proc" for instructions on how to call stdcall functions on windows. Be warned that *Proc.Call does allocate / deallocate memory, so, if you care about efficiency, you should use correspondent syscall.Syscall/syscall.Syscall6/syscall.Syscall9/... function instead.

Alex

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top