As said before, their statement regarding calling conventions is contradictory, because the standard "C calling convention" is
__cdecl
,
not __stdcall
. The latter is the "Win32 API calling convention" and usually only used with certain Windows system DLLs.
https://learn.microsoft.com/en-us/cpp/cpp/cdecl?view=msvc-170
https://learn.microsoft.com/en-us/cpp/cpp/stdcall?view=msvc-170
This is the function prototype for a DLL function called EXAMPLEONCREATE, a function which receives a pointer to an IEasyLanguageObject as its sole argument, and returns an integer:
int __stdcall EXAMPLEONCREATE( IEasyLanguageObject *pELObj ); |
Anyhow, if they say that the function prototype
must be as follows, because they will
assume that your function has that prototype when they call it, then you
must use
exactly that prototype for your DLL function, or it certainly is
not going to work:
int __stdcall YourFunctionNameGoesHere(IEasyLanguageObject *pELObj);
Of course, if that is the case, then
they must provide you with the definition of the
IEasyLanguageObject
type, usually in the form of a header (
.h) file, because that is
not a standard C/C++ type but something totally specific to "EasyLanguage"! 😒
And, of course, it means that you can
not take a string as function parameter, or return a string – at least
not in a
direct way – because the only parameter that you get is a pointer to an
IEasyLanguageObject
object and you have to return an
int
value.
(possibly, you could do something like
pELObj->GetParameter()
or
pELObj->SetResult()
or something in that vein, but as long as you don't show us the definition of the
proprietary IEasyLanguageObject
type, we can only make guesses here...)