- if (pAdapter->DhcpEnabled)
- _tprintf(_T("\tDHCP Enabled. . . . . . . . . . . : Yes\n"));
- else
- _tprintf(_T("\tDHCP Enabled. . . . . . . . . . . : No\n"));
- _tprintf(_T("\tAutoconfiguration Enabled . . . . : \n"));
+ if (bConnected)
+ {
+ if (pAdapter->DhcpEnabled)
+ _tprintf(_T("\tDHCP Enabled. . . . . . . . . . . : Yes\n"));
+ else
+ _tprintf(_T("\tDHCP Enabled. . . . . . . . . . . : No\n"));
+ _tprintf(_T("\tAutoconfiguration Enabled . . . . : \n"));
+ }
+ }
+
+ if (!bConnected)
+ {
+ pAdapter = pAdapter->Next;
+ continue;