X-ray diffuse scattering by a four-layer waveguide-type heterostructure is studied. The resonant enhancement of diffuse scattering due to the dynamic diffraction effects has been observed experimentally. It is shown that this phenomenon occurs in both cases when the incident or scattered waves are subject to the condition of waveguide mode excitation. Specific features of the waveguide mode excitation have been investigated. It is demonstrated that the methods of x-ray diffuse scattering can be effectively used to precisely determine the statistical parameters of roughness for internal and external interfaces. Processing the diffuse scattering and the specular reflection spectra provides information on the average distribution of electron density, the root-mean-square height, and the longitudinal and transversal correlation lengths of interface roughness. The obtained results are in good agreement with theoretical predictions and calculations.