[Windows Mobile Development and Hacking General] Chainfire:
I guess it is a matter of personal opinion, and yes, if you can find a way to ADD to the WiFi option, that would be killer. The net loss being zero is however not so, as you can no longer use BT to connect with a device that does support BT but doesn't support WiFi (those may not be so common, but they are out there - I got two phones like that and two PC's myself). I do consider my current approach to be more elegant though, IMHO, because it does not require any hacks and uses the supplied IS files (so no chance of creating strange instabilities), and you get the original functionality back by just running IS normally instead of my app. Also, replacing it is only really an option for cooked ROMs and/or hacked devices, not for the 'normal' consumers :)

Last but not least, and I'm still investigating this, but "my" method (which is really just your old method + some of Talyn's stuff + some of my own stuff) could also make other options available. Now it's WiFi --> Device --> Cell, but it could be WiFi --> Device --> USB, WiFi --> Device --> BT, USB --> Device --> WiFi, you name it.

(I'm rephrasing this because TalynOne's explenation is not 100% technically correct, though it does come down to the same thing)

TalynOne's method is based on the control panel applet for the WiFi adapter telling the NDIS drivers to rebind the device settings. The control panel tries to be smart and that is why it only works when you change a setting (like WINS IP). The only thing that really matters though (and this is what v0.2 and v0.3 of WMWifiRouter did through an IOCTL call) was the NDIS driver rebinding. Somehow this tricks IS into thinking it is now connected to a host, but tbh I suspect this more of a bug than expected behaviour for IS.

My own method, which frankly is kind of silly we didn't find earlier (it listed in the hex of the files, after all), is simply setting "HKCU\Software\Microsoft\InternetSharing\HostConnectTimeout" to a really large value (2^31 or so, which is more or less 68 years, instead of the default 10 minutes when the key isn't present).

I disagree. The USB hack does not seem to work correctly (at least for me and my Kaiser) if anything is connected to the USB port that actually talks USB (so pretty much anything aside from the charger and the headphones).

---

As for your method of hacking the DLL's, I was wondering about that. The first (hacked) DLL I really looked at was in such a way it lead me to believe the two interfaces and the IP settings were stored as the standard in-memory multistring list (item1 #0 item2 #0 ... item-last #0#0, in unicode), which is why I thought the move over of the strings would work out, as long as it started and ended at the same position... However after trying it some more this was obviously incorrect. I tried disassembling the entire thing, adjusting the references and reassembling it, but my WINCE compiler toolchain is FUBAR'd (also the reason my EXE's are currently over 1 MB - but I'm working on that!). I'd be very interested to hear exactly how you did the adjustments to the original DLL's (and you supplying the original DLL you started out with).