The phase behavior and structure of a symmetric binary polymer blend confined between two hard impenetrable walls is studied, assuming also short range forces between the monomers and the walls. Phenomenological considerations are elaborated with the self-consistent field theory of Gaussian chains, and also some Monte Carlo simulations of the bond-fluctuation model. In the case of "antisymmetric" walls (right wall attracts component A with the same strength as does left wall component B) the phase diagram is symmetric around volume fraction phi =1/2. For very thin films (or very weak surface fields) one finds a single critical point at phi (c)=1/2, as in the bulk. For thicker films, or stronger surface fields, the phase diagram exhibits two critical points and two concomitant coexistence regions, down to a triple point T-t, while below the triple point there is a single coexistence region. When the film thickness D --> infinity, the two coexistence regions for T >T-t shrink into the prewetting lines, while T-t approaches the wetting transition temperature. Asymmetric surface forces are also considered, studying the smooth crossover from "antisymmetric walls'' to "symmetric walls'' (that both attract the A component with the same strength). The resulting crossover between capillary-type behavior (i.e., a single critical point of the thin film) and the above behavior with two critical points is analyzed. Particular attention is paid to the behavior of interfaces between coexisting phases.