Hydrogen is attracting increasing attention as a clean-burning, carbon-neutral fuel in heavy-duty applications. However, hydrogen cannot ignite on its own under typical compression ignition engine conditions. To address this, the hydrogen-diesel dual direct injection (H2DDI) concept has been recently proposed in which hydrogen and a small quantity of diesel are introduced separately into the combustion chamber, with the diesel providing the ignition source. Experimentally, good hydrogen substitution rates and thermal efficiencies have been achieved with this approach. However, the underlying combustion mechanism for H2DDI engines remains unclear. This study employs direct numerical simulations to investigate the ignition of stratified mixtures in mixing-layer configurations under engine-relevant conditions, where an n-dodecane fuel-rich region is surrounded by an ultra-lean hydrogen-air mixture (dual-fuel/DF cases) or air (single-fuel/SF cases). Simulations of different spatial dimensionality are considered. Results in homogeneous reactors show that the ignition of DF cases is delayed compared to SF cases because hydrogen consumes OH species during the low-temperature oxidation of n-dodecane. In one-dimensional laminar mixing layers, ignition is sensitive to initial conditions, such as the hydrogen equivalence ratio, oxygen concentration, oxidiser temperature and mixing layer thickness, with different responses between SF and DF cases. Two-stage and multi-mode ignition processes with low- and high-temperature ignition kernels, cool flames, and different modes of edge flame structures are observed in two-dimensional turbulent mixing layers of SF and DF cases with different hydrogen concentrations. However, different characteristics of these kernels and flames are detected between SF and DF cases. The study also explores preferential diffusion effects in one-dimensional laminar and two-dimensional turbulent mixing layers for DF cases. Preferential diffusion impacts the two-stage ignition process and flame stability of lean hydrogen flame. It highly depends on diffusion levels, leading to shortened ignition delay times in laminar cases and prolonged ones in turbulent cases. In particular, the preferential diffusion of n-dodecane is the dominant factor of overall preferential diffusion effects in terms of flame structures and heat generation in rich mixtures, whereas the preferential diffusion of hydrogen only increases the maximum flame temperature.