without doubts calling it as an external process is the better way in any case (and avoids trouble of recompiling, reinterfacing and moreover possible compatibilities with the GPL license).
gslist has all the needed options for dumping the retrieved servers list in various ways.
the following example is valid for arma2 and shows how to dump all the fields used by the arma2 servers of which I'm aware (so choose those you prefer):
Code:
gslist -n arma2pc -X \gamever\hostname\mapname\gametype\numplayers\numteams\maxplayers\gamemode\timelimit\password\param1\param2\currentVersion\requiredVersion\modequalModRequired\gameState\dedicated\platform\language\difficulty\mission\gamename\sv_battleye -o %temp%\dump.txt
so you launch gslist with those arguments, wait its termination and then you can parse the dump.txt file located in the temp folder of the current user.
nice eh? :)