Subject: gethostname
From: Aldo Mazzilli <[email-masked]>
To: [email-masked], [email-masked]
Date: Wed, 21 Apr 1999 14:44:35 +0200

Hello,

I have to port a little C program to WindowsNT and I have some problems
with the following 'gethostname' command.

I just want to get the HOSTNAME value using :
	- gcc with cygwin32 libs (local compilation)
and 	- egcs with mingw32 libs (cross-compilation)

None of these both solutions work.

Do you know why the following program can't give me the HOSTNAME value :
---------
main ()
{
     char HOSTNAME[4096];
 
     gethostname (HOSTNAME, 4096);
        printf("HOST : %s",HOSTNAME) ;
}
---------

NB : it seems that WindowsNT requires to start up the Windows Sockets
API using WSAStartup() . Am I right ?

Thanks in advance ...
Aldo
-- 
=======================================================================
,',',',',',',' Aldo MAZZILLI             | INRIA Rhone-Alpes          |
,',',',',',',' [email-masked]| 655, avenue de l'Europe    |
,',',',',',',' Tel : 04 76 61 53 91      | 38330 Montbonnot St Martin |
,',',',',',',' Fax : 04 76 61 52 52      | FRANCE                     |
,',' *** Site WEB : http://www.inrialpes.fr/vasy/people/Aldo.Mazzilli |
=======================================================================

--
Want to unsubscribe from this list?
Send a message to [email-masked]