I'd like to pass a pointer to an array of pointers to functions as a
parameter to a function call to a shared library. 
(hey, don't you just love working with a computer language where
this sentence makes sense!)

This would allow the functions within the shared library to call functions
back in the main program.

Shared libraries use near function addresses (2 bytes), but a far address
would be needed to call the functions in the main module.
Consequently something like
       int (* foo) (CharPtr p)
wouldn't work because the compiler (CW5) would view this as a near 
(2 byte) pointer, not the needed 4 byte pointer.   There may be other
issues as well.   I tried "int (far * foo)(CharPtr p)" but the compiler
rejected it.

Is there a way of specifying pointers to functions as function parameters
from a big multi-sector program to a function in a shared library 
and ensuring the pointers are all correctly sized and formated so the
calls can occur?

So far I haven't found the right section in the Knowledge Base or any
of the manuals.   I suspect it is either really simple or vitually impossible.

Roger Stringer
Marietta Systems, Inc.



-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to