By "safety", do you mean running the antivirus software first?
Sorry, no, I mean one method that really works.
How can I run an exe-file from an EA out?
SellExecute:
#import "shell32.dll" // https://www.mql5.com/en/articles/1467 int ShellExecuteW(int hWnd,int lpVerb,string lpFile,string lpParameters,string lpDirectory,int nCmdShow); #import
ShellExecuteW or ShellExecuteA?
Thank you all.
@WHRoeder:
ShellExecuteW(NULL,"open","c:\\users\\route206\\desktop\\test.bat",NULL,NULL,1);
- The first argument is an int, use 0 not NULL.
- The last two are strings. Try passing empty strings ("") not NULLS.
But the second argument is int, but here with "open" a string?
- Strings have been Unicode since Build 600 17.02.2014. You must use the W version.
- Where do you get that idea?
HINSTANCE ShellExecute( _In_opt_ HWND hwnd, _In_opt_ LPCTSTR lpOperation, _In_ LPCTSTR lpFile, _In_opt_ LPCTSTR lpParameters, _In_opt_ LPCTSTR lpDirectory, _In_ INT nShowCmd ); -- ShellExecute function (Windows)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hallo,
Is there a safety method to execute an exe-file from an EA?
traderdoc