MSDN Magazine: C++ rss

All MSDN Magazine Topics
  • CLR Inside Out: Code Contracts
    Melitta Andersen - August 2009
    This article will share some of the best practices that the Base Class Libraries (BCL) team devised as they added the code contract libraries and started to take advantage of them in their own code.

  • Concurrent Affairs: Solving The Dining Philosophers Problem With Asynchronous Agents
    Rick Molloy - June 2009
    We use the new Asynchronous Agents Library in Visual C++ 2010 to solve the classic Dining Philosophers concurrency problem.

  • Windows With C++: Introducing Direct2D
    Kenny Kerr - June 2009
    If you want to develop high-performance and high-quality commercial applications, you’ll still look to C++ and native code. Direct2D will help you deliver the graphics power you need.

  • Windows With C++: Visual C++ 2010 And The Parallel Patterns Library
    Kenny Kerr - February 2009
    The Parallel Patterns Library allows you to more easily take advantage of parallelism. See what this and other Visual C++ 2010 features are in store.

  • Windows With C++: X64 Debugging With Pseudo Variables And Format Specifiers
    Kenny Kerr - December 2008
    This month we explain how pseudo variables and format specifiers provide a wealth of information for use in debugging.

  • Security Quiz: Test Your Security IQ
    Michael Howard and Bryan Sullivan - November 2008
    Our security experts present 10 vulnerable pieces of code. Your mission is to find the holes (a.k.a. bad security practices) in the code.

  • Windows with C++: Asynchronous WinHTTP.
    Kenny Kerr - August 2008
    This month's column explains how to use Windows HTTP Services, or WinHTTP, the new, powerful API for implementing HTTP clients.

  • GUI Library: Bring the Simplicity of Windows Forms to Native Apps
    John Torjo - June 2008
    In this article, author John Torjo presents a guide to his C++ GUI library called eGUI++ and explains how it makes user interface programming easier.

  • Windows with C++: Decoding Windows Vista Icons with WIC
    Kenny Kerr - June 2008
    In this month's installment, Kenny Kerr sings the praises of the new Visual C++ 2008 Feature Pack, which brings modern conveniences to Visual C++.

  • C++ Plus: Beef Up Windows Apps with the Visual C++ 2008 Feature Pack
    Kenny Kerr - May 2008
    Kenny Kerr sings the praises of the new Visual C++ 2008 Feature Pack, which brings modern conveniences to Visual C++.

  • Interview++: Bjarne Stroustrup on the Evolution of Languages
    Howard Dierking - April 2008
    Howard Dierking talks to the inventor of C++, Bjarne Stroustrup, about language zealots, the evolution of programming, and what’s in the future of programming.

  • Windows with C++: Windows Imaging Component Basics
    Kenny Kerr - April 2008
    Windows Imaging Component (WIC) is an extensible framework for encoding, decoding, and manipulating images. See how to use WIC to encode and decode different image formats.

  • Going Places: Provisioning Mobile Devices
    Mike Calligaro - April 2008
    Learn how you can set up every mobile device in your company with a few lines of code and some XML--thanks to the provisioning APIs in the Windows Mobile SDK.

  • Security Briefs: Protecting Your Code with Visual C++ Defenses
    Michael Howard - March 2008
    Michael Howard outlines some of the buffer overrun defenses available in Visual C++ 2005 and beyond.

  • WinUnit: Simplified Unit Testing for Native C++ Applications
    Maria Blees - February 2008
    Maria Blees introduces WinUnit, a handy new unit testing tool for native C++ projects.

  • Test Run: The Microsoft UI Automation Library
    Dr. James McCaffrey - February 2008
    James McCaffrey shows you how to get started with UI test automation using the new Microsoft UI Automation library.

  • Netting C++: EEK!—Time to Design the Mouse
    Stanley B. Lippman - December 2007
    This month begins the design of the actual mouse class for EEK!

  • Windows with C++: Windows Template Library 8.0
    Kenny Kerr - December 2007
    Kenny Kerr takes a look at Windows Template Library (WTL) support for new Windows Vista control enhancements, including task dialogs, Aero wizards, and open file dialogs.

  • Crash Course: Analyze Crashes to Find Security Vulnerabilities in Your Apps
    A. Abouchaev, D. Hasse, S. Lambert, and G. Wroblewski - November 2007
    Here the authors analyze program crashes to help you understand if you have the potential for read or write violations in your applications, and how they can lead to security vulnerabilities.

  • Windows with C++: Task Scheduler 2.0
    Kenny Kerr - October 2007
    The new Task Scheduler in Windows Vista can do so much more than previous versions. We introduce some basic concepts and building blocks you can put to use in your own scheduled task projects.

  • Netting C++: Describing the EEK!-osystem
    Stanley B. Lippman - October 2007
    This column crafts an XML document to hold the mouse environment simulation data and shows how to incorporate an XML file into the program using a DataSet.

  • Netting C++: Configuration with XML
    Stanley B. Lippman - August 2007
    Stanley B. Lippman explores the use of C++/CLI as a pure Microsoft .NET Framework-compliant language.

  • Windows with C++: Windows Vista Control Enhancements
    Kenny Kerr - August 2007
    With the release of Windows Vista, C++ developers will be happy to know there's plenty of magic left to perform. This new column will provide the necessary insight.

  • NTFS: Enhance Your Apps With File System Transactions
    Jason Olson - July 2007
    Presented here is an overview of Transactional NTFS and how it revolutionizes transactions.

  • Security: Applying Cryptography Using The CNG API In Windows Vista
    Kenny Kerr - July 2007
    Cryptography Next Generation (CNG) is meant to be a long-term replacement for the CryptoAPI, providing replacements for all of the cryptographic primitives it offered.

  • Speak Up: Support Dictation With Text Services Framework
    Eric Brown - July 2007
    Learn how to make your apps speech-aware by supporting Windows Speech Recognition and the Text Services Framework.

  • Bugslayer: Wait Chain Traversal
    John Robbins - July 2007
    Windows Vista has a new API called Wait Chain Traversal (WCT), which allows you to determine when and why a process is deadlocked. Read on.

  • C++: An Inside Look At The Next Generation Of Visual C++
    Tarek Madkour - June 2007
    The next version of Visual Studio (code-named “Orcas”) will help C++ developers take full advantage of the new capabilities in Windows Vista.

  • CONCURRENCY: Synchronization Primitives New To Windows Vista
    Robert Saccone and Alexander Taskov - June 2007
    Windows Vista has lots of goodies for native C++ developers including condition variables, slim reader/writer locks, and one-time initialization.

  • Netting C++: EEK! An Introduction
    Stanley B. Lippman - June 2007
    Stanley Lippman begins a look at using C++/CLI as a purely .NET-compliant language.

  • Security Briefs: Events in Windows Vista
    Keith Brown - May 2007

  • XmlLite: A Small And Fast XML Parser For Native C++
    Kenny Kerr - April 2007
    XmlLite provides a high-performance, low-overhead XML reader and writer geared for applications written in native C++. Learn more here.

  • Event Tracing: Improve Debugging And Performance Tuning With ETW
    Dr. Insung Park and Ricky Buch - April 2007
    Event Tracing for Windows (ETW) provides general-purpose, high-speed tracing of events raised by both user-mode applications and kernel-mode device drivers. Learn how ETW can improve your development and debugging work.

  • Netting C++: Mapping Templates to Generics
    Stanley Lippman - April 2007
    In this installment, Stanley Lippman continues to port his ISO-C++ Text Query Language application to the Microsoft .NET Framework and C++/CLI.

  • Netting C++: Mapping Native C++ to the Common Type System
    Stanley B. Lippman - February 2007
    This month Stanley Lippman begins translating the Text Query Language Query class hierarchy from C++ to the .NET Common Type System.

  • C++ at Work: Rationales, Highlights, and a Farewell
    Paul DiLascia - February 2007
    What's the deal with const functions, and lots more on the reasoning behind the design of the C++/CLI.

  • Desktop Security: Create Custom Login Experiences With Credential Providers For Windows Vista
    Dan Griffin - January 2007
    Why is a change to the Windows logon plug-in interface so exciting? Because with credential providers you can customize the logon experience for your users.

  • CLR Inside Out: Introduction to COM Interop
    Thottam R. Sriram - January 2007
    The CLR allows seamless interactions between Microsoft .NET applications and COM. But how, exactly? The CLR team knows.

  • Netting C++: The Design Space of the Common Type System
    Stanley B. Lippman - December 2006
    Stanley Lippman moves Text Query Language to the Microsoft .NET Framework using the C++/CLI language extensions in Visual C++ 2005.

  • Smart Storage: Protect Your Data Via Managed Code And The Windows Vista Smart Card APIs
    Dan Griffin - November 2006
    Smart cards are a compelling alternative to the reliance on passwords, which are the weakest link in authentication systems. Get the Windows smart card programming basics here.

  • SQL Security: New SQL Truncation Attacks And How To Avoid Them
    Bala Neerumalla - November 2006
    Exploits using SQL injection have drawn a lot of attention for their ability to get through firewalls and intrusion detection systems to compromise your data layers. Whether it's a first-order or second-order injection, if you look at the basic code pattern, it is similar to any other injection issue where you use untrusted data in the construction of a statement.

  • Netting C++: Introducing Regular Expressions
    Stanley B. Lippman - November 2006
    This month Stanley Lippman introduces the support for regular expressions in the .NET Framework.

  • C++ at Work: IRegistrar, Finding Submenus, and More
    Paul DiLascia - October 2006
    This month DLL problems, context menus, MFC strings to managed C++, and more.

  • C++ at Work: Create Dynamic Dialogs, Satellite DLLs, and More
    Paul DiLascia - September 2006
    This month Paul DiLascia teaches readers the right way to create dynamic dialogs, explains satellite DLLs and discusses language resource DLLs.

  • CLR Inside Out: CLR Hosting APIs
    Alessandro Catorcini and Piotr Puszkiewicz - August 2006
    By using the CLR 2.0 hosting APIs, developers of native hosts can execute managed code in-process with complete knowledge and control over how the CLR behavior can affect their application.

  • Netting C++: Resource Cleanup
    Stanley B. Lippman - August 2006
    Last time Stan Lippman did not consider the visibility of types and nondeterministic finalization in writing his TQL wrapper code. This month he rewrites the code.

  • C++ at Work: Addin a Combobox Cancel Feature
    Paul DiLascia - August 2006
    This month Paul DiLascia codes some Microsoft Office-style dialog box features.

  • Beyond WinFX: Transactions, Aero Wizards, And Task Dialogs In Windows Vista
    Kenny Kerr - July 2006

  • C++ at Work: Controlling Balloon Tips, and More
    Paul DiLascia - July 2006

  • Netting C++: The .NET Wrap
    Stanley B. Lippman - June 2006
    This month, we are changing the column name from Pure C++ to Netting C++ to better reflect our focus on Microsoft® . NET programming using C++/CLI, the . NET extensions to Visual C++® that are supported in Visual Studio® 2005.

  • C++ at Work: Managed Code in Visual Studio 2005
    Paul DiLascia - June 2006
    Many of you are no doubt in the process of upgrading to Visual Studio® 2005, so I thought now would be a good time to relate some of my own experiences with the new compiler. What took me so long? Hey, I'm a retro kind of guy! Better late than never!.

  • x64 Primer: Everything You Need To Know To Start Programming 64-Bit Windows Systems
    Matt Pietrek - May 2006

  • Mix And Match: Integrate Windows Forms Into Your MFC Applications Through C++ Interop
    Marcus Heege - May 2006

  • C++ at Work: Web Version Checking, Adding Sound to an App
    Paul DiLascia - May 2006
    This month: CWebVersion revisited using HTTP instead of FTP, and adding sounds to an MFC-based app.

  • Managed Spy: Deliver The Power Of Spy++ To Windows Forms With Our New Tool
    Benjamin Wulfe - April 2006
    Spy++ displays Win32 information such as window classes, styles, and messages. Now you can get that same functionality for managed code using our ManagedSpy. Get it here.

  • No More Hangs: Advanced Techniques To Avoid And Detect Deadlocks In .NET Apps
    Joe Duffy - April 2006
    You can combat deadlock using a combination of disciplined locking practices which Joe Duffy aptly explains in this article.

  • Built For Speed: Develop Turbocharged Apps For Windows Compute Cluster Server
    Rich Ciapala - April 2006
    This article explores the services provided by Compute Cluster Server 2003 and the tools provided by Visual Studio 2005 that will help you develop High-Perfomance Computing applications.

  • .NET Profiling: Write Profilers With Ease Using High-Level Wrapper Classes
    Joachim H. Fröhlich and Reinhard Wolfinger - April 2006
    Here Joachim H. Fröhlich and Reinhard Wolfinger show you how to get all the great functionality of the .NET Profiling API the easy way, with custom wrappers.

  • Pure C++: How Templates and Generics Work Together
    Stanley B. Lippman - April 2006
    I'm closing out this series of columns on generic programming in the Microsoft® . NET Framework by showing how templates and generics do and do not work together, and pointing out a pitfall with the current implementation of templates under Visual C++® 2005.

  • C++ at Work: Implement Triple-Click, Subclass the Main Window
    Paul DiLascia - April 2006

  • C++ at Work: Event Programming, Part 2
    Paul DiLascia - March 2006
    Last month I answered a question about implementing native events in C++ (see C++ At Work: Event Programming). I discussed events in general and showed how to use an interface to define event handlers for your class that clients must implement to handle events.

  • Pure C++: Live Source Browsing in Visual C++
    Boris Jabes and Ameya Limaye - February 2006
    If you're wondering where Stan Lippman is, we're happy to report that he has graciously granted us the use of his column this month to talk about some of the recent work the Visual C++ team has been doing to improve developer productivity.

  • C++ at Work: Event Programming
    Paul DiLascia - February 2006

  • C++ at Work: Installing a Hook, Strings in Managed C++, and More
    Paul DiLascia - January 2006

  • Pure C++: Hello, C++/CLI
    Stanley B. Lippman - Visual Studio 2005 Guided Tour 2006
    C++/CLI is a self-contained, component-based dynamic programming language that, like C# or Java, is derived from C++. In fact, you can look at it as a natural step in the evolution of C. Stanley Lippman, who was there from the beginning, provides some insight.

  • Pure C++: Reflecting on Generic Types
    Stanley B. Lippman - December 2005
    A funny thing happened to templates on their way to the common language runtime (CLR)—they lost their {type} identity. This is analogous to what happens with macros under native programs. Just as the C/C++ compilers have no awareness of macro preprocessor expansions, the CLR has no awareness of template instantiations.

  • C++ at Work: Layered Windows, Blending Images
    Paul DiLascia - December 2005

  • C++ at Work: Disabling Print Screen, Calling Derived Destructors, and More
    Paul DiLascia - November 2005

  • OpenMP and C++: Reap the Benefits of Multithreading without All the Work
    Kang Su Gatlin and Pete Isensee - October 2005
    Having more than one CPU core on a single chip makes a system with a processor with two cores operate just like a dual-processor computer, and a system with a processor with four cores operate like a quad-processor computer, so you get much better performance. But if your application does not take advantage of these multiple cores, you may not reap the benefits. OpenMP helps you create multithreaded C++ applications more quickly so the benefits of multithreading can be realized.

  • Pure C++: Invoking Generic or Function Templates
    Stanley B. Lippman - October 2005
    As I promised last time, in this month's column I'll walk through the process of defining and invoking a generic or template function under C++\CLI. A function template or a generic function begins with the template or generic keyword followed by its parameter list.

  • C++ at Work: Writing, Loading, and Accessing Plug-Ins
    Paul DiLascia - October 2005

  • C++ at Work: Copy Constructors, Assignment Operators, and More
    Paul DiLascia - September 2005

  • Pure C++: Generic Programming: Template Specialization
    Stanley B. Lippman - August 2005
    As I discussed in my last column, a param-eterized type that does more than simple storage and retrieval is constrained as to the acceptable types that may be safely bound to it (see Pure C++: CLR Generics Versus C++ Templates.

  • C++ at Work: Dialog Templates, RegexTest
    Paul DiLascia - August 2005

  • Debugging: Root Out Elusive Production Bugs with These Effective Techniques
    Matt Adamson - July 2005
    Errors happen. But in production, error logs often provide little or no help in pinpointing the exact line of code in which the problem originates. You can't usually isolate the root cause by modifying code in a production environment because recreating the exact same environment is very difficult due to the large number of potential software and hardware configurations. This article provides some concrete steps you can take to get at the heart of the problems in your production code.

  • C++ at Work: Enum Declarations, Template Function Specialization
    Paul DiLascia - July 2005

  • Security Briefs: Customizing GINA, Part 2
    Keith Brown - June 2005
    GINA, the Graphical Identification and Authentication component, is a part of WinLogon that you can customize or replace. Last month I introduced GINA customization; this month, I'm going to drill down to implement each of the GINA entry points.

  • Pure C++: CLR Generics Versus C++ Templates
    Stanley B. Lippman - June 2005
    Visual Studio® 2005 brings the type parameter model of generic programming to the Microsoft® . NET Framework. C++/CLI supports two type parameter mechanisms—common language runtime (CLR) generics and C++ templates.

  • C++ at Work: Counting MDI Children, Browsing for Folders
    Paul DiLascia - June 2005

  • Safe!: Repel Attacks on Your Code with the Visual Studio 2005 Safe C and C++ Libraries
    Martyn Lovell - May 2005
    When Visual Studio 2005 ships, it will include a major upgrade to the Visual C++ Libraries that was the result of a complete security review of the functions contained in the C Runtime Library, Standard C++ Library, ATL, and MFC. From that extensive review came the Safe C and C++ Libraries, which can improve the security and robustness of your apps.

  • Security Briefs: Customizing GINA, Part 1
    Keith Brown - May 2005
    Over the years I've had many people ask me to write about GINA, the Graphical Identification and Authentication component that serves as the gateway for interactive logons. This month I'll begin my coverage of this topic to help you get started if you're tasked to build such a beast.

  • C++ at Work: Unreferenced Parameters, Adding Task Bar Commands, and More
    Paul DiLascia - May 2005

  • Wrappers: Use Our ManWrap Library to Get the Best of .NET in Native C++ Code
    Paul DiLascia - April 2005
    By now you're probably used to reaching into the .NET Framework using Managed Extensions with your C++ code. But what do you do if you have legacy apps that use older versions of the compiler, or if you want to avoid some of the CLR requirements? Well, you can wrap Framework classes in a native way so you can use them in any C++/MFC app without /clr. Paul DiLascia shows you how.

  • Escape DLL Hell: Simplify App Deployment with ClickOnce and Registration-Free COM
    Dave Templin - April 2005
    DLL Hell that results from versioning conflicts is generally not a problem in .NET because components do not require registration, and are either totally isolated to an application or are managed in a well-defined side-by-side way with the help of the Global Assembly Cache. But if you're still using COM, wouldn't it be great if you could deploy your existing COM components using a model similar to the .NET Framework? In Windows XP, you can, and this article explains how.

  • Pure C++: Generic Programming Under .NET
    Stanley B. Lippman - April 2005
    Visual Studio® 2005 brings the type parameter model of generic programming to the Microsoft® . NET Framework. Parameterized types are, of course, standard fare for C++ programmers. So, for those who are unfamiliar with them, I'll give a brief introduction to generic programming in my next few columns.

  • C++ at Work: Form Validation with Regular Expressions in MFC
    Paul DiLascia - April 2005
    I thought I'd use this month's column to describe an interesting app I built using the RegexWrap library described in my article "Wrappers: Use Our ManWrap Library to Get the Best of . NET in Native C++ Code" in this issue.

  • Security Briefs: Access Control List Editing in .NET
    Keith Brown - March 2005
    Access control lists (ACLs) can be complex beasts, and user interfaces for editing them are incredibly tricky to implement properly. That's why I was really excited when Windows® 2000 shipped with a programmable ACL editor, shown in Figure 1.

  • C++ at Work: Making Static Links Keyboard-Capable, Launching URLs from Your App
    Paul DiLascia - March 2005

  • Editor's Note: C++, Plus...
    Joshua Trupin - February 2005
    How long have you been reading MSDN Magazine? Did you start picking it up five years ago? Ten years ago when we were Microsoft Systems Journal? Even longer? If you've been reading our publication for a decade or more, you've seen a lot of changes in what's considered "cutting edge" development.

  • Pure C++: Hello, C++/CLI
    Stanley B. Lippman - February 2005
    Welcome to my first column for MSDN®Magazine. I had actually written a completely different first column—one on the new generic programming support in Visual Studio® 2005. Reviewing it, though, I realized that it left far too many unanswered questions.

  • C++ at Work: Persisting View State Update, Using Managed Extensions in a DLL
    Paul DiLascia - February 2005
    This month marks the 11th anniversary of my column and the inauguration of a new title: C++ At Work. We're also adding a new bimonthly column, "Pure C++," by my pal Stan Lippman, one of the great C++ Masters.

  • C++ Rules: Power Your App with the Programming Model and Compiler Optimizations of Visual C++
    Kang Su Gatlin - January 2005
    Many programmers think that C++ gets good performance because it generates native code, but even if your code is completely managed you'll still get superior performance. In Visual Studio 2005, the C++ syntax itself has been greatly improved to make it faster to write. In addition, a flexible language framework is provided for interacting with the common language runtime (CLR) to write high-performance programs. Read about it here.

  • CLR Profiler: No Code Can Hide from the Profiling API in the .NET Framework 2.0
    Jay Hilyard - January 2005
    The common language runtime (CLR) profiling API makes available information about the application domains, assemblies, and classes that are loaded and used in a process, just-in-time (JIT) compiler notifications, memory usage tracking, tracing of events, exception tracking, managed to unmanaged code transitions, and the state of the runtime. And if that weren't enough, you will find a nicely enhanced profiling API in the .NET Framework 2.0. Find out what's coming up in this next version.

  • Interop: Get Seamless .NET Exception Logging From COM Clients Without Modifying Your Code
    Matt Adamson - January 2005
    Using .NET objects from ASP can help you gain experience with the .NET Framework before migrating to ASP.NET. Your ASP pages will make use of the new .NET components through COM-callable wrappers (CCW). But how will you handle exceptions? This article fills you in.

  • Interop: Get Seamless .NET Exception Logging From COM Clients Without Modifying Your Code
    Matt Adamson - January 2005
    Using .NET objects from ASP can help you gain experience with the .NET Framework before migrating to ASP.NET. Your ASP pages will make use of the new .NET components through COM-callable wrappers (CCW). But how will you handle exceptions? This article fills you in.

  • C++ Q&A: Sending Keystrokes to Any App, Calling .NET from an MFC App, and More
    Paul DiLascia - January 2005

  • C++ Q&A: Deleting Managed Objects, Wrapping a Library, and More
    Paul DiLascia - December 2004

  • App Lockdown: Defend Your Apps and Critical User Info with Defensive Coding Techniques
    Kenny Kerr - November 2004
    Whether you're storing database connection strings, user credentials, or logon info, you'll need to practice good defensive programming techniques to avoid those surprise situations in which your data is exposed. In this article, author Kenny Kerry shows you how.

  • C++ Q&A: Calling Virtual Functions, Persisting View State, POD Type
    Paul DiLascia - November 2004

  • .NET Internals: Examine Running Processes Using Both Managed and Unmanaged Code
    Christophe Nasarre - October 2004
    There are plenty of times when you need to get information on running processes, not the least of which is during performance tuning. Using the techniques in this article and special .NET classes you'll see how to get a process' ID, name, priority, number of threads, kernel handle, and memory consumption, as well as its user-mode, kernel-mode, and total elapsed running time and put them to use in a custom app called AssemblyBrowser.

  • C++ Q&A: Create Client Windows, Drag and Drop Between Listboxes
    Paul DiLascia - October 2004

  • C++ Q&A: Performance Monitoring, Managed Extensions, and Lock Toolbars
    Paul DiLascia - September 2004
    In the June 2004 issue of MSDN®Magazine, I described a class called ShowTime that you can use to do simple performance monitoring for your app. ShowTime uses its constructor/destructor to record the start/stop times of its existence so you can instantiate it in a block of code like so: { ShowTime st(_T("Total time is:")); // some lengthy operation } .

  • C++ Q&A: GetKeyState, the STL String Class, Exposing C++ Objects, and More
    Paul DiLascia - August 2004

  • C++ Q&A: Message Values, Managed String Literals, Obfuscating Code, and More
    Paul DiLascia - July 2004

  • { End Bracket }: What Makes Good Code Good?
    Paul DiLascia - July 2004
    When MSDN Magazine asked me to write a page on something I care about, I said, "You mean, like abolishing taxes, car phones, and SUVs?" Alas, they meant something to do with programming. Well! After pondering, I realized that something I care about is writing good code.

  • C++ Q&A: Performance Optimization, Controls versus Components
    Paul DiLascia - June 2004

  • C++: Write Faster Code with the Modern Language Features of Visual C++ 2005
    Stephen Toub - May 2004
    The next version of Visual C++ has a new syntax that is both elegant and powerful. It has new optimization technology that has improved the speed of Microsoft. It has new compilation modes that ensure Common Language Infrastructure compliance and verifiability for the .NET Framework, and it has new models for interop. In this article Stephen Toub explains these and other improvements to Visual C++.

  • C++ Q&A: Updating Views in MFC, Spying on Events in the .NET Framework
    Paul DiLascia - May 2004

  • Testing: Perform Code Coverage Analysis with .NET to Ensure Thorough Application Testing
    James McCaffrey - April 2004
    When running your tests how do you know which parts of your product code are actually executed and tested? This article presents a complete system called Fundamental Function code coverage that operates at the method level. The author gives an overview of the system so you can understand code coverage principles, explains the key parts of the underlying code, and discusses how code coverage fits into the overall product development cycle. After reading this article you will be able to perform code coverage analysis on any .NET software system.

  • C++ Q&A: CD Burning and Device Discovery with IMAPI
    Paul DiLascia - April 2004

  • Timers: Implement a Continuously Updating, High-Resolution Time Provider for Windows
    Johan Nilsson - March 2004
    The timestamps that you can obtain from Windows NT are limited to a maximum resolution of 10 or 15 milliseconds, depending on the underlying hardware. At times, such as when you need to timetag frequent events, it is desirable to achieve a higher resolution. For example, what if you want to be able to contact a thread or perform some other task at intervals more frequent than 10 milliseconds? Suggested ways of achieving better resolution include using performance counters in conjunction with the sytem time to calculate smaller time increments. But using performance counters is a technique that presents its own problems. This article shows one possible way of overcoming limitations inherent in this approach.

  • ISA Server 2004: Developing an Application Filter for Microsoft Internet Security and Acceleration Server 2004
    Yigal Edery - March 2004
    The beta version of Internet Security and Acceleration (ISA) Server 2004 is now publicly available. It includes a rich SDK with several extensibility mechanisms that allow third parties to integrate their specialized solutions on top of the ISA platform. In this article, the author explores the application filter extensibility mechanism, which enables you to add high-level application layer filtering capabilities to ISA Server and to provide rich content filtering solutions. He also highlights the new features of the ISA Server 2004 SDK, then moves on to describe how to develop a basic application filter that monitors all data going through the ISA Server, and how to integrate a filter into the ISA Server management console to create a seamless interface experience for your users.

  • C++ Q&A: List View Mode, SetForegroundWindow, and Class Protection
    Paul DiLascia - March 2004

  • The ASP Column: Web Services: ATL Server Versus ASP.NET
    George Shepherd - February 2004

  • C++ Q&A: Color Support, Console Apps, and Saving User Settings
    Paul DiLascia - February 2004

  • C++ Q&A: Get Logical Drives with VolInfo, Modifying the System Menu
    Paul DiLascia - January 2004

  • Threading: Break Free of Code Deadlocks in Critical Sections Under Windows
    Matt Pietrek and Russ Osterlund - December 2003
    Critical sections, a mechanism that prohibits more than one thread at a time from executing a particular section of code, is a topic that has not received much attention and thus tends not to be well understood. A solid understanding of critical sections in Windows can really come in handy when you need to track down multithreading performance issues in your code. This articles delves under the hood of critical sections to reveal information useful in finding deadlocks and in pinpointing performance problems. It also includes a handy utility program that shows all of your critical sections and their current states.

  • Beyond Macros: Create Word and Excel Smart Documents with C++ and XML
    Mike Kelly - December 2003
    One of the coolest new parts of Office 2003 is a programmability feature called Smart Documents, which allows developers to augment Word and Excel documents with programmable content and behavior. Typically, examples illustrating Office programmability use Visual Basic or Visual Basic .NET. In this article, the author develops a Smart Document for Excel using C++. He describes the new ISmartDocument interface and shows how to use it to manage a simple task list such as an Excel spreadsheet.

  • C++ Q&A: Docking the Menu Bar, Abstract Classes vs. Interfaces, and More
    Paul DiLascia - December 2003

  • Review It: Expert Tips for Finding Security Defects in Your Code
    Michael Howard - November 2003
    Reviewing code for security defects is a key ingredient in the software creation process, ranking alongside planning, design, and testing. Here the author reflects over his years of code security reviews to identify patterns and best practices that all developers can follow when tracking down potential security loopholes. The process begins by examining the environment the code runs in, considering the roles of the users who will run it, and studying the history of any security issues the code may have had. After gaining an understanding of these background issues, specific vulnerabilities can be hunted down, including SQL injection attacks, cross-site scripting, and buffer overruns. In addition, certain red flags, such as variable names like "password", "secret," and other obvious but common security blunders, can be searched for and remedied.

  • The ASP Column: ATL Server Versus ASP.NET
    George Shepherd - November 2003

  • Bugslayer: Google from Visual Studio .NET
    John Robbins - November 2003

  • C++ Q&A: Menu Tips in an MFC App
    Paul DiLascia - November 2003

  • C++ Q&A: Getting a Menu Handle, Declaring GetParam, and Filtering File Names
    Paul DiLascia - October 2003

  • .NET Internals: Rewrite MSIL Code on the Fly with the .NET Framework Profiling API
    Aleksandr Mikunov - September 2003
    In this article, the author shows how to dynamically rewrite Microsoft Intermediate Language code on the fly using the Profiling API of the CLR. Unlike approaches based on Reflection.Emit, this scheme works with the existing assemblies and doesn't require the creation of proxy or dynamic assemblies. The need for IL code rewriting emerges when you want to make your changes transparent to the client and preserve the identity of classes. This technique can be used for creation of interceptors, pre- and post-processing method calls, and code instrumentation and verification.

  • Coroutines: Implementing Coroutines for .NET by Wrapping the Unmanaged Fiber API
    Ajai Shankar - September 2003
    Coroutines are a powerful feature of many programming languages including CLU, Scheme, Python, Ruby, and ICON. Coroutines can save processor overhead and reduce redundancy because they allow you to stop execution of a procedure midstream, return a value, and resume exactly where the procedure left off.This article shows how coroutines can be implemented for the .NET Framework by using the Fiber API and Managed Extensions for C++, and how they can be easily used with other .NET-compliant languages. This article also shows a sophisticated use of the runtime host for running multiple managed threads on a single OS thread.

  • Visual C++ 6.0: Don't Let Memory Allocation Failures Crash Your Legacy STL Application
    James Hebben - September 2003
    Most C++ developers make extensive use of the Standard Template Library (STL) in their code. If you are one of them and are using STL and Visual C++ 6.0 directly out of the box, your application is at high risk of crashing under low memory conditions. The problem arises because checking for failure of operator new is such an uncommon practice. To make things worse, when new does fail, the response is not standard. Some language compilers return NULL while others throw an exception.In addition, if you are using STL in an MFC project, be aware that MFC has its own set of rules. This article discusses these problems, explains how the default behavior has changed in Visual C++ .NET 2003, and outlines the changes you must make if you're using Visual C++ 6.0 so that you can safely use the STL when operator new fails.

  • Cutting Edge: Managing Your Remote Windows Clipboard
    Dino Esposito - September 2003

  • C++ Q&A: Retrieving Hidden Path Names, Mouse Events in C#
    Paul DiLascia - September 2003

  • DCOM Interop: Generate Custom Managed C++ Wrappers for Easier COM Interoperation Using DCOMSuds
    Vishwas Lele - August 2003
    Now that you're writing managed code, you'll certainly want to use your existing COM components, but you can't simply call them directly. Instead, you have to wrap the COM component in a runtime-callable wrapper that acts as a proxy between the component and your managed code. While the CLR provides wrapper classes for this purpose, there will be times when you'll want custom objects to wrap your COM components. One way to get the low-level access you need to precisely control resource cleanup, pass security information, and get access to CLR features is to write your own wrapper class in managed C++. This article shows you how.

  • C++ Q&A: Finding a Win32 Handle, HTML in CHtmlCtrl
    Paul DiLascia - August 2003
    This month Paul DiLascia discusses how to find windows with GetLastChild and outputting HTML with a C++ procedure equivalent to document.write.

  • C++ Q&A: Parent and Child Window Captions, More MoveDlg
    Paul DiLascia - July 2003

  • Windows Server 2003: Discover Improved System Info, New Kernel, Debugging, Security, and UI APIs
    Matt Pietrek - June 2003
    There's a lot to say about Windows Server 2003. First of all, it's the first operating system with built-in .NET Framework support, and it's the first 64-bit OS from Microsoft. But wait, there's more! There are lots of new features and APIs in this version as well. For instance, Windows Server 2003 features Hot Add Memory and a number of other arcane new tidbits. There are new APIs for handling threads, directories, and files, and new features like the low fragmentation heap for managing memory and system information. There's vectored exception handling and new UI APIs as well.OS internals expert Matt Pietrek takes a look at the additions he finds most interesting and useful so you'll have a good place to start when you dive into Windows Server 2003.

  • Smart Cleanup: Achieve More Reliable Resource Management with Our Custom C++ Classes
    Eric Niebler - June 2003
    Managing resources in C++ is not easy. When you're unsuccessful, your app can leak all kinds of resources including file system handles, database connections, and, of course, memory. Even in garbage-collected languages like Managed C++, resource management is difficult because garbage collection only deals with memory management, not the other resources that cause performance problems.In this article, the author describes the SmartAny template library he created, which uses a policy-based approach to dynamic resource management. Readers will learn how to use the SmartAny classes and policies to ensure the proper cleanup of their resources, be they files, OS handles, or native and unmanaged objects.

  • C++ Q&A: Locking Column Headers, Implementing Singleton Classes
    Paul DiLascia - June 2003
    Prevent the sizing of the column headers in an ATL composite control. Also, see how you can share a small amount of simple data among multiple processes running on the same machine without Remoting.

  • C++ Q&A: Window Destruction in the .NET Framework
    Paul DiLascia - May 2003
    If a window is destroyed, does the .NET Framework immediately destroy the corresponding Form, or does it wait until a garbage collection to do this? How can you release my resources as soon as the window is destroyed? This month Paul DiLascia gives you the answers.

  • Security Briefs: Exploring S4U Kerberos Extensions in Windows Server 2003
    Keith Brown - April 2003
    Building Web sites that provide services external to the corporate firewall is tricky. Usually it's not desirable to grant corporate domain accounts to external clients, and from a purely practical standpoint Kerberos does not work well over the Internet due to the typical configuration of client-side firewalls.

  • C++ Q&A: Desktop Location, sscanf Equivalents in C#, and More
    Paul DiLascia - April 2003

  • Visual C++ .NET: Language Enhancements and Simplified GUI Development Enrich Your C++ Apps
    Richard Grimes - March 2003
    Managed Extensions for C++ is the preferred programming language for developing Windows Services. Visual Studio .NET 2003 introduces C++ support for designers, providing all the RAD facilities that were available to other languages for developing forms, controls, components, and DataSets. Furthermore, support has been added for the creation of verifiable assemblies with C++.In this article, the author reviews these additions as well as the new compiler and linker switches, demonstrating how C++ remains the premier systems language while becoming a powerful tool for .NET GUI development as well.

  • Windows Forms: .NET Framework 1.1 Provides Expanded Namespace, Security, and Language Support for Your Projects
    Chris Sells - March 2003
    With the much-anticipated release of the .NET Framework 1.1, developers are eager to know what's been added to their programming bag of tricks. In this article, the author focuses on new developments in Windows Forms, such as namespace additions, support for hosting managed controls in unmanaged clients, and designer support for C++ and J#. Integrated access to the Compact Framework and new mobile code security settings also make this release noteworthy. Along with these features, the author reviews the best ways to handle multiple versions of the common language runtime and highlights some potential pitfalls.

  • Smartphones: Design Robust Apps that Take Advantage of Windows CE-powered Smartphone Devices
    Chris Dellinger - March 2003
    Smartphone applications promise to be at the crest of a new wave of cell phone advances as the familiar process of using Microsoft dev tools can produce cutting-edge mobile phone applications. Because Smartphones are Windows-powered devices, developers can easily and inexpensively extend both new and time-tested business applications to mobile users. These applications will possess the necessary levels of enterprise functionality while integrating mobile phone features through the use of several easy to use APIs. This article looks at the basics of building a real-world business application for the Smartphone.

  • C++ Q&A: Find Icons, Launch an App from List Control, and More
    Paul DiLascia - March 2003

  • C++ Q&A: Singleton Class Private Constructor, C# Singleton Class, and More
    Paul DiLascia - February 2003

  • Design: Inspect and Optimize Your Program's Memory Usage with the .NET Profiler API
    Jay Hilyard - January 2003
    Developers using .NET often make memory leak tracking a low priority because the common language runtime takes care of garbage collection. What few developers realize, however, is that their objects' lifespans, along with their size and what other objects have been instantiated, all affect how they are cleaned up. Depending on the particular circumstances, these combinations can negatively affect performance, especially over the lifetime of an application. This article presents a way for developers to see memory usage and understand garbage collection using the .NET Profiler API. Along the way, a sample application to demonstrate these principles is built.

  • Debug: Detect and Plug GDI Leaks in Your Code with Two Powerful Tools for Windows XP
    Christophe Nasarre - January 2003
    In a previous article, the author devised a simple method to detect Graphical Device Interface (GDI) objects that are not properly released by Win32-based applications on Windows 9x platforms. Because some newer versions of Windows require a slightly different approach to GDI leaks, the author has updated his techniques for those operating systems. He builds and explains two tools designed to detect and eradicate GDI leaks in applications running on Windows XP, Windows 2000, and Windows NT.

  • .NET Column: Safe Thread Synchronization
    Jeffrey Richter - January 2003
    By far, the most common use of thread synchronization is to ensure mutually exclusive access to a shared resource by multiple threads. In the Win32® API, the CRITICAL_SECTION structure and associated functions offers the fastest and most efficient way to synchronize threads for mutually exclusive access when the threads are all running in a single process.

  • C++ Q&A: Progress Indicator in the Status Bar, International UI Terms
    Paul DiLascia - January 2003

  • C++ and ATL: Use ATL Server Classes to Expose Your Unmanaged C++ Code as an XML Web Service
    Kirk Fertitta and Chris Sells - December 2002
    Throughout this issue, you'll read all about the promise of Web Services and how the .NET Framework enables Web Service development. Many people will also be building their Web Services atop C++ code and frameworks like ATL Server, particularly when performance is paramount. In this article, the authors show how fully functional Web Services are built using ATL Server and Visual Studio .NET. Beginning with unmanaged C++ classes, they add ATL attributes that make the code work over HTTP.

  • C++ Q&A: Full Screen Display and Implementing Drag to Move Dialogs
    Paul DiLascia - December 2002

  • CLR Debugging: Improve Your Understanding of .NET Internals by Building a Debugger for Managed Code
    Mike Pellegrino - November 2002
    With the release of .NET, the Microsoft scripting strategy has evolved. Script engines can now compile or interpret code for the Microsoft common language runtime (CLR) instead of integrating debugging capabilities directly into apps through Active Scripting. With that change comes a new set of published services for including debugging functionality in a custom host application. You'll see how to use the debugging services published in the .NET Framework to create a full-featured CLR debugger that allows you to set breakpoints, view call stacks, browse variables, view processes, enumerate threads, and perform other important debugging tasks.

  • C++ Q&A: System Tray Balloon Tips and Freeing Resources Quickly in .NET
    Paul DiLascia - November 2002

  • C++ Q&A: Getting Version Info, CFolderTabCtrl Revisited
    Paul DiLascia - October 2002

  • Security Tips: Defend Your Code with Top Ten Security Tips Every Developer Must Know
    Michael Howard and Keith Brown - September 2002
    There are many ways to get into trouble when it comes to security. You can trust all code that runs on your network, give any user access to important files, and never bother to check that code on your machine has not changed. You can run without virus protection software, not build security into your own code, and give too many privileges to too many accounts. You can even use a number of built-in functions carelessly enough to allow break-ins, and you can leave server ports open and unmonitored. Obviously, the list continues to grow. What are some of the really important issues, the biggest mistakes you should watch out for right now so that you don't compromise your data or your system? Security experts Michael Howard and Keith Brown present 10 tips to keep you out of hot water.

  • C++ Q&A: Typename, Disabling Keys in Windows XP with TrapKeys
    Paul DiLascia - September 2002

  • ASP.NET: Intercept, Monitor, and Modify Web Requests with HTTP Filters in ISAPI and ASP.NET
    Panos Kougiouris - August 2002
    There can be many reasons to reroute incoming Web requests. For instance, sometimes it's necessary to redirect a browser to a page based on user criteria without passing long lists of parameters in the URL. In the past, the only way to intercept such page requests and send them elsewhere was with ISAPI. Now, in ASP.NET, the IHttpModule interface provides notification of server requests, and lets you easily reroute them based on criteria other than browser type or version. Here the author demonstrates the use of IHttpModule for interception and explains the use of ISAPI filters for anyone who isn't yet using ASP.NET.

  • Windows XP: Escape from DLL Hell with Custom Debugging and Instrumentation Tools and Utilities, Part 2
    Christophe Nasarre - August 2002
    Building on his article published in the June issue, which demonstrated several ways to get process and DLL-related information from APIs such as PSAPI, NTDLL, and TOOLHELP32, the author presents some unusual ways to get system-oriented info that you can easily integrate in your own toolkit. There are three tools included as samples: LoadLibrarySpy, which monitors an application and detects which DLLs are really loaded; WindowDump, which retrieves the content and a detailed description of any window; and FileUsage, which redirects console-mode applications to tell you which process is using any opened file.

  • SENS: System Event Notification Services and WMI Enable Flexible, Efficient Mobile Network Computing
    Aspi Havewala - August 2002
    Networked applications must deal with a host of connection problems ranging from timeouts to congestion to unavailability. If these applications can check the current connection status and, when disconnected, cache transmissions, they become more efficient. Fortunately, both the System Event Notification System (SENS) and Windows Management Instrumentation (WMI) can send notifications to keep applications informed of network status. In this article, the author explains the use of several SENS interfaces, including ISensNetwork and ISensLogon, which trigger events for connects/disconnects and logons/logoffs, respectively. The author then shows how you can subscribe to each of these events, and follows with a discussion of when you might use WMI events instead.

  • The ASP Column: Code-behind in ASPX Files
    George Shepherd - August 2002

  • C++ Q&A: Call Unmanaged DLLs from C#, Killing Processes Cleanly
    Paul DiLascia - August 2002

  • Rotor: Shared Source CLI Provides Source Code for a FreeBSD Implementation of .NET
    Jason Whittington - July 2002
    With over 9,000 files, and including some 1300 public classes to pore through, the Shared Source CLI can teach you quite a bit about the internal workings of the CLR. But the sheer amount of source code included can make just starting your exploration a monumental task. This article discusses some of the things you can learn from the source code facsimile of the CLR, like how JIT compilation works. It will also help you understand how to control execution along with debugging and loading classes. A walk through the steps involved in setting up the runtime will let you become familiar with the process.

  • DirectShow: Core Media Technology in Windows XP Empowers You to Create Custom Audio/Video Processing Components
    Michael Blome and Mike Wasson - July 2002
    DirectShow is an API that enables Windows applications to control a wide variety of audio/video input devices including (but not limited to) DV camcorders, Web cams, DVD drives, and TV tuner cards. It provides out-of-the-box support for a variety of formats, from WAV and AVI to Windows Media. DirectShow is also extensible, enabling third parties to support their own specialized devices, formats, or processing components. This article introduces the basic concepts behind DirectShow and gives a step-by-step tutorial showing how to create your own video effect filter.

  • C++ Q&A: Get the Main Window, Get EXE Name
    Paul DiLascia - July 2002

  • Windows XP: Escape from DLL Hell with Custom Debugging and Instrumentation Tools and Utilities
    Christophe Nasarre - June 2002
    DLL conflict problems can be tough to solve, but a large number of tools are available to help. There are also many Windows APIs that you can use to build custom debugging tools. Three such tools are discussed here and provided as samples. DllSpy lists all the DLLs loaded in the system and the processes that are using them. ProcessSpy enumerates the running processes and exposes the DLLs they are using, and ProcessXP displays the list of concurrent running sessions for Windows XP.

  • C++ Q&A: Commas, Pseudocode, Operator =, and More
    Paul DiLascia - June 2002

  • Under the Hood: Link-time Code Generation
    Matt Pietrek - May 2002

  • C++ Q&A: Ctrl Keys in MFC, Function Overloading, Checking for Null
    Paul DiLascia - May 2002

  • COM+ 1.5: Discover Powerful Low-Level Programming in Windows XP with New COM+ APIs
    Craig Andera and Tim Ewald - April 2002
    The new version of COM+ that ships as part of Windows XP includes APIs for low-level context programming. These functions allow you to create contexts that use COM+ runtime services, independent of objects and without registering anything in the COM+ Catalog. Designed for advanced COM+ developers who understand the COM+ context model, these APIs make it easy to integrate runtime services with code in nonstandard ways. This article explains how these low-level context APIs work, discusses when you'd want to use them, and provides a .NET-based wrapper to make it simpler to use the APIs from C#.

  • SOAP: Using ATL Server to Build an Asynchronous SOAP Client in Unmanaged C++
    Pranish Kumar and Bogdan Crivat - April 2002
    SOAP opens up a new world of Web Services, letting you make function calls across a network or the Internet. But this flexibility creates new problems when your app needs to wait for calls to return from halfway around the world. What you need is an asynchronous SOAP client that takes advantage of threading to continue execution while waiting for calls over the wire. This article covers the basics of building such a client with ATL.

  • C++ Q&A: Launching Internet Explorer, Getting CD-ROM Drive Names with ListDrives, and More
    Paul DiLascia - April 2002

  • AOP: Aspect-Oriented Programming Enables Better Code Encapsulation and Reuse
    Dharma Shukla, Simon Fell, and Chris Sells - March 2002
    Aspect-oriented Programming (AOP), a paradigm invented at Xerox PARC in the 1990s, lets the developer better separate tasks that should not be inextricably tangled, such as mathematical operations and exception handling. The AOP approach has a number of benefits. First, it improves performance because the operations are more succinct. Second, it allows programmers to spend less time rewriting the same code. Overall, AOP enables better encapsulation of distinct procedures and promotes future interoperation.

  • Under the Hood: Improved Error Reporting with DBGHELP 5.1 APIs
    Matt Pietrek - March 2002

  • Bugslayer: Tester Utility, Take 3: Adding Mouse Recording and Playback
    John Robbins - March 2002

  • C++ Q&A: Do You Have a License for that GIF? PreSubclassWindow, EOF in MFC, and More
    Paul DiLascia - March 2002

  • Visual C++ .NET: Tips and Tricks to Bolster Your Managed C++ Code in Visual Studio .NET
    Tomas Restrepo - February 2002
    Developers using the Managed Extensions for C++ have more options than those using other languages because C++ is a lower-level language. However, this means an increase in code complexity. This article discusses a few of the more complex issues facing developers, such as operator overloading, managed types and unmanaged code, and boxing. Also covered are the is operator, the using statement, and string conversions. The author points out the flexibility of Managed Extensions for C++ and outlines the additional effort that is required for you to take advantage of its increased power and flexibility.

  • Still in Love with C++: Modern Language Features Enhance the Visual C++ .NET Compiler
    Stanley B. Lippman - February 2002
    Programmers who have been using C++ for years are wondering where their language is headed with the advent of C# and Microsoft .NET. This article sketches a roadmap of C++ as it is used in the world of .NET. In .NET there are two approaches to C++ code: managed and unmanaged. Unmanaged code doesn't use the CLR, while managed code involves the use of Managed Extensions for C++. This discussion explains both approaches.

  • House of Web Services: The Continuing Challenges of XML Web Services
    Don Box - February 2002

  • C++ Q&A: Getting a Class Name, ImgView Revisited, GetModuleFileName, and More
    Paul DiLascia - February 2002

  • C++ Q&A: OpenDlg Fixes Preview Problems
    Paul DiLascia - January 2002

  • Generative Programming: Modern Techniques to Automate Repetitive Programming Tasks
    Chris Sells - December 2001
    Even when developers have recurring computer-readable metadata to process and a clear idea of how code should be structured, they can still find themselves in need of a technique to automatically generate the code to avoid the drudge work of repeatedly writing and tweaking it. Generative programming is a technique that addresses this problem. Using generative programming techniques, you can solve software engineering problems in families, rather than individually, saving time and coding effort. This article describes these techniques, and builds a sample template-driven code generator. The article also lists existing utilities that have been built with generative programming techniques, as well as actual code generators.

  • Pocket PC: MSMQ for Windows CE Brings Advanced Windows Messaging to Embedded Devices
    Bob Hartman - December 2001
    Handheld devices are becoming increasingly important nodes on wireless networks, allowing their users to connect to data stores and other central server applications over the network. But wireless network connections can be unreliable, requiring the use of store-and-forward messaging that does not need to maintain a continuous connection. Microsoft Message Queue (MSMQ) has supplied these features to desktop machines, and there is now a version for handheld devices. MSMQ for Windows CE allows users of embedded devices to perform tasks such as remote order processing and inventory update without worrying about the state of their connection. The benefits of MSMQ for Windows CE and how to install and run the service is covered here.

  • Under the Hood: The .NET Profiling API and the DNProfiler Tool
    Matt Pietrek - December 2001

  • C++ Q&A: Stopping Screen Savers, Detecting Screen Resolution, Adding Status Bar Buttons
    Paul DiLascia - December 2001

  • Windows XP Overview: Take Advantage of New Windows XP Features in Your Apps Today
    Douglas Boling - November 2001
    Windows XP includes both improvements to the operating system and several new features that enhance the user experience. The most noticeable change in Windows XP is the user interface, which includes a revised Start menu and updated Task Bar. The new look is possible because Windows XP can be skinned, which lets the interface be changed dramatically with a new facility called themes. Windows XP also introduces fast user switching, which allows multiple users to be logged onto their own sessions at the same time on the same machine and, as the name implies, they can switch back and forth quickly. Another new feature, ClearType, is discussed here as well.

  • Beyond Windows XP: Get Ready Now for the Upcoming 64-Bit Version of Windows
    Stan Murawski - November 2001
    In this article the author modifies an industry standard middle-tier application server benchmark called Nile. The goal was to get it to build and run correctly on the 64-bit edition of the Microsoft .NET Advanced Server running on computers with Intel Itanium processors and still build as a 32-bit version to run on Pentium class x86 processors. While modifying Nile, the author discovered some of the tips he presents here. As the article explains, when modifying code for 64-bit Windows, data types are the key to success. The article discusses which types to use and when, along with new data types and the importance of memory alignment.

  • .NET CLR Profiling Services: Track Your Managed Components to Boost Application Performance
    Anastasios Kasiolas - November 2001
    The Microsoft .NET platform provides you with a rich set of services for building profilers and application monitors for applications targeting the Common Language Runtime (CLR). These services expose runtime events that occur during the execution of a .NET application. They can be used to obtain information about managed code being executed under the runtime. This article describes the .NET CLR Profiling Services and shows how to use the services to build a simple profiler that will provide hot spot information for any .NET application. The sample profiler can easily be modified to suit other profiling and monitoring needs.

  • Under the Hood: TypeRefViewer Utility Shows TypeRefs and MemberRefs in One Convenient GUI
    Matt Pietrek - November 2001

  • C++ Q&A: Understanding CControlView, Changing Scroll Bar Color in MFC Apps
    Paul DiLascia - November 2001

  • MSLU: Develop Unicode Applications for Windows 9x Platforms with the Microsoft Layer for Unicode
    Michael Kaplan and Cathy Wissink - October 2001
    The Microsoft Layer for Unicode (MSLU) provides Unicode support on Windows platforms that don't provide their own support, including Windows 98, Windows 95, and Windows Me. With MSLU you can write Unicode applications easily for these platforms. MSLU is simple to install, small (even though it wraps more than 400 APIs), and easy on system resources. This article explains the design criteria behind MSLU and how to put the layer to work for you.

  • ISAPI Extensions: Creating a DLL to Enable HTTP-based File Uploads with IIS
    Panos Kougiouris - October 2001
    The MIME-compliant content type, called multipart/form-data, makes writing HTML that uploads files almost trivial. On the server side though, ASP does not have a way to access data in the multipart/form-data format. The most flexible way to access the uploaded file is through a C++ ISAPI Extension DLL. This article describes a reusable ISAPI extension DLL that allows you to upload images and files without writing C++ code. It is coupled with a few COM components that make it readily reusable for ASP development. With .NET, this whole process is much easier, and this article shows preliminary code that uploads files using ASP.NET features.

  • Win32 Resources: Using C++ to Programmatically Retrieve a Global Cursor's Shape and ID
    Dmitri Klementiev - October 2001
    Getting global cursor information is useful when developing software that drives or gathers information about other UI-based applications, including information about a remote machine. This article describes a way to programmatically identify the current cursor's ID and bitmap at any point in time. The first technique described is based on polling for information and shows how to get the handle of the current global cursor. This handle will then allow you to get information about the cursor. You can also monitor WinEvents for changes to the global cursor.

  • ISAPI Filters: Designing SiteSentry, an Anti-Scraping Filter for IIS
    Rodney Bennett - October 2001
    The Microsoft Internet API for IIS, ISAPI, sits between the client and the Web server. Therefore, you can access the HTTP data stream before IIS gets to see it. The project in this article takes advantage of the ISAPI architecture to create a filter that monitors access to a Web site to determine if visits are from typical users or from automated processes designed to pilfer information from your site. The author tracks the regularity of visits to the site to determine the likely source. Once the determination is made, the app either redirects the user or continues to track information about those hits.

  • C++ Q&A: Displaying a JPG in your MFC Application
    Paul DiLascia - October 2001

  • Windows Management Instrumentation: Create WMI Providers to Notify Applications of System Events
    J. Andrew Schafer - September 2001
    Windows Management Instrumentation (WMI) is based on an industry-wide standard for notifications used to manage objects and devices across a network. By receiving WMI events, an application can be notified of changes to data in WMI itself. This allows the developer to notify the consuming application that certain system configuration data has changed, without the application having to poll WMI continuously for this data. The author presents an explanation of the different types of events in WMI, then goes on to develop an event provider.

  • Under the Hood: New Vectored Exception Handling in Windows XP
    Matt Pietrek - September 2001

  • C++ Q&A: Disabling Context Menus, Sending Commands to Doc Objects
    Paul DiLascia - September 2001

  • Windows XP: Make Your Components More Robust with COM+ 1.5 Innovations
    Juval Lowy - August 2001
    The next version of COM+, COM+ 1.5, offers many improvements over COM+ 1.0. A comprehensive user interface that displays more data for each application as well as complete support for legacy components make the management of existing applications easier and more efficient. Enhanced queueing support provides more flexibility for managing queued calls, and pooling and recycling means better application lifetime management. Application partitioning in COM+ 1.5 surpasses that offered in COM+ 1.0, and transaction isolation can be configured for safer transactions. COM+ 1.5 also allows you to expose any COM+ component as a Web service, as long as it meets certain criteria. This article discusses these and other new features in COM+ 1.5 that take care of much of the plumbing code, allowing developers to concentrate on business components.

  • Fax Services: Send Any Printable File From Your Program in Windows 2000
    Marcin Kaluza - August 2001
    All versions of Windows 2000 have fax services built in, so sending faxes manually is as easy as setting fax options from the control panel. Faxes can also be sent programmatically in Windows 2000 using either COM Automation or the standard C API. The example in this article uses COM Automation with Visual Basic and MFC to programmatically manage faxing. The objects used for fax transmission, such as the FaxServer and FaxDoc objects, as well as their properties and methods, are explained. Because faxing of files you can't print can be problematic, this process is explained. Finally, this article implements a fax routing extension-a plug-in that exports standard functions and implements routing methods for processing received faxes.

  • Multiprocessor Optimizations: Fine-Tuning Concurrent Access to Large Data Collections
    Ian Emmons - August 2001
    Application performance involves more than just speed. In a Web server environment, top performance also means ensuring that the maximum numbers of users can be served concurrently. This can be accomplished through efficient use of multiprocessor machines and thread management. This article presents techniques that can solve a number of concurrency problems. One approach, using thread management, controls access to a database on a per-thread basis, which protects the integrity of the data. In the article, reusable thread classes are built and presented. The classes are then tested and their performance in a live environment is examined.

  • .NET Delegates: Making Asynchronous Method Calls in the .NET Environment
    Richard Grimes - August 2001
    One of the many great features of the .NET Framework is that it has asynchronous infrastructure built in. In .NET you can call any method asynchronously by defining a delegate for the method and calling the delegate's asynchronous methods. This is beneficial to your application because when a synchronous call is made, the calling thread is blocked until the method completes whereas an asynchronous call is made on a different thread, and this allows the original thread to continue its work while the asynchronous call is in progress.This article explains delegates in .NET and how to use them to perform asynchronous calls, eliminating age-old threading problems.

  • Bugslayer: Optimize and Trim Your Code with New Switches in Visual C++ .NET
    John Robbins - August 2001

  • C++ Q&A: Getting the Text of a Window in Another Application; Making Backspace Work in the Explorer Bar
    Paul DiLascia - August 2001

  • C++ -> C#: What You Need to Know to Move from C++ to C#
    Jesse Liberty - July 2001
    C# builds on the syntax and semantics of C++, allowing C programmers to take advantage of .NET and the common language runtime. While the transition from C++ to C# should be a smooth one, there are a few things to watch out for including changes to new, structs, constructors, and destructors. This article explores the language features that are new to C# such as garbage collection, properties, foreach loops, and interfaces. Following a discussion of interfaces, there's a discussion of properties, arrays, and the base class libraries. The article concludes with an exploration of asynchronous I/O, attributes and reflection, type discovery, and dynamic invocation.

  • Windows UI: Our WinMgr Sample Makes Custom Window Sizing Simple
    Paul DiLascia - July 2001
    Programmers using Visual Basic have always had an advantage over C++ programmers when it comes to component and window sizing. There are many third-party Visual Basic-based solutions to this age-old problem, but unfortunately, there are few elegant alternatives for the C++ crowd, short of using a full-fledged windowing toolkit. This article explains how to circumvent the tedious task of hardcoded pixel arithmetic. It starts by introducing a window sizing rules system, and then moves on to show how CWinMgr, a data-driven class, can intelligently manage an MFC application's window sizing.

  • Visual Studio .NET: Managed Extensions Bring .NET CLR Support to C++
    Chris Sells - July 2001
    If you're a longtime C++ programmer, the thought of migrating to Visual Studio .NET might make you wary at first. However, a new feature of Visual C++, the managed extensions for C++, allows you to build apps with the .NET Framework. When you use managed C++, your code is handled by the common language runtime (CLR). This provides advanced features like garbage collection, interoperability, and more. This article explains why you'd want to use the managed extensions, how to use them, how to mix managed and unmanaged code, and how your managed code can interoperate with programs written in other languages.

  • The XML Files: Understanding XML Namespaces
    Aaron Skonnard - July 2001

  • Under the Hood: IA-64 Registers, Part 2
    Matt Pietrek - July 2001

  • C++ Q&A: Understanding Categories with CatView, Getting Toolbars in 256 Colors
    Paul DiLascia - July 2001

  • Pocket PC: Seamless App Integration with Your Desktop using ActiveSync 3.1
    Dino Esposito - June 2001
    ActiveSync 3.1, AvantGo channels, and Internet Explorer 5.0 Mobile Links allow you to provide content for Pocket PC users over the Internet or company intranet. This article explains how to take advantage of ActiveSync and AvantGo functionality as well as how to extend ActiveSync's data synchronization capabilities by writing a custom service provider for Windows CE. The second part of the article uses eMbedded Visual C++ to develop ActiveX controls for the Pocket PC that work on both the desktop PC and on the Pocket PC platforms. Customizing the Pocket PC's Today screen using a custom Today item is demonstrated.

  • DirectX 8.0: Enhancing Real-Time Character Animation with Matrix Palette Skinning and Vertex Shaders
    Benjamin Freidlin - June 2001
    DirectX 8.0 allows the creation of smooth and realistic character movements that are more life-like than simple articulated structure animations. This is made possible by its improved support for vertex tweening and blended vertex deformations, also known as soft-skinning. After a brief history of the use of these techniques in DirectX, soft-skinning using the fixed function pipeline is discussed. This is followed by the use of matrix palettes from within vertex shaders to create a customized soft-skinning solution that takes advantage of the benefits of vertex shaders, such as hardware acceleration and custom lighting algorithms without the limitations of fixed-function solutions.

  • Under the Hood: IA-64 Registers
    Matt Pietrek - June 2001

  • C++ Q&A: Browser Detection Revisited, Fixing CPopupText, COM and the IServiceProvider Interface
    Paul DiLascia - June 2001

  • C++ Q&A: Initializing Class Objects, The TestAD App and Active Desktop, #include Problems
    Paul DiLascia - May 2001

  • C++ Attributes: Make COM Programming a Breeze with New Feature in Visual Studio .NET
    Richard Grimes - April 2001
    C++ attributes in Visual Studio .NET are used to generate C++ code through attribute providers. Attribute providers generate code for COM classes, and the code is injected by the C++ compiler at compile time. This has the effect of reducing the amount of code that you need to write. In addition, with C++ attributes you no longer need to maintain separate IDL and RGS files, which makes project management simpler. This article explains C++ attributes, the process used by the attribute provider to generate code, and the code that is automatically generated. It also covers how attributes affect the registration process, how attributes can be used to generate code module entry points, and how connection points can be implemented using C++ attributes. Also explained is how these features contribute to the Unified Event Model for the .NET platform.

  • Winsock 2: QoS API Fine-Tunes Networked App Throughput and Reliability
    Wei Hua - April 2001
    The Generic Quality of Service (GQoS) API is a subset of the Winsock 2 API that allows a Winsock application to inform the network of its traffic requirements, enabling entitled applications to receive preferential treatment for their traffic. Existing Winsock applications can be GQoS-enabled by adding or modifying Winsock calls at appropriate places. An application's sending and receiving traffic needs can also be defined by specifying parameters within the QualityOfService (QOS) structure. This article discusses how traffic information is conveyed throughout the network, what kind of QOS structure should be used in your app, and how to set up network configurations for testing GQoS applications.

  • C++ and STL: Take Advantage of STL Algorithms by Implementing a Custom Iterator
    Samir Bajaj - April 2001
    There are many benefits to using the Standard Template Library (STL) for C++ development, including the ability to use generic data structures and algorithms. To use the STL algorithms, an STL-conforming container is required. Iterating through the Internet Explorer cache is an informative exercise, but the cache is not an STL-conforming container. So, to use the STL algorithms to search and enumerate the Internet Explorer cache, an adapter is needed. Building such an adapter-an STL-conforming iterator-is the topic of this article. Also provided is an overview of the components of the STL and the Win32 Internet APIs used.

  • SOAP Toolkit 2.0: New Definition Languages Expose Your COM Objects to SOAP Clients
    Carlos C. Tapang - April 2001
    In SOAP Toolkit 2.0, the Services Description Language (SDL) has been replaced with the Web Services Description Language (WSDL) and the Web Services Meta Language (WSML). WSDL and WSML files describe the interfaces to a service and expose COM objects to SOAP clients. This article describes a custom tool, IDL2SDL, which takes an IDL file and produces WSDL and WSML files without waiting for a DLL or TLB file to be generated. Also shown is a customized development environment in which WSDL and WSML files automatically reflect the changes to IDL files.

  • Windows Script Host: New Code-Signing Features Protect Against Malicious Scripts
    Eric Lippert - April 2001
    Downloading scripts from the Web or e-mail leaves users vulnerable to security risks because scripts can't be signed. But now developers can use Windows Script Host (WSH) to hash scripts so users can verify their source and safety. With WSH, scripts can be signed or verified using all the same tools ordinarily used to sign EXE, CAB, DLL, and OCX files. This article discusses public-key cryptosystems, the process of signing and verifying scripts in WSH, and several warnings about attacks that could potentially be made against cryptographically secured scripts and ways in which to avoid them.

  • Security Briefs: The Security Support Provider Interface Revisited
    Keith Brown - April 2001

  • C++ Q&A: Why = Returns a Reference, Accessing the Recycle Bin, When to Use STL
    Paul DiLascia - April 2001

  • Whistler: Build More Flexible Console Snap-ins with the MMC 2.0 Object Model
    Vivek Jhaveri - March 2001
    Microsoft Management Console (MMC) 2.0 provides a host of exciting new features for MMC users and snap-in developers. The new MMC 2.0 automation object model allows much of the user interface of MMC 2.0 to be accessed through script, and exposes events so that many tasks can now easily be automated. The new view extension model uses HTML to enable extensions to seamlessly integrate new user interfaces with those of existing snap-ins. MMC 2.0 also includes a specific view extension snap-in, the Extended View snap-in, which provides an interface similar to Web folders. Drag and drop support has been expanded, and console files now use the XML file format. Enhancements to console taskpads make it easier to accomplish tasks.

  • Microsoft .NET: Implement a Custom Common Language Runtime Host for Your Managed App
    Steven Pratschner - March 2001
    While most application developers may not need to write a custom host, understanding what is involved provides a great deal of insight into the architecture of the CLR. After covering how the CLR is started and loaded into a process, how to set the available configuration options, and how a host defines application domains, this article explains how to design a custom host. Important concepts include making the right decisions about the application domain boundaries for the host, configuring them correctly, loading and executing user code, and resolving references to assemblies. Setting security policy and unloading application domains as the application shuts down are also explained.

  • Resource Leaks: Detecting, Locating, and Repairing Your Leaky GDI Code
    Christophe Nasarre - March 2001
    Leaks are possible, even in robust Windows-based applications. As bugs go, leaks are some of the most difficult to find, especially when they occur in graphics device interface (GDI) objects and menus. While free and third-party tools exist to detect such leaks, it is usually difficult to make the connection between the numeric handle value returned by the tool, and a bitmap or menu in your program. This can limit the usefulness of these tools. Custom tools can be built that detect, track down, and eradicate GDI and menu leaks. Here, three such tools are built using well-known and documented APIs.

  • COM: Handle Late-bound Events within Visual Basic Using an ATL Bridge
    Carlo Randone - March 2001
    Since a Visual Basic client doesn't handle events directly from late-bound COM objects, it needs some way to capture all the events and parameters launched by any COM object server instantiated at runtime and not known at design time. This article explains how to build a bridge component that does just that. The bridge component transmits the intercepted event data back to the Visual Basic client using another supporting COM object that is capable of holding event data and attributes. The Visual Basic client receives the notification from the bridge and extracts all the information relative to the event from the supporting object.

  • Graphics: Manipulate Digital Images in Internet Explorer with the DirectX Transform SDK
    Alex Lerner - March 2001
    The Microsoft DirectX Transform is a Microsoft DirectX media API that can be used to create animated effects as well as to create and edit digital images for Windows-based applications. Scripting and HTML can be used to display an existing transform on a Web page, and improved transform support in Microsoft Internet Explorer 5.5 makes it easy to use transforms. This article provides step-by-step instructions for writing a transform as an ATL project and shows an example of an image transform. C++ is used to instantiate, configure, and display transforms in this project.

  • COM+: Create a Compensating Resource Manager to Extend Your App's Transactional Features
    Alan Gordon - March 2001
    A Compensating Resource Manager (CRM) is any COM+ object that uses the CRM facility provided by COM+, a set of tools that make it simple to create a custom resource manager for business scenarios that require handling some non-database operation (such as generating a file) as part of a transaction. This article provides an overview of transaction processing, distributed transactions, and the two-phase commit protocol for transactions. Also covered are the implementation and configuration of a CRM.

  • C++ Q&A: Browser Detection Revisited, Toolbar Info, IUnknown with COM and MFC
    Paul DiLascia - March 2001

  • C++ Q&A: Prevent Users from Performing Normal GUI Operations
    Paul DiLascia - February 2001

  • Cutting Edge: Binary Behaviors in Internet Explorer 5.5
    Dino Esposito - January 2001

  • Under the Hood: Reduce EXE and DLL Size with LIBCTINY.LIB
    Matt Pietrek - January 2001

  • C++ Q&A: Browser Detection in the Registry, Changing Cursors in Windows, Avoiding Resource ID Collision
    Paul DiLascia - January 2001

  • COM+ and Windows 2000: Ten Tips and Tricks for Maximizing COM+ Performance
    David S. Platt - December 2000
    There are many tricks to getting the most out of COM+, and this article offers the author's top 10. The tips cover the importance of transaction processing, the use of the COM+ catalog, and the design of three-tier distributed systems. Writing components using the correct threading model, knowing when to use compensating transactions, and the importance of stress testing early in the process also make the list. Other indespensible suggestions emphasize the importance of recognizing where an object's state is located, choosing appropriate authentication levels for COM+ applications, using Queued Components correctly, and implementing object pooling.

  • Active Scripting APIs: Add Powerful Custom Debugging to Your Script-Hosting App
    Mike Pellegrino - December 2000
    Active Scripting is a powerful tool for adding advanced features such as macro capabilities to custom applications. This creates a need for integrated debugging services for new features added with scripting. To address this need, Microsoft has provided a set of COM interfaces for developing debugging services from within the Active Scripting framework. This article illustrates how to use the debugging services published within the Active Scripting framework to create a full-featured script debugger that can provide a multitude of debugging actions including setting breakpoints, call stack viewing, variable browsing, immediate-window viewing, thread enumeration, and application enumeration.

  • MMC: Designing TView, a System Information Viewer MMC Snap-in
    Tom Boldt - December 2000
    Windows 2000 provides remote management tools running in the Microsoft Management Console (MMC), but if you're running Windows NT 4.0 you can create your own remote management tools by writing an MMC snap-in. This article walks through the development of a distributed process management utility, TView, which is similar to Process Viewer or Task Manager. The tool consists of an MMC snap-in, a COM+ component, and a kernel-mode driver. The DCOM interface, TView's access to system processes and information, and debugging of TView are discussed in detail.

  • House of COM: Is COM Dead?
    Don Box - December 2000

  • Bugslayer: Improving Runtime Performance with the Smooth Working Set Tool-Part 2
    John Robbins - December 2000

  • C++ Q&A: Sending Messages in Windows, Adding Hot Keys to your Application
    Paul DiLascia - December 2000

  • Windows CE 3.0: Enhanced Real-Time Features Provide Sophisticated Thread Handling
    Paul Yao - November 2000
    Windows CE is a small, configurable, feature-rich, real-time operating system. In Windows CE 3.0, the real-time support has been improved. This article looks at specific support for the creation of real-time systems and how it compares to the support in Windows for the desktop. The way interrupt handlers, processes, memory management, and synchronization work in Windows CE 3.0 is discussed. An extensive look at threads and thread priority, misconceptions surrounding them, and their impact on performance is included. Refinements to the Windows CE scheduler and support for nestable interrupts are also covered.

  • Windows 2000 Registry: Latest Features and APIs Provide the Power to Customize and Extend Your Apps
    Dino Esposito - November 2000
    The Windows registry as it is recognized today first appeared in Windows 95. Its introduction simplified the storage of initialization information and made that data more secure. This article covers the history of the registry, the form it took in the early days, and its current incarnation in Windows 2000. Practical tips for managing data in the registry are outlined, along with descriptions of special keys, functions, and file types. Manipulation of the registry to customize both application behavior and certain features in Windows is discussed. Also covered are future directions of the registry, including the use of XML to store registry information in a hierarchical fashion.

  • RPC and C++: Build a Template Library for Distributed Objects Containing Multiple Interfaces
    Ajai Shankar - November 2000
    Building a C++ template library for developing distributed object-oriented applications using Remote Procedure Calls (RPC) allows the programmer to design RPC applications that are composed of components that implement multiple interfaces. This article demonstrates the use of techniques such as assembly-level thunks to build machine code on the fly, and C++ features such as templates, conversion operators, virtual destructors and virtual function tables. Along the way, familiar C++ interfaces and classes are transformed into a distributed application. The benefits of using distributed objects rather than raw remote procedures, which include writing fewer lines of code, is explained.

  • Cutting Edge: Extend the WSH Object Model with Custom Objects
    Dino Esposito - November 2000

  • Under the Hood: Programming for 64-bit Windows
    Matt Pietrek - November 2000

  • Wicked Code: Eight Lessons from the COM School of Hard Knocks
    Jeff Prosise - November 2000

  • C++ Q&A: FileType Icon Detector App, Custom Context Menus, Unreferenced Variables and String Conversions
    Paul DiLascia - November 2000

  • Avoiding DLL Hell: Introducing Application Metadata in the Microsoft .NET Framework
    Matt Pietrek - October 2000
    The Microsoft .NET platform uses metadata and assemblies to store information about components, enabling cross-language programming and resolving the infamous DLL Hell problem. This article describes the use of metadata for easy linking and loading of assemblies, the relationship between metadata and concepts such as IDL and type libraries, and the metadata hierarchy. The process of reading metadata from assemblies for easy versioning is also described. Although Microsoft provides the MSIL disassembler, IDLASM, and MetaInfo.exe for accessing metadata, the author provides two sample programs that read metadata using the unmanaged metadata interfaces and the Reflection API.

  • ATL Server and Visual Studio .NET: Developing High-Performance Web Applications Gets Easier
    Shaun McAravey and Ben Hickman - October 2000
    When developing high-performance applications for the Web, developers often must choose between performance and ease of development. With ATL Server, new with Visual Studio .NET, developers get the best of both worlds. ATL Server uses a tag replacement engine written in C++, provides a simple programming model, and promotes enhanced performance and easy debugging. This article presents an overview of the ATL Server architecture, then creates a basic ATL Server project. It then goes on to explain processing SRF files, HTTP streams, forms, cookies, and header files. Managing session state is also discussed, along with file uploads and performance monitoring.

  • The VTrace Tool: Building a System Tracer for Windows NT and Windows 2000
    Jacob R. Lorch and Alan Jay Smith - October 2000
    This article describes the techniques used to construct VTrace, a system tracer for Windows NT and Windows 2000. VTrace collects data about processes, threads, messages, disk operations, network operations, and devices. The technique uses a DLL loaded into the address space of every process to intercept Win32 system calls; establishes hook functions for Windows NT kernel system calls; modifies the context switch code in memory to log context switches; and uses device filters to log accesses to devices.

  • Propagate Error Info: Use ATL and C++ to Implement Error-Handling COM Objects
    Panos Kougiouris - October 2000
    Predefined error codes returned from HRESULT aren't always much help for debugging COM C++ code. The C++ macros provided with this article produce an XML file listing the error and its context to make debugging easier. This article begins with an overview of error handling in COM, then discusses the COM interfaces used in the macros. It explains how C++ exceptions are caught and converted to COM-compatible error information, how events are logged with the event viewer, and how context is reported in the description string of IErrorInfo. The macros handle logic errors and errors returned by an object or API.

  • Windows Sockets 2.0: Write Scalable Winsock Apps Using Completion Ports
    Anthony Jones and Amol Deshpande - October 2000
    Writing a network-aware application isn't difficult, but writing one that is scalable can be challenging. Overlapped I/O using completion ports provides true scalability on Windows NT and Windows 2000. Completion ports and Windows Sockets 2.0 can be used to design applications that will scale to thousands of connections. The article begins with a discussion of the implementation of a scalable server, discusses handling low-resource, high-demand conditions, and addresses the most common problems with scalability.

  • Bugslayer: Improving Runtime Performance with the Smooth Working Set Tool
    John Robbins - October 2000

  • C++ Q&A: Sizing Windows for Text Strings, Creating Nonrectangular Windows, Activating an Open Document
    Paul DiLascia - October 2000

  • Marshalling Your Data: Efficient Data Transfer Techniques Using COM and Windows 2000
    Richard Grimes - September 2000
    The way you choose to transfer data is vitally important in a distributed application. Windows 2000 provides several new features that allow you to transfer data more efficiently. Lightweight handlers allow you to write smart proxies that can cache results and perform buffered reads and writes, minimizing the number of network calls. Windows 2000 also allows you to use pipe interfaces to transfer large amounts of data efficiently through a read-ahead facility. This article illustrates several ways to improve data transfer in Windows 2000 using these new features. It also reports the results of transfer time tests and provides recommendations for transferred buffer sizes.

  • Cutting Edge: A Client-side Environment for ASP Pages
    Dino Esposito - September 2000

  • C++ Q&A: CPopupText for Home-grown Tooltips, Controlling Application Instantiation
    Paul DiLascia - September 2000

  • Cutting Edge: SQL Server 7.0 and OLE DB Heterogeneous Queries
    Dino Esposito - August 2000

  • Visual Programmer: Writing ActiveX Controls in Visual Basic versus Visual C++
    George Shepherd - August 2000

  • Bugslayer: A COM Symbol Engine Aids Debugging
    John Robbins - August 2000

  • Security Briefs: Explore the Security Support Provider Interface Using the SSPI Workbench Utility
    Keith Brown - August 2000

  • Wicked Code: Implementing Handler Marshaling Under Windows 2000: DeviceClient Sample App
    Jeff Prosise - August 2000

  • C++ Q&A: Windows 2000 File Dialog Revisited; Autocompletion and the ACTest Demo App
    Paul DiLascia - August 2000

  • Web Security: Part 2: Introducing the Web Application Manager, Client Authentication Options, and Process Isolation
    Keith Brown - July 2000
    This article, the second of two parts, continues coverage of Web security for Windows. It introduces the Web Application Manager in IIS that allows Web processes to be isolated, decreasing the security risk associated with running in a logon session. The article then picks up where Part One left off-it discusses authentication methods such as basic authentication, digest authentication, integrated Windows authentication, and anonymous logons, and the benefits and drawbacks of each.

  • SQL/MTS: Automating the Creation of COM+ Components for a Database Schema
    Aleksandr Mikunov - July 2000
    Using Microsoft Windows DNA architecture as a guideline, it's possible to create scalable multitier database applications with COM+ and Microsoft Transaction Services. In fact, you can use existing table definitions to automatically build the MTS/COM+ business logic layer and data access components for your application. This article will walk you through the development of database transactions by mapping the transactions to automatically generated MTS/COM+ components. This technique can greatly simplify the task of creating components for a large project.

  • Cutting Edge: Writing Custom OLE DB Providers Using ATL
    Dino Esposito - July 2000

  • House of COM: Using ADO to Create XML-based Recordsets
    Don Box - July 2000

  • C++ Q&A: Enabling Menus in MFC Apps, Changing the Behavior of Enter with DLGKEYS Sample App
    Paul DiLascia - July 2000

  • More Windows 2000 UI Goodies: Extending Explorer Views by Customizing Hypertext Template Files
    Dino Esposito - June 2000
    The Web-style interface is the default Explorer folder view for the Desktop Update in Windows 2000. The Desktop Update uses HTML-based hypertext templates to create the Web view, and you can customize these templates to include your own views and commands. This article shows you how the Explorer Web view works and how to build your own custom templates for it. You'll see how to add a command prompt and task buttons to a new folder view using HTML, script, and ActiveX controls. The shell object model and thumbnail shell extensions are also examined, then used to build a simple icon viewer for Explorer.

  • Wicked Code: Creating Sophisticated Tabbed Views with CTabView and the TabDemo App
    Jeff Prosise - June 2000

  • Bugslayer: Tester, Take Two-TESTREC.EXE Updates Previous Version of the Tester Utility
    John Robbins - June 2000

  • Visual Programmer: Add Scripting to Your Apps with Microsoft ScriptControl
    George Shepherd - June 2000

  • C++ Q&A: Inline Virtual Functions, AVI Files in EXEs, and the DynPrompt Sample App
    Paul DiLascia - June 2000

  • Windows CE Web Server: Using Web Tools to Monitor and Manage Embedded Devices
    Leonid Braginski and Matthew Powell - May 2000
    When it ships, Windows CE 3.0 is expected to include Web services via the Windows CE Web Server. This new component of the Windows CE operating system will allow developers to share data or monitor and manage devices that are running Windows CE-whether they are handheld PCs or embedded in devices such as gas pumps or refrigerators. This article explains how the Windows CE Web Server component can be included in the operating system for a given device. We'll also show you how the Web server features you're familiar with from Microsoft Internet Information Services are implemented in the Windows CE Web Server.

  • Say Goodbye to Quirky APIs: Building a WMI Provider to Expose Your Object Info
    Kevin Hughes and David Wohlferd - May 2000
    Windows Management Instrumentation (WMI) is the Microsoft implementation of Web-Based Enterprise Management (WBEM), an industry standard for managing computers. WMI exposes system information in accordance with the Common Information Model (CIM), also an industry standard. You need a WMI provider to expose system information to WMI to manage applications and devices. This article offers an in-depth discussion of how to write WMI providers using the WMI provider framework, and how to optimize performance.

  • Under the Hood: Optimizing DLL Load Time Performance
    Matt Pietrek - May 2000

  • Security Briefs: Understanding Kerberos Credential Delegation in Windows 2000 Using the TktView Utillity
    Keith Brown - May 2000

  • C++ Q&A: Create a Dialog while Keeping it off that Pesky Taskbar
    Paul DiLascia - May 2000

  • Windows 2000: Asynchronous Method Calls Eliminate the Wait for COM Clients and Servers
    Jeff Prosise - April 2000
    Windows 2000 is the first version of COM to support asynchronous method calls, which permit clients to make nonblocking calls to COM objects and objects to process incoming calls without blocking the calling threads. COM clients benefit from asynchronous method calls because they can continue working while waiting for outbound calls to return. Objects benefit because they can queue incoming calls and service them from a thread pool. Our SieveClient and SieveServer sample apps demonstrate how to create and use asynchronous clients and servers in COM-based distributed applications.

  • Which Framework Should You Use?: Building ActiveX Controls with ATL and MFC
    George Shepherd - April 2000
    Currently MFC and ATL represent two frameworks targeted at different types of Windows-based development. MFC represents a simple and consistent means of creating standalone apps for Windows; ATL provides a framework to implement the boilerplate code necessary to create COM clients and servers. The two frameworks overlap in their usefulness for developing ActiveX controls. We'll take a look at both frameworks as they apply to creating ActiveX controls-highlighting strengths and weaknesses, and walking through the process of creating a control-so you can determine when you might want to use one framework or the other.

  • Software Driving Software: Active Accessibility-Compliant Apps Give Programmers New Tools to Manipulate Software
    Dmitri Klementiev - April 2000
    Active Accessibility was developed to allow people with disabilities to work on PCs-it's used in magnifiers, screen readers, and tactile mice. It can also be used to create applications that drive other software, and its ability to emulate user input is particularly well suited to the design of testing software. Starting from the basics of Active Accessibility, this article leads you through the development of a software testing application. You'll see how this testing application interacts with common controls and other UI elements, then processes the resulting WinEvents.

  • Visual Programmer: Adding Your Own AppWizard to Visual C++
    George Shepherd - April 2000

  • Win32 Q&A: New C++ Classes for Better Resource Management in Windows
    Jeffrey Richter - April 2000

  • C++ Q&A: Initializing C++ Class Members and Incorporating the Places Bar in your MFC Apps
    Paul DiLascia - April 2000

  • A Young Person's Guide to The Simple Object Access Protocol: SOAP Increases Interoperability Across
    Don Box - March 2000
    The Simple Object Access Protocol (SOAP) facilitates interoperability among a wide range of programs and platforms, making existing applications accessible to a broader range of users. SOAP combines the proven Web technology of HTTP with the flexibility and extensibility of XML. This article takes you on a comprehensive tour of Object RPC technology to help you understand the foundations of SOAP and the ways it overcomes many of the limitations of existing technologies, including DCOM and CORBA. This is followed by a detailed treatment of the SOAP encoding rules with a focus on how SOAP maps onto existing ORPC concepts.

  • Windows 2000 UI Innovations: Enhance Your User's Experience with New Infotip and Icon Overlay Shell
    Dino Esposito - March 2000
    Windows 2000 includes some helpful new UI features you can customize and implement in your own applications. In this article you'll see how to provide infotips for files, after making the appropriate registry entries. Then create a custom column handler extension, resulting in a new column for the Explorer's Details view. In order to further extend the shell, additional UI goodies will also be examined and implemented including: search handlers, cleanup handlers, folder customizations using property sheet handlers and icon overlays, and context menu shell extensions. All the code samples are rolled up into a handy package which we've named, by tradition, ShellToys.

  • Security Briefs: Exploring Handle Security in Windows
    Keith Brown - March 2000

  • C++ Q&A: ATL Virtual Functions and vtables
    Paul DiLascia - March 2000