API Reference -

The API file, DSM_CLR_v1p4.dll is implemented with the CLR (Common Language Runtime) support. Languages targeting the runtime, such as C++/CLI, C#, Visual Basic, Jscript, J# and IL (Intermediate Language) assembler, can be used to reference the DSM API. In this manual, we use C++/CLI (with CLR-support) to demonstrate examples. Other languages can be applied in similar ways.

There is no need for header files or declarations of the API in CLR-supported code. The API can be referenced by adding the DSM_CLR_v1p4.dll to References (see below). All the available members, properties and methods, can be identified by using the object browser. In order to use the DSM API, the users' applications need to use the CLR-support option in compiling the codes which use the DSM API. It's not required to recompile all the code but only the code using the API need to be compiled with the CLR-support option. To compile the existing code with CLR-support, simply open the Property of the concerning source codes and select Common Languag Runtime Support under C/C++:General:Compile with Common Language Runtime Support. If you are just beginning a new project, simply create the project with CLR support. The following is an example to create a new CLR Console C++ project in Visual Studio.

» Go to File --> New Project.

New Project


» The New Project window will open. Expand Visual C++ then click on CLR. Select CLR Console Application under Templates. Make sure the Location is correct and give the project a name. Once you are done, click on OK.

New Project


» The code source should open with a sample "Hello World" program.

New Project


Now we need to add DSM_CLR_v1p4.dll to the references of your solution in Visual Studio.

» Right click your solutions file in the Solution Explorer. Your solution will probably be called something different than the one shown.

Visual Studio


» Click on Properties near the bottom of the pop out menu.

Visual Studio


» A new Property window will appear. Click on the "+" next to Common Properties at the top on the left column.

Visual Studio


» Click on References. Now click on the Add New Reference button.

Visual Studio


» Click on the Browse tab and then browse to the main DSM directory. By default the directory is C:\Program Files\Euvis\DSM. Once you get to the directory, double click on DSM_CLR_v1p4.dll then click OK.

Visual Studio


» DSM_CLR_v1p4 should now be listed under References along with its path.

Visual Studio



The DSM_CLR_v1p4 file provides you with all of the functions and properties for you to control your waveforms. You can use the Visual Studio's Object Browser to view all of the functions and properties that are available to you.

Object Browser



In order to use the functions and properties in the API, you most use the "using" directive to include the DSM and MOL namespaces.

	using namespace MOL;
	using namespace DSM;