external dll calls + protection

Created at 16 Jan 2013, 03:47
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
LE

lesliel

Joined 16.01.2013

external dll calls + protection
16 Jan 2013, 03:47


The documentation does not tell anything about calling the methods of an external C/C++ library (dll).

  • Does it work at all? (e.g. using P/Invoke)
  • Where should the external dll be copied to?
  • When would this information (along with some short tutorial) be added to the documentation?

What kind of protection do you provide for the robots/indicators? Is there any tutorial about it?

 

 


@lesliel
Replies

admin
21 Jan 2013, 14:51

Thank you for bringing this to our attention. We will add documentation or sample code for the above.

When you say protection do you mean in case you distribute your algorithms? If that is the case you may only share the .algo file along with a dummy text file which will have the same name and the .cs extension (the cs file is for the purpose of having the algorithm populated in the indicator/robot list of cAlgo).


@admin

lesliel
23 Jan 2013, 12:12

Does this mean that it is possible to address specific external dll's?

Regarding the .algo file: how is it protected against reverse engeneering?


@lesliel

hichem
24 Jan 2013, 15:40

RE:
lesliel said:

Does this mean that it is possible to address specific external dll's?

Regarding the .algo file: how is it protected against reverse engeneering?

The .algo file is not protected against reverse engineerning.


@hichem

admin
28 Jan 2013, 12:27

The .algo file is not currently encrypted. There is a plan to encrypt the .algo files in the future though, therefore they will be protected against reverse engineering.


@admin

snusnufreak
29 Jan 2013, 11:01

Greetings

So how exactly do I access an external library. Where do I find examples? Please tell me. 

I need Fourier transformation and want to use this library http://alglib.sources.ru


@snusnufreak

lesliel
12 Feb 2013, 04:12

RE:
admin said:

The .algo file is not currently encrypted. There is a plan to encrypt the .algo files in the future though, therefore they will be protected against reverse engineering.

How about the external dll calls?


@lesliel

admin
12 Feb 2013, 10:00

RE: RE:
lesliel said:
admin said:

The .algo file is not currently encrypted. There is a plan to encrypt the .algo files in the future though, therefore they will be protected against reverse engineering.

How about the external dll calls?

Hello,

To add a reference please use the "Add Reference" button on the top menu next to build. You may then locate the dll in your file system and add to your robot/indicator.

 


@admin

admin
12 Feb 2013, 12:35

RE:
lesliel said:

The documentation does not tell anything about calling the methods of an external C/C++ library (dll).

  • Does it work at all? (e.g. using P/Invoke)
  • Where should the external dll be copied to?
  • When would this information (along with some short tutorial) be added to the documentation?

What kind of protection do you provide for the robots/indicators? Is there any tutorial about it?

 

 

See this example for P/Invoke and external dll calls:

P/Invoke Example


@admin

dinhero
17 Feb 2013, 14:19

RE: RE:
admin said:
lesliel said:

The documentation does not tell anything about calling the methods of an external C/C++ library (dll).

  • Does it work at all? (e.g. using P/Invoke)
  • Where should the external dll be copied to?
  • When would this information (along with some short tutorial) be added to the documentation?

What kind of protection do you provide for the robots/indicators? Is there any tutorial about it?

 

 

See this example for P/Invoke and external dll calls:

P/Invoke Example

sorry admin, but in this example, look like you are not following what you are seing befor here : 

 

To add a reference please use the "Add Reference" button on the top menu next to build. You may then locate the dll in your file system and add to your robot/indicator.

 did you add the reference of user32.dll in the cBot in order to make the external dll to work ?


@dinhero

admin
18 Feb 2013, 10:07

You don't need a reference for that example. It is using a system namespace:  InteropServices

 

using System.Runtime.InteropServices;

 


@admin

dinhero
19 Feb 2013, 06:51

RE:
admin said:

You don't need a reference for that example. It is using a system namespace:  InteropServices

 

using System.Runtime.InteropServices;

 

we do need more example with dll import, this is a crucial aspect for all strategiste builder, thank you


@dinhero

longshot
05 Mar 2014, 17:28

RE: RE:

admin said:

lesliel said:

The documentation does not tell anything about calling the methods of an external C/C++ library (dll).

  • Does it work at all? (e.g. using P/Invoke)
  • Where should the external dll be copied to?
  • When would this information (along with some short tutorial) be added to the documentation?

See this example for P/Invoke and external dll calls:

P/Invoke Example

The provided link produces a 404 error - are there any instructions or examples on external DLL use in the documentation?  I'm not seeing them.


@longshot

modarkat
11 Mar 2014, 12:02

There are a lot of examples:

https://www.google.com/search?q=c%23+use+dllimport


@modarkat