I can't remember, are questions related to pd's C API appropriate for pd-list, or are they better asked here? It seems that everyone who responds to those questions is on this list just as much, anyway.
I have been mucking around with opening and closing pd patches using API calls instead of pd's messaging system. The reason for this is that I would like to be able to manage (open/close) multiple instances of a patch, and be able to send each copy of the patch a unique message via its $0 argument (see http://www.mail-archive.com/pd-list@iem.at/msg41648.html). So far, the method has been to hack glob_evalfile to look like: