Extended mqsocket.dll functionalities from http://www.mql5.com/en/code/169