Well, a bit late, but I could not reproduce this problem in 2.3.12. It looks like SLAPI_ADD_RESCONTROL was fixed on 2004/03/02, long before release 2.3.12. Anyway, your sample plugin works perfectly fine on my 2.3.12 build, after typos are fixed to get the plugin to compile.