Re: mem leaks win32 call_back

new topic     » goto parent     » topic index » view thread      » older message » newer message
jimcbrown said...
mattlewis said...

You could write an asm stub that takes the parameters from the caller, add some additional information (like a routine_id) and calls a routine that dispatches the calls. Look in the archives for fptr.e to get started. It was originally created to be able to get callbacks that take more parameters than euphoria allows. In this case, you'd have only one real callback, but potentially lots of others that you would be able to allocate or free however you wanted.

If there is a good reason to do this, then this should be a builtin capability - or at least fptr.e should be part of the stdlib.

Maybe. It's pretty rare, though it's basically what I did with the callbacks for eu.ex. I've also used fptr.e to use somewhat exotic calling conventions, like MS's thiscall. There were also some standard callbacks required in COM programming that required more than the then-allowed number of parameters.

Matt

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu