[m-dev.] Initialising the Mercury runtime in .NET
Peter Ross
pro at missioncriticalit.com
Mon Oct 13 19:56:45 AEST 2003
Before one can use Mercury.NET, one must call io__init_state.
Currently this is done by inserting the call to MR_init_runtime, which
simply calls io__init_state but may at a later date do more, in the
class constructor (.cctor) of the assembly containing main/2. This is
problematic if you want to use a Mercury.NET assembly as a library as
then this routine isn't called.
The simple solution would be to hard code the call to io__init_state
from the .cctor of io instead of from MR_init_runtime.
However I believe we should be able to offer a better solution to this
problem, as it has come up before in the need to run a predicate once to
initialise a solver engine for HAL and I have encountered a similar
problem where one needs to run some setup routines before running any of
the MS sockets stuff.
Does anyone have any suggestions?
--
Peter Ross
Software Engineer (Work) +32 2 757 10 15
Mission Critical (Mobile) +32 485 482 559
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list