Re: Help Needed

Ian Carr-de Avelon (avelon@phys.uva.nl)
Mon, 31 Jul 1995 10:18:09 +0200


At 02:12 31-07-95 -0800, hfageln@bgnet.bgsu.edu wrote:
>Would some one help me in setting up CUSEEME.
>I unziped the file and tried to run the software but I got the message
"Gethostname Failed"
>Any one's help will be greatly appreciated.
>
>
>
I enclose a help file on this routine. This is an unusual one to fail as the
Winsock is telling CU-SeeMe that it does not know the name of your own PC.
My guess is that it is the last of the possible failures listed here.
Another piece of software, which you are running, has blocked the Winsock.
Yours
Ian

Database Routines

gethostname()

Description Return the standard host name for the local machine.

#include <winsock.h>

int PASCAL FAR gethostname ( char FAR * name, int namelen );

name A pointer to a buffer that will receive the host name.

namelen The length of the buffer.

Remarks This routine returns the name of the local host into the buffer
specified by the name
parameter. The host name is returned as a null-terminated string. The form
of the host
name is dependent on the Windows Sockets implementation--it may be a simple
host
name, or it may be a fully qualified domain name. However, it is guaranteed
that the
name returned will be successfully parsed by gethostbyname() and
WSAAsyncGetHostByName().

Return Value If no error occurs, gethostname() reutrns 0, otherwise it
returns SOCKET_ERROR and a
specific error code may be retrieved by calling WSAGetLastError().

Error Codes WSAEFAULT The namelen parameter is too small

WSANOTINITIALISED A successful WSAStartup() must occur before using this API.

WSAENETDOWN The Windows Sockets implementation has detected that the
network subsystem has failed.

WSAEINPROGRESS A blocking Windows Sockets operation is in progress.

See Also gethostbyname(), WSAAsyncGetHostByName().

*************************************************
* Ian Carr-de Avelon avelon@phys.uva.nl *
* http://pc-ia184.phys.uva.nl/avelon.htm *
* *
* dept. of Physics Education *
* University of Amsterdam *
* Netherlands *
*************************************************