MT4 and Visual Basic dll call

 
Hi all,
Anyone using Visual basic dll for interfacing to MT4? How to call it?
Am getting frustated, or is it have to be C++ dll could only run in MT expert / script?
please advise...

Thanks in advance.

vb code (cFunction.cls) -> cFunction.dll

Public Function MergeChar(sFirstChar As String, sSecondChar As String) As String MergeChar = sFirstChar & sSecondChar End Function


mt4 code
#property copyright "Copyright © 2006, MetaQuotes Software Corp." #property link "https://www.metaquotes.net/" #import "PrjFunctionDll.dll" string MergeChar(string sFirstChar,string sSecondChar); #import //+------------------------------------------------------------------+ //| expert initialization function | //+------------------------------------------------------------------+ int init() { //---- string a; string b; string c; a="one"; b="two"; c=MergeChar(a,b); Alert(a,":",b,":",c,"working"); //---- return(0); }
 
I tried visual basic to make a MT compatible DLL but it failed!
I think the only language the MT support is c++.


You can download my dll(s) from:

Forex-tsd .com
metatrader.info
 
All DLL functions must be cdecl
Reason: