Writing a device driver for Windows. According to this article, a device driver's maximum size is 960MB on Windows XP (100MB on NT4, 220MB on Win2K).
Setting up the environment A proper environment must be setup. Use setenv (which ships with the ddk) to set the environment variables (and what not) to build a driver: Windows API Reference. Download details: SQL Server 2005 SP2. The Basics:Getting Started Writing Windows Drivers.