October 2000
Avoiding DLL Hell: Introducing Application Metadata in the Microsoft .NET Framework
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. Matt Pietrek
.NET Framework-Part 2: Microsoft .NET Framework Delivers the Platform for an Integrated, Service-Oriented Web
This article completes the .NET Framework overview begun in the September issue. The common language specification and ILDasm, the MSIL disassembler, are discussed-as well as how metadata, manifests, and assemblies simplify deployment and versioning. Security, which is integral to the design of .NET, is examined extensively, followed by a walk through the development of a single assembly containing multiple files. Finally, the way managed and unmanaged code work together, and the benefits of using each, including interoperablity with unmanaged code, are described. Jeffrey Richter
ATL Server and Visual Studio .NET: Developing High-Performance Web Applications Gets Easier
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. Shaun McAravey and Ben Hickman
The VTrace Tool: Building a System Tracer for Windows NT and Windows 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. Jacob R. Lorch and Alan Jay Smith
Propagate Error Info: Use ATL and C++ to Implement Error-Handling COM Objects
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. Panos Kougiouris
Windows Sockets 2.0: Write Scalable Winsock Apps Using Completion Ports
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. Anthony Jones and Amol Deshpande
Taming the Stateless Beast: Managing Session State Across Servers on a Web Farm
Running a Web farm means managing session state across servers. Since session state can't be shared across a Web farm with Internet Information Services 5.0, a custom solution is required. One such solution using a tool called the session manager is described here. The article begins with a description of the SQL Server database used to store state information, the stored procedures used to update it, and the retrieval of session data. ASP code drives the session manager tool and the COM and COM+ components that run the stored procedures. John Papa
Editor's Note: Today, Yesterday, and Tomorrow
New Stuff: Resources for Your Developer Toolbox
Theresa W. Carey
Web Q&A: Using WinInet for File Transfer, MSDN Tree Control, The Web-safe Palette
Robert Hess
Cutting Edge: Client-side Environment for ASP Pages-Part 2
Dino Esposito
Visual Programmer: Server-side Controls in Active Server Pages+
George Shepherd
Bugslayer: Improving Runtime Performance with the Smooth Working Set Tool
John Robbins
.NET Column: Programming for the New Platform
Jeffrey Richter
C++ Q&A: Sizing Windows for Text Strings, Creating Nonrectangular Windows, Activating an Open Document
Paul DiLascia