Best of all, your original code was correct from the point of view of gdk headers. Unfortunately, pascal interface is incorrectly translated. You found a bug.
It now looks like this:
procedure gdk_pixbuf_render_pixmap_and_mask(pixbuf:PGdkPixbuf;
var pixmap_return:PGdkPixmap;
var mask_return:PGdkBitmap; alpha_threshold:longint);
But it should look like this:
procedure gdk_pixbuf_render_pixmap_and_mask(pixbuf:PGdkPixbuf; pixmap_return:PPGdkPixmap; mask_return:PPGdkBitmap; alpha_threshold:longint);
Then your original code would run correctly.
Please file a bug.
http://bugs.freepascal.org/