Click here to Skip to main content
15,917,061 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Do I always need a function that's executed by only one thread to initialize synchronization objetcs? Pin
Federico Milano14-Oct-05 2:20
Federico Milano14-Oct-05 2:20 
GeneralRe: Do I always need a function that's executed by only one thread to initialize synchronization objetcs? Pin
Blake V. Miller24-Nov-05 9:09
Blake V. Miller24-Nov-05 9:09 
QuestionExecute and retrieve data from console Pin
schemp9812-Oct-05 5:11
schemp9812-Oct-05 5:11 
QuestionRe: Execute and retrieve data from console Pin
David Crow12-Oct-05 6:22
David Crow12-Oct-05 6:22 
AnswerRe: Execute and retrieve data from console Pin
schemp9812-Oct-05 7:09
schemp9812-Oct-05 7:09 
GeneralRe: Execute and retrieve data from console Pin
Rage12-Oct-05 7:26
professionalRage12-Oct-05 7:26 
GeneralRe: Execute and retrieve data from console Pin
David Crow12-Oct-05 7:33
David Crow12-Oct-05 7:33 
QuestionGetting IP Address through WMI Pin
qrverona12-Oct-05 4:23
qrverona12-Oct-05 4:23 
Dear all,
I'm writing a C++ (.NET 2003 with MFC) application that needs to query several data through WMI. I have a problem while accessing to the "IPAddress" data managed by the Win32_NetworkAdapterConfiguration WMI class.

It is stored as a string array, the first Get returns me this information, but I did not found any issue on how to get the array.

bool CMyDoc::GetWMIItemValue( IWbemClassObject *pInstance,
LPCWSTR pItemName,
CStringArray& strArray)
{
VARIANT val;
LONG lFlavour;
HRESULT hGet;
CIMTYPE cimType;

VariantInit(&val);
strArray.RemoveAll();

hGet = pInstance->Get( pItemName,
0,
&val, // val cannot hold the result
&cimType, // returns 2008 = string array
&lFlavour); // returns 0

if (hGet == WBEM_S_NO_ERROR)
{
if (cimType == (CIM_STRING | CIM_FLAG_ARRAY))
{
// val holds 0x2008 too, unusable
// how can I access the array?
}
}


Thank you for you help...

PS: Using C# is a piece of cake, but my application has been developed in C++ and I cannot convert it.


Daniele
AnswerRe: Getting IP Address through WMI Pin
David Crow12-Oct-05 6:31
David Crow12-Oct-05 6:31 
QuestionApplication getting stuck because of load ? Pin
Amarelia12-Oct-05 3:25
Amarelia12-Oct-05 3:25 
AnswerRe: Application getting stuck because of load ? Pin
John M. Drescher12-Oct-05 5:08
John M. Drescher12-Oct-05 5:08 
AnswerRe: Application getting stuck because of load ? Pin
Bob Stanneveld12-Oct-05 6:01
Bob Stanneveld12-Oct-05 6:01 
GeneralRe: Application getting stuck because of load ? Pin
Amarelia12-Oct-05 22:17
Amarelia12-Oct-05 22:17 
QuestionRe: Application getting stuck because of load ? Pin
David Crow13-Oct-05 3:05
David Crow13-Oct-05 3:05 
AnswerRe: Application getting stuck because of load ? Pin
Amarelia13-Oct-05 3:09
Amarelia13-Oct-05 3:09 
GeneralRe: Application getting stuck because of load ? Pin
David Crow13-Oct-05 3:38
David Crow13-Oct-05 3:38 
QuestionApplication getting stuck because of load ? Pin
Amarelia12-Oct-05 3:21
Amarelia12-Oct-05 3:21 
QuestionApplication getting stuck because of load ? Pin
Amarelia12-Oct-05 3:21
Amarelia12-Oct-05 3:21 
QuestionCBitmapButton Transparency Pin
NewVCbie12-Oct-05 3:18
sussNewVCbie12-Oct-05 3:18 
QuestionWebBrowser Problem, Please. Pin
GhostEx12-Oct-05 2:47
GhostEx12-Oct-05 2:47 
QuestionTerminate sqlservr.exe process Pin
sirtimid12-Oct-05 2:23
sirtimid12-Oct-05 2:23 
QuestionRe: Terminate sqlservr.exe process Pin
David Crow12-Oct-05 3:12
David Crow12-Oct-05 3:12 
AnswerRe: Terminate sqlservr.exe process Pin
sirtimid12-Oct-05 22:02
sirtimid12-Oct-05 22:02 
QuestionRe: Terminate sqlservr.exe process Pin
David Crow13-Oct-05 3:02
David Crow13-Oct-05 3:02 
AnswerRe: Terminate sqlservr.exe process Pin
Tim Smith12-Oct-05 3:54
Tim Smith12-Oct-05 3:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.