Slawa, you are wrong you can define a function with list var, for example:
extern "C" __declspec(dllexport) int __stdcall Print(const wchar_t* format , ...)
{
va_list argptr;
va_start(argptr, format);
int ret = printf(format, argptr);
va_end(argptr);
return(ret);
}
the prom is how can define this function in MT4:
your.mq4
#property strict#import "TestDLL.dll"
int Print(int file, string format , ...); // NOT ACCEPTED BY THE MT4 COMPILER#import
But there must be some way to define because the mt4 uses this type of parameters in functions such as Print, Comment or Alert.
- social.msdn.microsoft.com
Slawa, you are wrong you can define a function with list var, for example:
extern "C" __declspec(dllexport) int __stdcall Print(const wchar_t* format , ...)
{
va_list argptr;
va_start(argptr, format);
int ret = printf(format, argptr);
va_end(argptr);
return(ret);
}
the prom is how can define this function in MT4:
your.mq4
#property strict#import "TestDLL.dll"
int Print(int file, string format , ...); // NOT ACCEPTED BY THE MT4 COMPILER#import
But there must be some way to define because the mt4 uses this type of parameters in functions such as Print, Comment or Alert.
Don't say someone he is wrong when you don't understand his answer.
What you are tring to do is NOT POSSIBLE with mql4/mql5.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Anyone knows if this is possible: to import an dll function which uses as argument a: variable-argument lists
e.g. http://www.cplusplus.com/reference/clibrary/cstdio/vprintf/
int vprintf ( const char * format, va_list arg );
if so how would one do it?
Thanks
MJ