dinput: Use HeapAlloc/Free instead of alloc/free.