Click here to Skip to main content
15,881,803 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCopy text in Memory DC. Pin
zakkas248327-May-09 0:08
zakkas248327-May-09 0:08 
AnswerRe: Copy text in Memory DC. Pin
CPallini27-May-09 0:23
mveCPallini27-May-09 0:23 
GeneralRe: Copy text in Memory DC. Pin
zakkas248327-May-09 0:37
zakkas248327-May-09 0:37 
GeneralRe: Copy text in Memory DC. Pin
CPallini27-May-09 0:57
mveCPallini27-May-09 0:57 
Questionhow to attach horizontal scroll bar to combo box control Pin
saksp26-May-09 23:57
saksp26-May-09 23:57 
AnswerRe: how to attach horizontal scroll bar to combo box control Pin
Nibu babu thomas27-May-09 1:18
Nibu babu thomas27-May-09 1:18 
QuestionVS2005 backward compatibility Pin
Sunil P V26-May-09 23:40
Sunil P V26-May-09 23:40 
QuestionHow to use Win32_Tpm class method? Pin
aishui090526-May-09 23:38
aishui090526-May-09 23:38 
Hi,

I try to use "Win32_Tpm" to manage TPM in C++, Now i can get some info from TPM by "ExecQuery", but i want to use the class method such as "IsEnabled" by "ExecMethod", it returns error "-2147217361", it maybe means "InvalidMethodParameters "(found in net http://mono.ms.mff.cuni.cz/projects/mono/diffs/showdiff.php?old=2007-10-03&new=2007-10-04&diffIndex=15&bench=

code :

BSTR ClassName = SysAllocString(L"Win32_Tpm");
BSTR MethodName= SysAllocString(L"IsEnabled");
BSTR argname = SysAllocString(L"Request");

hres = pSvc->GetObject(L"Win32_Tpm", 0, NULL, &pclsObj, NULL);
hres = pclsObj->GetMethod(_bstr_t(L"SetPhysicalPresenceRequest"),0, &pInParamsDefinition, NULL);
hres = pInParamsDefinition->SpawnInstance(0, &pClassInstance);
varCommand.vt = VT_BSTR;
varCommand.bstrVal = L"14";
hres = pClassInstance->Put(argname, 0,&varCommand, 0);
hres = pSvc->ExecMethod(ClassName,_bstr_t(L"SetPhysicalPresenceRequest"),0,NULL,pClassInstance,&pTmpclsObj,NULL); ----- return "-2147217361" here

// isEnabled
hres = pSvc->ExecMethod(ClassName,MethodName,0,NULL,NULL,&pTmpclsObj,NULL); ----- return "-2147217361" here


Can somebody help me?
Thank a lot! Smile | :)
Stanley Hwang
QuestionHow to calculate string width and height in pixel. Pin
pandit8426-May-09 23:25
pandit8426-May-09 23:25 
QuestionRe: How to calculate string width and height in pixel. Pin
CPallini26-May-09 23:48
mveCPallini26-May-09 23:48 
AnswerRe: How to calculate string width and height in pixel. Pin
molesworth27-May-09 0:00
molesworth27-May-09 0:00 
AnswerRe: How to calculate string width and height in pixel. Pin
David Crow27-May-09 3:45
David Crow27-May-09 3:45 
JokeRe: How to calculate string width and height in pixel. Pin
Stuart Dootson27-May-09 5:12
professionalStuart Dootson27-May-09 5:12 
JokeRe: How to calculate string width and height in pixel. Pin
Rajesh R Subramanian27-May-09 21:14
professionalRajesh R Subramanian27-May-09 21:14 
QuestionMFC VS2005 example Pin
Lju226-May-09 23:23
Lju226-May-09 23:23 
AnswerRe: MFC VS2005 example Pin
BangQ26-May-09 23:35
BangQ26-May-09 23:35 
AnswerRe: MFC VS2005 example Pin
Hamid_RT26-May-09 23:45
Hamid_RT26-May-09 23:45 
GeneralRe: MFC VS2005 example Pin
Lju227-May-09 0:27
Lju227-May-09 0:27 
GeneralRe: MFC VS2005 example Pin
Hamid_RT27-May-09 1:17
Hamid_RT27-May-09 1:17 
GeneralRe: MFC VS2005 example Pin
Lju227-May-09 1:19
Lju227-May-09 1:19 
QuestionOnKillFocus for frame windows Pin
prithaa26-May-09 23:01
prithaa26-May-09 23:01 
AnswerRe: OnKillFocus for frame windows Pin
«_Superman_»27-May-09 2:45
professional«_Superman_»27-May-09 2:45 
GeneralRe: OnKillFocus for frame windows Pin
prithaa28-May-09 0:59
prithaa28-May-09 0:59 
QuestionSize variation for a window Pin
prithaa26-May-09 22:45
prithaa26-May-09 22:45 
AnswerRe: Size variation for a window Pin
zakkas248327-May-09 0:29
zakkas248327-May-09 0:29 

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.