I want to get computer name in mql4 in order to make original log file including computer name which MetaTrader runs.
I think it is possible using GetComputerName function in kernel32.dll, but I don't know how to implement it in mql4. I found a kernel32 api example and modified it, but it doesn't work. Can anybody teach me how to use GetComputerName function in mql4?
I tried following code, but terminal says "GetComputerName GBPUSD,H1: cannot call function 'GetComputerName' from dll 'kernel32.dll' (error 127)".
Thank you.
Where shout this function be declared in my program i would like to use it but its giving me errors
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
When I run the GetComputerNameA() function or the ExpandEnvironmentStringsA() it returns nothing for me, just 0.
Does this only work in MQL5?
I can only use MQL4.
Thanks
Strings have been 16 bit since February 3, 2014 (Build 600)
Upcoming MetaTrader 4 and MQL4 Upgrades - Big Changes Are Underway (MetaQuotes Software Corp.) - MQL4 and MetaTrader 4 - MQL4 programming forum
Hi,
I want to get computer name in mql4 in order to make original log file including computer name which MetaTrader runs.
I think it is possible using GetComputerName function in kernel32.dll, but I don't know how to implement it in mql4. I found a kernel32 api example and modified it, but it doesn't work. Can anybody teach me how to use GetComputerName function in mql4?
I tried following code, but terminal says "GetComputerName GBPUSD,H1: cannot call function 'GetComputerName' from dll 'kernel32.dll' (error 127)".
Thank you.
Where shout this function be declared in my program i would like to use it but its giving me errors