IntroductionThe first part of this User Guide describes using .NET/Link to allow you to call from Mathematica into .NET, thereby extending the Mathematica environment to include the functionality in all existing and future .NET classes. This part shows you how to use .NET/Link in the opposite direction, as a means to write .NET programs that use the Mathematica kernel as a computational engine. .NET/Link uses MathLink, Wolfram Research's protocol for sending data and commands between programs. Many of the concepts and techniques in .NET/Link programming are the same as those for programming with the MathLink C-language API. The .NET/Link documentation is not intended to be an encyclopedic compendium of everything you need to know to write .NET programs that use MathLink. Programmers may have to rely a little on the general documentation of MathLink programming in The Mathematica Book. They should also consult the MathLink Tutorial, available on MathSource (http://www.mathsource.com/Content/Enhancements/MathLink/0206-693), although some sections of that document (such as about graphics) are out of date. The Tutorial is divided into two major sections along the same lines as this User Guide. You will want to read the second part. Many of the functions .NET/Link provides have C-language counterparts that are identical or nearly so. If you have not read Part 1, "Calling .NET from Mathematica," you should at least skim it at some point. Your .NET "front end" can use the same techniques for calling .NET methods from Mathematica code and passing .NET objects as arguments that programmers use when running the kernel from the notebook front end. This allows you to have a very high-level interface between .NET and Mathematica. When you are writing MathLink programs in C, you have to think about passing and returning simple things like strings and integers. With .NET/Link you can pass .NET objects back and forth between .NET and Mathematica. The sections below merely provide an overview of topics in .NET/Link programming. The main class-by-class reference for .NET/Link is the API help file. You should also look at the example programs. When you are reading this text, or programming in .NET or Mathematica, remember that the entire source code for .NET/Link is provided. If you want to see how anything works (or why it doesn't), you can always consult the source code directly.
|