User login

MetaTraffic 2.0 Boxshot

DecodeString() function

Posted by Daniel [July 6, 2003]

I noticed that there was a duplication in the Case clauses of that function, and also there was an error in regards to the decoding of some characters since there were typo errors in the hex code specification.

To alleviate this situation I did the following :

1) In the upper part of the the class definition, where there are the "Private" variables defined, I added one called "HexList"

2) In the beginning sections of the LogFile() and GenerateReport() routines, I initialized HexList to "0123456789ABCDEF".

3) Finally, I replaced the DecodeString() function with the following:

Private Function DecodeString(strDecode)
DecodeString=Chr((Instr(HexList,Mid(strDecode,2,1))-1)*16 + (Instr(HexList,Mid(strDecode,3,1))-1)*1)
End Function

That solved my problem nicely.

Regards.

DecodeString() function

Hi,

I will look at adding this to the next version. Thanks for the code snippet.

Regards,
~Chad