Lotus & VB.NET(1):说明

水如烟 2009-07-11 10:11:07
Notes通信录的维护在我看来是一项较为烦人的工作。为了维护方便,自然的提起了尝试操作Notes的兴趣。

通过项目引用 "x:\Program Files\lotus\notes\domobj.tlb"便生成了Interop.Domino.dll。

后面的思路及代码,因涉及到注册表,要求本地正常安装Lotus客户端程序。

Notes对象


注:Lotus我并不熟悉,我是调试着看变量来编程序。有不对的地方,请不吝指教。
我也尝试过用NotesSql,个人觉得不大方便。

...全文
292 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
梵瑾箬 2011-04-13
  • 打赏
  • 举报
回复
我技术太差了,完全弄不懂,高手
Ants2002 2010-06-08
  • 打赏
  • 举报
回复
比较深,但还是要顶一下
TroubleShotting 2009-09-29
  • 打赏
  • 举报
回复
save
tjficcbw 2009-07-14
  • 打赏
  • 举报
回复
虽然看不太懂,但学习
水如烟 2009-07-13
  • 打赏
  • 举报
回复
        Public Function GetEnvironmentValue(ByVal pName As String, Optional ByVal bisSystem As Boolean = False) As Object 

Return Me.com.GetEnvironmentValue(pName,bisSystem) 'IsObject
End Function

Public Function GetUserPolicySettings(ByVal pServer As String, ByVal pName As String, ByVal lType As SESS_POLICY, Optional ByVal pExplicitPolicy As String = "", Optional ByVal pReserved As String = "") As NotesDocument

Return New NotesDocument(Me.com.GetUserPolicySettings(pServer, pName, CType(lType, Domino.SESS_POLICY), pExplicitPolicy, pReserved))
End Function

Public Function HashPassword(ByVal pPassword As String) As String

Return Me.com.HashPassword(pPassword)
End Function

Public ReadOnly Property HttpURL() As String
Get

Return Me.com.HttpURL()
End Get
End Property

Public Sub Initialize(Optional ByVal pPassword As String = "")

Me.com.Initialize(pPassword)
End Sub

Public Sub InitializeUsingNotesUserName(Optional ByVal pUser As String = "", Optional ByVal pPassword As String = "")

Me.com.InitializeUsingNotesUserName(pUser,pPassword)
End Sub

Public ReadOnly Property International() As NotesInternational
Get

Return New NotesInternational(Me.com.International())
End Get
End Property

Public ReadOnly Property IsOnServer() As Boolean
Get

Return Me.com.IsOnServer()
End Get
End Property

Public ReadOnly Property LastExitStatus() As Integer
Get

Return Me.com.LastExitStatus()
End Get
End Property

Public ReadOnly Property LastRun() As Object
Get

Return Me.com.LastRun() 'IsObject
End Get
End Property

Public ReadOnly Property NotesBuildVersion() As Integer
Get

Return Me.com.NotesBuildVersion()
End Get
End Property

Public ReadOnly Property NotesURL() As String
Get

Return Me.com.NotesURL()
End Get
End Property

Public ReadOnly Property NotesVersion() As String
Get

Return Me.com.NotesVersion()
End Get
End Property

Public ReadOnly Property OrgDirectoryPath() As String
Get

Return Me.com.OrgDirectoryPath()
End Get
End Property

Public ReadOnly Property Platform() As String
Get

Return Me.com.Platform()
End Get
End Property

Public Function Resolve(ByVal pURL As String) As Object

Return Me.com.Resolve(pURL) 'IsObject
End Function

Public ReadOnly Property SavedData() As NotesDocument
Get

Return New NotesDocument(Me.com.SavedData())
End Get
End Property

Public Function SendConsoleCommand(ByVal pServer As String, ByVal pCommand As String) As String

Return Me.com.SendConsoleCommand(pServer,pCommand)
End Function

Public ReadOnly Property ServerName() As String
Get

Return Me.com.ServerName()
End Get
End Property

Public Sub SetEnvironmentVar(ByVal pName As String, ByVal Value As Object, Optional ByVal bisSystem As Boolean = False)

Me.com.SetEnvironmentVar(pName,Value,bisSystem)
End Sub

Public Sub UpdateProcessedDoc(ByVal pIDoc As NotesDocument)

Me.com.UpdateProcessedDoc(pIDoc.com)
End Sub

Public ReadOnly Property URLDatabase() As NotesDatabase
Get

Return New NotesDatabase(Me.com.URLDatabase())
End Get
End Property

Public ReadOnly Property UserGroupNameList() As Object
Get

Return Me.com.UserGroupNameList() 'IsObject
End Get
End Property

Public ReadOnly Property UserName() As String
Get

Return Me.com.UserName()
End Get
End Property

Public ReadOnly Property UserNameList() As Object
Get

Return Me.com.UserNameList() 'IsObject
End Get
End Property

Public ReadOnly Property UserNameObject() As NotesName
Get

Return New NotesName(Me.com.UserNameObject())
End Get
End Property

Public Function VerifyPassword(ByVal pPassword As String, ByVal pHashedPassword As String) As Boolean

Return Me.com.VerifyPassword(pPassword,pHashedPassword)
End Function
End Class
End Namespace

水如烟 2009-07-13
  • 打赏
  • 举报
回复
跟自动生成的Interop.Domino.dll相比,将原来不明确的Object,包括变量,逐一明确它. 这是下一步的工作.

现在呢,比如NotesSession,代码如下:

Namespace LzmTW.Lotus
<DefaultMember("UserName")> _
Public Class NotesSession
Inherits LzmTW.Lotus.IComClassBase(Of Domino.NotesSession)


Friend Sub New(ByVal com As Domino.NotesSession)
MyBase.New(com)
End Sub

Public ReadOnly Property AddressBooks() As Object
Get

Return Me.com.AddressBooks() 'IsObject
End Get
End Property

Public ReadOnly Property CommonUserName() As String
Get

Return Me.com.CommonUserName()
End Get
End Property

Public Property ConvertMime() As Boolean
Get

Return Me.com.ConvertMime()
End Get
Set(ByVal value As Boolean)

Me.com.ConvertMime() = Value
End Set
End Property

Public Function CreateAdministrationProcess(ByVal pServer As String) As NotesAdministrationProcess

Return New NotesAdministrationProcess(Me.com.CreateAdministrationProcess(pServer))
End Function

Public Function CreateColorObject() As NotesColorObject

Return New NotesColorObject(Me.com.CreateColorObject())
End Function

Public Function CreateDateRange() As NotesDateRange

Return New NotesDateRange(Me.com.CreateDateRange())
End Function

Public Function CreateDateTime(ByVal pDate As String) As NotesDateTime

Return New NotesDateTime(Me.com.CreateDateTime(pDate))
End Function

Public Function CreateDXLExporter() As NotesDXLExporter

Return New NotesDXLExporter(Me.com.CreateDXLExporter())
End Function

Public Function CreateDXLImporter() As NotesDXLImporter

Return New NotesDXLImporter(Me.com.CreateDXLImporter())
End Function

Public Function CreateLog(ByVal Name As String) As NotesLog

Return New NotesLog(Me.com.CreateLog(Name))
End Function

Public Function CreateName(ByVal pName As String, Optional ByVal pLang As String = "") As NotesName

Return New NotesName(Me.com.CreateName(pName,pLang))
End Function

Public Function CreateNewsletter(ByVal pIDc As NotesDocumentCollection) As NotesNewsletter

Return New NotesNewsletter(Me.com.CreateNewsletter(pIDc.com))
End Function

Public Function CreateRegistration() As NotesRegistration

Return New NotesRegistration(Me.com.CreateRegistration())
End Function

Public Function CreateRichTextParagraphStyle() As NotesRichTextParagraphStyle

Return New NotesRichTextParagraphStyle(Me.com.CreateRichTextParagraphStyle())
End Function

Public Function CreateRichTextStyle() As NotesRichTextStyle

Return New NotesRichTextStyle(Me.com.CreateRichTextStyle())
End Function

Public Function CreateStream() As NotesStream

Return New NotesStream(Me.com.CreateStream())
End Function

Public ReadOnly Property CurrentAgent() As NotesAgent
Get

Return New NotesAgent(Me.com.CurrentAgent())
End Get
End Property

Public ReadOnly Property CurrentDatabase() As NotesDatabase
Get

Return New NotesDatabase(Me.com.CurrentDatabase())
End Get
End Property

Public ReadOnly Property DocumentContext() As NotesDocument
Get

Return New NotesDocument(Me.com.DocumentContext())
End Get
End Property

Public ReadOnly Property EffectiveUserName() As String
Get

Return Me.com.EffectiveUserName()
End Get
End Property

Public Function Evaluate(ByVal pFormula As String, ByVal pIDoc As NotesDocument) As Object

Return Me.com.Evaluate(pFormula, pIDoc.com) 'IsObject
End Function

Public Function FreeTimeSearch(ByVal pIWindow As NotesDateRange, ByVal iDuration As Integer, ByVal Names As Object, Optional ByVal bFirstfit As Boolean = False) As Object

Return Me.com.FreeTimeSearch(pIWindow.com, iDuration, Names, bFirstfit) 'IsObject
End Function

Public Function GetDatabase(ByVal pServer As String, ByVal pFile As String, Optional ByVal bCreateonfail As Boolean = True) As NotesDatabase

Return New NotesDatabase(Me.com.GetDatabase(pServer,pFile,bCreateonfail))
End Function

Public Function GetDbDirectory(ByVal pServer As String) As NotesDbDirectory

Return New NotesDbDirectory(Me.com.GetDbDirectory(pServer))
End Function

Public Function GetEnvironmentString(ByVal pName As String, Optional ByVal bisSystem As Boolean = False) As String

Return Me.com.GetEnvironmentString(pName,bisSystem)
End Function

水如烟 2009-07-13
  • 打赏
  • 举报
回复
有了方向后,今天引用Domino的所有接口,重建各个类,接口和类对照关系如下:

IACL NotesACL
IDatabase NotesDatabase
IDocumentCollection NotesDocumentCollection
IDocument NotesDocument
IView NotesView
IViewEntryCollection NotesViewEntryCollection
IViewEntry NotesViewEntry
IViewNavigator NotesViewNavigator
IViewColumn NotesViewColumn
IItem2 NotesItem
IDateTime NotesDateTime
ISession NotesSession
IAgent NotesAgent
IInternational NotesInternational
IName NotesName
IDateRange NotesDateRange
ILog NotesLog
INewsletter NotesNewsletter
IRegistration NotesRegistration
IRichTextParagraphStyle NotesRichTextParagraphStyle
IRichTextStyle NotesRichTextStyle
IDbDirectory NotesDbDirectory
IAdministrationProcess NotesAdministrationProcess
IColorObject NotesColorObject
IDXLExporter NotesDXLExporter
IDXLImporter NotesDXLImporter
IMIMEEntity NotesMIMEEntity
IMIMEHeader NotesMIMEHeader
IRichTextItem NotesRichTextItem
IEmbeddedObject NotesEmbeddedObject
IRichTextNavigator NotesRichTextNavigator
IRichTextRange NotesRichTextRange
IReplication NotesReplication
IReplicationEntry NotesReplicationEntry
IOutline NotesOutline
IOutlineEntry NotesOutlineEntry
IForm NotesForm
INoteCollection NotesNoteCollection
IACLEntry NotesACLEntry
IRichTextTab NotesRichTextTab
IRichTextDoclink NotesRichTextDoclink
IRichTextSection NotesRichTextSection
IRichTextTable NotesRichTextTable
flycatorg 2009-07-13
  • 打赏
  • 举报
回复
学习
加油馒头 2009-07-13
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 lqknife 的回复:]
这么好的东东没人顶啊
[/Quote]1
paulin 2009-07-12
  • 打赏
  • 举报
回复
学习..
LQknife 2009-07-12
  • 打赏
  • 举报
回复
这么好的东东没人顶啊
dylike 2009-07-11
  • 打赏
  • 举报
回复
身疾,然观其文.
纵观千里,不解一石.
问天曰:何为骆驼斯?
天答曰:吾亦不解,汝不妨问其楼主?
叹罢,坐饮淡茶,闭目而思.
茶必,回曰:骆驼斯,或是IBM之作?
回首,抬寸二之手,取分之.
笑然!

16,552

社区成员

发帖
与我相关
我的任务
社区描述
VB技术相关讨论,主要为经典vb,即VB6.0
社区管理员
  • VB.NET
  • 水哥阿乐
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧