A classical problem in the theory of projective curves is the classification of all their possible genera in terms of the degree and the dimension of the space where they are embedded. Fixed integers r, d, s, Castelnuovo-Halphen's theory states a sharp upper bound for the genus of a non-degenerate, reduced and irreducible curve of degree d in P-r, under the condition of being not contained in a surface of degree < s. This theory can be generalized in several ways. For instance, fixed integers r, d, k, one may ask for the maximal genus of a curve of degree d in P-r, not contained in a hypersurface of degree < k. In the present paper we examine the genus of curves C of degree d in p(r) not contained in quadrics (i.e. h(0) (P-r, I-C(2)) ...