Article View: borland.public.cppbuilder.nativeapi
Article #9079Re: CALLBACK Functions
From: McKool
Date: Fri, 13 Aug 2004 11:16
Date: Fri, 13 Aug 2004 11:16
99 lines
3665 bytes
3665 bytes
Compiler give me an error: "Size of CALLBACKATTR is unknow or zero". A
write follow the description that i receive:
//------------
Function:
UINT32 COTI_InitBoard(UINT16 board_seg, COTI_t_UsrIntHdlr fp_int_hdlr,
COTI_t_UsrExHdlr fp_exc_hdlr);
Description:
Register the given interface in the COTI. This includes resetting the
interface and starting the
firmware on intelligent interfaces.
The call-back handlers are also set with COTI_InitBoard:
� Exception handler for error handling (application specific).
� Receive interrupt handler for the interrupt handling (application
specific).
See type definitions of the call-back handlers.
� fp_int_hdlr:
Function pointer to the interrupt function for processing of receive
objects.
(NULL -> no interrupt processing)
/* receive interrupt handler */
typedef void (CALLBACKATTR *COTI_t_UsrRxIntHdlr)( UINT16 count,
COTI_CAN_OBJ FAR * p_obj);
� fp_exc_hdlr:
Function pointer to exception handler for processing of occurred errors.
(NULL -> no exception handler)
/* exception handler */
typedef void (CALLBACKATTR * COTI_t_UsrExcHdlr)( COTI_FUNC_NUM func_num,
INT32 err_code,
UINT16 ext_err,
char * message );
//--------------------------------------
That is just what i have for do that. So I only have two handler, one for
each function. Thats "CALLBACKATTR" mmm, i have no idea. Is not define in
the documentation.. what can i do?
"Andrue Cope [TeamB]" <no.spam@spammy.com> schrieb im Newsbeitrag
news:411c98fb$1@newsgroups.borland.com...
> McKool wrote:
>
> > typedef void (CALLBACKATTR *t_UsrRxIntHdlr)( UINT16 count, CAN_OBJ
> > FAR * p_obj);
>
> void CALLBACKATTR YourCallBackFunction1( UINT16 count,
> CANOBJ FAR * p_obj )
> {
> ... whatever
> }
>
> > typedef void (CALLBACKATTR * t_UsrExcHdlr)( FUNC_NUM func_num, INT32
> > err_code, UINT16 ext_err,char * message );
>
> void CALLBACKATTR YourCallBackFunction2( FUNC_NUM func_num,
> INT32 err_code,
> UINT16 ext_err,
> char * message )
> {
> .. whatever again
> }
>
> > UINT32 InitBoard( UINT16 BoarSegment,
> > t_UsrIntHdlr CallbackfunctionHandler,
> > t_UsrExHdlr ExeptionFunctionHandler);
>
> InitBoard( yourBoarSegment,
> YourCallBackFunction1,
> YourCallBackFunction2 );
>
> That should do it but might need some tweaking - let me know :)
> --
> Andrue Cope [TeamB]
> [Bicester, Uk]
> http://info.borland.com/newsgroups/guide.html
Technical Details
Message-ID:
<411ca272@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<411c6647@newsgroups.borland.com> <411c7648@newsgroups.borland.com> <411c7b53$1@newsgroups.borland.com> <411c98fb$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,57461044372eb966 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII From: "McKool" <kenethw@peak-system.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <411c6647@newsgroups.borland.com> <411c7648@newsgroups.borland.com> <411c7b53$1@newsgroups.borland.com> <411c98fb$1@newsgroups.borland.com> Subject: Re: CALLBACK Functions Date: Fri, 13 Aug 2004 13:16:22 +0200 Lines: 101 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 NNTP-Posting-Host: 213.157.13.214 Message-ID: <411ca272@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1092395634 213.157.13.214 (13 Aug 2004 04:13:54 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail