Download MetaTrader 5
To add comments, please log in or register
Any problems with the code? Find solution in documentation!
raven.chrono
324
raven.chrono 2015.01.06 10:54 

Hi,

Does anyone here knows or have ever use shell32.dll because when i tried it it always return an error "Cannot call 'shell32.dll::ShellExecuteW', 'shell32.dll' is not loaded".


#import
int ShellExecuteW(int hWnd,int lpVerb,string lpFile,string lpParameters,string lpDirectory,int nCmdShow);
#import
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()  // or OnTick() or OnCalculate(..)
  {
  ShellExecuteW(0,0,"notepad.exe","","c:\\windows\\system32\\",1); 
  }


Thanks...

Halley
198
Halley 2015.01.06 11:26  

I do not know, but your import lacks the file. I have it like that:

#import "shell32.dll"
int ShellExecuteW(int,string, string, string, string, int);
#import
/
To add comments, please log in or register