Tuesday, May 21, 2013

Detective story: sendto() and 10014 WSAEFAULT error

Time to time I read The Old New Thing blog (authored by Raymond Chen, one of Microsoft old-timers). On his brilliant notes, he often describes pathetic customers who observe unexpected Windows API behavior and pretend this is Microsoft's bug. What a naive people, I would exclaim. And every time few paragraphs later Raymond Chen explains that root of such issue is the customer failure: neglection to documentation details, wrong assumptions etc. Ironically, I got pretty strange behavior at WinSock API recently. So what should be my first reaction? Indeed, I started from myself...

Tuesday, January 29, 2013

Socket Option: Multicast Interface

Disclaimer: this is a short description of a code snippet primarily for myself because I had failed to find corresponding details in MSDN as well as on Google about SocketOptionName.MulticastInterface parameter values. Feel free to use it if you're experiencing the same lack of luck.

Multicasts... You have to learn them right after generic sockets (aka unicasts) and massive spam-like broascasts. According to their nature, multicasts gather one-shot-to-many strength of broadcasting and can pass boundaries of nested networks like unicasts. The only weak side is knowledge "how to tune the socket".

Friday, January 4, 2013

How to launch Windows Phone 8 emulator on virtual machine

One of most remarkable events at 2012 was Windows roll-out: desktop Windows 8, tablet Windows RT and mobile Windows Phone 8 (here and after, WP8). Personally I'm a bit of Windows Phone evangelist and Windows Phone 8 launch, even delayed for few months, was a big interest for me, so I was eager to try it.
After WP8 SDK installation attempt, I learned that my Windows 7 workplace is obsolete. Almost no surprise here: if you need Win7 instead of old good WinXP to do WP7 development, why don't you need to upgrade your PC to Win8 before starting with WP8? Anyway, it was no reason (and no time, as usual) to re-settle my working environment from Win7 to Win8 just to try the new technology. The answer was stright-forward: let use virtual machine! So, the toolchain was obvious from the first glance: Win7 as a host, Win8 as a guest on virtual machine, then WP8 emulator to try the new SDK. After a long-enough time installing all the staff, the toolchain just failed on very last step. WP8 emulator been failed to launch, accompanied with incomprehensible error messages (very famous Microsoft-style, you can say).
Finally, if you're looking just for working solution, I can redirect you to one of proven ways to fix the problem: http://stackoverflow.com/questions/13148828/unable-to-create-the-virtual-machine. But if you're interested to take a deeper look, welcome to this note...