Shashi Bhushan
Shashi Bhushan

Reputation: 1350

How to make a callback to GO method from C++ DLL

I have a GO program with a function that make a CGO call to c method defined in a dll. That part works great.. Now i need to make a callback from my dll to GO. Is that possible, any helping pointers ?

Note that my DLL code is separate codebase which gets compiled and linked separately to generate dll using visual studio. I'm on windows 10 64 bit machine.

Upvotes: 1

Views: 2205

Answers (1)

Shashi Bhushan
Shashi Bhushan

Reputation: 1350

I found exactly what i was looking for. Posting here so that it may help other with this problem.

https://github.com/golang/go/wiki/cgo#function-pointer-callbacks

Upvotes: 3

Related Questions