| | |
Overload DllExperted function
Please support our C++ advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
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
Views: 434 | Replies: 8
| Thread Tools | Search this Thread |
Tag cloud for C++
6 add api array arrays beginner binary bitmap c++ c/c++ calculator char class classes code compile compiler console conversion convert count data delete desktop directshow dll encryption error file forms fstream function functions game getline givemetehcodez google graph homeworkhelper iamthwee ifstream input int integer java lazy lib linkedlist linux loop looping loops map math matrix memory microsoft newbie news node number output parameter pointer problem program programming project proxy python random read recursion recursive reference return sort string strings struct studio system template templates test text tree unix url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






