troubleshooting Question

Passing point to function

Avatar of matchz
matchz asked on
5 Comments1 Solution219 ViewsLast Modified:
I have a header.h from somewhere which has a function defined as:

err_Type app_Body (void);
err_Type app_End (uchar *pbuf, sysobj_LType argl, sysobj_LType *prespl);
err_Type app_Version (uchar *pbuf, sysobj_LType argl, sysobj_LType *prespl);

The function I am going to call is like this:
err_Type sysobj_ObjNew(
                sysobj_NOType id,       /* Object id */
                uchar dtype,            /* =0 normal task, =1 filter */
                uchar stack_l,            /* stack length (in _StackU units) */
                sysobj_FuncRef ops,
                sysobj_FuncRef ope,
                sysobj_FuncRef op2,
                sysobj_FuncRef op3,
                sysobj_FuncRef op4,
                sysobj_FuncRef op5,
                sysobj_FuncRef op6,
                sysobj_FuncRef op7,
                void * ctx            /* Context of object */

When I call the function like this:
                  Err=sysobj_ObjNew (
                        (sysobj_NOType)((pSC->StepId+1)<<8)|app_Id,      /* Object id */
                0,            /* =0 normal task, =1 filter */
                0,            /* stack length (in _StackU units) */
                0            /* Context of object */

I got the following errors:
error C2664: 'sysobj_ObjNew' : cannot convert parameter 5 from 'unsigned long (unsigned char *,unsigned short,unsigned short *)' to 'unsigned long (__cdecl *)(void)'
        None of the functions with this name in scope match the target type

How can I solve it?
Where can I read more infomration about point to function?
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 5 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros