The reaction pp->p K0 pi+ Lambda has been studied with the ANKE spectrometer at COSY-Juelich at a beam momentum of 3.65 GeV/c in order to search for a possible signal of the pentaquark Theta+(1540), decaying into the p K0 system. By detecting four charged particles in the final state, the K0 and the Lambda have been reconstructed to tag strangeness production. It has been found that the pi+ Lambda missing-mass spectrum displays no significant signal expected from the Theta+(1540) excitation. The total cross section for the reaction pp->p K0 pi+ Lambda has been deduced, as well as an upper limit for the Theta+ production cross section. The intermediate Delta++ K0 Lambda state is found to provide a significant contribution to the reaction.