Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

Marcel Vogt

@Marcel Vogt
About
Posts
2
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • WMI getting IP-Address [modified]
    M Marcel Vogt

    Sorry but this is not the solution for my Problem. I need help with my C++-Code above. That's why i have asked in this forum and not anywhere else ;)

    C / C++ / MFC data-structures question announcement

  • WMI getting IP-Address [modified]
    M Marcel Vogt

    Hi, i'm using WMI to get some Parameters of the local Computer. Here is a Sample Code Snippet:

        pEnumerator = NULL;
        hres = pSvc
    			->ExecQuery(
            bstr_t("WQL"), 
            bstr_t("SELECT * FROM Win32_BIOS"),
            WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY, 
            NULL,
            &pEnumerator);
    
        *pclsObj;    
    		uReturn = 0;
       
        while (pEnumerator)
        {
            HRESULT hr = pEnumerator->Next(WBEM_INFINITE, 1, 
                &pclsObj, &uReturn);
    
            if(0 == uReturn)
            {
                break;
            }
    
    	VARIANT vtprop;
    	hr = pclsObj->Get(L"SerialNumber", 0, &vtprop, 0, 0);
    	wcout << vtprop.bstrVal << endl;
    
            VariantClear(&vtprop);
    
            pclsObj->Release();
        }
    

    This works very well. How must i change this, to show the IP-Adressses of the Computer? Only with Changing to "Win32_NetworkAdapterConfiguration" and "IPAddress" instead of "SerialNumber" doesn't works. I think, because IPAdress is an Array in WMI?

    modified on Saturday, June 19, 2010 12:50 PM

    C / C++ / MFC data-structures question announcement
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups