>>So it is impossible to "create" a port i guess then.

You use an existing port, if two programs are to comunicate with one another, ports are used, this is implemented useing sockets. One end point may be the server, while the other is the client. Assumeing we are designing a server:

You create the socket,
You bind the socket to a port,
You listen to the socket
And you acept any incomeing conections

The client, has less work to do

Create the socket
Then conect your socket to a remote host, useing Conect.

EDIT: the port must not already be in use. And in Windows, Winsock must be initiated first using WSAStarup