网站首页  词典首页

请输入您要查询的函数:

 

术语 shcreateprocessasuserw
释义 SHCreateProcessAsUserW
语法:
BOOL SHCreateProcessAsUserW( PSHCREATEPROCESSINFOW pscpi
);
SHCreateProcessAsUserW功能
创建一个新用户模式进程和主线程来运行指定的可执行文件。
注意SHCreateProcessAsUserW不是在Windows XP或更高版本系统的实施。
参数
pscpi
[in]一个指向就如何创建进程的信息SHCREATEPROCESSINFOW结构。
返回值
如果成功返回TRUE,如果没有或FALSE。要检索扩展的错误信息,调用GetLastError。
备注
这个功能类似于给ShellExecuteEx作为动词皿as。然而,SHCreateProcessAsUserW创建一个进程,在由结构hUserToken成员所代表的用户的安全上下文中运行指向pscpi。该lpProcessInformation成员可用于返回一个与新的进程的信息PROCESS_INFORMATION结构。
在皿as动词必须支持可执行文件的文件类。 。exe文件类支持皿as。使用AssocQueryString函数来检查是否皿as是由其他文件阶级的支持。下面的代码片段说明了语法。
AssocQueryString(0,ASSOCSTR_COMMAND,pszFile,文字(“皿as”),空,&cchVerb)
有关如何使用Shell启动应用程序,请启动应用程序的讨论。
SHCreateProcessAsUserW不支持在Windows XP下。用户需要类似的功能应该研究CreateProcess的,CreateProcessAsUser,CreateProcessWithLogonW和ShellExecuteEx,仔细评估的基础上每一个所需的功能和安全性。 IQueryAssociations可用于提取与CreateProcess的使用的信息,如有必要。
功能信息
最低DLL版本 shell32.dll 5.0或更新版本
自定义ImplementationNo
Headershlobj.h
import libraryshell32.lib
最低经营systemsWindows 2000年,Windows Millennium Edition中
UnicodeImplemented为Unicode版本。
参见
CreateProcess的,CreateProcessAsUser,CreateProcessWithLogonW,ShellExecuteEx
==英文原文==SHCreateProcessAsUserW Function
Creates a new user-mode process and its primary thread to run a specified executable file.
Note SHCreateProcessAsUserW is not implemented under Windows XP or later systems.
Syntax
BOOL SHCreateProcessAsUserW( PSHCREATEPROCESSINFOW pscpi
);
Parameters
pscpi
[in] A pointer to an SHCREATEPROCESSINFOW structure with information on how to create the process.
Return Value
Returns TRUE if successful, or FALSE if not. To retrieve extended error information, call GetLastError .
Remarks
This function is similar to ShellExecuteEx with runas as the verb. However, SHCreateProcessAsUserW creates a process that runs in the security context of the user represented by the hUserToken member of the structure pointed to by pscpi. The lpProcessInformation member can be used to return a PROCESS_INFORMATION structure with information on the new process.
The runas verb must be supported by the executable file's file class . The .exe file class supports runas. Use the AssocQueryString function to check whether or not runas is supported by other file classes. The following code fragment illustrates the syntax.
AssocQueryString(0, ASSOCSTR_COMMAND, pszFile, TEXT("runas"), NULL, &cchVerb)
For a discussion of how to use the Shell to launch applications, see Launching Applications .
SHCreateProcessAsUserW is not supported under Windows XP. Users requiring similar functionality should examine CreateProcess , CreateProcessAsUser , CreateProcessWithLogonW and ShellExecuteEx, carefully evaluating each based on required functionality and security. IQueryAssociations can be used to extract information used with CreateProcess, if necessary.
Function Information
Minimum DLL Versionshell32.dll version 5.0 or later
Custom ImplementationNo
Headershlobj.h
Import libraryshell32.lib
Minimum operating systemsWindows 2000, Windows Millennium Edition
UnicodeImplemented as Unicode version.
See Also
CreateProcess , CreateProcessAsUser , CreateProcessWithLogonW , ShellExecuteEx
==原始网址==http://msdn.microsoft.com/en-us/library/bb762138(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:25:42