Jump to content

Shellexecute in c++


MetalSpongebob
 Share

Recommended Posts

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

Link to comment
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

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

  • 2 weeks later...

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...