熟悉 msnp32.dll 的高手请进!关于“PwdProvider”的问题!

sean 2000-07-14 05:40:00
我想请教一下这两个函数的原形及功能作用:
PPChangePassword()、PPGetPasswordStatus()
谢谢!
...全文
75 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
lu0 2000-07-16
  • 打赏
  • 举报
回复
DWORD PPChangePassword(
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

lu0 2000-07-16
  • 打赏
  • 举报
回复
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.

16,470

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧