Answer the question
In order to leave comments, you need to log in
How to make an exported dll function without a header a member of a class?
Good afternoon.
There is a certain dll without a header, I load it with the LoadLibrary method , then I want to load the exported function from it with the GetProcAddress method, let's say the function declaration int add( int, int );
in it is: int add( int, int );
without wrapping it, and I could use it as a regular function like this: int summ = someclass->add(5,6);
I tried to do it myself, but I got confused in references and pointers, so far I use typedef , and the function is stored as a class member (void *) , and I can call it only after casting to FUNC_ADD .
#upd:
I had no idea about passing this as a parameter. In general, it seems strange that such a powerful language cannot pull off such a trick.
Thanks for the replies =)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question