# How to make in process callback on w32?

**URL:** <https://forum.kx.com/t/how-to-make-in-process-callback-on-w32/10240>\
**Category:** Community Support\
**Tags:** kdb-and-q\
**Created:** [August 8, 2015, 5:34pm UTC](https://forum.kx.com/t/how-to-make-in-process-callback-on-w32/10240 "2015-08-08T17:34:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Emil](https://avatars.discourse-cdn.com/v4/letter/e/f4b2a3/32.png) [@Emil](https://forum.kx.com/u/Emil)\
**Post date:** [August 8, 2015, 5:34pm UTC](https://forum.kx.com/t/how-to-make-in-process-callback-on-w32/10240/1 "2015-08-08T17:34:00Z")

</div>

I’ve extended kdb w32 with a windows dll written in c++ and compiled with mingw. Ive had trouble figuring out how to register a callback in the main q thread via sd1(). In Linux, I’d use eventfds… I see the kx documentation suggests using selectable socketpair. I’ve not been able to get that to work. Are there alternatives? Has anyone got this work and has a working example? Thanks

---

<div class="post-metadata">

**Author:** ![Flying1](https://avatars.discourse-cdn.com/v4/letter/f/f4b2a3/32.png) [@Flying1](https://forum.kx.com/u/Flying1)\
**Post date:** [August 10, 2015, 2:56am UTC](https://forum.kx.com/t/how-to-make-in-process-callback-on-w32/10240/2 "2015-08-10T02:56:00Z")

</div>

It is not as trivial on Windows, but not too difficult.

There are two Github projects you might take a look to get some ideas from:

1)&nbsp;[https://github.com/ncm/selectable-socketpair/](https://github.com/ncm/selectable-socketpair/)

2)&nbsp;[https://github.com/FlyingOE/q\_Wind/blob/master/win32.util/SocketPair.cpp](https://github.com/FlyingOE/q%5C_Wind/blob/master/win32.util/SocketPair.cpp)
