Sorry if this has been asked before but i can't seem to find it on here

I was just wondering whether it was possible to detect the ip of the client attempting to connect to you before you accept the connection, i'm looking for a way of implementing an ip blocker

The only parameter i get when a remote client attempts to connect is the requestID. Is there a Winsock API function that can use this to get the ip of the remote client?