I wrote a little program to send a mail via Lotus Notes.First time i run the program it works fine.
Second time i start the program i get the message “Try to connect to Notes” but i never get the message “Session initialized”
The programm is in the taskmanager but it hungs.
Any idea what is wrong ?
OS: Windows XP
Lotus Notes: 8.5.3
Language: C# with VS2010
MessageBox.Show(“Try to connect to Notes”);
try {
Notes = Type.GetTypeFromProgID(“lotus.Notessession”);
session = Activator.CreateInstance(Notes, true);
Notes.InvokeMember(“Initialize”, BindingFlags.Public | BindingFlags.InvokeMethod | BindingFlags.Instance, null, session, null);
MessageBox.Show(“Session initialized”);
…etc…
}
catch(Exception e) {
MessageBox.Show(null, "Error: " + e.Message, “Error”, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}