Does the text file have a header somewhere above that line with square [brackets]? If so then it is an INI format and ReadProfileString can be used to read that line directly without parsing.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.