Вопрос

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?

Это было полезно?

Решение

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

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top