Evtl. in die Richtung:
Dim cdb As NotesDatabase
...
strKommentar = ncdoc.getItemValue("$Comment")(0)
[...]
Leider nein.
UNID: 620F37C3286D8819C12580F7003BD8E1
NoteID: 1203E
LSI_THREAD_MODULE: *D5DDE18
Der Stern erinnert mich an einen Pointer ;)
[EDIT]
Butter bei de Fische: Manuell ist das Ganze kein Problem:
Private g_nameScriptLib As String
...
g_nameScriptLib = "Name der Lib"
Nicht schön, aber ein Workarround, den ich schon oft gesehen habe.
Bei Agents hättest Du ja agent.name.
So ein session.CurrentLibrary.Name wäre hier echt eine Hilfe gewesen.
Der Rückgabe wert ist in der Tat ein Pointer. Mit ein bisschen API Magic kommt man dann auch an den Namen der ScriptLib. Ist sicher nicht alltagstauglich. Ich verwende daher auch eine (private) Konstante in meinen Libs
Option Public
Option Declare
Const APIModule = "NNOTES"
Declare Private Sub Peek Lib APIModule Alias "Cmovmem"( ByVal P As Long, D As Any, ByVal N As Long)
Declare Private Sub PeekString Lib APIModule Alias "Cmovmem"( ByVal P As Long, ByVal D As String, ByVal N As Long)
Sub Terminate
End Sub
Public Sub sayHello()
MsgBox getModuleName
End Sub
Function getModuleName ()As String
Dim t As long
Dim p As Long
Dim s As String
Dim a As String
Dim b As String
Dim z As Integer
t& = CLng("&H" & Mid$(GetThreadInfo(2), 2))
Peek t& + 166, p&, 4 ' 166 For 9.0.1
If Abs(t& - p&) > 1E6 Then Exit Function
s$ = Space(32)
PeekString p&, s$, 32
z% = InStr(s$, Chr$(0))
a$ = Left$(s$, z% - 1)
s$ = Mid$(s$, z% + 1)
z% = InStr(s$, Chr$(0))
b$ = Left$(s$, z% - 1)
If b$ = "" Then getModuleName = a$ Else getModuleName = b$ & " - " & a$
End Function