Overloading struct members (or cast?)

2014-11-18 Thread Wsdes via Digitalmars-d-learn
Hello again and welcome to another tale of mystery :) I, again, am facing problems connecting my D program to the C API as seen in the callback thread before. I want to write a callback function that is assigned to a struct member. The function should write data from members of another struc

Re: Callbacks in D as void functions

2014-11-13 Thread Wsdes via Digitalmars-d-learn
On Thursday, 13 November 2014 at 15:17:45 UTC, Adam D. Ruppe wrote: On Thursday, 13 November 2014 at 14:50:00 UTC, Wsdes wrote: I am trying to write a wrapper for a C API in D. In C I have the following definition of a callback type: typedef void (*Callback)(void*); I would translate this di

Callbacks in D as void functions

2014-11-13 Thread Wsdes via Digitalmars-d-learn
Hi all, I already posted this to Code Project, but maybe you have a solution for my problem. I am trying to write a wrapper for a C API in D. In C I have the following definition of a callback type: typedef void (*Callback)(void*); In a struct all members are of the type Callback. In the main