Click here to Skip to main content
15,917,618 members
Home / Discussions / COM
   

COM

 
QuestionDynamically switching between DLLs Pin
Divick26-Sep-05 20:41
Divick26-Sep-05 20:41 
AnswerRe: Dynamically switching between DLLs Pin
prasad_som26-Sep-05 21:18
prasad_som26-Sep-05 21:18 
GeneralRe: Dynamically switching between DLLs Pin
Divick26-Sep-05 21:28
Divick26-Sep-05 21:28 
GeneralRe: Dynamically switching between DLLs Pin
Divick27-Sep-05 20:47
Divick27-Sep-05 20:47 
GeneralRe: Dynamically switching between DLLs Pin
rwestgraham28-Sep-05 19:08
rwestgraham28-Sep-05 19:08 
QuestionActiveX Controls Pin
Ashwin kumar Gurujala26-Sep-05 18:14
Ashwin kumar Gurujala26-Sep-05 18:14 
QuestionITypeInfo - Method parameter names Pin
mpuerto26-Sep-05 15:55
mpuerto26-Sep-05 15:55 
AnswerRe: ITypeInfo - Method parameter names Pin
Lim Bio Liong27-Sep-05 0:24
Lim Bio Liong27-Sep-05 0:24 
Hello mpuerto,

Use the ITypeInfo::GetNames() method. E.g. :

typedef std::vector<BSTR> BSTR_VECTOR;

...
...
...
BSTR_VECTOR vecFunctionParameters;

pITypeInfo -> GetFuncDesc
(
(unsigned int)function_id,
(FUNCDESC FAR* FAR*)&pFUNCDESC
);

// Resize the vector of BSTRs to hold "cParams + 1" number
// of parameters. We plus 1 because GetNames() will return
// to us the name of the method itself as the first returned
// name.
vecFunctionParameters.resize(pFUNCDESC->cParams + 1);

pITypeInfo -> GetNames
(
(MEMBERID)(pFUNCDESC->memid),
(BSTR FAR*)&(vecFunctionParameters[0]),
(unsigned int)(pFUNCDESC->cParams + 1),
(unsigned int FAR*)&cNames
);

BSTR_VECTOR::iterator theIterator;
DWORD dwParamIndex = 0;
for
(
theIterator = (vecFunctionParameters.begin() + 1), dwParamIndex = 0;
theIterator != vecFunctionParameters.end();
theIterator++, dwParamIndex++
)
{
BSTR bstrTemp = (BSTR)(*theIterator);
_bstr_t _bstTemp(bstrTemp, true);
TYPEDESC td = ((pFUNCDESC->lprgelemdescParam) + dwParamIndex)->tdesc;

std::cout << (LPCTSTR)_bstTemp << " " << td.vt << std::endl;

::SysFreeString(bstrTemp);
bstrTemp = NULL;
}


Give it a try, mpuerto.

Best Regards,
Bio.

GeneralRe: ITypeInfo - Method parameter names Pin
mpuerto27-Sep-05 11:38
mpuerto27-Sep-05 11:38 
QuestionMultithreaded COM Pin
tajbender25-Sep-05 9:52
tajbender25-Sep-05 9:52 
QuestionDesign Help Pin
dwh6324-Sep-05 18:51
dwh6324-Sep-05 18:51 
QuestionA Juicy COM Bug Pin
mango_lier24-Sep-05 13:57
mango_lier24-Sep-05 13:57 
GeneralRe: A Juicy COM Bug Pin
Jörgen Sigvardsson24-Sep-05 23:20
Jörgen Sigvardsson24-Sep-05 23:20 
QuestionExample of Custom marshelling in COM Pin
Bhargava Alanka24-Sep-05 2:00
Bhargava Alanka24-Sep-05 2:00 
QuestionChat application b/w web application Pin
irshad ali23-Sep-05 21:27
irshad ali23-Sep-05 21:27 
QuestionIphelper API Pin
Mukhan23-Sep-05 10:26
Mukhan23-Sep-05 10:26 
QuestionCOM Help Pin
amitgh22-Sep-05 20:11
amitgh22-Sep-05 20:11 
AnswerRe: COM Help Pin
rwestgraham23-Sep-05 9:06
rwestgraham23-Sep-05 9:06 
GeneralRe: COM Help Pin
amitgh25-Sep-05 18:37
amitgh25-Sep-05 18:37 
GeneralRe: COM Help Pin
rwestgraham26-Sep-05 4:10
rwestgraham26-Sep-05 4:10 
QuestionInterface leak Pin
mango_lier22-Sep-05 11:45
mango_lier22-Sep-05 11:45 
AnswerRe: Interface leak Pin
Anonymous23-Sep-05 5:30
Anonymous23-Sep-05 5:30 
GeneralRe: Interface leak Pin
mango_lier23-Sep-05 6:58
mango_lier23-Sep-05 6:58 
Questionproblem with imnact.h Pin
rajeevktripathi22-Sep-05 1:40
rajeevktripathi22-Sep-05 1:40 
QuestionDebugging DLL Pin
Venkata Rama Subbarao21-Sep-05 22:49
Venkata Rama Subbarao21-Sep-05 22:49 

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.