Sign in to follow this  
Followers 0
MetalSpongebob

Shellexecute in c++

6 posts in this topic

Hi,I have an other question about autoit funcs and the functions "father"^^...

The function "shellexecute" how is coded in c++?

ShellExecute ( "filename" [, "parameters" [, "workingdir" [, "verb" [, showflag]]]] )

And how are managed the filename,parameters,dir,verb and flags?


Noob but ethical

Share this post


Link to post
Share on other sites



Unimaginatively enough, ShellExecute() uses the ShellExecute() function.

Share this post


Link to post
Share on other sites

Even VisualC++?


Noob but ethical

Share this post


Link to post
Share on other sites

Yes. it uses the Function described in http://msdn2.microsoft.com/en-us/library/b...153(VS.85).aspx


*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Even VisualC++?

Yes, it's a very simple function, here's an example (compiled in VS2008)

#include <windows.h>
 #include <iostream>
 int main ()
 {
     HINSTANCE result;
     result=ShellExecute(NULL,NULL,L"C:\\test.mp3",NULL,NULL,SW_SHOWDEFAULT);
     if ((int)result<=32)
     std::cout << "Error!\nReturn value: " << (int)result << "\n";
     return 0;
 }
Edited by monoceres

Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites

Thank youuuuuuuuuuuuuuu .... ;-)


[center]I LOVE ALGERIA .... ;-)[/center]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0