mIRC Home    About    Download    Register    News    Help

Print Thread
mIRC 6.2 reports version as 6.02 to DLLs #154952 02/08/06 03:05 PM
Joined: May 2003
Posts: 161
A
Ashkrynt Offline OP
Vogon poet
OP Offline
Vogon poet
A
Joined: May 2003
Posts: 161
In mIRC 6.2, the mVersion member of the LOADINFO struct passed to LoadDll has just 2 as the minor version number, rather than the 20 that would be expected.

Re: mIRC 6.2 reports version as 6.02 to DLLs #154953 03/08/06 03:33 AM
Joined: Dec 2002
Posts: 580
N
NaquadaServ Offline
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
confirmed


NaquadaBomb
www.mirc-dll.com
Re: mIRC 6.2 reports version as 6.02 to DLLs #154954 03/08/06 12:37 PM
Joined: Apr 2004
Posts: 218
P
PhantasyX Offline
Fjord artisan
Offline
Fjord artisan
P
Joined: Apr 2004
Posts: 218
Isn't 6.2 the same as 6.20, and 6.200?


Live to Dream & Dream for Life
Re: mIRC 6.2 reports version as 6.02 to DLLs #154955 03/08/06 12:57 PM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
What's the issue? mIRC uses real numbers for versions, not a <major>.<minor>.<revision> notation. Meaning the part after the decimal point is a fraction, not a distinct number. It's not reporting the version as '02', it's reporting it as '2', which is correct.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Re: mIRC 6.2 reports version as 6.02 to DLLs #154956 03/08/06 01:27 PM
Joined: Oct 2005
Posts: 1,741
G
genius_at_work Offline
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
I think the point of the OP may be that you can't code any version check directly from that minor version style. A logical bit of code might be something like this pseudocode:

if ((majorversion == 6) && (minorversion >= 17)) { do something }

Obviously that code is trying to ensure that the user's version of mIRC is 6.17 or later, however the problem you'd run into with that code is that the version after 6.17 is 6.2, and as you can see, 2 is less than 17 so version 6.2 wouldn't be detected as newer than 6.17.

I think the minor version should return a number that is right padded with zeros (doesn't change the decimal value of the number) or it should return the actual decimal value, ie 0.17, 0.2 etc, as that would work correctly in > and < comparisons.

-genius_at_work

Re: mIRC 6.2 reports version as 6.02 to DLLs #154957 04/08/06 11:48 AM
Joined: Dec 2002
Posts: 4,577
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,577
Thanks fixed for the next version, I'll change it so that it is right-padded with zeros, ie. it will return 6 20 for the major/minor values.

Re: mIRC 6.2 reports version as 6.02 to DLLs #154958 04/08/06 07:06 PM
Joined: Dec 2002
Posts: 580
N
NaquadaServ Offline
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
Thanks Khaled...

For those of you that still don't understand the problem, look at it this way... You have a single number for version (passed to the mLoad function). The left most BITS (shifted)of that number is the major version and the right most BITS of that same number form the minor version, it is not a floating point number. It a way to save two 16-bit numbers within one 32-bit number. See the macro definations HIWORD and LOWORD on msdn for additional details. wink


NaquadaBomb
www.mirc-dll.com
Re: mIRC 6.2 reports version as 6.02 to DLLs #154959 04/08/06 08:49 PM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
I don't think anyone thought mIRC passed the version to the DLL as a floating point number. My point was that the version numbers mIRC uses are floating points, ie. 6.2 is greater than 6.12 (which is not the case in the most common notation used in programming). Of course there's nothing wrong in passing it as '20' instead of '2' since they're effectively the same thing, and I guess if it makes things easier for checking versions than I suppose it makes sense to provide it that way.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Re: mIRC 6.2 reports version as 6.02 to DLLs #154960 04/08/06 10:17 PM
Joined: Dec 2002
Posts: 580
N
NaquadaServ Offline
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
You must work for Microsoft, Starbucks. grin

Math is math, don't think because you work for a billion dollar company, that you can change math. wink

Sure you could use any screw-ball way to keep track of version. Personallly, I like how Khaled (and myself) handle versions. Sounds better than what you are suggesting. smile
Let review...

* (02 == 2) and (.20 == .2)
* (0.2 > 0.17) and (2 < 17)
* (.02 != .2) and (2 != 20)


NaquadaBomb
www.mirc-dll.com
Re: mIRC 6.2 reports version as 6.02 to DLLs #154961 05/08/06 11:45 AM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
I'm not suggesting anything. I'm explaining the way it currently is and how it has been for every version to date. I'm quite aware of how numbers work thanks.

Anyway, Khaled's already said it'll be changed to make it easier to check as the OP wanted, so that's all that matters I guess.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Re: mIRC 6.2 reports version as 6.02 to DLLs #154962 05/08/06 01:08 PM
Joined: Jul 2006
Posts: 53
O
oblivious Offline
Babel fish
Offline
Babel fish
O
Joined: Jul 2006
Posts: 53
shocked