I'm a harbour programmer and I need know how I can use different calling conventions in a same plain C function, because some DLL manufacturer use __stdcall and another use __cdecl but the functions are the same, example:
static int iCcv = 1;
HB_FUNC( foo )
{
if( iCcv == 1 )
typedef const char * ( __stdcall * pMYFUNC )( int n );
else
typedef const char * ( __cdecl * pMYFUNC )( int n );
pMYFUNC funcMy = (pMYFUNC) GetProcAddress( hLib, "myProc" );
const char * ret;
if( funcMy )
ret = funcMy( hb_parni( 1 ) );
hb_retc( ret );
}