Calling WinRT functions from low level C++

The high level projection available in C++ targeting WinRT make working with WinRT from C++ a much easier task. It handles error reporting, reference counting, string conversions etc for you. As an example let’s consider the following high level C++ code to retrieve the path of the temporary folder: void GetTempFolderPathHighLevel(std::wstring& path){  path = Windows::Storage::ApplicationData::Current->TemporaryFolder->Path->Data();} Short,…

2

A concise history of the Bing Maps Windows 8 Map control.

The Windows 8 Bing map XAML control (as opposed to the javascript control which is an entirely different beast) has a slightly different API when compared to earlier Bing Map XAML controls. Previous XAML controls have all been written in managed code whereas the Windows 8 map control is written in native code. Written in mostly…

0

Working with the Bing Maps Metro style map in XAML

Win 8 xaml unfortunately does not supporting anything similar to TypeConverters to convert from strings to objects so some properties like Location end up being more verbose and less intuitive than in previous versions of Bing Maps xaml-compatible controls like Silverlight and WPF. In Silverlight one could set the Center inline: <bm:Map Center=“0,0” /> On…

0

Using Bing Maps in a Windows 8 Metro style app

The recently released Bing Maps controls for Windows 8 (available in the Visual Studio Gallery) actually contains two separate map controls to support the two types of Windows 8 applications. One is a port of our existing Javascript map control and is used to write html/javascript applications, the other is written in native C++ and…

0

Shrinking .NET assemblies by removing unnecessary attributes

.NET assemblies contain a rich set of metadata for use by the run time, debugger, and compiler. This information is stored in the assembly whether it will be used or not which for certain types of shipping assemblies is unnecessary. For example when you create a new automatic property: public int MyProperty { get; set;…

0

Streetside photos is live!

Bing Maps just shipped a tech preview of Streetside photos which overlays Flickr photos on Streetside to show where the photos were taken. The team worked hard to get it out the door and we’re proud to share it with the rest of the world. Check it out on Bing Maps.

0

Streetside smoove

Bing Maps Streetside just released a minor update that allows you to smoothly glide through streets like a first-person shooter or pacman. Try it out yourself, just hold down the Up key and turn with Left and Right. Faster connections give a more pleasant experience.

0

It’s 10 pm, do you know what your JITter is doing?

Ever have that awkward feeling like you don’t know what actually gets executed as a result of your managed code? Visual Studio allows you to inspect the JITted code easily but does require a few tweaks first: First set your project to build in Release mode. Next go to Tools|Options|Debugging and uncheck both Suppress JIT…

0

OutOfMemoryException is special

Consider the humble OutOfMemoryException and its most common usage. If it is thrown when the system is well and truly out of memory then how would the system allocate enough memory to create a new instance of OutOfMemoryException? Luckily this problem has a simple solution: OutOfMemoryException is allocated up front so it’s available when it…

0

Troubleshooting a failed Virtual Earth 3D installation

The Virtual Earth 3D setup program is a small executable that downloads and installs pre-requisites if they’re not already installed and then the correct MSI for your OS flavor (32 or 64 bit). The pre-requisites are Windows Imaging Components and .NET Framework 2.0. WIC comes with Vista and XP sp3 and doesn’t need to be…

0