Shell Execute Lib

I have the following at the head of code in a vb6 ap:

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

What does this do?  Where can I find info about Lib functions?
faybAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

 
EDDYKTCommented:
Go to http://www.mvps.org/vb/ and look for API index
0
 
q2eddieCommented:
Hi, fayb.

Whenever I have a question about win apis, I usually visit some of the sites at www.mvps.org and www.allapi.net before asking it.

#Links
1. "Visual Basic Win32 Shell Routines - ShellExecute Madness"
http://www.mvps.org/vbnet/index.html?code/shell/shellexecute.htm

Bye. -e2
0
 
TravisHallCommented:
Information about the API functions used most often, those which are a standard part of the OS, can be found in the Windows SDK, which is a free download from Microsoft. This document often doesn't give a lot of information about how to use API function, but it does detail what they do, parameters, return values and that sort of thing.

Sorry, I don't know the current URL for this. You should be able to find it easily enough yourself if you go to www.microsoft.com and snoop around a bit.

As for ShellExecute, it performs an operation provided by the shell specified by the lpOperation parameter, on the file specified by lpFile. Typical operations are edit, explore, find, open and print. For more details, you really should check out the Windows SDK.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Richie_SimonettiIT OperationsCommented:
ShellExecute is the real function called when you use shell function in VB, only that with that api you get more control of what is happening.
For API info, i agree with others comments: go to www.allapi.net (they have a tool with tons of explanations and source file using those apis)
0
 
bppraveen001Commented:
Hello fayb,

      API (Application Program Interface) is a set of predefined Windows functions used to control the appearance and behavior of every Windows element. Every user action causes the execution of several or more API function telling Windows what's happened.

       It is something like the native code of Windows. Other languages just act as a shell to provide an automated and easier way to access APIs. VB has done a lot in this direction. It has completely hidden the APIs and provided a quite different approach for programming under Windows. But if you want to use API's explicity in VB you can do that by declaring the specified API function either in the Standard Module with Public scope or the in Module where you want to call that API function (it is better to declare these API's in the General Declration part of the Module).

       In this case ShellExecute is a API which has its declaration in shell32.dll, this API is used to open a file with its Default program. For Eg: Opening Sample.doc with MSWord document, Opening a Web Page from the Default browser.
     
       To find about the API you can use API Text Viewer application which is under Microsoft Visual Studio 6.0 -> Microsoft Visual Studio 6.0 Tools-> API Text Viewer

bpp
0

Experts Exchange Solution brought to you by ConnectWise

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
 
bppraveen001Commented:
Hello fayb,

      API (Application Program Interface) is a set of predefined Windows functions used to control the appearance and behavior of every Windows element. Every user action causes the execution of several or more API function telling Windows what's happened.

       It is something like the native code of Windows. Other languages just act as a shell to provide an automated and easier way to access APIs. VB has done a lot in this direction. It has completely hidden the APIs and provided a quite different approach for programming under Windows. But if you want to use API's explicity in VB you can do that by declaring the specified API function either in the Standard Module with Public scope or the in Module where you want to call that API function (it is better to declare these API's in the General Declration part of the Module).

       In this case ShellExecute is a API which has its declaration in shell32.dll, this API is used to open a file with its Default program. For Eg: Opening Sample.doc with MSWord document, Opening a Web Page from the Default browser.
     
       To find about the API you can use API Text Viewer application which is under Microsoft Visual Studio 6.0 -> Microsoft Visual Studio 6.0 Tools-> API Text Viewer

bpp
0
 
VincentLawlorCommented:
The specifics of the API have been explained by others.

www.allapi.net gives the basics of the format of the API call.

For more information try msdn.microsoft.com

V.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.