| | |
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 |
Tag cloud for C++
api application array arrays based beginner binary bmp c++ c/c++ calculator char char* class classes code compile compiler console conversion convert count data delete deploy dll download dynamiccharacterarray email encryption error file format forms fstream function functions game givemetehcodez graph homeworkhelp iamthwee ifstream input int java lib library lines list loop looping loops map math matrix memory newbie news number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg search simple sorting spoonfeeding string strings struct temperature template templates text text-file tree url variable vector video visual visualstudio void win32 windows winsock wordfrequency wxwidgets






