The information in this article applies to:
SUMMARYNetbios.exe is a NetBIOS programming sample that implements an echo server and client. The sample illustrates how a client and server should be written in order to make the application protocol and LAN Adapter (LANA) independent. It also shows how to avoid common mistakes programmers frequently make when writing NetBIOS applications under WIN32. MORE INFORMATIONThe following files are available for download from the Microsoft
Download Center. Click the file names below to download the files: http://www.microsoft.com/downloads/search.aspand then click How to use the Microsoft Download Center. For a discussion about LANAs see the following article in the Microsoft Knowledge Base: Q138037 How to Use LANA Numbers in a 32-bit EnvironmentThis file is associated with the NetBIOS echo client/server sample. There are four source files associated with this application:
Compilation & ExecutionThese files compile into two applications: client.exe and server.exe.First, compile nbcommon.c into object code. In a DOS prompt, type: cl /c nbcommon.cNext, compile the two applications with the following commands: cl -o client client.c nbcommon.obj netapi32.libTo run the server: server SERVER-NAMESERVER-NAME uniquely identifies the echo service. All clients who want to connect to the server should connect using this name. To run the client: client CLIENT-NAME SERVER-NAMECLIENT-NAME uniquely identifies the client. SERVER-NAME identifies which NetBIOS server the client wishes to connect to. Both of these names are NetBIOS names which are formed as follows:
server MYSERVER1This establishes the server process as MYSERVER1. This name is registered with the machine and can be verified by running: nbtstat -a AJONES1which will display a list of all names registered with the machine including "MYSERVER1." Please note that nbtstat.exe is a utility that is installed only when the TCP/IP protocol is installed. It is a very useful utility for debugging certain aspects of Netbios programs, and I would highly recommend installing it. Execute the client from a machine named "AJONES2" with this command: client MYCLIENT MYSERVER1The client will connect to the server, send a string, and read the string back from the server. Additional query words:
Keywords : kbfile kbnetwork kbAPI kbNetBIOS kbNTOS351 kbNTOS400 kbWinOS2000 kbSDKPlatform kbWinOS95 kbWinOS98 kbGrpNet |
Last Reviewed: January 21, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |