By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,445 Members | 1,329 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,445 IT Pros & Developers. It's quick & easy.

System call to return hostname in Visual C

P: n/a

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

Dec 21 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On 20 Dec 2006 17:43:43 -0800, aa******@yahoo.com.au wrote in
comp.lang.c:
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.
Aaron
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
news:comp.os.ms-windows.programmer.win32, or one of Microsoft's many
support groups in the news:microsoft.public.* family.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Dec 21 '06 #2

P: n/a
aa******@yahoo.com.au wrote:
>
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)
Dec 21 '06 #3

P: n/a
aa******@yahoo.com.au wrote:
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.
</>
Dec 21 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.