On Thursday, 13 November 2014 at 15:58:34 UTC, Wsdes wrote:
void MyDtaCB(void* v){
    // Do stuff
}

Events.OnData = cast(Callback) &MyDtaCB;

this compiles but might crash, the extern(C) is important on a callback to be used from a C program. I'd really recommend adding that to the function, even if you cast when assigning to the struct.

Reply via email to