title: Cannot read status of NetBIOS
body: <p>We got a (reproducable) bug in our NetBIOS code in Delphi that (seemed) to work for years. </p>
  
  <p>Used System Windows 7 / 64 bit.</p>
  
  <p>We have a routine that checks if NetBIOS is active or not.
  We do this by calling NetBIOS() and reading the return code.</p>
  
  <p>Even so we deactivated NetBIOS via Windows Properties on (the single enabled) Network Connection,
  the call to Netbios(lRec) returns NRC_GOODRET.</p>
  
  <p>This is the important code fragment:</p>
  
  <pre><code>Getmem(lNCB, SizeOf(TNCB));
  try
    Fillchar(lNCB^, SizeOf(TNCB), 0);
  
    Getmem(lLenum, SizeOf(TLanaEnum));
    try
      Fillchar(lLenum^, SizeOf(TLanaEnum), 0);
  
      Getmem(lAdapter, SizeOf(TAdapterStatus));
      try
        Fillchar(lAdapter^, SizeOf(TAdapterStatus), 0);
  
        lLenum.Length := chr(0);
        lNCB.ncb_command := chr(NCBENUM); // List NetBIOS
        lNCB.ncb_buffer := Pointer(lLenum);
        lNCB.ncb_length := SizeOf(lLenum);
  
        if Netbios(lNCB) = Char(NRC_GOODRET) then
          ... We get here, even when NetBIOS is deactiated
  </code></pre>
  
  <p>The code is unchanged and works since years. Did I miss something?</p>