PwdGetPasswordStatus
This function is used to retrieve information about a password provider's password. The request is passed to the network provider through the PPGetPasswordStatus SPI. DWORD PwdGetPasswordStatus(
LPCTSTR lpProvider,
DWORD dwIndex,
LPDWORD lpStatus,
);
lpProvider
Specifies the network provider who owns the password.
dwIndex
Type of information to retrieve. Can be one of the following: PS_ONOFF Returns whether password is active or "turned on". Upon return, the following bits can be set in lpStatus: PS_ONOFF_ON, PS_ONOFF_OFF.
PS_HASOLDPWD Returns whether it is necessary to supply the previous password in order to change the current password. Upon return, the following bits can be set in lpStatus: PS_HASOLDPWD_ON, PS_HAS_OLDPWD_OFF.
PS_SYNCMASTERPWD Returns whether the password should be kept in sync with the logon password. Upon return, the following bits can be set in lpStatus: PS_SYNCMASTERPWD_ON, PS_SYNCMASTERPWD_OFF.
PS_STORAGETYPE Returns whether the password is stored locally, or in a network location. Upon return, the following bits can be set in lpStatus: PS_STORAGETYPE_LOCAL, PS_STORAGETYPE_NETWORK.
lpStatus
A pointer to a bit field that is filled in upon return, based upon the value of the dwIndex field passed in. See the dwIndex field above for the possible values.
WN_SUCCESS if the call is successful.
PwdChangePassword
This function is used to change the user's Windows password or a password provider's password. The MPR displays a dialog box for this purpose. If the Windows password is changed, the MPR re-encrypts the user's password cache with the new password. Password providers are notified through the PPChangePassword SPI. DWORD PwdChangePassword(
LPCTSTR lpProvider,
HWND hwndOwner,
DWORD dwFlags
);
lpProvider
Specifies the provider to change the password for. If lpProvider is NULL, the logon password is changed. Changing the logon password can also result in other password providers being notified to change their passwords, if the user has selected to synchronize a provider's password with the logon password.
hwndOwner
A handle to a window which should be the owner for the dialog box displayed by the MPR.
dwFlags
Can be 0, or a combination of the following: CHANGEPWD_OLDPWDONLY Displays a dialog that prompts only for the previous password. The current logon password is given to the password provider as the new password to use. This flag is ignored if PwdChangePassword is called to change the logon password (lpProvider is NULL). This flag is intended primarily for use by the system, it is not recommended that applications set this flag.
WN_SUCCESS if the call is successful. Otherwise, an error, which includes:
WN_CANCEL The user canceled the operation.
This function is used to retrieve information about a password provider's password. The request is passed to the network provider through the PPGetPasswordStatus SPI. DWORD PwdGetPasswordStatus(
LPCTSTR lpProvider,
DWORD dwIndex,
LPDWORD lpStatus,
);
lpProvider
Specifies the network provider who owns the password.
dwIndex
Type of information to retrieve. Can be one of the following: PS_ONOFF Returns whether password is active or "turned on". Upon return, the following bits can be set in lpStatus: PS_ONOFF_ON, PS_ONOFF_OFF.
PS_HASOLDPWD Returns whether it is necessary to supply the previous password in order to change the current password. Upon return, the following bits can be set in lpStatus: PS_HASOLDPWD_ON, PS_HAS_OLDPWD_OFF.
PS_SYNCMASTERPWD Returns whether the password should be kept in sync with the logon password. Upon return, the following bits can be set in lpStatus: PS_SYNCMASTERPWD_ON, PS_SYNCMASTERPWD_OFF.
PS_STORAGETYPE Returns whether the password is stored locally, or in a network location. Upon return, the following bits can be set in lpStatus: PS_STORAGETYPE_LOCAL, PS_STORAGETYPE_NETWORK.
lpStatus
A pointer to a bit field that is filled in upon return, based upon the value of the dwIndex field passed in. See the dwIndex field above for the possible values.
WN_SUCCESS if the call is successful.
PwdChangePassword
This function is used to change the user's Windows password or a password provider's password. The MPR displays a dialog box for this purpose. If the Windows password is changed, the MPR re-encrypts the user's password cache with the new password. Password providers are notified through the PPChangePassword SPI. DWORD PwdChangePassword(
LPCTSTR lpProvider,
HWND hwndOwner,
DWORD dwFlags
);
lpProvider
Specifies the provider to change the password for. If lpProvider is NULL, the logon password is changed. Changing the logon password can also result in other password providers being notified to change their passwords, if the user has selected to synchronize a provider's password with the logon password.
hwndOwner
A handle to a window which should be the owner for the dialog box displayed by the MPR.
dwFlags
Can be 0, or a combination of the following: CHANGEPWD_OLDPWDONLY Displays a dialog that prompts only for the previous password. The current logon password is given to the password provider as the new password to use. This flag is ignored if PwdChangePassword is called to change the logon password (lpProvider is NULL). This flag is intended primarily for use by the system, it is not recommended that applications set this flag.
WN_SUCCESS if the call is successful. Otherwise, an error, which includes:
WN_CANCEL The user canceled the operation.
解决方案 »
- gdi/gdi+绘制图片窗口周围的阴影
- VC 2008里面,“Project”菜单下的“Add Web Reference”项是灰掉的,如何解决?
- 在线等。。。命名冲突了
- 请问一下VC下的XML解析需要的环境?
- vc中如何在类中定义数组? vc总是提示出错!!!
- 一个关于网页中Flash的难题(WEB开发版人气太低啦所以来这问,这又精通网页开发,又懂编程的高手多^_^)
- 一个网络传输程序用自定义的协议,如何实现超时机制
- 如何屏蔽 EDIT 的输出?
- dllregistersever调用失败错误代码0x80004005
- 想用VC做一个类似Word“公式编辑器”的东东,不知如何引入那些奇怪的字体,高手请re
- 500分等您拿!决不失言!!!如何编写IEXPLORER PLUGIN程序
- 怎样把数据以二进制形式写入文件(在基于对话框程序中)
LPLOGONINFO lpAuthentInfo,
LPLOGONINFO lpPreviousAuthentInfo
DWORD dwAction
);
lpAuthentInfo
A structure specifying the logged-on user's name and new password.
lpPreviousAuthentInfo
A structure specifying the user's name and old password.
dwAction
One of the following values: PWDCHANGE_MASTERPWD_NOTIFY The Windows password has changed. The provider may wish to take some action, such as giving the new password to a network redirector.
PWDCHANGE_PROVIDERPWD_PENDING The user wants to change a password maintained by the provider. This message is a first-phase notification. The provider should not change the password at this time. The provider should do any pre-commit verification that is appropriate, such as pinging a server or checking that the old password is valid, if possible.
PWDCHANGE_PROVIDERPWD_COMMIT Commit-phase notification, the provider should change the password in response to this message.
PWDCHANGE_PROVIDERPWD_CANCEL A provider will receive this message if it has already received a first-phase notification (PWDCHANGE_PROVIDERPWD_ PENDING) and the password-change action has been canceled (for example, in response to another provider being unable to change its password).
WN_SUCCESS if the call is successful.
PPGetPasswordStatus
This function is used to query a password provider about the status of its password. The attributes an network provider can report are if it is on/off (enabled/disabled), if it requires typing in the old password to change it, and if the storage type is local or remote. DWORD PPGetPasswordStatus(
DWORD nIndex
);
nIndex
Can be one of the following: PS_ONOFF Requests on/off status of password.
PS_HASOLDPWD Requests "old password" status of password.
PS_STORAGETYPE Requests storage type of password.
Can be a combination of the following bits, for each nIndex:
nIndex: Valid return bits:
PS_ONOFF PS_ONOFF_ON, PS_ONOFF_OFF
PS_HASOLDPWD PS_HASOLDPWD_ON, PS_HASOLDPWD_OFF
PS_STORAGETYPE PS_STORAGETYPE_LOCAL, PS_STORAGETYPE_NETWORK