1. Call Back Addresses for C Routine IDs

I'm trying to get a 'call_back' for a routine id returned by 'define_c_func'. 
Obviously 'call_back' doesn't work, since it's for Euphoria routine ids, 
but I'm wondering if any of you know a way to get a call-back address for a
routine id returned from 'define_c_func'.

Thanks in advance for the help!

new topic     » topic index » view message » categorize

2. Re: Call Back Addresses for C Routine IDs

You could always use GetProcAddress in kernel32.dll (assuming this is for
Windows).

new topic     » goto parent     » topic index » view message » categorize

3. Re: Call Back Addresses for C Routine IDs

K. Einfeldt wrote:
> 
> I'm trying to get a 'call_back' for a routine id returned by 'define_c_func'.
> 
> Obviously 'call_back' doesn't work, since it's for Euphoria routine ids, 
> but I'm wondering if any of you know a way to get a call-back address for a
> routine id returned from 'define_c_func'.
> 
> Thanks in advance for the help!

You can use define_c_var to get the pointer to the function.

Matt

new topic     » goto parent     » topic index » view message » categorize

4. Re: Call Back Addresses for C Routine IDs

K. Einfeldt wrote:
> 
> I'm trying to get a 'call_back' for a routine id returned by 'define_c_func'.
> 
> Obviously 'call_back' doesn't work, since it's for Euphoria routine ids, 
> but I'm wondering if any of you know a way to get a call-back address for a
> routine id returned from 'define_c_func'.
> 
> Thanks in advance for the help!

mic wrote:
> You could always use GetProcAddress in kernel32.dll (assuming this is for
> Windows).

Matt Lewis wrote:
> 
> You can use define_c_var to get the pointer to the function.
> 
> Matt

Thanks for your help!  Both ways work great, and it's nice to know both too.

new topic     » goto parent     » topic index » view message » categorize

5. Re: Call Back Addresses for C Routine IDs

you know we should probably merge the c_func/call_func and
c_proc/call_proc they are really the same except where the ID comes
from. So the id spaces could be merged I think without a problem, and
then you could do what you want.

a=define_c_proc....
b=routine_id....

call_proc(a...
call_proc(b...

call_back(a) would return the address of the c proc
call_back(b) would return the call back as normal

no real need for c_func/c_proc in my opinion, just thinking about it
for the first time.

Daniel

On Sat, Apr 19, 2008 at 10:55 PM, K. Einfeldt <guest at rapideuphoria.com>
wrote:
>
>
>  posted by: K. Einfeldt <keinfeldt at myrealbox?co?>
>
>
>  K. Einfeldt wrote:
>  >
>  > I'm trying to get a 'call_back' for a routine id returned by
>  > 'define_c_func'.
>  >
>  > Obviously 'call_back' doesn't work, since it's for Euphoria routine ids,
>  > but I'm wondering if any of you know a way to get a call-back address for a
>  > routine id returned from 'define_c_func'.
>  >
>  > Thanks in advance for the help!
>
>
> mic wrote:
>  > You could always use GetProcAddress in kernel32.dll (assuming this is for
>  > Windows).
>
>
> Matt Lewis wrote:
>  >
>  > You can use define_c_var to get the pointer to the function.
>  >
>  > Matt
>
>  Thanks for your help!  Both ways work great, and it's nice to know both too.
>
>
>
>
>

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu