Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > How to use Functors with a function struct

Reply
Thread Tools

How to use Functors with a function struct

 
 
leaf
Guest
Posts: n/a
 
      02-23-2006
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

 
Reply With Quote
 
 
 
 
leaf
Guest
Posts: n/a
 
      02-23-2006
ps. Functions from the DLL as encapusaled on a class.
ie.
CMyDLLFunc_A
{
...
many functions here...
.....
}
CMyDLLFunc_B
{
....
many functions here also...
....
}

 
Reply With Quote
 
 
 
 
TB
Guest
Posts: n/a
 
      02-23-2006
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Can *common* struct-members of 2 different struct-types, that are thesame for the first common members, be accessed via pointer cast to either struct-type? John Reye C Programming 28 05-08-2012 12:24 AM
Why use struct instead of class while using functors? michael.lesniak@gmail.com C++ 8 06-29-2006 05:03 PM
Access from function in struct (pointer to function) to other items in the struct (advanced) Ole C Programming 4 10-26-2004 09:43 PM
struct my_struct *p = (struct my_struct *)malloc(sizeof(struct my_struct)); Chris Fogelklou C Programming 36 04-20-2004 08:27 AM



Advertisments