In order to improve the capabilities of the electron-beam-induced current method, a technique based on scanning transmission electron-beam-induced current has been developed. It is shown that it enables the direct correlation of structural defects with their electrical activity. It implies the fabrication of ultrathin Schottky diodes (thickness ≤600 nm). From an approximate theoretical model it was inferred that the spatial resolution reaches about 200 nm in our experimental conditions. Experimental data are obtained on electron-grade and on upgrade metallurgical grade polycrystalline silicon, grown by the heat exchange method on which the behavior of carbon at grain boundaries and defects has been studied by transmission electron microscopy, high-resolution electron microscopy, and electron energy loss. There is a good agreement between the experimental data on electrical activity and the calculated approximation. The present method shows that the electrical activity is mainly related to the presence of impurities. Carbon seems to trap recombining impurities and specifically oxygen. Isolated dislocations are always electrically active whereas "clean" twin boundaries are not active. The activity at boundaries is always localized on extrinsic dislocations or on precipitates. Asymmetric profiles are also observed on boundaries and stacking faults. This was related to the existence of segregated zones lying on one side of these defects which are likely to act as diffusion barriers.