Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 557
  • Last Modified:

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?
0
fayb
Asked:
fayb
1 Solution
 
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now