lstrcmp 与lstrcmpi

#include “stdafx.h”
#include <stdlib.h>
#include <atlstr.h>
#include

using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
TCHAR a[10] = _T(“123Wer”);
TCHAR b[10] = _T(“123WEr”);
int i = lstrcmp(a, b);
int r = lstrcmpi(a, b);

cout << i<<endl;
cout << r<<endl;
system("pause");
return 0;

}

结果:
-1
0

得到网络管理中心显示的网卡

#include “StdAfx.h”
#include<atlstr.h>
#include <NetCon.h>
#include <stdlib.h>
int main()
{
long lCardNum = 0;
TCHAR szServiceName[6][256];
CString strServiceName;
CString strGuidId ;
IEnumNetConnection *pEnum = NULL;
INetConnectionManager *pManager = NULL;
INetConnection *pConnection = NULL;
ULONG celt = 0;
NETCON_PROPERTIES *Nproperties = NULL;
INetSharingManager *pNetSharingManager = NULL;
INetSharingConfiguration *pConfiguration = NULL;

    //可用なネットワークアダプタの接続状態を取得します。
CoInitialize(NULL);
CoCreateInstance(CLSID_ConnectionManager, NULL, CLSCTX_SERVER, IID_INetConnectionManager, (void**)&pManager);
if(pManager == NULL)
{
    printf("異常、失敗,Error:%d\n",GetLastError());
    return 1;
}
pManager->EnumConnections(NCME_DEFAULT, &pEnum);
while(pEnum->Next(1, &pConnection, &celt) == S_OK )
{
    pConnection->GetProperties(&Nproperties);
    strGuidId.Format(_T("{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}" )
                    ,Nproperties->guidId.Data1 
                    ,Nproperties->guidId.Data2 
                    ,Nproperties->guidId.Data3 
                    ,Nproperties->guidId.Data4[0]
                    ,Nproperties->guidId.Data4[1] 
                    ,Nproperties->guidId.Data4[2]
                    ,Nproperties->guidId.Data4[3]
                    ,Nproperties->guidId.Data4[4]
                    ,Nproperties->guidId.Data4[5] 
                    ,Nproperties->guidId.Data4[6]
                    ,Nproperties->guidId.Data4[7]
                    ); 


        strServiceName = strGuidId ;
        printf("strServiceName = %S \n",(LPCTSTR)strServiceName);
}
if(pManager)           pManager->Release();
if(pConnection)        pConnection->Release();
if(pEnum)              pEnum->Release();
if(pNetSharingManager) pNetSharingManager->Release();
if(pConfiguration)     pConfiguration->Release();
CoUninitialize();

system("pause");
return 0;

}