July 28, 2014
Hot Topics:
RSS RSS feed Download our iPhone app

More articles by Tom Archer

tarcher@codeguru.com

Loading Blowfish-Encrypted Data into an MSXML2 DOM Object

Learn how to use helper functions that (utilizing a popular Blowfish class) open and decrypt an XML file in memory and then load that memory—without writing it to disk—into a DOM object.

Using Delegates with Native Function Callbacks in Managed C++

Learn how to import native DLL functions into a Managed C++ application and how to define and pass delegates for asynchronous processing with callback functions.

Build a Maintenance Application with the XmlTextWriter/XmlTextReader Classes

Tom Archer presents a step-by-step tutorial for building an application that uses the .NET XML classes to read and write video information to an XML file.

Reading XML Files with the XmlTextReader Class, Part 2

In this follow-up article to learning how to use the XmlTextReader to enumerate the nodes of an XML file, Tom Archer illustrates how to skip non-content and whitespace nodes and how to locate and read attribute values.

Reading XML Files with the XmlTextReader Class

Learn how to use the .NET XmlTextReader class to sequentially read through and parse the nodes of an XML document/file.

Writing XML Files Using the XmlTextWriter Class

Learn how easy it is to generate XML files using the XmlTextWriter class from Managed C++.

Owner-Draw Menus with .NET and Managed C++

Learn how to use .NET and Managed C++ to program owner-draw menu items with the fonts and point sizes you want.

Search Entire Directories for Specified Files with Managed C++

Tom Archer presents a generic Managed C++ function that searches a directory hierarchy for all instances of a specified file name, utilizing the .NET DirectoryInfo and FileInfo classes.

Using Regular Expressions to Parse for Email Addresses

The final installment of Tom Archer's series on using the .NET regular expression classes from Managed C++ presents several complex patterns that allow you to locate almost any valid email address from a body of text.

Using Regular Expressions to Search and Replace Text

When you deal with user input or text files, you usually have to search through that input and replace literals, special characters, or patterns. Learn how to perform this common task via the .NET regular expressions classes.

.NET Regular Expressions and Captures

Learn the subtle differences between groups and captures in .NET regular expressions and how to suppress capture information when your applications don't need it.

Named and Non-Capturing Groups in .NET Regular Expressions

Learn how to better isolate your regular expressions patterns from changes. You can name the groups and make your patterns more efficient by defining them as 'non-capturing'.

Using Regular Expressions Groups to Isolate Sub-Matches

Learn how to extract sub-matches from your regular expression matches with the .NET Group and GroupCollection classes.

Understanding Basic Regular Expressions Patterns

For programmers who are new to regular expressions, Tom Archer presents some basic metacharacters and explains how to use them to perform simple pattern matching with regular expressions.

Search Strings for Patterns with the Match Classes

Learn how to use the Match and MatchCollection classes to enumerate found literals and strings with .NET regular expressions.

Splitting Strings with Regex in Managed C++ Applications

Learn how to use this simple yet useful feature of the Regex class to delimit strings in your Managed C++ applications.

Managed C++: Working with Temp Files

See how easy it is to create, optimize, and work with unique temporary files from your Managed C++ applications.

Managed C++: Write Image Data Using the ADO.NET Command and Parameter Objects

Tom Archer illustrates in step-by-step fashion how to read an image file from disk and then save it to a SQL Server database using the ADO.NET SqlCommand and SqlParameter objects.

Managed C++: Read Image Data Using the ADO.NET DataReader

Tom Archer illustrates step-by-step instructions for using the .NET DataReader class to read image data from a database, and he presents a generic function that will write this data to disk.

Managed C++: Authenticating Users via Hash Codes

For situations when a company doesn't want the responsibility of maintaining a user password file, Tom Archer presents a mechanism that stores and uses the hash codes of passwords instead of the actual passwords to validate users.

Managed C++: Determining User Security Roles

For those who don't have the desire or time to become experts on Windows security, follow this demonstration of using various .NET classes to test for a user's inclusion in one or more security groups.

Managed C++: Retrieving User's Windows Security Information

Learn how to retrieve a current user's basic security information, such as the fully qualified user name (with domain or workgroup), whether the user is authenticated, and the authentication type.

Managed C++: Monitoring the Windows Event Log

Tom Archer illustrates the steps necessary to programmatically monitor your system's event log from a Managed C++ application. Monitoring certain event logs—especially the Security log—enables you to keep tabs on such security-related events as failed login attempts and port scans.

Managed C++: Reading and Writing Windows Event Log Entries

Learn how to enumerate event log entries, read specific event entries, manually filter events based on their desired property values, write new event entries, and clear an event log.

Managed C++: Working with Windows Event Logs

Learn how to enumerate local and remote event logs, instantiate an EventLog object for a specific event log, create a custom event log specific to your application, and delete an event log.

Managed C++: Read and Write Registry Keys and Values

Tom Archer illustrates how programmatically modifying Windows registry keys and values from Managed C++ is much easier and more intuitive than ever before.

Windows Forms: Creating an SDI ListView and Control Panel UI

Tom Archer illustrates how easy Visual Studio .NET and Windows Forms make creating interfaces that once required manual coding.

Managed C++: Debugging with the StackTrace Class

Learn how the StackTrace class makes your debugging life a bit easier by enabling you to retrieve full call stack information.

Managed C++: Rubber-banding and Cropping Images

Learn how .NET enables you to easily allow your users to create a cropping area of an image with the mouse and then create a new image consisting of only that cropped area.

Managed C++: Loading and Displaying Images

For years, one of the biggest complaints about MFC was its lack of imaging support. Tom Archer shows how Managed C++, the .NET Image class, and the PictureBox control make loading, displaying, and dynamically sizing an image a snap.

Managed C++: Use GDI+ to Render Reflected Text

Tom Archer illustrates how you can use the TranslateTransform and ScaleTransform methods to invert and display the reflection of a string.

Managed Extensions: Using GDI+ to Render Sheared Text

Tom Archer illustrates how the Matrix object and transforms enable you to draw horizontally or vertically sheared text.

Managed Extensions: Using the Microsoft Word Spell Checker via Automation

Learn how to access the Microsoft Word spell checker using Automation from your own Managed C++ Windows Forms applications.

Managed Extensions: Using GDI+ to Draw 3D Text

Learn how to use GDI+ to render several 3D text effects such as shadowed, blocked, embossed, and engraved text.

Managed Extensions: Using GDI+ Brushes to Draw Text

Tom Archer illustrates how the combination of Managed Extensions and GDI+ enable you to draw gradient and hatched text with only a few lines of C++ code.

Managed Extensions: Tracking User Idle Time Without Hooks

Hooks aren't always your best option for tracking user idle time. Not only are they often difficult to write, but they also must be loaded into every desktop process and they can trigger some anti-spyware software. Tom Archer offers a more efficient technique.

Managed Extensions: Using the .NET OLE DB Classes to Read Text Files

Tom Archer illustrates how to use the .NET OLE DB classes to read text files.

Managed Extensions: Finding Files by Extension

Tom Archer illustrates how to locate files matching a specified extension using a .NET component and various .NET classes.

Managed Extensions: Measuring Strings

Learn how to easily measure the height and width needed to display text values using .NET classes.

Managed Extensions: Using the .NET ODBC Classes to Read Text Data

Tom Archer explains how to use the Microsoft Text Driver and the .NET ODBC Classes to read formatted text data.

Managed Extensions: Parsing CSV Files with Regular Expressions

Tom Archer illustrates how to parse comma-delimited text—when the data contains quotes, commas, and blanks—and return the data in a managed array.

Managed Extensions: Combining IEnumerable and IEnumerator

In some situations, it is beneficial to have a single class implement two interfaces. Tom Archer illustrates this technique and explains when you would want to use it.

Managed Extensions: Versioning Collection Classes

Versioning your collections is important when the data held by a collection can be modified while a client is enumerating that data. Tom Archer presents a versioning technique he's told Microsoft uses internally.

Managed Extensions: Sorting Your Collection Classes

Tom Archer illustrates step-by-step instructions for making your collection classes sortable by any of your class's members.

Managed Extensions: Adding Enumeration to Your Classes

The .NET Base Class Library defines interfaces that enable you to quickly and easily define your classes. Learn how to write client code that enumerates these interfaces in a type-safe and object-specific manner.

MFC and .NET: Handling .NET Events

Tom Archer explains how to work around the inherent problems associated with handling .NET events from a mixed mode (MFC/Managed Extensions) application.

Managed Extensions: Using Delegates and Events

Tom Archer presents a step-by-step tutorial on understanding and using .NET delegates and events from the C++ Managed Extensions.

Managed Extensions Example That Calls the Amazon Web Service

Many talented C++ programmers still think that calling Web services from C++ is difficult. Tom Archer illustrates that using the .NET classes makes this task a snap.

MFC and .NET: Why ShellExecute Isn't Dependable and How to Work Around It

Tom Archer explains the low-level details of why the ShellExecute function isn't dependable in a mixed-mode application. He then offers a couple of workarounds to this limitation.

Converting Between MFC/C++ and .NET Types

Converting between types is frequently a sticking point for coders new to mixing MFC and .NET. Tom Archer illustrates some basic conversions that will help you should you get stuck in a painful series of compiler error messages about type mismatches.

Specifying Managed Arrays as Function Parameters in C++

Tom Archer illustrates the basics of defining functions with Managed Extensions C++ that receive and return arrays. He also provides a helpful set of macros and typedefs that make this task much more intuitive and error-free.

Date Validation Using the .NET Globalization Classes

Sometimes the answer to a common problem is very easy once you know where to look. In this week's installment of the '.NET Tips & Techniques' column, learn how the Globalization classes can make validating any date format a snap.

Saving Rich Edit Control Text to SQL Server

Allowing users to enter formatted text is a great addition to any user interface. In this article, Tom Archer shows you how to save the user's formatted text to a SQL Server database.

Wrapping MFC Objects for Use with .NET Remoting

One drawback to using remoting in a mixed—MFC/.NET—environment is that MFC objects cannot be remoted. One technique for overcoming this limitation is wrapping your MFC objects before remoting them.

Comparing Large Bodies of Text with Hash Codes

While most people think of hash codes in relation to cryptography, Tom Archer illustrates how they can be used to quickly and easily compare text values of virtually any size.

C# Tip: Monitoring Clipboard Activity in C#

In this week's .NET Tips & Techniques column, Tom Archer illustrates how to correctly monitor the Windows Clipboard from a C# .NET application.

C++ Tip: Versioning Serialized Files with Managed C++

Tom Archer introduces a step-by-step technique for versioning your serialized files so that your application can handle current and older file formats, as well as properly deal with situations where the application is older than the file format being read.

C++ Tip: Uniquely Identifying Serialized Files with Managed C++

In this week's .NET Tips & Techniques column, Tom Archer presents a step-by-step approach to uniquely identifying your serialized files using Managed Extensions, custom serialization, and GUIDs.

C++ Tip: Implementing Custom Serialization with Managed C++

Tom Archer illustrates how custom serialization enables you to take full control over the serialization process in your .NET Managed C++ applications—including the ability to provide pre- and post-processing when reading and writing members.

C++ Tip: Serializing .NET Objects with Managed C++

In this installment of .NET Tips & Techniques, learn how to serialize entire objects—as well as selected members—to and from disk using Managed C++ Extensions

C++ Tip: Using Custom Exception Handlers to Restart Your Application

With .NET, you can create a custom exception handler that allows you to catch all unhandled exceptions thrown during the execution of your application. This technique allows you to terminate your application in a controlled manner and perform any needed application-specific cleanup and error logging.

C# Tip: Making Windows Forms Pop Under

Learn the steps required to shuttle pop-under windows behind all other windows in the z-order.

C# Tip: Forcing Garbage Collection in .NET

Discover the methods for forcing the Garbage Collector (GC) to go into action!

Downloading Files with the WebRequest and WebResponse Classes

Download a specified server file and save it to a local file. Instead of describing the function and then presenting it, the function contains comments that document exactly what is going on.

C# Tip: Placing Your C# Application in the System Tray

Learn how to place an application's icon in the System Tray.

C# TIP: Converting & Sending Sockets Data with a Leading Length Value

Most articles that illustrate how to send data via sockets tend to focus on sending and receiving simple textual data. While this is certainly useful, one very common practical need is to prefix a length value to the data being sent.

Sockets Byte-Ordering Primer

For those who are new to sockets programming or who've long ago forgotten the idiosyncrasies of byte ordering with sockets, here's a primer on what byte ordering is, why it's needed, and terms such as little-endian, big-endian, network byte order, and host bye order.

File I/O with Streams - Part 1 - An Excerpt from Inside C#, Second Edition

Check out the different types of stream, types of file system objects, and potential application environments, including Microsoft Windows-based and Web-based environments as part of this exploration of the streams framework in .NET.

Using the XML DOM with Visual C++ and COM

Learn how to use the XML Document Object Model (DOM) to load an XML document and iterate through its nodes using Visual C++ and COM.

Solving Complex SQL Problems with Full-Text Indexing

Real-world problems can turn an ordinary SQL statement into a Cartesian product-producing, index-ignoring, performance nightmare. In such cases, SQL Server's Full-Text Index may offer the perfect mix of flexibility and performance.

Hybrid Edit Control that Combines Prompt Text and Edit Control

Great for dialogs/views where space is limited or prompt text would look out of place (e.g., invoices, purchase orders, etc.)

Sitemap | Contact Us

Rocket Fuel