Option Public
Option Declare
Const NOERROR = &H0
Const ERR_MASK = &H3FFF
Const NULLHANDLE = &H0
'// Lotus Notes/Domino C API (Windows/Intel
32-bit)
Declare Function W32_SECKFMChangePassword Lib {nnotes.dll} Alias {SECKFMChangePassword}
( ByVal pIDFile As String , ByVal pOldPassword As String , ByVal pNewPassword
As String ) As Integer
Declare Function W32_OSLoadString Lib {nnotes.dll} Alias {OSLoadString}
( ByVal hModule As Long , ByVal StringCode As Integer , ByVal retBuffer
As String , ByVal BufferLength As Integer ) As Integer
Sub Initialize
Dim intAPIResult As Integer
Dim szErrorText As String
Dim szBuffer As String * 1024
intAPIResult = W32_SECKFMChangePassword (
{c:\lotus\notes\data\user.id} , {oldpassword} , {newpassword} )
If Not ( ( intAPIResult And ERR_MASK ) = NOERROR ) Then
szBuffer = String$ ( LenB ( szBuffer ) , 0 )
Call W32_OSLoadString ( NULLHANDLE , intAPIResult , szBuffer , LenB ( szBuffer
) - 1 )
If Instr ( 1 , szBuffer , Chr$ ( 0 ) , 5 ) > 1 Then
szErrorText = Left$ ( szBuffer , Instr ( 1 , szBuffer , Chr$ ( 0 ) , 5
) - 1 )
ElseIf Instr ( 1 , szBuffer , Chr$ ( 0 ) , 5 ) = 0 Then
szErrorText = {}
Else
szErrorText = szBuffer
End If
MessageBox szErrorText , 16 , {C API ERROR CODE: } & CStr ( intAPIResult
)
End If
End Sub
Fabio Barbieri
www.barbieri.da.ru
3 Commenti:
asdgdasg
Bella Bella ....
Bella Bella ....