A microelectromechanical structure is formed by depositing sacrificial and
structural material over a substrate to form a structural layer on a
component electrically attached with the substrate. The galvanic
potential of the structural layer is greater than the galvanic potential
of the component. At least a portion of the structural material is
covered with a protective material that has a galvanic potential less
than or equal to the galvanic potential of the component. The sacrificial
material is removed with a release solution. At least one of the
protective material and release solution is surfactanated, the surfactant
functionalizing a surface of the component.