473,320 Members | 1,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

System call to return hostname in Visual C


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
3 1943
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Pieter Linden | last post by:
Okay, the basic plan: 1. Call EnumerateServers to return an array of all the computers on the network. available at: http://datafast.cjb.net/ 2. Resolve the HostNames into IP Addresses....
11
by: bart | last post by:
Hello, I'm so sorry, but i don't understand the concept of the .net environment yet. I made a simple program that retrieves the hostname and ipaddress of the local computer. But when i give...
2
by: Rob Levine | last post by:
Hi All, This is a cut down version of a post from earlier entitled "Name resolution in .Net". Apologies, for the repeat, but I think the first post was too verbose (it came from a blog article...
5
by: Sven | last post by:
Hi! I have a problem with System.Net.Dns.GetHostByAddress(ls_Request.UserHostAddress()).HostName Usually the call GetHostByAddress returns the correct hostname of the client, but sometimes...
36
by: AussieRules | last post by:
Hi, I want to use the user color scheme to set the color of my forms. I now I have to use the. System.Drawing.SystemColors, but which color is the color of a form background as used in other...
9
by: Supra | last post by:
i got error problem.......... An unhandled exception of type 'System.NullReferenceException' occurred in system.windows.forms.dll Additional information: Object reference not set to an instance of...
1
by: nygiantswin2005 | last post by:
Hi I am trying to resolve this bug that I have in this application. The code is below. It will generate this Exception System.UnauthorizedAccessException: Access to the path is denied. at...
1
by: Sudarhan | last post by:
Hello frnds I have created a webbased form using asp and javascript .. while submitting the form i am validating the fields in the form .it validates the field and returns alert message. but when...
3
by: Brian | last post by:
Hi.. I don't get it.... this procedure is obsolete.. that is obsolete.... I am trying to rewrite a program i wrote in vb 6 years ago Dim hostIPAddress As IPAddress =...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.