Hi, the most of our users are iNotes users and we have to manage their user IDs whenever they get renamed (moved from an OU to another) to get the whole rename process (rename in ACLs, groups, unread lists, etc…) executed.I’m not a developer, but 'I’m trying to create an agent that downloads ID file from IDVault and writes it to disk, opens it, executes a “SECRefreshIdFile” command writes back the modifications and then does a “SECidfSync” of the modified id…
Since LS doesn’t support this kind of operations I need to use APIs, but I’m stuck at the first step: SECidfGet gets the RC 2051
This is the declaration:
Declare Function SECidfGet Lib “nnotes.dll” _
(ByVal pUserName As String,_
ByVal pPassword As String,_
ByVal pPutIDFileHere As String,_
ByVal KFHANDLE As Long,_
pServerName As String,_
ByVal dwReservedFlags As Long,_
ByVal wReservedType As Integer,_
pReserved As Integer) As Integer
Then I call it in a sub:
Sub ProcessID (uid As String, uname As String, temp As String, vaultserver As string)
Dim rc As Integer
Dim handle As Long
If Dir$(temp & "\RenUs", 16) = "" Then
MkDir temp & "\RenUs\"
End If
rc = SECidfGet(uname, PWD, temp & "\RenUs\" & uid & ".id", handle, vaultserver, 0, 0, 0)
Print rc
'....more code here
End Sub
uid is the shortname from the person document in names
uname is the user’s old canonical name
temp is the result of Environ$(“TMP”)
vaultserver is the canonical name the server where the ID Vault resides
PWD is a public const declared at the beginning (this one is just an example)
Public Const PWD = “PASSWORD”
The agent is executed by me (ID Vault administrator, with [Auditor] role)
I’m pretty sure that i messed up something in the function declaration… any idea?