I'm making a program that uses WiFi 802.11b/g, Ive been looing around and cant find any code or threads on solved wifi issues

Im trying to determine signal strength, access point name, etc

And the tricky one, distance from router

Help please