Well I could set the size ahead of time, but I'd much rather only have it as big as I need it. The utility I'm working on is used for configuring gamepads for a console emulator, and there could very well be a large number of attached controllers with varied features. And I have no real way of know whether there are 3 or 30 gamepads attached (okay 30 is pushing it, but I like to be ready for anything). I'll try zeroing out the memory ahead of time and see what happens.

Here is the entire procedure where I enumerate all the devices:
[pascal][background=#FFFFFF][normal=#000080][number=#C00000][string=#00C000][comment=#8080FF][reserved=#000000]
Procedure Tfrm_Main.FormActivate(Sender: TObject);
Var
FJoyList: TStringList;
iCount: Integer;
Begin
//Create the DirectInput object
DirectInput8Create(hInstance, DIRECTINPUT_VERSION, IID_IDirectInput8, FDirectInput, nil);

//Create primary keyboard interface
ZeroMemory(@DIKeyBuffer, SizeOf(DIKeyBuffer));
FDirectInput.CreateDevice(GUID_SysKeyboard, FKeyDevice, nil);
FKeyDevice.SetDataFormat(@c_dfDIKeyboard);
FKeyDevice.SetCooperativeLevel(Handle, DISCL_NONEXCLUSIVE or DISCL_FOREGROUND);
FKeyDevice.Acquire;

//Enumerate attached game controllers
FJoyList := TStringList.Create;
FDirectInput.EnumDevices(DIDEVTYPE_JOYSTICK, EnumInputDevs, FJoyList, DIEDFL_ATTACHEDONLY);

//Create associated DirectInput devices
for iCount := 0 to (FJoyList.Count - 1) do begin
SetLength(FJoyDevice, Length(FJoyDevice) + 1);
FDirectInput.CreateDevice(PGUID(FJoyList.Objects[iCount])^, FJoyDevice[iCount], nil);
FJoyDevice[iCount].SetDataFormat(@c_dfDIJoystick2);
FJoyDevice[iCount].SetCooperativeLevel(Handle, DISCL_EXCLUSIVE or DISCL_FOREGROUND);
//SetLength(FJoyCaps, Length(FJoyCaps) + 1);
//FJoyCaps[iCount].dwSize := SizeOf(TDIDevCaps);
//FJoyDevice[iCount].GetCapabilities(FJoyCaps[iCount]);
DevNum := iCount;
FJoyDevice[iCount].EnumObjects(EnumInputAxis, nil, DIDFT_AXIS);
FJoyDevice[iCount].Acquire;
end;

//Cleanup and free local objects
for iCount := 0 to (FJoyList.Count - 1) do begin
Dispose(PGUID(FJoyList.Objects[iCount]));
end;
FJoyList.Free;

//Refresh Main Window
RefreshWindow;
End;

[/pascal]