Does GetHostName() work without TCP/IP?

Does GetHostName() work without TCP/IP?

Post by Jeremy Garrar » Tue, 28 Mar 2000 04:00:00



I only ask 'cus I need to get the host name of machines running Netbeui too
and being that it is included with Winsock2, I suspect it may need TCP/IP ro
run? If so, what's the alternative?

Thanks

 
 
 

Does GetHostName() work without TCP/IP?

Post by Felix Kasza [MVP » Wed, 29 Mar 2000 04:00:00


Jeremy,

 > I only ask 'cus I need to get the host name
 > of machines running Netbeui too

Use GetComputerName().  For Netbeui, hostname == computername, as
hierarchical (DNS-style) domains are not supported.

--

Cheers,
Felix.

If you post a reply, kindly refrain from emailing it, too.
Please consider migrating to microsoft.public.platformsdk.*
where the MS folks plan on* around. See you there!

 
 
 

1. Access NT TCP/IP from DOS app, or NT<->DOS IPC

I have a DOS app which is to be run under NT. I would just love to make
it talk TCP/IP via a sockets interface. Does anybody know if it is
possible to access TCP/IP from a DOS app (i.e. from a VDM), and if so,
how?

If this can't be done directly, then an alternative approach would be to
let an NT process handle the TCP/IP comms on behalf of the DOS app. The
problem now becomes how to perform IPC between an NT process and a DOS
program.

I've tried having the NT process create anonymous pipes, redirecting
them to STDIN & STDOUT, and spawn a DOS program. This works, but the
pipes are implemented as files that keep on growing as you squirt data
down them (great if you wish to keep a record of all IPC data, not so
great if your hard disk has finite capacity and you're running a real-
time system!).

Named pipes seem to be a promising mechanism. If I understand this
correctly, as far as the DOS app is concerned this is a LAN Manager
facility. Support for LAN Manager named pipes (amongst other things) is
provided by a VDM, but I would need appropriate libraries for my DOS
program (not to mention documentation on the API).

Can any of you knowledgeable gurus shed any light on these issues or
give me some pointers (non-null)?

Thanks

Ian

+----------------------------------------------------------------------+
|  Ian Horton             |  Phone +44 1392 217850                     |
|  RHS Harntec Ltd,       |  Fax   +44 1392 435226                     |

|  UK.                    |  URL   http://www.rhs-harntec.co.uk/       |
+----------------------------------------------------------------------+

2. Any game programming compo this year?

3. need to create a TCP/IP session without user intervention

4. wanna get some information about DPA. *repost*

5. TCP/IP programming Without Winsock

6. return values on jdk 1.2

7. using WinSock without TCP/IP protocol installed

8. Directory Printing

9. strange question: TCP/IP application without connecting to the internet...

10. Send/Recv TCP/IP packet without Winsock ?

11. Using sockets without tcp/ip stack?

12. Adding TCP/IP without User Intervention