We provide new results of first-order necessary conditions of optimality problem in the form of John's theorem and in the form of Karush–Kuhn–Tucker's theorem. We establish our result in a topological vector space for problems with inequality constraints and in a Banach space for problems with equality and inequality constraints. Our contributions consist in the extension of the results known for the Fréchet and Gateaux-differentiable functions as well as for the Clarke's subdifferential of Lipschitz functions to the more general Dini-differentiable functions. As consequences, we extend the result of B.H. Pourciau in [Modern multiplier rules. Amer Math Monthly. 1980;87(6):433–457, Theorem 6, p. 445] from the convexity to the Dini-pseudoconvexity.