![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello Tradezone,
I am interested in using your API, however, I am getting the same error as a previous post when attempting to logon,
System.Runtime.InteropServices.SEHException was unhandled
Message="External component has thrown an exception."
Source="WindowsApplication1"
ErrorCode=-2147467259
StackTrace:
at WindowsApplication1.Form1.LogIn_MT4(Int32 login, String password, String server, String proxyserver, String proxytype, String proxylogin, String proxypassword)
at WindowsApplication1.Form1.Login() in C:\...\Form1.cs:line 211
at WindowsApplication1.Form1..ctor() in C:\...\Form1.cs:line 200
at WindowsApplication1.Program.Main() in C:\...\Program.cs:line 17
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
I didn't notice a solution/resolution to the previous inquiry, has anyone faced this problem and fixed it?
Language being used is C#, via Visual Studio 2005, on windows vista.
Thanks
ADP.
No response...... bump, bump.....
Same problem in VS2008, however not a problem in VS2003???
VS2005 works when vshost is enabled, and run as administrator, otherwise does not, hence works in debugging, but not when deployed.
As far as I am aware, permissions are set correctly.
Can someone pls help with this problem its really p*ssing me off.
ADP.
Hi TradeZone,
Does this API supports managing more than one Account in parallel ?
And Does anyone tried to manage more than one account in parallel by using this API for MT4 ?
Hi Arlekind!
Yes, API supports more than one account in parallel.
Tradezone's Team.
Hello Tradezone,
I am interested in using your API, however, I am getting the same error as a previous post when attempting to logon,
System.Runtime.InteropServices.SEHException was unhandled
Message="External component has thrown an exception."
Source="WindowsApplication1"
ErrorCode=-2147467259
StackTrace:
at WindowsApplication1.Form1.LogIn_MT4(Int32 login, String password, String server, String proxyserver, String proxytype, String proxylogin, String proxypassword)
at WindowsApplication1.Form1.Login() in C:\...\Form1.cs:line 211
at WindowsApplication1.Form1..ctor() in C:\...\Form1.cs:line 200
at WindowsApplication1.Program.Main() in C:\...\Program.cs:line 17
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
I didn't notice a solution/resolution to the previous inquiry, has anyone faced this problem and fixed it?
Language being used is C#, via Visual Studio 2005, on windows vista.
Thanks
ADP.
HI ADPowers!
TZMT4API creates some working temp folders under <TZMT4API Folder>. If installation foler is under <Program Files>, vista will not allow folder creation.
Try to re-install TZMT4API in c:\TZMT4API, for example.
Youi must get a valid login.
Regards,
Tradezone's Team.
HI ADPowers!
TZMT4API creates some working temp folders under <TZMT4API Folder>. If installation foler is under <Program Files>, vista will not allow folder creation.
Try to re-install TZMT4API in c:\TZMT4API, for example.
Youi must get a valid login.
Regards,
Tradezone's Team.
Hi Tradezone,
'Youi must get a valid login.'
Yes I am aware of this fact, hence the probem/nature of my enquiry, Thanks for the suggestion, but unfortunately this doesn't seem to make any difference, see below.
There is no problem creating temp/working folders in the root directory of installation, whichever that may be (i have tried 3 now including c:/Program Files/Tradezone/TZMT4API as default installation path suggests, as well as c:/TZMT4API and c:/TradeZone/TZMT4API) as evidenced by the following screendump.
So therefore to eliminate access/securitiy issues to the tzmt4api.dll file in the system32 folder, so I tried moving the .dll out of the system32 folder and into the local working directory, ie c:\Tradezone\ and referencing it explicitly in the code, ie using [ DllImport ( @"c:\TradeZone\tzmt4api.dll" )] which gains a correct result from the VersionGet_MT4 function (therefore the .dll is recognised), but sill throws an SEHException when trying to log on.
But as mentioned previously, handle can be obtained under certain circumstances... which is perplexing.
As evidence of a successfull login attempt when vshost.exe is enabled in vs2005, see below (login details blotted out), as you can see, the handle value of '1' was assigned (refer to the mouse hover box) which is valid (-1 would have been assigned if invalid, and SEH exception not thrown)
To demonstrate what happens when the vshost.exe process is disabled, this is the output...
To clarify, when vshost.exe is enabled, the other functions seem to work fine, such as getting price quotes and acccount details, perfect, which leads to a possible solution direction, being, what is is that the debugger host is doing right which allows this to work, that a normal operating environment lacks causing error to be thrown? But im out of ideas...
Pls help me, I would really like to get this working.
Regards,
ADP.
Hi Tradezone,
'Youi must get a valid login.'
Yes I am aware of this fact, hence the probem/nature of my enquiry, Thanks for the suggestion, but unfortunately this doesn't seem to make any difference, see below.
There is no problem creating temp/working folders in the root directory of installation, whichever that may be (i have tried 3 now including c:/Program Files/Tradezone/TZMT4API as default installation path suggests, as well as c:/TZMT4API and c:/TradeZone/TZMT4API) as evidenced by the following screendump.
So therefore to eliminate access/securitiy issues to the tzmt4api.dll file in the system32 folder, so I tried moving the .dll out of the system32 folder and into the local working directory, ie c:\Tradezone\ and referencing it explicitly in the code, ie using [ DllImport ( @"c:\TradeZone\tzmt4api.dll" )] which gains a correct result from the VersionGet_MT4 function (therefore the .dll is recognised), but sill throws an SEHException when trying to log on.
But as mentioned previously, handle can be obtained under certain circumstances... which is perplexing.
As evidence of a successfull login attempt when vshost.exe is enabled in vs2005, see below (login details blotted out), as you can see, the handle value of '1' was assigned (refer to the mouse hover box) which is valid (-1 would have been assigned if invalid, and SEH exception not thrown)
To demonstrate what happens when the vshost.exe process is disabled, this is the output...
To clarify, when vshost.exe is enabled, the other functions seem to work fine, such as getting price quotes and acccount details, perfect, which leads to a possible solution direction, being, what is is that the debugger host is doing right which allows this to work, that a normal operating environment lacks causing error to be thrown? But im out of ideas...
Pls help me, I would really like to get this working.
Regards,
ADP.
Hi!
Are you using vista64 or 32?
If you are using vista64, under project's properties, go to build and force paltform target to x86.
Your project will be built in 32bits, same of TZMT4API.
There are some issues comunicating 64bit's process with 32bits.
Regards.
Hi!
Are you using vista64 or 32?
If you are using vista64, under project's properties, go to build and force paltform target to x86.
Your project will be built in 32bits, same of TZMT4API.
There are some issues comunicating 64bit's process with 32bits.
Regards.
I am running 32 bit vista, see below.
Any other suggestions?
ADP
HI, Tradezone:
When i publish my application, which files should be include in my application ? and which keys in regedit should also include ?
thanks . I'm look forward to recieve your quickly reply ! I send a email before this email . but no reply .
When i try to login into mt4 account using login function, i recieve INVALID_HANDLE_VALUE . What's wrong ?
I did these on my virtual pc, which is run VirtualBox .
I didn't install api on virtual pc. i distrubute these files included in my application :
lpk.dll
borlndmm.dll
secur32.dll
msvcrt.dll
usp10.dll
oleaut32.dll
rpcrt4.dll
advapi32.dll
ole32.dll
tzmt4api.dll
My reg had been pointed to the tzmt4api.dll folder correctly.
What else should i do ?
Thanks in advance .
Hi!
We Are finding some issues mostly with security (license model). For this reason we are stopping to sell API until solve these issues.
Regards.
To: TradeZone
Would you inform me about conditions of selling the API (via email) when you resolve problems?
By the way:
If it is not secret, writing this software, did you only watch TCP protocol or decompile terminal.exe file? As I know this .exe file is encrypted against decompiling.
Do you maybe consider to write software to convert .ex4 file to .mq4?
Regards