How to use Functors with a function struct

Discussion in 'C++' started by leaf, Feb 23, 2006.

  1. leaf

    leaf Guest

    i have a struct which defines a function call

    stuct TFunction
    {
    int id; // ID of the function to call
    UINT nparams; // No. of parameters
    ULONG* params // Parameter data
    }

    how can i use a Functor to execute a function as well as passing the
    parameters (ULONG* params)

    *functions to call are from a DLL.
    *functions in the DLL have different argument counts and types

    ---
    young leaf
     
    leaf, Feb 23, 2006
    #1
    1. Advertising

  2. leaf

    leaf Guest

    ps. Functions from the DLL as encapusaled on a class.
    ie.
    CMyDLLFunc_A
    {
    ...
    many functions here...
    .....
    }
    CMyDLLFunc_B
    {
    ....
    many functions here also...
    ....
    }
     
    leaf, Feb 23, 2006
    #2
    1. Advertising

  3. leaf

    TB Guest

    leaf skrev:
    > i have a struct which defines a function call
    >
    > stuct TFunction
    > {
    > int id; // ID of the function to call
    > UINT nparams; // No. of parameters
    > ULONG* params // Parameter data
    > }
    >
    > how can i use a Functor to execute a function as well as passing the
    > parameters (ULONG* params)
    >
    > *functions to call are from a DLL.
    > *functions in the DLL have different argument counts and types
    >


    Consider Assembly language.

    --
    TB @ SWEDEN
     
    TB, Feb 23, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris Fogelklou
    Replies:
    36
    Views:
    1,393
    Chris Fogelklou
    Apr 20, 2004
  2. Martin Herbert Dietze

    Loki-like functors with boost::function?

    Martin Herbert Dietze, Mar 30, 2006, in forum: C++
    Replies:
    2
    Views:
    479
    Martin Herbert Dietze
    Mar 30, 2006
  3. Replies:
    8
    Views:
    356
    Frederick Gotham
    Jun 29, 2006
  4. laikon
    Replies:
    13
    Views:
    493
    Jerry Coffin
    Apr 3, 2008
  5. mlt

    Function functors?

    mlt, Aug 28, 2008, in forum: C++
    Replies:
    3
    Views:
    287
    Kai-Uwe Bux
    Aug 28, 2008
Loading...

Share This Page