Very basic COM question for D6
Andy,
I'd personally try generating the interfaces for Notes using the Active-X
Component Wizard, since the resulting classes and methods are usually a lot
easier to work with. If you don't want to bother with that (e.g., you're
just doing some workspace-based experimentation), you could use:
s := IDispatch createObject: 'Lotus.NotesSession'.
In that case, s will be an instance of IDispatch. You can interact with any
IDispatch by using #getProperty:, #setProperty:, and #invoke:. (Take a look
at the IDispatch methods in the Accessing and Dispatching categories.) You
can also try just sending it a message that Notes should understand and
IDispatch>>doesNotUnderstand: will often sort things out well enough for
things to work (of course you should never rely on that in an actual
application).
If you've generated the interfaces, you could use something more direct like
(possibly):
s := Lotus_NotesSession new.
The exact class name will depend on what you choose in the wizard, but
that's the general idea. If you have more questions or problems, feel free
to post again.
HTH, Don
|