Subscribe: Kenny Kerr
http://weblogs.asp.net/kennykerr/rss.aspx
Added By: Feedage Forager Feedage Grade B rated
Language: English
Tags:
article  direct  issue  i’m  magazine  microsoft  msdn magazine  msdn  new  soap  web services  windows web  windows   
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Kenny Kerr

Kenny Kerr



This blog has moved to kennykerr.ca



 



My blog has moved!

Mon, 13 Sep 2010 15:51:00 GMT

I’ve just set up a permanent new home for myself on the web:

 

kennykerr.ca

 

This is where I’ll continue to write about software and talk about my new business. See you there!




Windows Web Services FAIL

Thu, 24 Dec 2009 05:55:00 GMT

In 2007 I published an article about the cool XmlLite API introduced with Windows Vista. Although the XmlLite developers wanted to provide a redistributable for Windows XP, they never managed to get it past the Microsoft lawyers. Eventually Windows XP Service Pack 3 was released including XmlLite but by then many developers had given up on it. I felt that this was a great embarrassment for Microsoft. But that was in the Windows Vista era. Surely things have improved in the Windows 7 timeframe.

Fast forward to 2009 and in the November issue of MSDN Magazine I wrote about the excellent Windows Web Services (WWS) API introduced with Windows 7. If you’re targeting Windows 7 and later this is an excellent addition to your developer toolbox. But it seems a similar fate has befallen it. Although a redistributable is apparently available I have yet to see it again thanks to the lawyers. After months of requesting and waiting, I finally heard back from a lawyer again but now it turns out I need to purchase a premiere support contract in order to qualify for the redistributable.

I’ve never needed paid support from Microsoft and I don’t see why I need to get a contract now! For crying out loud I’m a Microsoft MVP and I provide free support to Microsoft customers. Just a little ironic. Anyway, if you’ve got one of these fancy support contracts I guess you’ll be fine. As for me I’ll just have to wait till Windows 7 is as ubiquitous as Windows XP before I will give it another look. This really would not have bugged me if Microsoft hadn’t made such a big deal about how a redistributable would be made available to developers.




Goodbye Windows with C++ and Layered Windows with Direct2D

Thu, 03 Dec 2009 08:51:00 GMT

I’ve been offline for days at a time while traveling through South Africa and just noticed that my latest Windows with C++ column, Layered Windows with Direct2D, is now live on the MSDN Magazine website.

This issue is bittersweet for me as it is both one of my favorite articles to date and also my last for the magazine. Although MSDN Magazine will continue for some time, Microsoft is getting out of the magazine business, and it just no longer makes sense for me to write for the magazine on a regular basis. Of course being the last remaining C++ columnist I’m not sure anyone will notice.  :)

This is my third article on Direct2D. From the article:

In my third installment on Direct2D, I’m going to show off some of its unmatched power when it comes to interoperability. Instead of exhaustively detailing all the various interoperability options that Direct2D provides, I’m going to walk you through a practical application: layered windows. Layered windows are one of those Windows features that have been around for a long time but haven’t evolved much and thus require special care to use effectively with modern graphics technologies.

I hope you enjoy it.

Here are links to some of the most recent Windows with C++ columns:

November 2009 – Windows Web Services

September 2009 – Drawing with Direct2D

June 2009 – Introducing Direct2D

April 2009 – The Virtual Disk API in Windows 7

February 2009 – Visual C++ 2010 and the Parallel Patterns Library

December 2008 – x64 Debugging With Pseudo Variables and Format Specifiers

October 2008 – Exploring High-Performance Algorithms

August 2008 – Asynchronous WinHTTP

And here is a complete list.




Travel

Fri, 13 Nov 2009 09:38:00 GMT

Today I’m leaving for South Africa where I’ll spend 2.5 months with my family. If you have any questions about Window Clippings or my articles please be patient as I may not be able to get online to check my email as regularly.

Any suggestions for affordable mobile broadband in South Africa would be welcome!




Windows Web Services versus ATL SOAP

Thu, 05 Nov 2009 21:13:00 GMT

After publishing the WWS article I received some questions about how this compares to ATL’s SOAP stack. I’m certainly not trying to convince anyone to switch over to WWS but it has some benefits that may be useful in some scenarios. I also haven’t used the ATL/ServerXMLHTTP stack much so I’m probably not the best person to do a comparison. From what I can tell however it uses either WinHTTP or WinInet and MSXML. Given that there are some things I can point out

1. WWS is not limited to SOAP over HTTP and provides first-class support for TCP and UDP bindings. It’s also not limited to text encoding and can provide a considerable performance boost with binary encoding when applicable. It is possible for developers to modify the ATL source code to use a different transport and encoding as several teams at Microsoft have done in the past but you are on your own when doing this whereas WWS can handle this for you.

2. The XML layer in WWS, which includes serialization for C data types and structures, is much faster than XmlLite which in turn is much faster than MSXML. In some scenarios that can make a big difference. Control over memory management and reduced working set is also critical for many customers (many of whom live within Windows core). This also has a big impact on throughput which is critical in scenarios like financial services.

3. I didn’t touch on this in the article but there’s a very nice (and efficient) asynchronous programming and cancellation model that works with completion ports making it really scalable.

4. ATL SOAP is no longer in active development and Microsoft only supports the version of ATL SOAP that shipped with Visual Studio 2005. Of course if this works for you that’s great.

The list can go on.  One of the biggest reasons for using WWS that I’ve heard from Microsoft and others is the interoperability with modern SOAP stacks like WCF, WebSphere, Weblogic, and others. With ATL SOAP it is only possible to build clients for services that use the basic SOAP services specs that fall under the Basic Profile 1.0. If a service uses any of the WS-* standards released past 2002, ATL SOAP just doesn’t support it out of the box.

Concerns over platform support are warranted although a lightweight redistributable for WWS is available going back to Windows XP.




Windows with C++: Windows Web Services

Wed, 04 Nov 2009 08:35:00 GMT

(image) My latest Windows with C++ column, Windows Web Services, just went live on the MSDN Magazine website. Here I’m taking a break from Direct2D to highlight the new SOAP stack introduced with Windows 7 for building both clients and servers. It’s completely native, has minimal overhead, and is incredibly fast. From the article:

One of the main reasons many developers flocked to the Microsoft .NET Framework, and Java to a lesser degree, was the fact that it made it much easier to write software for the Internet. Whether you were writing an HTTP client or server application, the .NET Framework had you covered with classes for making HTTP requests and processing XML easily. You could even generate SOAP clients from WSDL documents and implement SOAP servers with ASP.NET. As the standards around Web services matured, Microsoft developed the Windows Communications Foundation (WCF), also built on the .NET Framework, to make it easier to use the increasingly complex Web standards for handling different transports, such as TCP and UDP, and provide more versatile security options.

C++ developers, however, were left wondering whether it was even practical to use C++ to write Web applications. Microsoft had provided a couple of temporary solutions in the form of ATL classes and a COM-based toolkit, but in the end these couldn’t keep up with the progress that the managed SOAP stacks had made and thus were largely abandoned.

I hope you enjoy it.

Here are links to some of the most recent Windows with C++ columns:

September 2009 –  Drawing with Direct2D

June 2009 – Introducing Direct2D

April 2009 – The Virtual Disk API in Windows 7

February 2009 – Visual C++ 2010 and the Parallel Patterns Library

December 2008 – x64 Debugging With Pseudo Variables and Format Specifiers

October 2008 – Exploring High-Performance Algorithms

August 2008 – Asynchronous WinHTTP

And here is a complete list.




October 2009 issue of MSDN Magazine

Fri, 02 Oct 2009 09:49:00 GMT

Those of you expecting my Windows with C++ column about Windows Web Services to appear in the October issue will have to wait another month as the article was bumped due to space constraints. I just found out yesterday myself. In the mean time you should read Rick Molloy’s latest article on the Concurrency Runtime.




Zune Fail

Wed, 16 Sep 2009 10:20:00 GMT

(image) The Zune hardware products are fantastic. The new Zune HD is particularly impressive. The Zune software is a joy to use when compared to that other product that controls 99% of the market. But until Microsoft figures out how to make the Zune Marketplace and the Zune Pass subscription service available in the rest of the world (outside of the USA) this isn’t going to go anywhere.

With the Zune 3.0 I could at least browse the marketplace even if I couldn’t purchase anything. I could for example use it to search for podcasts. That doesn’t even seem to work anymore with Zune 4.0.

Make it happen. Pretty please.

(image)




Direct2D and the Desktop Window Manager

Tue, 15 Sep 2009 13:22:00 GMT

Many moons ago, when Windows Vista was still in beta, I wrote an article showing readers how to program with the Desktop Window Manager (DWM). I also followed up with another article showing readers how to display controls on glass. Both articles focused on User32/GDI which at the time was still the way to go for native application developers. With the introduction of Windows 7 comes a brand new graphics platform for the application developer and that of course is Direct2D. So far MSDN Magazine has published two introductory articles I wrote about Direct2D. If you haven’t already done so please read Introducing Direct2D and Drawing with Direct2D. I’ll wait. The upcoming December issue of the magazine will feature the next installment which covers some more advanced topics related to interoperability, but for now I thought I’d update the DWM saga for Direct2D as it’s just so simple. Whereas GDI barely tolerated the DWM, Direct2D just loves it. Let’s say you just want to render the entire client and non-client area as a seamless sheet of glass and then use Direct2D to draw on top. Start by instructing the DWM to extend the frame into the client area as follows: MARGINS margins = { -1 }; Verify(DwmExtendFrameIntoClientArea(windowHandle,                                    &margins)); Now all you need to do is instruct Direct2D to use the same pixel format used when alpha blending with GDI, namely pre-multiplied BGRA: const D2D1_PIXEL_FORMAT format =    D2D1::PixelFormat(DXGI_FORMAT_B8G8R8A8_UNORM,                      D2D1_ALPHA_MODE_PREMULTIPLIED); The format is used when initializing the render target properties: const D2D1_RENDER_TARGET_PROPERTIES targetProperties =     D2D1::RenderTargetProperties(D2D1_RENDER_TARGET_TYPE_DEFAULT,                                 format); The render target properties are then provided to the Direct2D factory object to create the render target as usual: Verify(m_d2dFactory->CreateHwndRenderTarget(targetProperties,                                            windowProperties,                                            &m_target)); And that’s all there is to it. You can now render portions of your window with glass simply by using a brush or bitmap’s alpha channel. You might for example clear the render target before drawing as follows: m_target->Clear(D2D1::ColorF(0.0f, 0.0f, 0.0f, 0.0f)); Hope that helps.[...]



WinUnit is Now on CodePlex

Fri, 11 Sep 2009 07:49:00 GMT

I’m totally hooked on WinUnit. As someone who writes a lot of native code it’s just absolutely essential. Up until now the only place to get it was via the download for the article that Maria wrote for MSDN Magazine.

Well I just found out via John Robbins that Maria finally got around to making a permanent home for WinUnit over on CodePlex.

http://winunit.codeplex.com/

Thanks Maria!




Windows with C++: Drawing with Direct2D

Thu, 10 Sep 2009 06:50:00 GMT

(image) My latest Windows with C++ column, "Drawing with Direct2D", just went live on the redesigned MSDN Magazine website. This is really a continuation of my previous column where I introduced Direct2D. From the article:

It is helpful to think about Direct2D as a hardware-accelerated 2-D rendering API. Of course, it supports software fallback, but the point here is that Direct2D is about rendering. Unlike other graphics APIs on Windows, Direct2D takes a componentized approach to graphics. It does not provide its own APIs for encoding and decoding bitmaps, text layout, font management, animation, 3-D and so on. Rather, it focuses on rendering and control over the graphics processing unit (GPU) while providing first class hooks to other APIs that focus on things like text layout and imaging. Direct2D does, however, provide primitives for representing different types of brushes as well as simple and complex shapes, the building blocks for any 2-D graphics application.

In this article, I'm going to show you how to draw with Direct2D. I'll begin by introducing Direct2D's color structure and then
show you how to create various types of brushes. Unlike most of the other graphics APIs on Windows, Direct2D doesn't provide a "pen" primitive, so brushes are pretty important as they're used for all outline and filling tasks. With that out of the way, I'll show you how to draw primitive shapes.

I hope you enjoy it. Right now I’m finishing up the December issue of Windows with C++ where I dive into Direct2D interoperability.

Here are links to some of the most recent Windows with C++ columns:

June 2009 – Introducing Direct2D

April 2009 – The Virtual Disk API in Windows 7

February 2009 – Visual C++ 2010 and the Parallel Patterns Library

December 2008 – x64 Debugging With Pseudo Variables and Format Specifiers

October 2008 – Exploring High-Performance Algorithms

August 2008 – Asynchronous WinHTTP

And here is a complete list.




I just don’t get twitter

Sat, 22 Aug 2009 14:37:00 GMT

I think I’m with Mickey on this one and may never post anything more, but to ensure that nobody confuses me with a few other notorious Kenny Kerr’s out there my twitter account is “kennykerr”.

 

(object) (embed)

 




Window Clippings loves Windows 7

Thu, 20 Aug 2009 13:03:00 GMT

I received a few queries about this so I thought I better just make a quick statement: Window Clippings 2.1 works great on Windows 7.

(image)  

I’ve also updated the website to point this out.




Windows Server 2008 R2 for MSDN Subscribers

Fri, 14 Aug 2009 17:46:00 GMT

It’s been just over a week since Windows 7 was made available to MSDN subscribers and now you can finally download the server version and with it version 2 of the best virtualization system on the planet!

(image)

Go and get it!




Lenovo Website Blues

Mon, 10 Aug 2009 19:33:00 GMT

I’ve been dreaming of getting a Lenovo laptop for a few years. Don’t get me wrong, I love my Dell D630 but it may be time to upgrade soon. What frustrates me is how bad the Lenovo website experience is. Take the very appealing new T400s’ customization page:

(image)

Boy that’s one serious processor upgrade. For only $999,624.00 I can upgrade to the pathetic low-voltage 1.4GHz Core 2 Duo processor. This leaves me with a sales price of over a million dollars:

(image)

 

Now if only I was as lucky as John Robbins...

 




Windows 7 for MSDN Subscribers

Thu, 06 Aug 2009 17:11:00 GMT

(image)  

Go and get it!




On the move again

Sun, 26 Jul 2009 07:56:00 GMT

Our house is now officially on the market. Anyone want to live in Tonbridge in Kent? We’re on our way back to Ontario in Canada after two years in England. This will be our last move!

In other news there have been some hiccups with scheduling at MSDN Magazine. My next article, on Direct2D again, will now appear in the September 2009 issue. I’ve also just finished another really fun article on the new Windows Web Services API that I’m really excited about. That’ll be in the October 2009 issue and I’ll probably write some more about it for the December 2009 issue.

We’re really looking forward to being back in Canada! Just as soon as we sell this house...




Asynchronous Agents

Wed, 03 Jun 2009 10:55:00 GMT

Rick Molloy, one of the masterminds behind the new concurrency runtime (concrt) and parallel patterns library (PPL), has written an article in the latest issue of MSDN Magazine demonstrating the new asynchronous agents library with the classic dining philosophers problem.

Concurrent Affairs: Solving The Dining Philosophers Problem With Asynchronous Agents

Enabling C++ developers to write highly concurrent applications is a major focus of Visual Studio 2010. The beta release includes the Concurrency Runtime, parallel libraries, and development tools aimed at addressing several common problems preventing developers from unlocking the performance potential inherent to multicore hardware. Notably, this includes ensuring that developers can identify and take advantage of opportunities for concurrency in their code, productively manage shared state and its side effects, and not having to worry about building low-overhead concurrency infrastructure that is scalable at run time on a variety of hardware.

In this article, I'm going to demonstrate how to use the new Asynchronous Agents Library included as part of Visual C++ 2010 to manage the difficulties that can arise with shared state. To show you how this works, I will walk through an implementation of a classic concurrency problem: Djikstra's Dining Philosophers. You'll see how the actor-based programming construct of an agent in combination with asynchronous message-passing APIs can be used to provide a correct and easy to understand solution to this problem that doesn't rely directly on threading or synchronization primitives.

Enjoy!




Lost Carrier Pigeon

Tue, 02 Jun 2009 15:08:00 GMT

What do you when a carrier pigeon lands in your back yard seemingly lost?

It has bracelets around its feet with numbers but no email address.   :)

It’s pretty tame and let me pick it up to inspect its markings.




Windows with C++: Introducing Direct2D

Tue, 02 Jun 2009 10:44:00 GMT

(image) I’ve been away from my computer for a few days working on a house renovation project and didn’t notice that my latest Windows with C++ column came out until the mail man delivered a copy of the June 2009 issue of MSDN Magazine.

In this issue I introduce a new technology that I’m very excited about. I’ve been waiting for Direct2D for some time. When Microsoft started pushing WPF as the “one true path” (TM) I just couldn’t persuade myself to buy the sales pitch. If you felt the same way then read on. This just might make your day.

Windows with C++: Introducing Direct2D

With the introduction of Windows Vista a few years ago, it was clear that the era of the Windows Graphics Device Interface (GDI) was coming to an end. GDI, even with the help of GDI+, had been showing its age especially when compared to the superior graphics capabilities of Windows Presentation Foundation (WPF). As if that weren't enough, GDI lost its hardware acceleration while WPF took advantage of Direct3D's abundance of hardware acceleration.

However, if you want to develop high-performance and high-quality commercial applications, you'll still look to C++ and native code to deliver that power. That's why few things excite me more about Windows 7 than the introduction of Direct2D and DirectWrite. Direct2D is a brand new 2D graphics API designed to support the most demanding and visually rich desktop applications with the best possible performance. DirectWrite is also a brand-new API that complements Direct2D and provides hardware-accelerated text, when used with Direct2D, and high-quality text layout and rendering with advanced support for OpenType typography and ClearType text rendering.

In this article, I will explore these new technologies and give you an idea of why it matters and how you can start using them today.

Big thanks to Mark Lawrence and Ben Constable, from the Direct2D team, for their feedback on the article as well as for providing a side bar discussing rendering performance.

Stay tuned for more Direct2D articles in my upcoming Windows with C++ columns.

If you’re looking for one of my previous articles here is a complete list of them for you to browse through.

Produce the highest quality screenshots with the least amount of effort! Use Window Clippings.