ShellExecuteW on MQL4

Back to topics list To post a new topic, please log in or register
avatar
37
raven.chrono 2015.01.06 11: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...








avatar
165
DeepThought 2015.01.06 12: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

 

Back to topics list  

To add comments, please log in or register