Link to home
Start Free TrialLog in
Avatar of aelatik
aelatikFlag for Netherlands

asked on

Change Lotus Notes ID password programmatically ( 500 + 500 points )

I need help on changing notes id password programmatically. Need to implement this in a VB program...

https://www.experts-exchange.com/questions/20880858/Change-password-through-VB.html
ASKER CERTIFIED SOLUTION
Avatar of HemanthaKumar
HemanthaKumar

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of aelatik

ASKER

Any ideas on how to use this through VB ?
Avatar of HemanthaKumar
HemanthaKumar

Copy/Paste :-)
Avatar of aelatik

ASKER

Doesn't work, VB crashes in design time and after compilation.
I think just changing those {} with "
But i got an error: nnotes.dll file not found.
I copied to system32 folder too, but with no success.
Avatar of aelatik

ASKER

Even this only will cause VB to crash. I have the nnotes.dll, but does not work.

Private Declare Function W32_SECKFMChangePassword Lib "nnotes.dll" Alias "SECKFMChangePassword" (ByVal pIDFile As String, ByVal pOldPassword As String, ByVal pNewPassword As String) As Integer

Private Sub Form_Load()
W32_SECKFMChangePassword "myfile.id", "oldpass", "newpass"
End Sub

Still trying.......
I didnt get crash, only file not found to nnotes.dll, is there a version issue from that dll?
Also note that i use full path to myfile.id" (c:\lotus\notes\data\...)
I did it with/without full path to nnotes.dll too (and copy to system folder of windows too)
Avatar of aelatik

ASKER

I just did a search in nnotes.dll for SECKFMChangePassword and its there. I don't get why its not working.
And its amazing how many other API's are in there.
i did it too and, yes, function is in it
Notes has to be installed for this api to work ...

Probably there is no path information to notes executable directory.. add it in path environment..
You have to initialize teh NOtes API before you call it externally.  Use something like:

Declare Function NotesInitExtended Lib "nnotes.dll" ( Byval argc As Long, Byval argv As String ) As Integer
Declare Function NotesTerm Lib "nnotes.dll" () As Integer

Status%=NotesInitExtended(0,"")
'all of your code
Status%=NotesTerm()

Avatar of aelatik

ASKER

Jippie.... Its working :-), qwaletee just finalized this q.

I'm awarding you all for your input, because i had to use comments from all of you to accomplish it....

qwalatee, get your points here.... https://www.experts-exchange.com/questions/20882225/Points-for-qwaletee.html
Richie, you point are awarded in : https://www.experts-exchange.com/questions/20880858/Change-password-through-VB.html
HemanthaKumar : Your points are awarded in this queue.

p.s In needed all your comments to get an answer, thats why everyone gets equal points.
Nice!
qwaletee, so we have to "open an API session" before actually use it?
500 + 500 ?

:-)
HemanthaKumar, don't forget that in any case, aelatik spent 1500 points between us.
If you want 500 points, i could post a Q for you.
Just wanted to confirm what he meant by 500 + 500 i.e LN + VB TA ?

Aelatik.. I am not rigid, you can delete that question !!
Avatar of aelatik

ASKER

HemanthaKumar,

In my opinion your post is worth more than 1000 points. So please take your points...
Richie and qwaletee got 500 points each. So don't feel quilty about accepting the points.
Afterall, you posted the function that did the job....
Avatar of aelatik

ASKER

qwaletee,

You still didn't claim your points. Get them here : https://www.experts-exchange.com/questions/20882225/Points-for-qwaletee.html