ShellExecuteW on MQL4

 

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...

 

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