Hi,
I have been trying to get one of the alchemi examples to load from an
external assembly, and it appears to be running everything but the
delegates for the threads no longer seem to work. The app delegate
works fine...
Should this be working?
Cheers
Anton

Assembly hithere =
Assembly.LoadFrom(@"C:\dev2005\examples2005\Tutorial\bin\Debug\Tutorial.exe");

            Module testmod = hithere.GetModule("Tutorial.exe");
            ga.Manifest.Add(new ModuleDependency(testmod));

            // create and add 10 threads to the application
            for (int i = 0; i < 10; i++)
            {
                // create thread
                //MultiplierThread thread = new MultiplierThread(i, i + 1);

                // add thread to application
                //ga.Threads.Add(thread);

                object theClass =
hithere.CreateInstance("Alchemi.Examples.Tutorial.MultiplierThread",
false,
                    BindingFlags.Default, null, new object[2] { i, i + 1 },
                    System.Globalization.CultureInfo.InvariantCulture, null);

                // add thread to application
                ga.Threads.Add((GThread)theClass);
            }

            // subscribe to events
            ga.ThreadFinish += new
GThreadFinish(MultiplierApplication.ThreadFinished);
            ga.ThreadFailed += new
GThreadFailed(MultiplierApplication.ThreadFailed);
            ga.ApplicationFinish += new
GApplicationFinish(MultiplierApplication.ApplicationFinished);

            // start application
            ga.Start();


-- 
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D4D465452snlbxq' | dc
This will help you for 99.9% of your problems ...

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
alchemi-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alchemi-users

Reply via email to