The spin dynamics of ferromagnetic thin films following an excitation by ultrashort 100-fs near-infrared laser pulses has recently received much attention. Here, a new approach is described using x-ray magnetic circular dichroism to investigated emagnetization and magnetization switching processes. In contrast to magneto-optical measurements, x-ray dichroism has the advantage of determining separately the spin and orbital components of the magnetic moment. The relatively low time resolution of the synchrotron x-ray probe pulses (80 ps FWHM) is overcome by employing an ultrafast x-ray streak camera with a time resolution of <1 ps. A description of the experimental setup including the x-ray/IR laser pulse synchronization and the streak camera is given.