We present a theory of superconductivity in the presence of a general magne
tic structure in a form suitable For the description of complex magnetic ph
ases encountered in borocarbides. The theory, complemented with some detail
s of the band structure and with the magnetic phase diagram, may explain th
e nearly reentrant behavior and the anisotropy of the upper critical field
of HoNi2B2C. The onset of the helical magnetic order depresses superconduct
ivity via the reduction of the interaction between phonons and electrons ca
used by the formation of magnetic Bloch states. At mean field level, no add
itional suppression of superconductivity is introduced by the incommensurab
ility of the helical phase.