From: Nick Schultz on 28 Jul 2008 19:58 How do I create the callback function? I haven't ever used a typedef'd function before, and there isn't much info online. Here are the declarations in canlib.h typedef void (CANLIBAPI *kvCallback_t)(int handle, void* context, unsigned int notifyEvent); kvStatus CANLIBAPI kvSetNotifyCallback(int hnd, kvCallback_t callback, void* context, unsigned int notifyFlags);
From: Doug Harrison [MVP] on 28 Jul 2008 20:05 On Mon, 28 Jul 2008 16:58:16 -0700, "Nick Schultz" <nick.schultz(a)flir.com> wrote: >How do I create the callback function? I haven't ever used a typedef'd >function before, and there isn't much info online. > > > >Here are the declarations in canlib.h > >typedef void (CANLIBAPI *kvCallback_t)(int handle, void* context, unsigned >int notifyEvent); > >kvStatus CANLIBAPI kvSetNotifyCallback(int hnd, kvCallback_t callback, void* >context, unsigned int notifyFlags); void CANLIBAPI My_kvCallback(int handle, void* context, unsigned int notifyEvent) { whatever; } -- Doug Harrison Visual C++ MVP
From: Nick Schultz on 28 Jul 2008 20:10 thank you for the speedy reply :-) Nick "Doug Harrison [MVP]" <dsh(a)mvps.org> wrote in message news:gjns84tq6teebken1iadomkp7bmrj926kf(a)4ax.com... > On Mon, 28 Jul 2008 16:58:16 -0700, "Nick Schultz" <nick.schultz(a)flir.com> > wrote: > >>How do I create the callback function? I haven't ever used a typedef'd >>function before, and there isn't much info online. >> >> >> >>Here are the declarations in canlib.h >> >>typedef void (CANLIBAPI *kvCallback_t)(int handle, void* context, unsigned >>int notifyEvent); >> >>kvStatus CANLIBAPI kvSetNotifyCallback(int hnd, kvCallback_t callback, >>void* >>context, unsigned int notifyFlags); > > void CANLIBAPI > My_kvCallback(int handle, void* context, unsigned int notifyEvent) > { > whatever; > } > > -- > Doug Harrison > Visual C++ MVP
|
Pages: 1 Prev: How to convert time from one timezone to another? Next: Mixed code - Crashes in Release Mode |