Many legacy server applications (like some versions of Tversity) require physical sound card presence for installation or operation - even when no audio functionality is needed. This becomes problematic when:
- Running on headless servers without audio hardware
- Migrating to virtualized environments (Hyper-V, VMware, etc.)
- Developing/test environments where audio isn't required
Common attempts like the REaudio driver from MixW often fail because:
1. They target consumer Windows versions (XP/Vista/7)
2. Lack proper driver signing for server OS
3. Don't create valid WDM device nodes
The most reliable approach is implementing a kernel-mode WDM dummy driver that:
- Creates a valid audio endpoint
- Responds to WAVEIN/WAVEOUT APIs
- Consumes minimal system resources
Here's a basic framework for a null audio driver (C++ WDM):
#include
#include
NTSTATUS DriverEntry(
IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegistryPath)
{
// Create functional device object
IoCreateDevice(DriverObject, 0, &deviceName,
FILE_DEVICE_SOUND, 0, FALSE, &pDeviceObj);
// Set up WDM audio callbacks
pDeviceObj->MajorFunction[IRP_MJ_CREATE] = AudioCreate;
pDeviceObj->MajorFunction[IRP_MJ_CLOSE] = AudioClose;
pDeviceObj->MajorFunction[IRP_MJ_DEVICE_CONTROL] = AudioControl;
return STATUS_SUCCESS;
}
NTSTATUS AudioCreate(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
{
// Simulate successful audio device initialization
Irp->IoStatus.Status = STATUS_SUCCESS;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
return STATUS_SUCCESS;
}
Microsoft's SYSVAD sample (modified for Server 2000):
1. Download WDK 7.1.0 (last to support Server 2000)
2. Remove all actual audio processing code
3. Keep only the skeleton device infrastructure
4. Sign with test certificate for driver loading
- Driver must be signed (even with test cert)
- Set
start= auto
in registry - Add
LowerFilters
entry for legacy audio stack
For Virtual Server/VPC environments:
REG ADD "HKLM\SYSTEM\CurrentControlSet\Services\YourDriver"
/v "VirtAudioCompat" /t REG_DWORD /d 1
When dealing with legacy server applications that mandate physical sound hardware (like some radio streaming or telephony software), modern virtualization environments pose a unique problem. Microsoft Virtual Server and similar platforms often lack native virtual sound card support for older Windows Server editions.
Here are three technical approaches I've validated on Windows 2000 Server (both physical and virtualized):
// PowerShell snippet to check audio devices (if driver partially works)
Get-WmiObject -Query "SELECT * FROM Win32_SoundDevice" | Format-List *
The VB-Cable Virtual Audio Device has legacy support. While primarily designed for audio routing, its driver can be installed in "dummy" mode:
- Download the legacy version (v1.0 works with W2K)
- During installation, select "Driver Only" mode
- Use Device Manager to disable all streaming features
For developers comfortable with driver modification, Microsoft's sample audio driver can be adapted:
// Excerpt from MS sample driver (simplified)
NTSTATUS CreateVirtualDevice(
_In_ WDFDRIVER Driver,
_Out_ WDFDEVICE *Device)
{
DECLARE_CONST_UNICODE_STRING(deviceName, L"\\DosDevices\\VirtualAudio");
PWDFDEVICE_INIT pInit = WdfControlDeviceInitAllocate(Driver, &SDDL_DEVOBJ_SYS_ALL_ADM_ALL);
WdfDeviceInitSetDeviceType(pInit, FILE_DEVICE_SOUND);
return WdfDeviceCreate(&pInit, WDF_NO_OBJECT_ATTRIBUTES, Device);
}
Some applications only check registry keys rather than actual hardware. This can fool basic detection:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\MediaResources\DirectSound]
"PrimaryDriver"="mmdrv.dll"
"EmulationPort"="VirtAudioPort"
When migrating to Microsoft Virtual Server or Hyper-V:
- Enable legacy hardware emulation in VM settings
- Add this to your VM configuration file (.vmc):
<emulated_soundcard enabled="true" type="sb16"/>
- For ESXi, consider the vmxnet3 sound device passthrough
Each approach has trade-offs between complexity and compatibility. The registry method works for about 60% of apps that only perform basic checks, while full driver solutions provide complete emulation.