ShellExecute Function (ZT)[1]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 ihihonline 的 blog

shellexecute function


performs an operation on a specified file.

syntax

hinstance shellexecute(      
    hwnd hwnd,     lpctstr lpoperation,     lpctstr lpfile,     lpctstr lpparameters,     lpctstr lpdirectory,     int nshowcmd );

parameters

hwnd
[in] handle to a parent window. this window receives any message boxes that an application produces, such as error reporting.
lpoperation
[in] pointer to a null-terminated string, referred to in this case as a verb, that specifies the action to be performed. the set of available verbs depends on the particular file or folder. generally, the actions available from an object's shortcut menu are available verbs. for more information about verbs and their availability, see object verbs. see extending shortcut menus for further discussion of shortcut menus. the following verbs are commonly used.
edit
launches an editor and opens the document for editing. if lpfile is not a document file, the function will fail.
explore
explores the folder specified by lpfile.
find
initiates a search starting from the specified directory.
open
opens the file specified by the lpfile parameter. the file can be an executable file, a document file, or a folder.
print
prints the document file specified by lpfile. if lpfile is not a document file, the function will fail.
null

for systems prior to microsoft windows 2000, the default verb is used if it is valid and available in the registry. if not, the "open" verb is used.

for windows 2000 and later systems, the default verb is used if available. if not, the "open" verb is used. if neither verb is available, the system uses the first verb listed in the registry.

本文关键:ShellExecute Function (ZT)
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top