I am using C++ to write code to create a network 'team' on a machine having an intel proset network adapter. I am using the IANet_TeamOfAdapter CIM class as mentioned in their WMI scripting guide ( http://downloadmirror.intel.com/9405..._Reference.pdf ).
To be specific I am unable to set the TeamingMode property of this class. It requires a UINT32 type variable. Hence I first tried with using a variant whose vt type was VT_UI4 but to no avail. I then also tried with VT_UINT but it didnt work as well. I am getting a "WBEM_E_TYPE_MISMATCH" error. Does anyone has any experience with this? How did you go about solving this??
Another problem that I am facing is this:
I need to create a variant of type VT_ARRAY thereby holding an array of BSTRs (corresponding to the path of the physical adapters) which I am doing like so:
CPP / C++ / C Code:
//get the path of the physical adapter which we are going to bind a team on
Here I get the path using the __PATH variable of the current physical
adapter instance and I update PhysicalAdapterPath with it.
Ive verifed that the correct path was indeed stored using WMI object
browser. I later use this variable to create a variant holding an array
of BSTRS which corresponds to this path.
CPP / C++ / C Code:
The above wide char printf does not show the content that PhysicalAdapterPath holds. Which means that either the array was not populated properly from PhysicalAdapterPaths or I do not how to get/print/check the content of that location i.e. the BSTR at the 0th index of that array of BSTRS..I even tried to print the contents of the memory location where the array is supposed to start from...specifically I tried printing the memory contents of memory pointed to by parray.. msdn mentions that this variable within a variant gives the "dimentions, size and in-memory location of the array". I strongly think that by merely printing the content of memory starting from 'parray' is the wrong way to print the contents of the array. So..does anyone know how to check the contents of a safearray manually?? Using a debugger like windbg??
//create a safearray with the physical adapter path
//create a 1D safe array with 1 element and lowest index as 0
wprintf(L"Retrieved Adapter Path is \"%s\"\n", \\
any input would be appreciated....even if you haven't come across this specific issue, anything related and how you went about resolving it would be helpful