| | |
Overload DllExperted function
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Oct 2008
Posts: 25
Reputation:
Solved Threads: 0
I need to overload Dll Exported function, and the problem i'm getting is thet the compiller says only one overloaded function can be "C", how can i do this ?
this is the original declaration, i'm tying to overload it so here is the heder i'm compiling
C++ Syntax (Toggle Plain Text)
extern "C" __declspec(dllexport) __stdcall void CreateCustomers(TComponent *Owner);
C++ Syntax (Toggle Plain Text)
#ifndef DllH #define DllH #include "CustomersForm.h" extern TCustomersF* DllCustomers; extern "C" __declspec(dllexport) __stdcall void CreateCustomers(TComponent *Owner); extern "C" __declspec(dllexport) __stdcall void CreateCustomers(TComponent *Owner, AnsiString Caprion); //--------------------------------------------------------------------- #endif
Well you could declare it as
IF it's possible to look at Owner, AND figure out from that what the rest of the parameters should be.
> so it is not possible to have to functinos under one name?
Create your own really simple class around the API you're given (perhaps), which provides you with all the overloading you want.
CreateCustomers(TComponent *Owner, ... ); IF it's possible to look at Owner, AND figure out from that what the rest of the parameters should be.
> so it is not possible to have to functinos under one name?
Create your own really simple class around the API you're given (perhaps), which provides you with all the overloading you want.
Last edited by Salem; Oct 27th, 2008 at 3:51 pm. Reason: Fix the wacky icode tags end of line
There is no "simple".
Fundamentally, there is no overloading in C - period.
There's just a bunch of hacks which could loosely be described as "good", "bad" and "ugly".
Since you've given minimal information (like are you even allowed to change the C code?), it's just vague suggestions based on what might be possible.
Oh, and get some sleep. As often as not, I find the answer to be so obvious in the morning I wondered what the hell the problem was the night before that I couldn't see it.
See you in the morning, cos I'm about done for the night as well.
Fundamentally, there is no overloading in C - period.
There's just a bunch of hacks which could loosely be described as "good", "bad" and "ugly".
Since you've given minimal information (like are you even allowed to change the C code?), it's just vague suggestions based on what might be possible.
Oh, and get some sleep. As often as not, I find the answer to be so obvious in the morning I wondered what the hell the problem was the night before that I couldn't see it.
See you in the morning, cos I'm about done for the night as well.
![]() |
Other Threads in the C++ Forum
- Previous Thread: winsock yahoo.com
- Next Thread: Test Casing
| Thread Tools | Search this Thread |
api array arrays based beginner binary bitmap c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete deploy developer dll download dynamiccharacterarray email encryption error file forms fstream function functions game generator getline givemetehcodez graph gui homeworkhelp homeworkhelper iamthwee ifstream input int java lib list loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference rpg sorting string strings temperature template text text-file tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






