未分类--Windows API--CreateProfile

原文来自MSDN Library for Visual Studio 2008 SP1,翻译部分仅为个人观点,想要看更多信息请看MSDN,如有版权问题请联系QQ 643166601,邮件643166601@qq.com

 

CreateProfile Function

--------------------------------------------------------------------------------

Creates a new user profile.
创建一个新的用户配置文件。
Syntax

HRESULT WINAPI CreateProfile(         
LPCWSTR pszUserSid,
LPCWSTR pszUserName,
LPWSTR pszProfilePath,
DWORD cchProfilePath
);
Parameters

pszUserSid
[in] Pointer to the security identifier (SID) of the user as a string.
指针指向用户作为一个字符串的安全标识符(SID)。
pszUserName
[in] The user name of the new user.
这个新用户的用户名。
This name is used as the base name for the profile directory.
使用这个名称作为配置文件目录的基本名称。
pszProfilePath
[out] When this function returns, contains a pointer to the full path of the profile.
当这个函数返回时,包含一个指针指向配置文件的全路径。
cchProfilePath
[in] Size of the buffer pointed to by pszProfilePath, in characters.
由pszProfilePath指向的缓冲区的大小,以字符为单位。
Return Value

Returns S_OK if successful, or an error value otherwise, including the following:
如果成功返回S_OK,否则返是一个错误值,包含以下:
E_ACCESSDENIED
The caller does not have a sufficient permission level to create the profile.
这个调用者没有足够的权限级别去创建一个配置文件。
HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS)
A profile already exists for the specified user.
指定的用户已经存在一个配置文件了。

Remarks

The caller must have administrator privileges to call this function.
这个调用者必须有管理员特权去调用这个函数。
Function Information

Minimum DLL Version Userenv.dll
Custom Implementation No
Header Userenv.h
Import library Userenv.lib
Minimum operating systems Windows Vista

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值