473,394 Members | 1,769 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

How to use Functors with a function struct

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

Feb 23 '06 #1
2 1646
ps. Functions from the DLL as encapusaled on a class.
ie.
CMyDLLFunc_A
{
...
many functions here...
.....
}
CMyDLLFunc_B
{
....
many functions here also...
....
}

Feb 23 '06 #2
TB
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
Feb 23 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

41
by: AngleWyrm | last post by:
I have created a new container class, called the hat. It provides random selection of user objects, both with and without replacement, with non-uniform probabilities. Uniform probabilities are a...
2
by: nsgi_2004 | last post by:
Hi, I have been learning about functors and at first everything was clear. Make a class and overload operator () so that an object of the functor can be thought of as a function. However, I...
1
by: Satish | last post by:
Hi, I am trying to create a helper function that will delete all the pointers in a map. The function takes a bool parameter that tells if the key is of pointer type or if the value is of pointer...
2
by: Martin Herbert Dietze | last post by:
Hi, in a project I am using callbacks which are called like ordinary functions but in fact are Loki::Functor's encapsulating calls to non-static member functions on instances of different...
8
by: michael.lesniak | last post by:
Hello, I'm learning C++ for a couple of days and play a bit with the algorithms provided in the STL. One thing I don't understand is the fact that classes inherited of functors have to be...
4
by: tryptik | last post by:
Hello all, I have a question about iterators. I have a container of functors that operate on an std::string. The functors go something like this: class Functor { std::string...
2
by: Jon Slaughter | last post by:
I'm trying to mess with functors and the way I want it to work is that when I create a functor it will automatically add itself to an array. The attached code demonstrates what I mean. The...
15
by: desktop | last post by:
I have this class: class test { public: int getpp() { return pp; } void setpp(int i) {
4
by: Christopher | last post by:
I used to just use a plain old function pointer is a call to std::sort. My colleagues are telling me that I need to use a "functor". Ok, I google and see that a functor is a class with a public...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.