We propose semiparametric methods for estimating the effect of a time-dependent covariate on treatment-free survival. The data structure of interest consists of a longitudinal sequence of measurements and a potentially censored survival time. The factor of interest is time-dependent. Treatment-free survival is of interest and is dependently censored by the receipt of treatment. Patients may be removed from consideration for treatment, temporarily or permanently. The proposed methods combine landmark analysis and partly conditional hazard regression. A set of calendar time cross-sections is specified, and survival time (from cross-section date) is modeled through weighted Cox regression. The assumed model for death is marginal in the sense that time-varying covariates are taken as fixed at each landmark, with the mortality hazard function implicitly averaging across future covariate trajectories. Dependent censoring is overcome by a variant of inverse probability of censoring weighting (IPCW). The proposed estimators are shown to be consistent and asymptotically normal, with consistent covariance estimators provided. Simulation studies reveal that the proposed estimation procedures are appropriate for practical use. We apply the proposed methods to pre-transplant mortality among end-stage liver disease (ESLD) patients.