Click here to Skip to main content
16,017,297 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how can i add image/file icon in listview? Pin
Naveen19-Feb-07 20:33
Naveen19-Feb-07 20:33 
GeneralRe: how can i add image/file icon in listview? Pin
amitmistry_petlad 19-Feb-07 20:57
amitmistry_petlad 19-Feb-07 20:57 
GeneralRe: how can i add image/file icon in listview? Pin
Naveen19-Feb-07 21:04
Naveen19-Feb-07 21:04 
GeneralRe: how can i add image/file icon in listview? Pin
amitmistry_petlad 19-Feb-07 22:57
amitmistry_petlad 19-Feb-07 22:57 
QuestionProblem in using 'GlobalMemoryStatusEx' Pin
SelvaKr19-Feb-07 16:21
SelvaKr19-Feb-07 16:21 
AnswerRe: Problem in using 'GlobalMemoryStatusEx' Pin
David Crow19-Feb-07 16:55
David Crow19-Feb-07 16:55 
GeneralRe: Problem in using 'GlobalMemoryStatusEx' Pin
SelvaKr19-Feb-07 17:11
SelvaKr19-Feb-07 17:11 
Questionproblem with IWbemClassObject::GetMethod Pin
Manasi D19-Feb-07 16:03
Manasi D19-Feb-07 16:03 
Hi,
I am writing a code to execute a method of a WMI class. Please find a piece of my code below :

CString wmi_method = WMI_METHOD_GETINSTID;
BSTR wmi_method_bstr = _bstr_t(wmi_method);
IWbemClassObject* l_pClass = NULL;
HRESULT (l_hRes);

l_hRes = m_wmiService->GetObject(L"Win32_WindowsProductActivation", 0, NULL,&l_pClass, NULL); //WMI Call
if (FAILED (l_hRes))
return 0;

IWbemClassObject* l_pInParamsDefinition = NULL; //input parameter definition
IWbemClassObject* l_pOutParams= NULL;
l_hRes = l_pClass->GetMethod(L"GetInstallationID", 0, &l_pInParamsDefinition, &l_pOutParams);

if (FAILED (l_hRes))
{
return 0;
}

IWbemClassObject* l_pClassInstance = NULL;
l_hRes = l_pInParamsDefinition->SpawnInstance(0, &l_pClassInstance);
if (FAILED (l_hRes))
{
l_pClass->Release();
l_pInParamsDefinition->Release();
l_pClassInstance->Release();

return 0;
}


This code is failing because l_pInParamsDefinition value after GetMethod is called is null.
hence it cannot do 'spawnInstalnce' .

Can anyone please let me know what could be wrong.

Thanks,
Manasi
AnswerRe: problem with IWbemClassObject::GetMethod Pin
redr0cky25-Jul-10 22:10
redr0cky25-Jul-10 22:10 
AnswerRe: Do the Visual C++6 and MFC can develope application to install on.. Pin
David Crow19-Feb-07 16:41
David Crow19-Feb-07 16:41 
QuestionSEH exception translation bug Pin
jfranzoy19-Feb-07 14:14
jfranzoy19-Feb-07 14:14 
AnswerRe: SEH exception translation bug Pin
Mark Salsbery20-Feb-07 6:42
Mark Salsbery20-Feb-07 6:42 
QuestionC++ Email project help Pin
arbster119-Feb-07 12:50
arbster119-Feb-07 12:50 
AnswerRe: C++ Email project help Pin
David Crow21-Feb-07 8:21
David Crow21-Feb-07 8:21 
QuestionMFC Force Painting Pin
Bram van Kampen19-Feb-07 12:49
Bram van Kampen19-Feb-07 12:49 
AnswerRe: MFC Force Painting [modified] Pin
Mark Salsbery19-Feb-07 13:06
Mark Salsbery19-Feb-07 13:06 
GeneralRe: MFC Force Painting Pin
Bram van Kampen19-Feb-07 13:46
Bram van Kampen19-Feb-07 13:46 
GeneralRe: MFC Force Painting Pin
Mark Salsbery19-Feb-07 13:53
Mark Salsbery19-Feb-07 13:53 
GeneralRe: MFC Force Painting [modified] Pin
Bram van Kampen19-Feb-07 15:16
Bram van Kampen19-Feb-07 15:16 
GeneralRe: MFC Force Painting Pin
PJ Arends19-Feb-07 15:51
professionalPJ Arends19-Feb-07 15:51 
GeneralRe: MFC Force Painting Pin
Bram van Kampen19-Feb-07 16:04
Bram van Kampen19-Feb-07 16:04 
GeneralRe: MFC Force Painting Pin
Mark Salsbery20-Feb-07 5:21
Mark Salsbery20-Feb-07 5:21 
GeneralRe: MFC Force Painting Pin
Bram van Kampen20-Feb-07 13:23
Bram van Kampen20-Feb-07 13:23 
GeneralRe: MFC Force Painting Pin
Mark Salsbery20-Feb-07 13:30
Mark Salsbery20-Feb-07 13:30 
GeneralRe: MFC Force Painting Pin
Mark Salsbery20-Feb-07 5:41
Mark Salsbery20-Feb-07 5:41 

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.