i will attach an C# or C++ (i am not related with it) code that maybe help to this because 'some' said that there is not a way or there is but is an 'wrong' way
No. You're not reading. Nobody said there is no way to do it. They had said that there is no
reliable way to do it. Note that this important keyword was even italicized for importance in the first reply. I've bolded and underlined it for even more distinction.
The code you once again posted is not reliable. It makes assumptions about how disks work that are not always accurate. Simply put, it is guessing. As pointed out, it will occasionally guess wrong. A script that used this would occasionally be wrong. Occasionally can be more scenarios than you think, but one practical one would be any drive setup in a RAID array. This is not an opinion, it is a fact.
We should not have unreliable functions in mIRC. That is an opinion (alongside the one where there is no point for this), but it is also an opinion that carries quite a bit of precedent with it. If a routine is going to make guesses, it should be your userland script, not a core function of mIRC.