Localization Support for wlanconf network utility

Despite the level of schoolwork that I am doing, I still find time to work on helping to improve ReactOS. One of the latest patches that I have made is by adding localization support for the wlanconf network utility. I can immediately tell you that this was not as easy as I wanted it to be since I had to make over 8 patches until I had one that both worked and didn't leak memory everywhere. I made some premature assumptions about the code, especially regarding the global character functions sSsid and sWepKey which apparently according to the developer Thomas Faber who stated:
"the type of the sSsid and sWepKey variables can't be changed easily. The Ioctls expect certain structures, and they will break when suddenly passed a unicode string. sWepKey might work, because it's processed char-by-char anyway - that would need proper type updating of CharToHex though. sSsid is copied to the buffer using memcpy though, meaning half of the SSID will be thrown away and 0 chars inserted instead if it's UTF-16 - which will break. "
Originally, I had changed the two variables to TCHAR and seemed to compile okay, but I would have never caught it on my own. I have learned a lot from this experience, and if it wasn't for the help of Thomas Faber, I would have been most likely stuck on the code for a longer period of time. So if you're reading this Thomas, then thank you for all your help.

From this experience, I have learned that I need to make sure what each part of the code does, rather than make automatic assumptions about different parts of the code. And I also was reminded that even with a solution that works, there will most likely be a simpler solution that uses less memory and is easier to read. Although I will have a fast computer to use ReactOS when the OS gets to the first final release, I still want it to be as fast and efficient as I possibly can. Just because today's computers can use a lot of memory and CPU processor power, doesn't mean that I can be wasteful about it. That type of mentality is what most likely made Vista less popular than it could have been (although I know there were other factors involved as well).

And on a side note, I also got a few other patches submitted into the trunk. The first was the enhancement of the 8-bit spectrum bitmap for the desk.cpl tool (CORE-6069) and fixed the header information in the file power.c found in the kernel (WDA-6701). Originally, the file used to be called "power.c" and someone forgot to update the header information.

Well, that's it for now. Have a nice day.

Comments