Articles
Home About Workshops Articles Writing Talks Books Contact

Prolific Writer

Over the last decade Richard has written for all of the major software development magazines. He specializes in writing in depth articles about the fundamental features of technology. Richard's articles are high quality and are written to an advance level.
 

MSDN Library

See http://msdn.microsoft.com/en-us/library/ff708696.aspx
Chapter 1: Introducing Hilo
The first Hilo sample application—the Hilo Browser—implements a touch-enabled user interface for browsing and selecting photos and images.
Chapter 2: Setting up the Hilo Development Environment
This article outlines how to set up a workstation for the development environment so that you can compile and run the Hilo Browser sample application.
Chapter 3: Choosing Windows Development Technologies
This article describes the rationale for the choice of the development technologies used to implement the Hilo applications.
Chapter 4: Designing the Hilo User Experience
This article describes the process and thoughts when developing the Hilo User Experience.
Chapter 5: The Hilo Common Library
This article introduces the Hilo Common Library, a lightweight object orientated library to help to create and manage Hilo-based application windows and handle messages sent to them.
Chapter 6: Using Windows Direct2D
This article describes how hardware accelerated Direct2D and DirectWrite are used in the Hilo sample application.
Chapter 7: Using Windows Animation Manager
This article explores the Windows 7 Windows Animation Manager, that handles the complexities of image changes over time.
Chapter 8: Using Windows 7 Libraries and the Shell
Files from many different locations can be accessed through a single logical location according to their type even though they are stored in many different locations. Libraries are user defined collections of content that are indexed to enable faster search and sorting. Hilo uses the Windows 7 Libraries feature to access the user’s images.
Chapter 9: Introducing Hilo Annotator
This article describes the Hilo Annotator application, which allows you to crop, rotate, and draw on the photographs you have selected. Hilo Annotator uses the Windows Ribbon Control to provide easy access to the various annotation functions, and the Windows Imaging Component to load and manipulate the images and their metadata.
Chapter 10: Using the Windows Ribbon
This article examines the use of the Windows Ribbon control, which is designed to help users find, use, and understand available commands for a particular application in a way that’s more natural and intuitive than menu bars or toolbars.
Chapter 11: Using the Windows Imaging Component
In this article you will learn how the Windows 7 Imaging Component is used in the Hilo Browser and Annotator applications. The Windows 7 Imaging Component (WIC) allows you to load and manipulate images and their metadata. The WIC Application Programming Interface (API) has built-in component support for all standard formats. In addition, the images created by the WIC can be used to create Direct2D bitmaps so you can use Direct2D to change images.
Chapter 12: Sharing Photos with Hilo
In this article, we’ll describe how the Hilo applications have been extended to allow you to share photos via an online photo sharing site. To do this, Hilo uses the Windows 7 Web Services application programming Interface (WSSAPI). The Hilo Browser application has also been updated to provide additional user interface (UI) and touch screen features, and the Hilo Annotator application has been extended to support Windows 7 Taskbar Jump Lists. This chapter provides an overview of these new features.
Chapter 13: Enhancing the Hilo Browser User Interface
In the final version of Hilo, the Annotator and Browser applications provide a number of enhanced user interface (UI) features. For example, the Hilo Browser now provides buttons to launch the Annotator application, to share photos via Flickr, and touch screen gestures to pan and zoom images. In this chapter we will see how these features were implemented.
Chapter 14: Adding Support for Windows 7 Jump Lists & Taskbar Tabs
The Hilo Browser and Annotator support Windows 7 Jump Lists and taskbar tabs. Jump Lists provide the user with easy access to recent files and provide a mechanism to launch key tasks. Taskbar tabs provide a preview image and access to additional actions within the Windows taskbar. In this Chapter we will see how the Hilo Browser and Annotator applications implement support for Windows 7 Jump Lists and taskbar tabs.
Chapter 15: Using Windows HTTP Services
The Hilo Browser application allows you to upload photos to the Flickr online photo sharing application. To do this, Hilo uses Windows HTTP Services. This chapter will explore how this library is used in the Hilo Browser to implement its photo sharing feature.
Chapter 16: Using the Windows 7 Web Services API
The Hilo Browser application allows you to share your photos via Flickr by using the Share dialog. The previous chapter showed how the Share dialog uses the Windows HTTP Services API to upload the selected photos to Flickr using a multi-part HTTP POST request. Before the photo can be uploaded the Hilo Browser must first be authenticated with Flickr by obtaining a session token (called a frob), and then authorized to upload photos by obtaining an access token. To accomplish these two steps, Hilo Browser uses the Windows 7 Web Services Application Programming Interface (WWSAPI) to access Flickr using web services. In this chapter we will explore how the Hilo Browser uses this library.

MSDN Magazine

See msdn.microsoft.com/msdnmag/default.asp
The New WinFS Storage System Lets Users Search And Manage Files Based On Content
Describes the new storage layer in Longhorn
PDC Edition October 2003
Language Enhancements and Simplified GUI Development Enrich Your C++ Apps
Outlines the new features for C++ developers in the 2003 release of Visual Studio
March 2003
C++ Attributes: Make COM Programming a Breeze with New Feature in Visual Studio .NET
Illustrates how to use the new C++ ATL Atributes
April 2001
Marshaling Your Data: Efficient Data Transfer Techniques Using COM and Windows 2000
Explains the COM facilities to transfer large amounts of data with Windows 2000
September 2000

Dr Dobb's Journal

.NET Columnist, see www.ddj.com
Win32 and Windows Forms
To write effective Windows Forms code you must understand Win32 windowing. If you do not understand Win32 windowing you will not be able to get the best out of Windows Forms, and potentially, you'll write code that could prevent your user interface from updating.
Mar 2005
Custom Visual Studio Project Wizards
Describes how you can change the existing project wizards in Visual Studio.NET so that they have a UI which you can use to provide the name of the first class that the wizard creates.
Feb 2005
Whidbey C++
Three part series on the new features of C++ in the Whidbey release of Visual C++ .NET.
Nov, Dec 2004, Jan 2005
Improving .NET Events
Outlines issues with .NET events and strategies for solving them. 
Oct 2004
Layout Managers
Explains how to implement a Windows Forms Layout Manager
Sept 2004
Serialization
Outlines .NET Serialization and the various ways that you can customize it
August 2004
Synchronization Domains
Describes how to ensure that one thread at a time will execute a group of .NET objects.
July 2004
Making .NET Assemblies Tamper Resistant
This article describes how signing a .NET assembly prevents an attacker from modifying your assembly.
June 2004
Implementing Screen Savers in .NET
Prevents a .NET library that you can use to implement screen savers. This article lists the details of Windows screen savers and explains how Windows Forms can be used to implement a full screen screen saver.
May 2004
Preventing Buffer Overruns in C++
Microsoft provides a library that you can use to perform string manipulation without the dangers of the CRT
January 2004

C/C++ Users Journal

See www.cuj.com
Whidbey C++
Outlines the new features of C++ in the Whidbey release of Visual C++ .NET.
 Nov 2004

Windows Developer Magazine .NET Newsletter

Control Implementation of ISynchronizeInvoke
Describes how you can call the Control class implementation of ISynchronizeInvoke to call code on the UI thread.
15 Jan 2005
Using Worker Threads in Windows Forms
Explains how to use a worker thread to run lengthy routines and how to synchronise access to the user interface elements.
1 Jan 2005
Handling Lengthy Routines in a Form
Describes the problems with having length code in Windows Forms event handlers and one method to solve the problem.
15 Dec 2004
Volatile Reads and Writes
Explains how to prevent reordering of reads and writes of variables which is vital in a multi threaded application.
1 Dec 2004
Standard .NET Performance Counters
This final part of this mini-series outlines the performance counters that are installed by .NET to allow you to monitor how the runtime is working and how your own assemblies are performing.
15 Nov 2004
Writing Performance Counters
Illustrating how to create your own performance counters in your applications.
1 Nov 2004
Reading .NET Performance Counters
The second part of this series explains how to use the .NET framework classes to read the performance counters provided by another process.
15 Oct 2004
.NET Performance Counters
First part of a series of articles on performance counters. This articles gives an overview of what performance counters are and the registration that you need to perform.
1 Oct 2004
Socket Asynchronous Calls
Describes how the System.Net.Socket class implements asynchronous methods
15 Sept 2004
FileStream Asynchronous Calls
Describes how the FileStream file access methods are implemented to perform asynchronous calls
1 Sept 2004
System Async Calls
First article describes some of the methiods that you can call asynchronously without using a delegate
15 Aug 2004
Free .NET Development Tools from Microsoft
Outlines the tools that you can download for free from Microsoft and use for .NET development
1 Aug 2004
Event Log Categories
Describing how you can use categories in .NET
15 July 2004
Event Handlers
Comparing identifying event handler methods through interfaces and attributes
1 July 2004
Notification and Delegate Lifetimes
Investigates the lifetime issues involved in adding a delegate to an event
15 June 2004
Do We Need Edit and Continue?
A personal opinion about VB.NET edit and continue in Whidbey
1 June 2004
Command Line and Visual Studio Tools
Here I outline support in Visual Studio for projects and how you can use project files to run tools in 'build events'.
15 May 2004
.NET Notifications
Here I outline delegates and events as a tightly coupled notification mechanism and COM+ as a loosely coupled notificaton mechanism.
1 May 2004
Java: Worth Another Look?
Visual Studio .NET 2003 is provided with J#, a Java-like language. Far better than this, is that much of the JDK has been implemented as a managed library that you can call from any .NET language and in this article I give an example of using Java's ZIP file support.
15 April 2004
Base64 Stream Class
In this article I present a stream class that you can use to encode and decode Base64 data.
1 April 2004
The Base64 Classes in the Framework Library
The framework library provides some classes to encode data in Base64. However, these classes are not perfect for the reasons that I outline here.
15 March 2004
Versatile Streams
This is the first in three articles on streams. This first article explains streams and how to implement your own stream class.
1 March 2004
XML Serialization
The XmlSerializer class is used to obtain the state of an object from a XML file, or create an XML file from an object's state. Unlike the SOAP formatter, the XmlSerializer class is instructed by attributes on the .NET class. These attributes allow you to have fine control over the format of the XML file that is generated. So XML Serialization provides a flexible mechanism to store object state in XML files. 
15 February 2004
Visual Studio Application Wizards
Here I outline the problems of the UI-less project wizards in Visual Studio .NET 2003 and explain the format of the files that make up project wizards.
1 February 2004
A Personal .NET Review of 2003
There have been some important changes in .NET announced in 2003, in this article I list the various .NET events I have attended and the effect they have had on .NET
15 January 2004
Custom Marshalling
Following on from the previous article, this article goes into the details of custom marshalling
1 January 2004
[DllImport] Marshalling
Does the managed C++ developer every have to use [DllImport]? Doesn't IJW do every thing that [DllImport] does? The answer is no to the second question, [DllImport] allows you to customize the marshalling, so managed C++ developers sometimes do need to use [DllImport].
15 December 2003
Optional Values in Whidbey
I investigate some of the issues I have found with using optional values that are provided in Whidbey thyrough its new support for generics.
1 December 2003
Is .NET Too big Part 2
Following on from the last article I analyse the DLLs that are loaded automatically by a bare-bones .NET application and question why DLLs that are not needed are loaded.
15 November 2003
Is .NET Too big Part 1
In this article I speculate whether the .NET redistributable is too big and outline how I would partitian the redistributable into mandatory and optional parts
1 November 2003
Raw Sockets and .NET
Raw sockets can be used to manipulate IP packets at the packet level. Winsock 2 gives access to raw sockets for administrators and .NET is implemented using Winsock 2.
15 October 2003
.NET Performance
Here, I present some code thatI have used to compare the performance of native C++ with .NET code written with managed C++. I found that for a computationally intensive routine the two have similar performance.
1 October 2003
Comparisons
Explains how data is compared in .NET
15 September 2003
Windows Properties
Win32 windows can be associated with 'properties' in this article I show how you can use them in .NET
1 September 2003
Single Instance of a .NET Application
Explaining some techniques to ensure that just one instance of an application runs at a particular time.
15 August 2003
Windows Class Names and Windows Forms
Windows Forms is just a wrapper over Win32 windowing, in this article I explain how Windows Forms creates and registers a windows class,
1 August 2003
Structure Storage Property Sets
How don you know who wrote a Word document? How do you find this out with .NET?
15 July 2003
Satellite Assemblies
What are they? What are they used for?
1 July 2003
.NET Code Optimization
Talking about the managed C++ code optimizer.
15 June 2003
More .NET and COM Issues
Highlighting the reasons why you should be careful about /codebase
1 June 2003
Why .NET
I think everyone should ask this question at least once a day. Why use .NET? My answer is that security is the most important reason.
15 May 2003
Fusion
The second part to the DLL Hell article
1 May 2003
.NET and DLL Hell
In this two part article I explain what causes DLL Hell and how to solve it
15 April 2003
The .NET Console Class
The v1.x System.Console class is a first try by Microsoft. In this article I give an improved class. (Stop Press! The new version in Whidbey will have all of the features that I mention.)
1 April 2003
Com Apartments and .NET Threads
Talks about the default apartment types in .NET and some of the problems it can cause
15 March 2003
Serializing Delegates
You can serialize a delegate to persistent store. This explains how, and muses about what you can do with it
1 March 2003
The Visual Studio Expression Evaluator part 2 15 February 2003
The Visual Studio Expression Evaluator
In this article I explain the facility in the VS.NET IDE for evaluating expressions including your program's variables.
1 February 2003
.NET Applications and Working Set
In this article I explain why Windows Forms appear to use such a large amount of memory and how you can (at least initially) reduce this memory usage drastically.
15 January 2003
Exceptions and GUI Applications
Exceptions get special handling in GUI applications and in this article I explain the mechanism.
1 January 2003
Exceptions and Threads
Exceptions are thrown on a thread. If the thread does not catch an exception then  the thread will die. In this article I explain this mechanism, and describe how to provide a application domain based handler for unhandled exceptions.
15 December 2002
Application Domains and Unmanaged Transitions
Managed C++ is wonderful because it allows you to call unmanaged code in a way that is not possible with other .NET languages. However, there is a bug in the runtime that means that in a process that has more than one application domain the runtime 'forgets' the domain where a call to unmanaged code originated. I explain this bug in this article.
1 December 2002
.NET Installers
.NET strives to enable XCOPY deployment, but in some case this is not possible. In this article I explain how to provide code that will be called at installation and uninstallation.
15 November 2002
Destructors Part 2
C# 'destructors' are actually the implementation that will be used for finalization. In this article I describe how this relates to C++ finalizers and the issues that occur if you derive a C++ class from a C# class with a finalizer.
1 November 2002
Destructors Part 1
.NET has a concept of 'finalization' which differs in many significant ways to C++ destructors. However, when you write a C++ .NET class the compiler will generate a destructor, and in this article I explain how you can use this.
15 October 2002
Loading Configuration Files
Following on from my earlier article on configuration, I use this article to describe how to load a specific configuration file.
1 October 2002
Managed C++ and GUI Development
There are several pitfuls involved in writing .NET GUI code with managed C++ and in this article I explain what they are and how to avoid them.
15 September 2002
The NT Event Log
This is my favourite peeve. The .NETdesigners have been sloppy and have taken the VB6 implementation for the .NET EventLog class. This code is really poor and in this article I explain why you should never use the EventLog class to generate NT event log messages.
1 September 2002
Diagnostic Asserts
Here I explain asserts and how to use them. I describe why I think the C# wizard designers are wrong with respect to asserts and I descibe a bug in the .NET assert code and breifly explain how to fix it.
15 August 2002
Tracing Code Part 2
In this article I follow up by explainig why I say that tracing release code can be damaging.
1 August 2002
Tracing Code Part 1
Tracing is useful when testing code. It is rarely useful for release code where tracing can be damaging. In this article I describe the tracing classes.
15 July 2002
Properties and the Windows Forms Library
The Windows Forms Library has a striking resemblance to unmanaged Visual Basic forms. One really irritating feature is the excessive use of properties and in this article I explain why the Windows Forms team made a really big mistake with this excessive dependence. Often the code does not work the way you expect, sometimes it runs code multiple times and other times seemingly unrelated code is called. Its far easier to eshew properties and just use methods as I explain in this article.
1 July 2002
.NET Exceptions
When should you use exceptions in .NET code?
15 June 2002
C++ Delegates
I always wondered why C++ delegate contructors looked the way they did. So I went back to native C++ and looked how pointer to members behaved and then wrote a template around pointer to members to make the mechanism more generic and found that I got a class that looked very similar to the delegate class created by the C++ compiler. More details are in this article.
1 June 2002
Configuration
In this article I present the basic features of .NET configuration.
15 May 2002
Custom Event Methods
If you define an event the compiler will generate the code to combine and remove delegates from the event and to raise the event. You can write these methods yourself using a different delegate storage mechanism.
1 May 2002
Varargs
The .NET spec allows methods to have a variable number of arguments, but currently the only way to write such methods is directly in IL. C++ does allow you to access methods with varargs, but not write them. C# does not even allow you to call varargs method, but simulates the action with [ParamArray]. However, [ParamArray] is not treated the same as varargs by C++. Basically it is a mess.
15 April 2002
Pointers
In this article I describe the basic features of C++ .NET pointers and explain features like interior pointers
1 April 2002
.NET Languages
Here I set the scene by describing my impression of the plethora of .NET Languages
15 March 2002

Windows Developer Magazine C++.NET Expert

.NET Columnist, see http://www.wd-mag.com/
Preventing Buffer Overruns in Your Code
Describing the safe string API available for native C++ 
January 2004 edition of Dr Dobb's Journal
Data Marshalling
Describes how to marshal strings, arrays and structures between the native and managed worlds
December 2003
Porting Your C++ Code to .NET
Describing some of the issues involved when you port native code to managed C++ 
November 2003
Rich Graphics With GDI+
Describing the unmanaged API for accessing the GDI+ library 
October 2003
The Mixed Mode Library Assembly Bug and Managed C++
Describe the mixed mode bug in .NET version 1.0 and 1.1. This bug is caused by the way that Windows loads DLLs and is shown up with assemblies written in managed C++.
September 2003
Application Domains and Threads
Describing the relationship between application domains and threads
June 2003

Visual C++ Developer Journal

ATL columnist and .NET columnist, see www.vcdj.com
Using C++ Classes With Other .NET Languages April 2001
Declaring and Accessing Arrays in Managed C++ March 2001
Developing .NET Classes with C++ February 2001
Extend .NET Metadata with Attributes February 2001
Feel at Home with Managed Extensions
Describes the new keywords in C++ in VS.NET to allow you to develop managed .NET classes with C++.
January 2001
Is ATL Dead?
Explains why you should continue to develop with ATL.
December 2000
Debugging with ATL 7.0
Describes the new tracing and asserting features in ATL 7.0
November 2000
Add Traces and Asserts to your ATL 3.0 Programs
Describes tracing and asserting in ATL 3.0
October 2000
How ATL Implements IDispatch
Describes the ATL IDispatchImpl<> class
Develop Web Applications With ATL Server
Describes the new features of ATL Server in VS.NET
September 2000
Use Type Libraries With ATL
Shows how ATL uses type libraries and how to bind and register a type library to client processes
August 2000
Register Your COM+ Event Classes With ATL
Microsoft tell you to create an empty object for your event, this article gives code that will register a COM+ event for you
July 2000
Create Your Own Object Wizards
Explains how ATL object wizards are implemented in VC6
June 2000
Using Rich Error Information In Your ATL Code
Shows how to develop OLE DB extended error objects
May 2000
Write With WTL
Describes the WTL library
April 2000
Use ATL Wizards to Protect Your Code March 2000
Make Your Server Use A Thread Pool
Describes how to use a STA thread pool in your ATL EXE server
February 2000
How to Develop MTS Components with ATL
Describes the MTS component object wizard and why you should not use it
Nov 1999
ATL Creators
Describes ATL's class factory creator classes
Sept 1999
Container Classes in ATL
Lightweight container classes
July 1999
ATL 3.0's Enumerator and Collection Templates
Describes how to use the enumerator and collection classes
April 1999
Using ATL to Create Win32 Applications
ATL 3 has UI classes that you can use to create Win32 applications
Feb 1999
Marshalling without registration
This explains how to merge proxy-stub code into your client and server code
Jan 1999
Marshaling Fundementals
This is a reprint of my marshalling articles for VSJ
September 1998

CodeGuru

See www.codeguru.com
Events and .NET
Describes the .NET event model
January 2001
Streams and .NET
Describes the streams API in the .NET Framework
December 2000

ManagedWorld

See www.managedworld.com
Learning C#
In-depth article about the C# language
 

iDevResource.com

See www.idevresource.com, see my author central page at www.idevresource.com/authorcentral/richardg
ATL Server
ATL server was announced at VCDC Bonn, Feb 2000. Here is my report about what was said.
 
What Are COM Pipes?
Pipes are a mechanism to transfer large amounts of data efficiently
 
What is Asynchronous COM?
More correctly called "non-blocking COM"
 
WTL Architecture
This article outlines the architecture and presents a full UI application built with WTL.
 
WTL Features
WTL is a wonderful framework for developing Win32 applications. It is basically a lightweight version of MFC. This article lists the features of WTL.
 
Microsoft Transaction Server
My views about what MTS was developed for
 
What COM is All About?
A beginner's article that describes what COM is for an how it works
 

Visual Systems Journal

See www.vsj.co.uk
C++’s library of choice
Describes the new facilities in ATL 7
December 2000/January 2001
MTS and Threading February 2000
COMe follow the thread
COM threading explained
June 1999
Security Counsel
COM security
May 1999
Plugging a Leak
ATL 3's interface debugging facilities
March 1999
Bugging Out
The facilities that the CRT gives you to debug your code
December 1998
VC++'s new ALTernative
An outline of the new facilities in ATL 3
November 1998
Marshaling all your Resources
Explains all the issues about type library marshalling
October 1998
Smart Pointers to COM Development part II
This explains _variant_t, _bstr_t and _com_error classes
July 1998
Smart Pointers to COM Development part I
This explains VC5's _com_ptr_t smart pointer class
June 1998
Errors in Error Objects
COM objects cannot throw exceptions, but they can pass back error information in error objects
May 1998
Marshal Law part II April 1998
Marshal Law part 1
Explains what marshalling is and how it helps COM achieve location transparency
March 1998 
COMplicated Issues - Achieving asynchronous calls
COM is synchronous, this article explains how to get asynchronous calls
January/February 1998 
The Second COMing
This outlines the new features expected in COM+
November 1997

Developer Network Journal

See www.dnjonline.com
Introduction to Attributes
Describes the differences between COM, COM+, .NET and ATL attributes
Online Articles
Best of both worlds
Managed Extensions for C++ let you create .NET code with C++ and to re-use existing code with .NET
Online Articles
The development environment
The editors and tools in Visual Studio .NET’s Integrated Development Environment.
Visual Studio.NET Reviews
A class act to follow
Writing efficient code for your web applications with ATL Server
July/August 2001
Oh Behave!
Using Attributes in COM+, C++ and .NET.
Jan/Feb 2001
BugBusters
Explains how to use Visual C++'s remote debugging facilities and how to use Visual Studio Analyser
Mar/Apr 2000

Visual C++ Developer

See www.pinpub.com/vcd
Extending Developer Studio with Add-ins May 1998
The NT EventLog part II April 1998
The NT EventLog part I March 1998 
DCOM Security January 1998

COMDeveloper

See www.comdeveloper.com
Why ATL? Why COM?  
COM and the Registry  
A Spot Of Wizardry  



(c) 2006 Richard Grimes