Tom,
Did you not read the FAQ or the manual?  Basically, I ripped a lot of the FAQ right out of the manual.

WriteProfileString() uses a self-contained API and as such does not need Open() and Close().  It also has specific parameters.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.