From: Nick Schultz on
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
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
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