Api C: Funzione per Cambiare La Password All’id Notes.

TIPS DEVELOPERS

  • 3 commenti
Api C: Funzione per Cambiare La Password All'id Notes.

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:

  • #1 cho chet 08/04/2006 11:35:34 AM

    asdgdasg

  • #2 Nicola 01/10/2006 9:29:44 AM

    Bella Bella ....

  • #3 Nicola 01/10/2006 9:29:43 AM

    Bella Bella ....

Commenta articolo
 

Questo spazio web è stato creato da per un uso pubblico e gratuito. Qualsiasi tipo di collaborazione sarà ben accetta.
Per maggiori informazioni, scrivete a info@dominopoint.it

About Dominopoint
Social
Dominopoint social presence: