Thanks, fixed.
It works in msvc but as someone pointed out, it was a typo and was meant to be (void*) cast.