C ++ / CLI script
Last updated
Last updated
C++/CLI - one of the languages of the .NET Framework - is rarely used to develop large independent projects. Its main purpose is to create assemblies for .NET interaction with native (unmanaged) code.
In TSLab, you can connect scripts written in C #, VB.NET. Or connect dll libraries written in .NET (C #, VB.NET, C ++ / CLI).
For an example, we will write a library on C ++ / CLI, and we will connect in TSLab.
And so, create a new project in Visual Studio 2019. Let's choose a type: CLR Class Library in C ++.
Immediately switch the project to x64, add the libraries TSLab.Script.dll, TSLab.Script.Handlers.dll, TSLab.DataSource.dll.
Let's take an example of a script from the article First script (API) written in C #, but we will redo it in C ++. Create a BuyScript class and write the following code:
Now you can build the project and if there are no errors, then the studio will create a library \x64\Debug\TestLibC.dll and connect it to TSLab.
As you can see, the script is connected, transactions are displayed on the chart.