Features of the mql5 language, subtleties and tricks - page 199

 
Vitaly Muzichenko:

The WinAPI mql bible has this function

Your types are different, they must be from C#

---

So my question is: where is it right?

interesting questions you have ))))

if in doubt, go tohttps://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getvolumeinformationw

Sharp has nothing to do with it.

read "preprocessor" in Wiki and "macro substitution" in MQL help - maybe something will become clear

 
Igor Makanu:

interesting questions ))))

if in doubt, you need to look at the sourcehttps://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getvolumeinformationw

Sharp has nothing to do with it.

Read "preprocessor" in Wiki and "macro substitution" in MQL help - maybe something will become clear.

Before asking a question, I searched for an answer using your link too.

I'm confused by difference of types, e.g., mql: ushort volume_name_buffer , butLPWSTRvolume_name_buffer in official documentation

That's why this question is"where is correct?", but rather the exact question: "what is correct to use in an mql program?"

 
Vitaly Muzichenko:

So such a question is "where is right?", but rather the exact question is "what is right to use in an mql program?"

both examples will be the same after the compiler preprocessor works, well look at the help, what does macro substitution do

which one to use? - it's a matter of taste, i would use the first one - it's clear to me immediately that this code implies calling WinApi -

 
Traditionally, such code is copied from MS API documentation.
Defines are needed to avoid rewriting ready-made code for MQ5.
 
Anybody there!?
 

I haven't seen anyone write this before, it turns out that to change the MT5 icon to a branded one, just replace Terminal.ico in the folder,

so many years of struggling with a bunch of identical terminals

 
Fast235:

I haven't seen anyone write before, it turns out that to change the MT5 icon to a branded one, just replace Terminal.ico in the folder,

so many years of agony.

Jeez... I've had different icons for a long time. And I have these.

I can share...

 
Fast235:

I haven't seen anyone write before, it turns out that to change the MT5 icon to a branded one, just replace Terminal.ico in the folder,

so many years of agony with lots of identical terminals

I create custom icons and substitute them, so that in the taskbar it is immediately visible what and where it works.

 

It's easy to control.

#property description "Original Filename: " + __FILE__
#property description "Compile Time: " + (string)__DATETIME__
#property description "Compiler Version: " + (string)__MQLBUILD__

void OnInit() {}


 
Object*-functions are very laggy if you drag the graph with the mouse.