oppoR9s怎么升级到oppo coloross3.2版本

5259人阅读
C++学习(37)
程序调用ShellExecuteEx打开其他程序(兼容UAC获取管理员权限)
-----------------
#include &stdio.h&
#include&windows.h&
#include&tchar.h&
//检查系统版本是否是Vista或更高的版本
IsOsVersionVistaOrGreater()
OSVERSIONINFOEX
szVersionInfo[1024];
*szVersionInfo = '\x00';
//设置参数的大小,调用并判断是否成功
ovex.dwOSVersionInfoSIze = sizeof(OSVERSIONINFOEX);
if( !GetVersionEx(
(LPOSVERSIONINFO) (&ovex)
printf(&检查系统版本失败\n&);
//通过版本号,判断是否是vista及之后版本
if(ovex.dwMajorVersion & 5)
//检查并根据系统版本选择打开程序方式
ShellExecuteExOpen(CString appName, CString appPath)
if(IsOsVersionVistaOrGreater())
SHELLEXECUTEINFO sei={sizeof(SHELLEXECUTEINFO)};
= SEE_MASK_NOCLOSEPROCESS;
sei.lpVerb = TEXT(&runas&);
sei.lpFile = appN
sei.lpDirectory = appP
sei.lpnShow = SW_SHOWNORMAL;
if(!ShellExecuteEx(&sei))
DWORD dwStatus=GetLastError();
if(dwStatus==ERROR_CANCELLED)
printf(&提升权限被用户拒绝\n&);
else if(dwStatus==ERROR_FILE_NOT_FOUND)
printf(&所要执行的文件没有找到\n&);
appPath.Replace(L&\\&,L&\\\\&);
ShellExecute(NULL, _T(&open&), appName, NULL, appPath, SW_SHOWNORMAL);
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:113252次
积分:1432
积分:1432
排名:千里之外
原创:27篇
转载:42篇
评论:10条
(1)(2)(6)(2)(2)(1)(1)(3)(2)(1)(2)(2)(6)(5)(8)(1)(1)(1)(3)(3)(1)(5)(7)(1)(2)5108人阅读
Windows Mobile(10)
先来看看“深入浅出ShellExecute”
&Q: 如何打开一个应用程序? ShellExecute(this-&m_hWnd,"open","calc.exe","","", SW_SHOW );或 ShellExecute(this-&m_hWnd,"open","notepad.exe",
"c://MyLog.log","",SW_SHOW );正如您所看到的,我并没有传递程序的完整路径。Q: 如何打开一个同系统程序相关连的文档? ShellExecute(this-&m_hWnd,"open",
"c://abc.txt","","",SW_SHOW );Q: 如何打开一个网页? ShellExecute(this-&m_hWnd,"open",
"","","", SW_SHOW );Q: 如何激活相关程序,发送EMAIL? ShellExecute(this-&m_hWnd,"open",
"mailto:","","", SW_SHOW );Q: 如何用系统打印机打印文档? ShellExecute(this-&m_hWnd,"print",
"c://abc.txt","","", SW_HIDE);Q: 如何用系统查找功能来查找指定文件? ShellExecute(m_hWnd,"find","d://nish",
NULL,NULL,SW_SHOW);Q: 如何启动一个程序,直到它运行结束? SHELLEXECUTEINFO ShExecInfo = {0};
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
ShExecInfo.hwnd = NULL;
ShExecInfo.lpVerb = NULL;
ShExecInfo.lpFile = "c://MyProgram.exe";
ShExecInfo.lpParameters = "";
ShExecInfo.lpDirectory = NULL;
ShExecInfo.nShow = SW_SHOW;
ShExecInfo.hInstApp = NULL;
ShellExecuteEx(&ShExecInfo);
WaitForSingleObject(ShExecInfo.hProcess,INFINITE);或: PROCESS_INFORMATION ProcessI
STARTUPINFO StartupI //This is an [in] parameter
ZeroMemory(&StartupInfo, sizeof(StartupInfo));
StartupInfo.cb = sizeof StartupI //Only compulsory field
if(CreateProcess("c://winnt//notepad.exe", NULL,
NULL,NULL,FALSE,0,NULL,
NULL,&StartupInfo,&ProcessInfo))
WaitForSingleObject(ProcessInfo.hProcess,INFINITE);
CloseHandle(ProcessInfo.hThread);
CloseHandle(ProcessInfo.hProcess);
MessageBox("The process could not be started...");
Q: 如何显示文件或文件夹的属性? SHELLEXECUTEINFO ShExecInfo ={0};
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
ShExecInfo.fMask = SEE_MASK_INVOKEIDLIST ;
ShExecInfo.hwnd = NULL;
ShExecInfo.lpVerb = "properties";
ShExecInfo.lpFile = "c://"; //can be a file as well
ShExecInfo.lpParameters = "";
ShExecInfo.lpDirectory = NULL;
ShExecInfo.nShow = SW_SHOW;
ShExecInfo.hInstApp = NULL;
ShellExecuteEx(&ShExecInfo);
在windows mobile中,要打开一个文件夹,下面一种方法可以:&&&&SHELLEXECUTEINFO&ShExecI&&&&memset(&&ShExecInfo,&0,&sizeof(&SHELLEXECUTEINFO&)&);&&&&ShExecInfo.cbSize&=&sizeof(SHELLEXECUTEINFO);&&&&ShExecInfo.fMask&=&SEE_MASK_NOCLOSEPROCESS;&&&&ShExecInfo.hwnd&=&m_hW&&&&ShExecInfo.lpVerb&=&L"Open";&&&&ShExecInfo.lpFile&=&L"fexplore.exe";&&&&&&&&&&&&ShExecInfo.lpParameters&=&L"//Program&Files//photo//";&&&&&&ShExecInfo.lpDirectory&=&NULL;&&&&ShExecInfo.nShow&=&SW_SHOWNORMAL;&&&&ShExecInfo.hInstApp&=&NULL;&&&&&ShellExecuteEx(&ShExecInfo);&打开一个文件&&&&&SHELLEXECUTEINFO&ShExecI&&&&memset(&&ShExecInfo,&0,&sizeof(&SHELLEXECUTEINFO&)&);&&&&ShExecInfo.cbSize&=&sizeof(SHELLEXECUTEINFO);&&&&ShExecInfo.fMask&=&SEE_MASK_NOCLOSEPROCESS;&&&&ShExecInfo.hwnd&=&m_hW&&&&ShExecInfo.lpVerb&=&L"Open";&&&&ShExecInfo.lpFile= L"//ProgramFiles//Empty//Empty.exe";&&&&&&&&&&ShExecInfo.lpParameters&=&NULL;&&&&&ShExecInfo.lpDirectory&=&NULL;&&&&ShExecInfo.nShow&=&SW_SHOWNORMAL;&&&&ShExecInfo.hInstApp&=&NULL;&&&&&ShellExecuteEx(&ShExecInfo);&&关于ShellExecuteEx Function&Performs an operation on a specified file.Syntax
BOOL&ShellExecuteEx(&&&&&&&&&&LPSHELLEXECUTEINFO&lpExecInfo
);Parameters
lpExecInfo
The address of a
structure that contains and receives information about the application being
executed. Return Value
Returns TRUE if successful, or FALSE otherwise. Call
for error information. Remarks
Because ShellExecuteEx can delegate execution to Shell
extensions (data sources, context menu handlers, verb implementations) that are
activated using Component Object Model (COM), COM should be initialized before
ShellExecuteEx is called. Some Shell extensions require the COM
single-threaded apartment (STA) type. In that case, COM should be initialized as
shown here:
&CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE)There
are certainly instances where ShellExecuteEx does not use one
of these types of Shell extension and those instances would not require COM to
be initialized at all. Nonetheless, it is good practice to always initalize COM
before using this function.
With multiple monitors, if you specify an HWND and set the
lpVerb member of lpExecInfo to "Properties", any
windows created by ShellExecuteEx may not appear in the correct
If the function succeeds, it sets the hInstApp member of the
SHELLEXECUTEINFO structure to a value greater than 32. If the
function fails, hInstApp is set to the
error value that best indicates the cause of the failure. Although
hInstApp is declared as an HINSTANCE for compatibility with
16-bit Microsoft Windows applications, it is not a true HINSTANCE. It can only
be cast to an int and compared to either 32 or the SE_ERR_XXX
error codes.
Note&&The SE_ERR_XXX error values are
provided for compatibility with ShellExecute. To retrieve more
accurate error information, use GetLastError. It may return one
of the following values.
ErrorDescriptionERROR_FILE_NOT_FOUND The specified file was not found.ERROR_PATH_NOT_FOUND The specified path was not found.ERROR_DDE_FAIL The Dynamic Data Exchange (DDE) transaction failed.ERROR_NO_ASSOCIATION There is no application associated with the given file name extension.ERROR_ACCESS_DENIED Access to the specified file is denied.ERROR_DLL_NOT_FOUND One of the library files necessary to run the application can't be found.ERROR_CANCELLED The function prompted the user for additional information, but the user canceled the request.ERROR_NOT_ENOUGH_MEMORY There is not enough memory to perform the specified action.ERROR_SHARING_VIOLATION A sharing violation occurred.
Windows 95/98/Me: ShellExecuteEx is
supported by the Microsoft Layer for Unicode (MSLU). To use this, you must add
certain files to your application, as outlined in .Function&Information
Minimum DLL Versionshell32.dll version 3.51 or laterCustom ImplementationNoHeadershellapi.hImport libraryshell32.libMinimum operating systemsWindows NT&4.0, Windows&95UnicodeImplemented as ANSI and Unicode versions. &&&关于SHELLEXECUTEINFO Structure
Contains information used by .
typedef struct _SHELLEXECUTEINFO&{
LPCTSTR&lpV
LPCTSTR&lpF
LPCTSTR&lpP
LPCTSTR&lpD
HINSTANCE&hInstA
LPVOID&lpIDL
LPCTSTR&lpC
HKEY&hkeyC
DWORD&dwHotK
}&DUMMYUNIONNAME;
} SHELLEXECUTEINFO, *LPSHELLEXECUTEINFO;
The size of the structure, in bytes.
An array of flags that indicate the content and validity of the other
structure members. This can be a combination of the following values.
SEE_MASK_CLASSNAME
0x. Use the class name given by the lpClass member. If both SEE_MASK_CLASSKEY and
SEE_MASK_CLASSNAME are set, the class key is used.
SEE_MASK_CLASSKEY
0x. Use the class key given by the hkeyClass member. If both SEE_MASK_CLASSKEY and
SEE_MASK_CLASSNAME are set, the class key is used.
SEE_MASK_IDLIST
0x. Use the item identifier list given by the lpIDList member. The lpIDList member must point to an
structure.
SEE_MASK_INVOKEIDLIST
0x0000000C. Use the
interface of the selected item's . Use either lpFile
to identify the item by its file system path or lpIDList to identify the item by its pointer to an
item identifier list (PIDL). This flag allows applications to use
ShellExecuteEx to invoke verbs from shortcut menu extensions
instead of the static verbs listed in the registry.
Note&&SEE_MASK_INVOKEIDLIST
overrides SEE_MASK_IDLIST.
SEE_MASK_ICON
0x. Use the icon given by the hIcon member. This flag cannot be combined with
SEE_MASK_HMONITOR.
Note&&This flag is available only in
Microsoft Windows XP and earlier. It is not available in Windows Vista and later
versions of Windows.
SEE_MASK_HOTKEY
0x. Use the keyboard shortcut given by the dwHotKey member.
SEE_MASK_NOCLOSEPROCESS
0x. Use to indicate that the hProcess member receives the process handle. This
handle is typically used to allow an application to find out when a process
created with ShellExecuteEx terminates. In some cases, such as
when execution is satisfied through a Dynamic Data Exchange (DDE) conversation,
no handle will be returned. The calling application is responsible for closing
the handle when it is no longer needed.
SEE_MASK_CONNECTNETDRV
0x. Validate the share and connect to a drive letter. The
lpFile member is a Universal Naming
Convention (UNC) path of a file on a network.
SEE_MASK_NOASYNC
0x. Wait for the execute operation to complete before returning. This
flag should be used by callers that are using ShellExecute forms that might
result in an async activation, for example DDE, and create a process that might
be run on a background thread. (Note: ShellExecuteEx runs on a
background thread by default if the caller's threading model is not Apartment.)
Calls to ShellExecuteEx from processes already running on
background threads should always pass this flag. Also, applications that exit
immediately after calling ShellExecuteEx should specify this
If the execute operation is performed on a background thread and the caller
did not specify the SEE_MASK_ASYNCOK flag, then the calling thread waits until
the new process has started before returning. This typically means that either
has been called, the DDE communication has completed, or that the custom
execution delegate has notified ShellExecuteEx that it is done.
If the SEE_MASK_WAITFORINPUTIDLE flag is specified, then
ShellExecuteEx calls
and waits for the new process to idle before returning, with a maximum timeout
of 1 minute.
For further discussion on when this flag is necessary, see the Remarks
SEE_MASK_FLAG_DDEWAIT
0x. D use SEE_MASK_NOASYNC instead.
SEE_MASK_DOENVSUBST
0x. Expand any environment variables specified in the string given
by the lpDirectory or lpFile member.
SEE_MASK_FLAG_NO_UI
0x. Do not display an error message box if an error occurs.
SEE_MASK_UNICODE
0x. Use this flag to indicate a Unicode application.
SEE_MASK_NO_CONSOLE
0x. Use to create a console for the new process instead of having it
inherit the parent's console. It is equivalent to using a CREATE_NEW_CONSOLE
flag with CreateProcess.
SEE_MASK_ASYNCOK
0x. Microsoft Windows NT 4.0Service Pack 6 (SP6), Windows
2000&Service Pack 3 (SP3) and later. The execution can be performed on
a background thread and the call should return immediately without waiting for
the background thread to finish. Note that in certain cases
ShellExecuteEx ignores this flag and waits for the process to
finish before returning.
SEE_MASK_NOQUERYCLASSSTORE
0x. Windows Internet Explorer 5.0 and later. Not
SEE_MASK_HMONITOR
0x. Use this flag when specifying a monitor on multi-monitor
systems. The monitor is specified in the hMonitor member. This flag cannot be combined with
SEE_MASK_ICON.
SEE_MASK_NOZONECHECKS
0x. Windows XP&Service Pack 1 (SP1) and later. Do
not perform a zone check. This flag allows ShellExecuteEx to
bypass zone checking put into place by .
SEE_MASK_WAITFORINPUTIDLE
0x. Internet Explorer 5.0 and later. After the new
process is created, wait for the process to become idle before returning, with a
one minute timeout. See
for more details.
SEE_MASK_FLAG_LOG_USAGE
0x. Windows XP and later. Keep track of the number
of times this application has been launched. Applications with sufficiently high
counts appear in the Start Menu's list of most frequently used
A window handle to any message boxes that the system might produce while
executing this function.
A string, referred to 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. If you set this parameter to NULL:
For systems prior to 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.The following verbs are commonly
Launches an editor and opens the document for editing. If lpFile is not a document file, the function will
Explores the folder specified by lpFile.
Initiates a search starting from the specified directory.
Opens the file specified by the lpFile parameter. The file can be an executable
file, a document file, or a folder.
Prints the document file specified by lpFile. If lpFile is not a document file, the function will
properties
Displays the file or folder's properties.
The address of a null-terminated string that specifies the name of the file
or object on which ShellExecuteEx will perform the action
specified by the lpVerb parameter.
The system registry verbs that are supported by the
ShellExecuteEx function include "open" for executable files and
document files and "print" for document files for which a print handler has been
registered. Other applications might have added Shell verbs through the system
registry, such as "play" for .avi and .wav files. To specify a Shell namespace
object, pass the fully qualified parse name and set the
SEE_MASK_INVOKEIDLIST flag in the fMask parameter.
Note If the SEE_MASK_INVOKEIDLIST flag is set,
you can use either lpFile or
lpIDList to identify the item by its
file system path or its PIDL respectively.
Note If the path is not included with the name, the current
directory is assumed.
lpParameters
The address of a null-terminated string that contains the application
parameters. The parameters must be separated by spaces. If the lpFile member specifies a document file,
lpParameters should be NULL.
lpDirectory
The address of a null-terminated string that specifies the name of the
working directory. If this member is not specified, the current directory is
used as the working directory.
Flags that specify how an application is to be shown when it is opened. It
can be one of the SW_ values listed for the
function. If lpFile specifies a
document file, the flag is simply passed to the associated application. It is up
to the application to decide how to handle it.
If the function succeeds, it sets this member to a value greater than 32. If
the function fails, it is set to an SE_ERR_XXX error value that indicates the
cause of the failure. Although hInstApp is declared as an HINSTANCE for
compatibility with 16-bit Windows applications, it is not a true HINSTANCE. It
can be cast only to an int and compared to either 32 or the
following SE_ERR_XXX error codes.
SE_ERR_FNF
File not found.
SE_ERR_PNF
Path not found.
SE_ERR_ACCESSDENIED
Access denied.
SE_ERR_OOM
Out of memory.
SE_ERR_DLLNOTFOUND
Dynamic-link library not found.
SE_ERR_SHARE
Cannot share an open file.
SE_ERR_ASSOCINCOMPLETE
File association information not complete.
SE_ERR_DDETIMEOUT
DDE operation timed out.
SE_ERR_DDEFAIL
DDE operation failed.
SE_ERR_DDEBUSY
DDE operation is busy.
SE_ERR_NOASSOC
File association not available.
The address of an ITEMIDLIST structure to contain an item
identifier list uniquely identifying the file to execute. This member is ignored
if the fMask member does not include
SEE_MASK_IDLIST or SEE_MASK_INVOKEIDLIST.
The address of a null-terminated string that specifies the name of a file
class or a GUID. This member is ignored if fMask does not include
SEE_MASK_CLASSNAME.
A handle to the registry key for the file class. This member is ignored if
fMask does not include
SEE_MASK_CLASSKEY.
A keyboard shortcut to associate with the application. The low-order word is
the virtual key code, and the high-order word is a modifier flag (HOTKEYF_). For
a list of modifier flags, see the description of the
message. This member is ignored if fMask does not include SEE_MASK_HOTKEY.
DUMMYUNIONNAME
A handle to the icon for the file class. This member is ignored if
fMask does not include
SEE_MASK_ICON.
A handle to the monitor upon which the document is to be displayed. This
member is ignored if fMask does not
include SEE_MASK_HMONITOR.
A handle to the newly started application. This member is set on return and
is always NULL unless fMask is set to
SEE_MASK_NOCLOSEPROCESS. Even if fMask is set to
SEE_MASK_NOCLOSEPROCESS, hProcess will be NULL if no process was launched.
For example, if a document to be launched is a URL and an instance of Internet
Explorer is already running, it will display the document. No new process is
launched, and hProcess will be
does not always return an hProcess,
even if a process is launched as the result of the call. For example, an
hProcess does not return when you use
SEE_MASK_INVOKEIDLIST to invoke
IContextMenu.
The SEE_MASK_NOASYNC flag must be specified if the thread
calling ShellExecuteEx does not have a message loop or if the
thread or process will terminate soon after ShellExecuteEx
returns. Under such conditions, the calling thread will not be available to
complete the DDE conversation, so it is important that
ShellExecuteEx complete the conversation before returning
control to the calling application. Failure to complete the conversation can
result in an unsuccessful launch of the document.
If the calling thread has a message loop and will exist for some time after
the call to ShellExecuteEx returns, the
SEE_MASK_NOASYNC flag is optional. If the flag is omitted, the
calling thread's message pump will be used to complete the DDE conversation. The
calling application regains control sooner, since the DDE conversation can be
completed in the background.
When populating the most frequently used program list using the
SEE_MASK_FLAG_LOG_USAGE flag in fMask, counts are made differently for the classic
and Windows XP-style Start menus. The classic style menu only counts hits to the
shortcuts in the Program menu. The Windows XP-style menu counts both hits to the
shortcuts in the Program menu and hits to those shortcuts' targets outside of
the Program menu. Therefore, setting lpFile to myfile.exe would affect the count for
the Windows XP-style menu regardless of whether that file was launched directly
or through a shortcut. The classic style—which would require lpFile to contain a .lnk file name—would not be
To include double quotation marks in lpParameters, enclose each mark in a pair of
quotation marks, as in the following example.
sei.lpParameters = "An example: /"/"/"quoted text/"/"/"";In
this case, the application receives three parameters: An, example:, and "quoted
Structure&Information
Headershellapi.hMinimum operating systemsWindows NT&3.51, Windows&95
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:134841次
积分:1709
积分:1709
排名:千里之外
原创:31篇
转载:28篇
评论:25条
(2)(1)(1)(1)(1)(2)(1)(2)(1)(1)(3)(1)(1)(1)(2)(1)(4)(1)(2)(1)(1)(3)(14)(2)(9)&&&&&&&&&&&&&&&&&&
posts - 149,comments - 125,trackbacks - 0
阅读排行榜
评论排行榜
100&&&&&&& &&&&&&&&& SHELLEXECUTEINFO
ShellExecuteEx&&&&&&& SHELLEXECUTEINFOShellExecuteExcab
SHELLEXECUTEINFO ShellInfo;
memset(&ShellInfo, 0, sizeof(ShellInfo));
ShellInfo.cbSize = sizeof(ShellInfo);
ShellInfo.hwnd = NULL;
ShellInfo.lpVerb = _T("open");
ShellInfo.lpFile = szFilePath;
ShellInfo.nShow = SW_SHOWNORMAL;
ShellInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
BOOL bResult = ShellExecuteEx(&ShellInfo);
SHELLEXECUTEINFO
Contains information used by
ULONG&fMHWND&LPCTSTR&lpVLPCTSTR&lpFLPCTSTR&lpP&&&&&&int&nSHINSTANCE&hInstALPVOID&lpIDLLPCTSTR&lpC&&&&&&HKEY&hkeyC&&&&&&DWORD&dwHotKHANDLE&hIHANDLE&hM}&DUMMYUNIONNAME;} SHELLEXECUTEINFO, *LPSHELLEXECUTEINFO;
ShellExecuteExNULL
edit explore find openprint properties
lpParameters
lpDirectory
outSEE_MASK_NOCLOSEPROCESS SShellExecuteEx 32 SE_ERR_XXX
ITEMIDLISTfMaskSEE_MASK_IDLISTSEE_MASK_INVOKEIDLIST
GUIDfMaskSEE_MASK_CLASSNAME
HandlefMaskSEE_MASK_HOTKEY
Key Code(HOTKEYF_)modifier flagsfmaskSEE_MASK_HOTKEY
DUMMYUNIONNAME
HandlefMaskSEE_MASK_ICON
HandlefMaskSEE_MASK_HMONITOR
fMaskSEE_MASK_NOCLOSEPROCESSNULLfMaskSEE_MASK_NOCLOSEPROCESSNULL
ShellExecuteEx
Performs an operation on a specified file对指定应用程序执行某个操作
lpExecInfo
[in, out]&一个指向
结构的指针,用来传递和保存应用程序执行相关的信息。
如果函数成功执行就返回TRUE,否则返回 FALSE 。可调用
获取错误信息。
由于ShellExecuteEx 能够将执行委托给那些由组件对象模型COM激活的Shell 扩展(数据源,上下文菜单句柄,动词实现),因此在调用ShellExecuteEx 之前要先初始化 COM。某些Shell 扩展要求单线程单元模型的COM,在这种情况下,应当像下面一般初始化COM:
CoInitializeEx (NULL,COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE)
ShellExecuteEx Shell COMCOM
SHELLEXECUTEINFO ShellInfo;
memset(&ShellInfo, 0, sizeof(ShellInfo));
ShellInfo.cbSize = sizeof(ShellInfo);
ShellInfo.hwnd = NULL;
ShellInfo.lpVerb = _T("open");
ShellInfo.lpFile = szFilePath; //
ShellInfo.nShow = SW_SHOWNORMAL;
ShellInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
BOOL bResult = ShellExecuteEx(&ShellInfo);
memset(&ShellInfo, 0, sizeof(ShellInfo));
ShellInfo.cbSize = sizeof(ShellInfo);
ShellInfo.hwnd = NULL;
ShellInfo.lpVerb = _T("open");
ShellInfo.lpFile = _T("");
ShellInfo.nShow = SW_SHOWNORMAL;
ShellInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
BOOL bResult = ShellExecuteEx(&ShellInfo);
memset(&ShellInfo, 0, sizeof(ShellInfo));
ShellInfo.cbSize = sizeof(ShellInfo);
ShellInfo.hwnd = NULL;
ShellInfo.lpVerb = _T("open");
ShellInfo.lpFile = szFilePath;
ShellInfo.nShow = SW_SHOWNORMAL;
ShellInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
ShellExecuteEx(&ShellInfo);
2SHELLEXECUTEINFO
3ShellExecuteEx
http://blog.csdn.net/kesalin/category/242901.aspx
阅读(26464)

我要回帖

更多关于 oppor9scoloros 3.2 的文章

 

随机推荐