  State transitions in black hole X-ray binaries are likely caused by gas
evaporation from a thin accretion disk into a hot corona. We present a
height-integrated version of this process which is suitable for analytical and
numerical studies. With radius $r$ scaled to Schwarzschild units and coronal
mass accretion rate $\dot{m}_c$ to Eddington units, the results of the model
are independent of black hole mass. State transitions should thus be similar in
X-ray binaries and AGN. The corona solution consists of two power-law segments
separated at a break radius $r_b \sim10^3 \,(\alpha/0.3)^{-2}$, where $\alpha$
is the viscosity parameter. Gas evaporates from the disk to the corona for
$r>r_b$, and condenses back for $r<r_b$. At $r_b$, $\dot{m}_c$ reaches its
maximum, $\dot{m}_{c,{\rm max}} \approx 0.02\, (\alpha/0.3)^3$. If at $r\gg
r_b$ the thin disk accretes with $\dot{m}_d < \dot{m}_{c,{\rm max}} $, then the
disk evaporates fully before reaching $r_b$, giving the hard state. Otherwise,
the disk survives at all radii, giving the thermal state. While the basic model
considers only bremsstrahlung cooling and viscous heating, we also discuss a
more realistic model which includes Compton cooling and direct coronal heating
by energy transport from the disk. Solutions are again independent of black
hole mass, and $r_b$ remains unchanged. This model predicts strong coronal
winds for $r>r_b$, and a $T\sim 5\times 10^8\,{\rm K}$ Compton-cooled corona
for $r < r_b$. Two-temperature effects are ignored, but may be important at
small radii.
