Using WinRT from Winforms

It is beyond doubt that WinRT simplifies the development of our Apps, specially when we’ve to access devices like webcams or gyroscopes. But, is it possible to use these new APIs from our good old friend Winforms or are they restricted to Windows Store Apps?

I don’t know why Visual Studio does not allow you to use them out of the box, but don’t worry cause the procedure to enable that feature is quite simple. Just follow these steps:

  1. Open your .csproj file with your favorite text editor
  2. Add the following element as a child of the Project element:

That’s it! Now you can open the project with Visual Studio and you’ll be able to add a reference to WinRT:


Updating from Windows RT 8.1 Preview to Windows RT 8.1 RTM

I’m one of those who always need to have the latest version of everything, regardless of the drawbacks that might lead me. I’m, by definition, an early bird. Having said that, it’s easy to figure out that my Surface RT was running Windows RT 8.1 Preview.

  • Go to Windows Update, desktop version, and install all updates (even the optional ones)
  • Try a reboot, just in case
  • If the Store is still refusing to show the update, open a browser and go to this URI ms-windows-store:WindowsUpgrade

That last URI should open the Store and show the update. Keep in mind that the process will take up to 2 hours and there is no indicator whatsoever about the progress of the update. You can take a look at the Task Manager to see CPU and Network usage to ensure that something is really going on.

Hopefully after that process you’ll have a Windows RT 8.1 RTM device ready to be used

How to hibernate Windows 8











Starting the Windows Phone emulator without Visual Studio

I know it’s pretty simple to open Visual Studio and then launch the Windows Phone emulator, but let’s be honest… we’re pretty lazy, and sometimes it’s just convenient to launch it with just one click.

We could create a launcher on our taskbar by creating a shortcut to %ProgramFiles(x86)%\Microsoft XDE\8.0 and putting it in the taskbar. However, we’ll have to tune it a little bit more. We’ve to change the target of the shortcut (we can change it from its properties) and set it to:

"%ProgramFiles(x86)%\Microsoft XDE\8.0\XDE.exe" -memsize 1024 -createDiffDisk %localappdata%\Microsoft\XDE\dd.720x1280.1024.vhd -vhd "%ProgramFiles(x86)%\Microsoft SDKs\Windows Phone\v8.0\Emulation\Images\Flash.720x1280.vhd"

Other time it could be useful to launch it from the command line or from a script. We can do it from the PowerShell with:

Invoke-Expression "& '${Env:ProgramFiles(x86)}\Microsoft XDE\8.0\.\XDE.exe' -memsize 1024 -createDiffDisk ${Env:LocalAppData}\Microsoft\XDE\dd.720x1280.1024.vhd -vhd '${Env:ProgramFiles(x86)}\Microsoft SDKs\Windows Phone\v8.0\Emulation\Images\Flash.720x1280.vhd'"

If for some reason you’ve lost your marbles and you’re using the ancient CMD, I’ve translated the sentence into your rusty language:


All these commands execute the 720×1280 version of the emulator, but you can also start the 480×800 and 768×1280 versions by changing the numbers 😉

Using Remote Desktop to shutdown a computer


Windows Security



Command Line




How to achieve anonymity: Proxies and tunnels

Anonymity vs. security

There is a widely extended misconception that cryptographic systems achieve both security and anonymity. However, this is far away from being true. Cryptography has been used in systems which aim is anonymity and security, but the sole fact of using some kind of cryptography guarantees nothing.

When two users, Alice and Bob, establish a communication, they want to achieve security to prevent anyone else from knowing the message they are exchanging. They want anonymity to prevent anyone, outside the conversation or in the conversation, from knowing the identity of the sender of the message.

The general consensus is to think of anonymity as the anonymity of the sender of the message, however far too little attention has been paid to the anonymity of the responder. This might sound absurd because the sender should know the identity of the sender in the first place, but this does not need to be true in all cases, like Peer-to-Peer networks, and responder anonymity is indeed achievable.


Proxies were initially developed to solve technical problems when accessing the same resource from different clients and to hide the underlying technology from the clients. Since those days, proxies have evolved and adapt to the Internet providing very different functionality.

One of the most common proxies on the Internet is web-cache proxies. These are putted in place by organizations and Internet Service Providers to save bandwidth by temporarily storing previous requested data.

The client want to access some resource stored in the Target, but instead of connecting directly to the Target, it asks the proxy to connect to the Target for him. The first time the client asks for the resource, the Proxy has to connect to the Target and retrieve it. However, the next requests do not need to be retrieved from the target but from the Proxy, which saves bandwidth assuming that the Client and the Proxy are closer than the Client and the Target.

Despite the simple idea of a cache-proxy, there is research that suggests that this kind of system is not efficient on current networks due to the extensive use of dynamic content (the same resource is different depending on who is asking for it) and the increasingly speed on today’s connections.

Anonymity as a side effect

As show in the previous figure, when the client wants to access the target, he asks the proxy and it is the proxy the one who access the target. This means that the target is never connected by the client but by the proxy, and therefore the identity of the client remains concealed.

Additionally, if two clients, A and B contact the proxy for resource R, the proxy would only retrieve R once, which means that the second client to ask for R will not generate any traffic from the proxy to R.

For anonymity to be achieved in this way, it would be necessary for the proxy to not keep track of any requests, because it has all the information about who access what and when.


Tunneling is a technique in which one communication protocol is wrapped into another. By itself, this technique does not provide either anonymity, security, privacy or anything, it is just a technical option.

The original use of this technique was to use new protocols over systems that only allow certain protocols. The new protocol could be wrapped inside the previous and then sent across the network without the old system noticing it.

Circumventing firewalls

Notwithstanding its power for backwards compatibility, tunneling can be used to circumvent certain types of censorship and security measures like firewalls.

When the client requests a censored resource, the firewall blocks it as expected. However, if the request is tunnelled into an accepted way of communications, the firewall lets that request pass through.

SSH tunnels

SSH stands for Secure SHell and was designed to be a replacement of the out-dated and insecure system for remote login telnet. SSH however superseded the set of functionality originally intended for telnet and is currently used for different purposes beyond remote login. One of these uses is tunnelling.

SSH sessions are protected cryptographically to prevent any observer from knowing the content of the messages being sent or even its type. When a protocol is tunnelled through an SSH session it is indistinguishable from a non-tunnelled SSH session. This behaviour allows circumventing firewalls.

On the figure, the Client wants to access some resource that is blocked by the firewall. However, outside the firewall there are free machines (those that are not under censorship) that can access to that resource.

The client then, establish an SSH connection to a free machine and creates a tunnel. All traffic between the Client and the Free machine is encrypted and the firewall does not know either its content nor its type rather that it is some kind of encrypted communication.

Circumventing Terraria’s security










Getting into a 64 bits world: What Apple spotted and Microsoft missed

The user comes first

You might be a large corporation or a freelance developer, but it you’re in the software business you’re working for the end-user even if you don’t even know a single one of them. And let me tell you something about them: they’re stupid, but they hate to realize.

You want to make profit of your work, you have to make your user feel clever… or at least, don’t make him feel stupid or frustrated. A lot of users change powerful software for a crappy one that’s easy. I’m not saying technical quality is not important, I’m saying that if it two different applications can do the job, users will use the one which makes them feel clever by doing the job with less irritating error messages or cryptic questions.

Why so many users recommend using 32 bits?

Because they’re scared. They don’t know what 64 bits is apart from being the double of 32 bits… what they know is that some of their friends were using 64 bits and had to fallback to 32 because their applications weren’t working or the computer was unstable or… who knows what, but something wasn’t working.

But, is that true or is just a legend?

I’m afraid both. If we’re talking about windows, 32 bits applications will work on a 64 bits Windows without issues… but (there’s always a but) 16 bits applications will not work neither 32 bits drivers.

This means that if you’re running very old applications (MS-DOS and Windows 3.11 mainly) and you switch to 64 bits, you’re going to run into troubles. This is indeed a problem for business, but normal end-users do not rely on ancient software. However, they rely on something equally bad: cheap and crappy hardware.

Windows provides drivers for most common hardware, but it is likely that some bits of your system won’t be covered by the catalog windows offers. There is where hardware vendors step in providing you drivers for your operating system. A lot of 64-bits windows users found out, sadly, that their hardware vendors won’t provide 64 bits drivers (welcome to the Linux world, where your hardware vendor will tell you “I don’t care”).

32, 64 bits… who cares?

Let’s be honest. Users don’t care if your application is using 64, 32 bits or a giant wheel powered by a hamster. They want to do their job as fast as possible, knowing the minimum about the tool (ideally nothing) so they can move to important things (like watching big brother, or reading The Sun, but that’s another story).

However, as engineers we know that 64 bits is the right choice because we’re using more and more memory every day (chrome is actually eating memory) and relying on “tricks” like PAE is not a solution but a workaround.

The question is not if we should move to 64 bits, but how.

Universal Binaries: The Holy Grail

The solution to having to know about the architecture and choosing the right binary is: Universal binaries. Apple also used this solution when they changed their PowerPCs for Intel microprocessors.

The basic idea is to create a binary that would work on both, 32 and 64 bits by including both versions of the binary merged. Besides this, due to the particular way applications are packaged in MacOS X, applications have only one download for all architectures and all languages.

This is great for the user. It doesn’t matter if he’s using one or another architecture, in English or in Russian…. the same file is going to work smoothly and in the correct language.

The downside

Universal Binaries are the holy grail because the user doesn’t need to know anything. However, they achieve this by including binaries for all supported architectures and languages within the same distribution. Which means that the size of the application is going to be multiplied by the number of architectures supported and increased by the amount of languages included.

I’ve a 64 bits Intel Processor and I use everything in English. Why should I download application three times larger than expected (some of them have 64 and 32 bits versions along with a PowerPC version) and with support for German if I don’t have those processors and I can’t read German?

As an example, Google’s uploader for Google Music, called Music Manager, weights 45MB. After removing languages other than English and unused architectures (in this case, PowerPC support) the size is 11.7MB. In other words, I’ve an application that sizes nearly 4 times what it should.

Fortunately enough, there is software, like Xslimmer to strip out the unnecessary architecture and language support from our applications. But take this with caution, because this procedure could cause some updating methods to fail. Moreover, some applications won’t survive the process because realizing their size has changed, they refuse to work assuming they’re corrupted or tampered. You’re warned.

Upload any kind of file into Google Music: Google Data Uploader





How does it work?


Doesn’t it make my file bigger?

Yes, it does. Exactly 100kb more.





How do I use the tool?



To reveal a file: GoogleMusicDataUploader.exe –unmerge <hidden_file>

How do I upload the hidden file?


Why are you developing this?


Where is the source code?

You can find the code at my GitHub space.

I want to know more about the technical details.












Download songs from Google Music

Download App

Download Source Code



It is quite simple:

  1. Open the app (just in case :P)
  4. Click “Download those songs!”
  5. Wait until it finishes and enjoy 🙂







  • UltraID3Lib replaced with TagLibSharp



Download App

Download Source Code