I started a reply to this and budda bing, budda bing, Jooel and Richard already posted. Darned this bbchecker... you gotta be quick... forget what I was going to say.

Like Jooel said, get familiar with ReadProfileString(). it can not only pull individual section and key names but also enumerate all sections and/or keys just by passing empty parms.

Richard shows just how simple it is.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.