David,
Clicked send before I finished what I was going to say. The original sample doesn't show where the DLL declarations are being made. The thought occurs that while redclaring a function creates minimal (almost not worthy of mentioning) additional overhead, I wonder if this might cause some problem if they were re-clared in this iterative situation. Wasn't something like 400 files mentioned?
George
Ubi caritas et amor, deus ibi est