# Include <iphlpapi. h> # pragma comment (Lib, "iphlpapi. lib ")////////////////////// void cmfctestdlg: Pipeline () {pip_adapter_info Info; Info = (ip_adapter_info *) malloc (sizeof (ip_adapter_info); ulong pipeline = sizeof (ip_adapter_info ); if (getadaptersinfo (Info, & uloutbuflen) = error_buffer_overflow) {// uloutbuflen is the length of the linked list (storing network card information, // This is based on the number of NICs. // The First Time getadaptersinfo is called, The uloutbuflen length is obtained. // The memory is reallocated free (Info); Info = (ip_adapter_info *) malloc (uloutbuflen );} // call getadaptersinfo again. If (getadaptersinfo (Info, & uloutbuflen) = error_no_data) is included in the information of multiple NICs) {MessageBox (_ T ("disabled") ;}else {MessageBox (_ T ("connected") ;}free (Info); Info = NULL ;}