A reference is basically a disguised pointer, so you are trying to take the address of a temporary (returned) value. Try it as a plain SOCKET, without the &.
however FacadeSocket::Con.getSocket() will just make a copy of hSocket which becomes a very large unitiliazed value and pass it into the Connect function which is not what i want :
I have also tried to rewrite the function hSocket so that it returns a reference to a Socket, but that did not work either :
The rough tl;dr is: FacadeSocket::Con.getSocket() is a "temporary object", and we can't get an alias to that temporary object because it is about to be destroyed.
We can make the "temporary object" last longer (i.e., have its lifetime extended) by "copying" it, by taking a const lvalue reference to it, or by taking a rvalue reference to it.