Passing {self} as IEasyLanguageObject via C++Interop to C#  [SOLVED]

Questions about MultiCharts and user contributed studies.
PK1
Posts: 102
Joined: 12 Jun 2011
Has thanked: 42 times
Been thanked: 12 times

Passing {self} as IEasyLanguageObject via C++Interop to C#

Postby PK1 » 14 Mar 2014

Hello,

I've read the PDF regarding the IEasylanguageObject and want to pass the {self} reference via my C++-Interop-DLL (TSLib_Interop.dll) to a C# DLL (TSLib.dll)

The C++-Project has CLR-Support enabled with option /clr

Code: Select all

// ----- C++ Interop-DLL

#include "stdafx.h"
#include "TSLib_Interop.h"
#include <comdef.h>

#import "C:\Program Files\TS Support\MultiCharts64\PLKit.dll" no_namespace

double __clrcall TestR(IEasyLanguageObject* pELObj, double _2) {
return TS::Class1::TestR(pELObj, _2);
}

// ------ C# DLL
using PLKit;

public class Class1
{
public static double TestR(ref IEasyLanguageObject elRef, double len)
{
return 2;
}
}
As I'm not that familiar with C++ my decision is C#. Is anyone using the reference of {self} in C#, would be very glad for any help!

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Passing {self} as IEasyLanguageObject via C++Interop to   [SOLVED]

Postby Henry MultiСharts » 20 Mar 2014

Hello PK1,

This question is beyond our regular support. Please contact us directly if you want us to develop this study for you as a custom paid project.


Return to “MultiCharts”