System call to return hostname in Visual C

A

aaron80v

Is there a way to obtain hostname from system call in Windows env? How
do I obtain a hostname from Visual C?

Do I just call system("hostname")?

Aaron
 
J

Jack Klein

Is there a way to obtain hostname from system call in Windows env? How
do I obtain a hostname from Visual C?

I am sure there is.
Do I just call system("hostname")?

I don't know.

We don't discuss the Windows API, or any other system specific
extensions, here, because they are not part of the C language.

Ask Windows API questions in a Windows programming group such as
or one of Microsoft's many
support groups in the family.
 
C

CBFalconer

Is there a way to obtain hostname from system call in Windows env?
How do I obtain a hostname from Visual C?

By asking in an appropriate newsgroup, which is not this one. See
the links below.

--
Some useful references about C:
<http://www.ungerhu.com/jxh/clc.welcome.txt>
<http://www.eskimo.com/~scs/C-faq/top.html>
<http://benpfaff.org/writings/clc/off-topic.html>
<http://anubis.dkuug.dk/jtc1/sc22/wg14/www/docs/n869/> (C99)
<http://www.dinkumware.com/refxc.html> (C-library}
<http://gcc.gnu.org/onlinedocs/> (GNU docs)
<http://clc-wiki.net> (C-info)
 
C

Clever Monkey

Is there a way to obtain hostname from system call in Windows env? How
do I obtain a hostname from Visual C?

Do I just call system("hostname")?
<off-topic>
Search MSDN.
</>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top