Context : X-rays/EUV radiation emitted from wind-embedded shocks in hot , massive stars can affect the ionization balance in their outer atmospheres , and can be the mechanism responsible for the production of highly ionized atomic species detected in stellar wind UV spectra . Aims : To allow for these processes in the context of spectral analysis , we have implemented the emission from wind-embedded shocks and related physics into our unified , NLTE model atmosphere/spectrum synthesis code FASTWIND . Methods : The shock structure and corresponding emission is calculated as a function of user-supplied parameters ( volume filling factor , radial stratification of shock strength , and radial onset of emission ) . We account for a temperature and density stratification inside the post-shock cooling zones , calculated for radiative and adiabatic cooling in the inner and outer wind , respectively . The high-energy absorption of the cool wind is considered by adding important K-shell opacities , and corresponding Auger ionization rates have been included into the NLTE network . To test our implementation and to check the resulting effects , we calculated a comprehensive model grid with a variety of X-ray emission parameters . Results : We tested and verified our implementation carefully against corresponding results from various alternative model atmosphere codes , and studied the effects from shock emission for important ions from He , C , N , O , Si , and P. Surprisingly , dielectronic recombination turned out to play an essential role for the ionization balance of O iv /O v in stars ( particularly dwarfs ) with T _ { eff } \sim 45,000 K. Finally , we investigated the frequency dependence and radial behavior of the mass absorption coefficient , \kappa _ { \nu } ( r ) , important in the context of X-ray line formation in massive star winds . Conclusions : In almost all considered cases , direct ionization is of major influence ( because of the enhanced EUV radiation field ) , and Auger ionization significantly affects only N vi and O vi . The approximation of a radially constant \kappa _ { \nu } is justified for r \gtrsim 1.2 R _ { \ast } and \lambda \lesssim 18 Å , and also for many models at longer wavelengths . To estimate the actual value of this quantity , however , the He ii opacities need to be calculated from detailed NLTE modeling , at least for wavelengths longer than 18 to 20 Å , and information on the individual CNO abundances has to be present .