Redefinition of ‘BOOKMARK’

If you include in a VC++ project <mapidefs.h> and <sqltypes.h> and build for the x64 platform you get a redefinition error. #include <Windows.h> #include <MAPIDefS.h> #include <sqltypes.h> int _tmain(int argc, _TCHAR* argv[]) { return 0; } 1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\sqltypes.h(283) : error C2371: ‘BOOKMARK’ : redefinition; different basic types 1> C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\MAPIDefS.h(1142) : see declaration…

C++ Renaissance at Microsoft

At the beginning of this year, Microsoft announced a “C++ renaissance”. Quoting from the description of a Channel 9 video with Craig Symonds and Mohsen Agsen: C++ is currently undergoing a renaissance. This means that, by definition, the language, compilers and compositional tooling are evolving and coalescing into a state that maximizes native developer efficiency,…

C++ Accelerated Massive Parallelism

Microsoft has recently announced at the AMD Fusion Developer Summit the introduction of a new technology called C++ Accelerated Massive Parallelism or shortly C++ AMP that helps C++ developers use the GPU for parallel programming. The new technology will be part of Visual C++, integrated with full support (edit, build, debug, profile) in the next…

New Colors Game in WPF

Last year I posted a small MFC application on my blog, called Colors Game, about covering with a single color a grid initially colored in six colors. It wasn’t a big deal of an application, but it was fun and recently I decided to write a WPF version of that MFC game. This is the…

The Day Visual Studio Went Crazy

I said it before, the Visual Studio installer gets me mad. All is fine until you want to install the Service Pack. After that you cannot install additional components until you uninstall the SP. Because of that, you should make sure you installed the entire Visual Studio package before installing SP1. So I did, but…

Alchemy 2.0

Alchemy 2.0 brings a modified layout, a set of 44 new elements (to a total of 444), hints, and translation to Hebrew. The most reported bug for Alchemy so far has been the layout mess on small resolution systems, such as netbooks. It wasn’t a bug actually, but a feature. The application required a higher…

Generate Output from T4 at Build Time

Text templates (aka T4) is a great feature in Visual Studio, that proves helpful in many scenarios. I use it for instance in developing Alchemy. However, it has a significant drawback: it does not generate code automatically when you build your solution. To build the files and generate their output you have to manually run…

Finding Installed Applications with VC++

Finding applications installed on a machine (the ones that you see in Control Panel Add/Remove programs) could be a little bit tricky, because there isn’t a bulletproof API or method. Each of the available methods has its own weak points. WMI is slow and can actually be disabled on a machine. MSI API only shows…

Chrome 11 Speech Input

This Wednesday Google released version 11 of the Chrome Browser. One of the most important addition was the support for speech recognition for English. One can enable speech recognition in an input field by adding the x-webkit-speech proprietary attribute, like in this example: <input type=”text” x-webkit-speech /> The result should look like this (of course,…

VS2010 Productivity Power Tools

Productivity Power Tools is a Visual Studio 2010 add-in, developed by the Microsoft Visual Studio Platform Team and available in Visual Studio Gallery. Of course, you can also download it using Visual Studio Extension Manager, from the Tools menu in Visual Studio 2010. Its list of features is detailed on the add-in page and I…