Friday, April 29, 2005

.NET Serialization Tools

Did you know that when you use the XML Serializer in .NET, the framework uses codeDOM to spit out code to do the work. This is part of the reason that exceptions thrown during serialization/deserialization seem so arcane. Read more about it at "Troubleshooting Common Problems with the XmlSerializer" Chris Sells tool the "XmlSerializerPreCompiler" is very useful to detect problems that you might face during the serialization process. A front-end for this tool is also available.

Friday, April 22, 2005

Windows Forms .NET: The Official Microsoft Windows Forms Community Site

learn how to build Microsoft Windows Forms applications Windows Forms .NET: The Official Microsoft Windows Forms Community Site

Monday, April 18, 2005

Coding4Fun: Coding4Fun

Coding4Fun: Coding4Fun The new Coding4Fun section of MSDN. Fire up your code editor, open an article, and start coding for fun.

Thursday, April 14, 2005

Console with a WinForm

Console with a WinForm

Environment: .NET, C#

Often, you need a console window together with a WinForm application. It can be very handy for debugging purposes while developping, but also for a (temporary) logging of some data. It is very simple to do. The following program demonstrates it, using P/Invoke.

Start a new Windows application, drop a CheckBox on the form, name it ViewConsole, and copy the following code into it.

using System;
using System.Windows.Forms;
using System.Runtime.InteropServices;    // needed to call external
                                        // application (winAPI dll)

namespace WindowsApplication1
{
  partial class Form1: Form
  {
     public Form1()
     {
        InitializeComponent();
     }

     private void ViewConsole_CheckedChanged(object sender,
                                             EventArgs e)
     {
        if (ViewConsole.Checked)
           Win32.AllocConsole();
        else
           Win32.FreeConsole();
     }
  }

  public class Win32
  {
     [DllImport("kernel32.dll")]
     public static extern Boolean AllocConsole();
     [DllImport("kernel32.dll")]
     public static extern Boolean FreeConsole();
  }
}

Setup Sense and Sensibility :

Setup Sense and Sensibility :

Saturday, April 09, 2005

InstallSite: Windows Installer Tools and Tips

InstallSite: Windows Installer Tools and Tips: "Windows Installer Tools & Tips"

Displaying Billboards on a Modeless Dialog

Windows Installer Displaying Billboards on a Modeless Dialog Billboards can display a sequence of images and text in a dialog during an installation. Typically, billboards are used to create the visual effect of a slide show or animation that informs the user of the progress of an installation. Displaying Billboards on a Modeless Dialog

Friday, April 08, 2005

Good books on .NET technology

Introductory/Reference

.NET intro: Introducing .NET, 3rd Ed (David Platt) VB.NET dev: Introducing Microsoft Visual Basic 2005 for Developers (Kris Horrocks et al) C# dev: Programming C#, 3rd Ed (Jesse Liberty) C# from VB: C# for Java Developers (Allen Jones)

Patterns & Architecture Design Patterns: Design Patterns in C# (Stephen John Metsker) Software Construction: Code Complete, Second Edition (Steve McConnell) Components: Programming .NET Components (Juval Lowy) SOA & WSE 2.0: Expert Service-Oriented Architecture in C#: Using the Web Services Enhancements 2.0 (Jeffrey Hasan) Technologies

Web: Introducing Microsoft ASP.NET 2.0 (Dino Esposito) Mobile: Microsoft .NET Compact Framework (Core Reference) (Microsoft .NET Compact Framework (Andy Wigley et al) Database: A First Look at Microsoft SQL Server 2005 for Developers (Bob Beauchemin et al) Networking: Microsoft Windows Server 2003 TCP/IP Protocols and Services Tech Ref (Joseph Davies, Thomas Lee)

Security

Writing Secure Code, 2nd Ed (Michael Howard and David LeBlanc) Threat Modeling (Frank Swiderski, Window Snyder) Assessing Network Security (Ben Smith et al)

Game Development

Managed DirectX: Managed DirectX Kickstart (Tom Miller) Engine Design: Introduction to 3D Game Engine Design Using Directx 9 and C# (Lynn Thomas Harrison)

IT Pro

Windows Server: Microsoft Windows Server 2003 Deployment Kit: A Microsoft Resource Kit (MS Corp) Active Directory: Designing a Microsoft Windows Server 2003 Active Directory and Network Infrastructure (Walter Glenn et al) IIS: Internet Information Services (IIS) 6 Resource Kit (IIS Team)

Management / Office

Office Dev: Microsoft .NET Development for Microsoft Office (Andrew Whitechapel) Project: Microsoft Project 2003 Inside Out (Teresa Stover)

Monday, April 04, 2005

Logging Windows Installer Actions

Windows Installer can generate a verbose log file, and then you can analyze the verbose log file looking for the source of the error. A helpful utility for analyzing verbose log files is the WILogUtl.exe tool provided in the Windows Installer SDK. Logging can be enabled via Windows Installer logging policy or by appending "/L*v path to logfile" to your MSIExec command line. To generate a detailed verbose log file through policy, use the following registry key: • HKLM\Software\Policies\Microsoft\Windows\Installer • Set: Logging = REG_SZ voicewarmup • Set: Debug = REG_DWORD 0x7 Log files generated through the policy key will be of the form msiXXXXX.log in the user's %temp% folder. Note: Logging through the command line overrides any logging policy settings. The following MSDN site has a lot more info about Windows Installers. Frequently Asked Questions About Windows Installer