|
From: Philip B. <phi...@pb...> - 2007-04-07 01:49:56
|
Hi everone, I'm in the process of building a voicechat dll for developers to allow = them to add voicechat capabilities to their applications quickly and = easily. I have just started so there is not much stuff implemented yet. = I want it to work with the stdcall method and have a C interface. I = think I've done everything right, but the export table looks really = weird. It defines each function twice, first one without an @ # and then = one with. Here is the export table: PbTalker_Free PbTalker_Free@0 PbTalker_GetInputDeviceCount PbTalker_GetInputDeviceCount@0 PbTalker_GetInputDeviceName PbTalker_GetInputDeviceName@4 PbTalker_GetLastError PbTalker_GetLastError@0 PbTalker_GetLastErrorText PbTalker_GetLastErrorText@0 PbTalker_GetOutputDeviceCount PbTalker_GetOutputDeviceCount@0 PbTalker_GetOutputDeviceName PbTalker_GetOutputDeviceName@4 PbTalker_Init PbTalker_Init@0 PbTalker_SetHostAPI PbTalker_SetHostAPI@4 PbTalker_StreamSound PbTalker_StreamSound@4 Maybe I should metnion also that some of the functions return char *. = The functions are declared like so: #define exporting __declspec( dllexport ) extern "C" exporting int __stdcall PbTalker_Init(void); extern "C" exporting int __stdcall PbTalker_SetHostAPI(int); extern "C" exporting int __stdcall PbTalker_GetInputDeviceCount(void); extern "C" exporting const char* __stdcall = PbTalker_GetInputDeviceName(int); extern "C" exporting int __stdcall PbTalker_GetOutputDeviceCount(void); extern "C" exporting const char* __stdcall = PbTalker_GetOutputDeviceName(int); extern "C" exporting int __stdcall PbTalker_GetLastError(void); extern "C" exporting const char* __stdcall = PbTalker_GetLastErrorText(void); extern "C" exporting int __stdcall PbTalker_StreamSound(const char*); extern "C" exporting int __stdcall PbTalker_Free(void); In the project options, the compiler has the command line=20 parameter -mrtd set, and the linker has the following: --no-export-all-symbols --add-stdcall-alias Is it normal behavior, to export each function twice? If not, how can I = fix it? Regards Philip Bennefall |