NexusFi: Find Your Edge


Home Menu

 





Calling external DLL from EasyLanguage


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one Fu510n with 3 posts (4 thanks)
    2. looks_two Big Mike with 2 posts (4 thanks)
    3. looks_3 rosasurfer with 2 posts (2 thanks)
    4. looks_4 thinkfuture with 1 posts (1 thanks)
      Best Posters
    1. looks_one Nicolas11 with 4 thanks per post
    2. looks_two Big Mike with 2 thanks per post
    3. looks_3 Fu510n with 1.3 thanks per post
    4. looks_4 rosasurfer with 1 thanks per post
    1. trending_up 25,206 views
    2. thumb_up 15 thanks given
    3. group 9 followers
    1. forum 11 posts
    2. attach_file 0 attachments




 
Search this Thread

Calling external DLL from EasyLanguage

  #11 (permalink)
sarathraj99
Trivandrum, Kerala
 
Posts: 2 since Aug 2015
Thanks Given: 0
Thanks Received: 0

i can possible to call below function from dll and works fine .

DefineDLLFunc: "ConsoleApplication10.dll", int, "getP";

print("sum =",getP());

But

DefineDLLFunc: "ConsoleApplication10.dll", int, "getP",int ,int;

print("sum =",getP(10,12));

ERROR

<<exception>>
Address: 0x65641407 ( 1701057543 )
Code: 0xC0000005 ( -1073741819 )
Continuable: 0x00000000 ( 0 )
Description: Instraction for adress "0x
ErrorCode: 0xC0000005 ( -1073741819 )
ExceptionType: 0x00000000 ( 0 )
Module: C:\Documents and Settings\All Users\Application Data\TS Support\MultiCharts\StudyServer\Studies\Dlls\Indicators\i_my_indicator.dll
Process: C:\Program Files\TS Support\MultiCharts\MultiCharts.exe
Thread ID: 0x000013F4 ( 5108 )
Time: 27.05.2012 - 01:36:02.768


By def file is

LIBRARY DemoLibrary
DESCRIPTION 'Test DLL for file operations
EXPORTS
WriteToFile
getVal
getadd
getP

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Quant vue
Trading Reviews and Vendors
MC PL editor upgrade
MultiCharts
How to apply profiles
Traders Hideout
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
  #12 (permalink)
 rosasurfer 
Sofia Bulgaria
 
Experience: Intermediate
Platform: MetaTrader, MultiCharts
Trading: Forex, ES, GC, strange synthetic creatures
Posts: 40 since Nov 2014
Thanks Given: 41
Thanks Received: 34

You can call your function only with *one* signature, function overloading (one function with different signatures) will not work when calling DLL's from "outside". So, you need to decide if your function getP() expects zero parameters (as in your first example) OR two parameters (as in your second example). If you need both calling variants you have to implement two functions with different names.

Post your function declaration ConsoleApplication10::getP()

Peter

Reply With Quote




Last Updated on August 6, 2015


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts