The effects of anisotropic gap structures on a diamagnetic response are investigated in order to demonstrate that the field-angle-resolved magnetization [ML(chi)] measurement can be used as a spectroscopic method to detect gap structures. Our microscopic calculation based on the quasiclassical Eilenberger formalism reveals that ML(chi) in a superconductor with a fourfold gap displays a fourfold oscillation reflecting the gap and Fermi-surface anisotropies, and the sign of this oscillation changes at a field between Hc1 and Hc2. As a prototype of unconventional superconductors, magnetization data for borocarbides are also discussed.