Click here to Skip to main content
15,901,035 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralDetect closing of application from windows Pin
Manfred Staiger23-Nov-03 23:58
Manfred Staiger23-Nov-03 23:58 
GeneralRe: Detect closing of application from windows Pin
bnn3nasdfasdfa24-Nov-03 1:56
bnn3nasdfasdfa24-Nov-03 1:56 
GeneralRe: Detect closing of application from windows Pin
David Crow24-Nov-03 2:32
David Crow24-Nov-03 2:32 
GeneralRe: Detect closing of application from windows Pin
Manfred Staiger24-Nov-03 2:45
Manfred Staiger24-Nov-03 2:45 
GeneralError while changing to Release Version Pin
ramya8323-Nov-03 22:15
ramya8323-Nov-03 22:15 
GeneralRe: Error while changing to Release Version Pin
Ilamparithi23-Nov-03 22:39
Ilamparithi23-Nov-03 22:39 
GeneralRe: Error while changing to Release Version Pin
David Crow24-Nov-03 2:34
David Crow24-Nov-03 2:34 
GeneralLANA Numbers Pin
BaldwinMartin23-Nov-03 21:55
BaldwinMartin23-Nov-03 21:55 
In Oct. 2002 Microsoft wrote in part:

NetBIOS LANA Numbers
Windows XP Certain legacy networking protocols, including NetBEUI, will no longer be supported. For more information, see Network Protocol Support in Windows.

The NetBIOS LANA number identifies the transport driver, network interface card (NIC) driver, and adapter that will be used to send and receive NetBIOS packets. This is known as the network route. The following example shows the network route that will be used when you specify a LANA value of 1:

001 NetBT -> IEEPRO -> IEEPRO1

Specify the LANA number in the ncb_lana_num member of the NCB structure when you issue a NetBIOS command.

The IBM NetBIOS 3.0 specification supports only two LANA numbers, because NetBEUI was originally the only protocol that supported NetBIOS, and a computer could contain only two network adapters at that time. Specifying LANA 0 directed a command to the first adapter, and specifying LANA 1 directed a command to the second adapter. Because many computers had only one network adapter, many MS-DOS based applications sent all their requests to LANA 0. If a second network adapter was installed, some applications allowed the user to specify the use of LANA 1 instead. As a result, LANA 0 became the default setting, though it was never intended as such.

Windows NT/Windows 2000/Windows XP enables NetBIOS to use transport protocols other than NetBEUI. Therefore, Microsoft has extended the meaning of a LANA number to indicate a specific transport protocol on a specific adapter. For example, if you have two network adapters, and have three transport protocols installed, you have six LANA numbers. The LANA numbers are not necessarily sequential.

In addition to extending the meaning of a LANA number, Microsoft also added the NCBENUM command to enumerate the available LANA numbers. As an example, the LANA_ENUM structure filled by NCBENUM might hold an array with values 0, 3, 5, and 6. Zero might map to IPX/SPX on the first adapter, three might map to a different protocol on a second adapter, and so on.

Windows 2000/XP: You cannot configure LANA numbers on these platforms.

Windows NT: You can associate specific LANA numbers with specific network routes using the following steps.

To associate a LANA number with a network route

Start the Network Control Panel application.
Click the Services tab.
Double-click NetBIOS Interface.
Click the LANA number you want to change.
Enter the new LANA number to be associated with the network route.
Windows 95/98/Me: You cannot configure LANA numbers because of the way plug and play was designed. LANA numbers can change as users install plug and play devices. You may set only LANA 0, which is the default protocol. The next protocol is LANA 7, then LANA 6, and so on. If no protocol is set as the default, there may not be a LANA 0.

You can set the default protocol in the control panel using the following steps:

To set LANA 0 on Windows 95/98/Me

Start the Network Control Panel application.
Choose the protocol you want as the default.
Click Properties.
Click the Advanced tab.
Click Set this protocol to be the default protocol.
The best way to write a NetBIOS application is to support all LANA numbers, and establish connections over any LANA number. This allows your application to transparently support any transport protocol that supports NetBIOS, as well as dynamic LANA numbers associated with dial-up adapters or plug-and-play hardware. A good approach is outlined in the following steps.

To support connections over any LANA

Enumerate the LANA numbers by issuing an NCBENUM command.
Reset each LANA by issuing one NCBRESET command per LANA number.
Add your local NetBIOS name to each LANA. The name may be the same on each LANA.
Connect using any LANA number:
For servers, issue an NCBLISTEN command on each LANA. If necessary, cancel any outstanding listen operation after the first listen operation has been completed.
For clients, issue an NCBFINDNAME (Windows NT/Windows 2000/Windows XP only) or an NCBCALL (Windows NT/Windows 2000/Windows XP or Windows 95/98/Me) command on each LANA. The first successful NCBFINDNAME or NCBCALL operation will indicate which LANA to use. When using NCBCALL instead of NCBFINDNAME, you must cancel any pending NCBCALL commands and hang up any extra completed calls.
Though this is the best technique for writing a NetBIOS application, it generates several datagrams, making the NetBIOS interface less desirable than other networking interfaces.

End of Microsoft White paper.

OK if I want to grab a MAC number and I get the os type of say XP how do I enumerate the the LANA numbers.

Should I use 0?




Best Wishes,
ez_way
GeneralRe: LANA Numbers Pin
Ilamparithi23-Nov-03 23:36
Ilamparithi23-Nov-03 23:36 
GeneralRe: LANA Numbers Pin
Anonymous23-Nov-03 23:54
Anonymous23-Nov-03 23:54 
GeneralRe: LANA Numbers Pin
Ilamparithi24-Nov-03 1:29
Ilamparithi24-Nov-03 1:29 
GeneralResults of a ping Pin
chadell23-Nov-03 21:45
chadell23-Nov-03 21:45 
GeneralRe: Results of a ping Pin
BaldwinMartin23-Nov-03 21:57
BaldwinMartin23-Nov-03 21:57 
GeneralRe: Results of a ping Pin
chadell23-Nov-03 23:23
chadell23-Nov-03 23:23 
GeneralRe: Results of a ping Pin
Ilamparithi23-Nov-03 23:37
Ilamparithi23-Nov-03 23:37 
GeneralRe: Results of a ping Pin
ez_way@charter.net23-Nov-03 23:56
sussez_way@charter.net23-Nov-03 23:56 
GeneralRe: Results of a ping Pin
David Crow24-Nov-03 2:37
David Crow24-Nov-03 2:37 
GeneralRe: Results of a ping Pin
chadell24-Nov-03 2:48
chadell24-Nov-03 2:48 
GeneralRe: Results of a ping Pin
David Crow24-Nov-03 3:06
David Crow24-Nov-03 3:06 
GeneralCList problem Pin
dave@home23-Nov-03 21:44
dave@home23-Nov-03 21:44 
GeneralRe: CList problem Pin
David Crow24-Nov-03 2:38
David Crow24-Nov-03 2:38 
GeneralRe: CList problem Pin
dave@home24-Nov-03 9:09
dave@home24-Nov-03 9:09 
Generalcreate template class Pin
ahmadaz23-Nov-03 21:34
ahmadaz23-Nov-03 21:34 
GeneralRe: create template class Pin
ZoogieZork23-Nov-03 21:56
ZoogieZork23-Nov-03 21:56 
GeneralMFC Toolbar button text Pin
AntonGogolev23-Nov-03 20:57
AntonGogolev23-Nov-03 20:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.