SessionManager>>openEventLog

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

SessionManager>>openEventLog

James Foster-3
This method references VMLibrary which is does not have the needed code in
runtime. The fix is to change the call from VMLibrary to AdvApiLibrary. The
following seems to work (I've added it as an override in a subclass of
SessionManager):

openEventLog

    "Private - Open the NT event log for writing, and answer a handle onto
it that can be passed to the

    ReportEvent() API."

    OSVERSIONINFO current isNT

        ifTrue:

            [eventLogHandle := AdvApiLibrary default

                registerEventSource: nil

                lpSourceName: self eventLogSource].

    ^eventLogHandle


Reply | Threaded
Open this post in threaded view
|

Re: SessionManager>>openEventLog

Blair McGlashan-3
"James Foster" <[hidden email]> wrote in message
news:[hidden email]...
> This method references VMLibrary which is does not have the needed code in
> runtime. The fix is to change the call from VMLibrary to AdvApiLibrary.
> The
> following seems to work (I've added it as an override in a subclass of
> SessionManager):
>

Thanks James, both the registration method and the messages table (necessary
to avoid the event log telling you there is no "source" for the message, or
something like that, can't remember exactly, are indeed missing from the
ToGo application stubs. We'll get this fixed in 5.1.5. In the meantime your
approach is a reasonable workaround.

Regards

Blair