Exemple #1
0
        private static void AppDestroy(IntPtr app_handle, bool cleanup)
        {
            GCHandle   h    = (GCHandle)app_handle;
            ServiceApp sapp = h.Target as ServiceApp;

            sapp.Stop(cleanup);
            sapp._started = false;
            sapp.ReleaseUnmanagedResources();
        }
Exemple #2
0
        private static int AppStart(IntPtr app_handle, string[] argv)
        {
            GCHandle   h    = (GCHandle)app_handle;
            ServiceApp sapp = h.Target as ServiceApp;
            var        r    = sapp.Start(argv);

            if (r == 0)
            {
                sapp._started = true;
                Native.dsn_primary_address2(out sapp._address.addr);
                sapp._name = argv[0];
            }
            return(r);
        }