Preparation of functional nanostructured particles by spray drying