Let w(t), 0 ≦ t ≦ ∞, be a Brownian motion process, i.e., a zero-mean separable normal process with Pr{w(0) = 0} = 1, E{w(t1)w(t2)}= min (t1, t2), and let a, b denote the boundaries defined by y = a(t), y = b(t), where b(0) < 0 < a(0) and b(t) < a(t), 0 ≦ t ≦ T ≦ ∞. A basic problem in many fields such as diffusion theory, gambler's ruin, collective risk, Kolmogorov-Smirnov statistics, cumulative-sum methods, sequential analysis and optional stopping is that of calculating the probability that a sample path of w(t) crosses a or b before t = T. This paper shows how this probability may be computed for sufficiently smooth boundaries by numerical solution of integral equations for the first-passage distribution functions. The technique used is to approximate the integral equations by linear recursions whose coefficients are estimated by linearising the boundaries within subintervals. The results are extended to cover the tied-down process subject to the condition w(1) = 0. Some related results for the Poisson process and the sample distribution function are given. The procedures suggested are exemplified numerically, first by computing the probability that the tied-down Brownian motion process crosses a particular curved boundary for which the true probability is known, and secondly by computing the finite-sample and asymptotic powers of the Kolmogorov-Smirnov test against a shift in mean of the exponential distribution.