STDCALL passing to C code

Hello, I am trying to call C code with cgo and I can’t figure out passing of function from Go. My C definition of function:

typedef void (STDCALL pfNotifyConnect)(handle_t handle, bool is_connected, void context);
EXTERN void STDCALL notify_connect(handle_t handle, pfNotifyConnect NotifyConnect);

I can’t change the C code. I have to pass the pfNotifyConnect from Go code to notify_connect function. Can you advice me how to convert Go function into the pfNotifyConnect?

Thank you, Ladislav.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.