Effects of parallel and poloidal flows, as well as the flow shear, on the resistive wall mode (RWM) instability have been numerically investigated in toroidally rotating plasmas, utilizing a recently updated version of the MARS-F code (Liu Y Q et al 2000 Phys. Plasmas 7 3681). A significant difference between these flows is that the background toroidal flow frequency is symmetric with respect to the poloidal angle, whilst both the poloidal and toroidal projections of the additional parallel flow are functions of both the plasma minor radius and poloidal angle. It is found that the stability of the resistive wall mode is hardly modified by the parallel flow, as a consequence of cancellation of the stabilizing effect provided by the poloidal projection of the parallel flow from one side, and the destabilizing effect provided by the toroidal projection from the other side. The destabilizing effect of the toroidal projection comes predominantly from the m=1 poloidal Fourier harmonic of the flow contribution. The shear of the parallel flow is found to generally weaken the stabilization/destabilization effect on the RWM, as compared to the case of uniform parallel flow.