The invention relates to a method for coating a surface (44), in particular a microstructured surface, of a component (55) comprising different materials, in particular glass and silicon, wherein the surface (44) is first activated and then coated, wherein an oxidising solution, a basic solution or an acid-oxidising solution is used to activate the surface (44).