Click here to Skip to main content
15,606,221 members
Home / Discussions / COM
   

COM

 
GeneralRe: TROUBLE Passing BYTE Array from Client to COM OUTPROC Server Pin
K ARUN KUMAR18-May-10 21:30
K ARUN KUMAR18-May-10 21:30 
GeneralRe: TROUBLE Passing BYTE Array from Client to COM OUTPROC Server Pin
Stephen Hewitt18-May-10 21:40
Stephen Hewitt18-May-10 21:40 
GeneralRe: TROUBLE Passing BYTE Array from Client to COM OUTPROC Server Pin
K ARUN KUMAR18-May-10 22:51
K ARUN KUMAR18-May-10 22:51 
QuestionProblem with ActiveX control Pin
NarVish17-May-10 1:44
NarVish17-May-10 1:44 
AnswerRe: Problem with ActiveX control Pin
Cool_Dev18-May-10 1:59
Cool_Dev18-May-10 1:59 
GeneralRe: Problem with ActiveX control Pin
NarVish21-May-10 0:05
NarVish21-May-10 0:05 
QuestionCan we call dynamically COM exposed methods inhertied from IUnknow? Pin
glitteringsound14-May-10 2:07
glitteringsound14-May-10 2:07 
QuestionWhy Exception occured getting address of COM function ? [modified] Pin
glitteringsound12-May-10 21:21
glitteringsound12-May-10 21:21 
Hello,

I am getting address of COM function by loading type library (TLB) and iterating over types using ITypeLib and ITypeInfo.
After calling AddressOfMember function of ITypeInfo I am facing following exception:

System.Runtime.InteropServices.COMException (0x800288BD): Wrong module kind for the operation. (Exception from HRESULT: 0x800288BD (TYPE_E_BADMODULEKIND)) at System.Runtime.InteropServices.ComTypes.ITypeInfo.AddressOfMember(Int32 memid, INVOKEKIND invKind, IntPtr& ppv).

Any idea how to get rid of this excpetion?
for (int curFunc = 0; curFunc <iTotalfunc ; iTotalFuncs;curFunc++)
{
try
{

IntPtr ppFuncDesc;
oTypeInfo.GetFuncDesc(curFunc, out ppFuncDesc);

funcDesc = new System.Runtime.InteropServices.ComTypes.FUNCDESC();
funcDesc = (System.Runtime.InteropServices.ComTypes.FUNCDESC)Marshal.PtrToStructure(ppFuncDesc,typeof(System.Runtime.InteropServices.ComTypes.FUNCDESC));



int cNames;
//if (funcDesc.)

oTypeInfo.GetNames(funcDesc.memid, m_strFuncNames, 1, out cNames);

switch (funcDesc.invkind)
{
case System.Runtime.InteropServices.ComTypes.INVOKEKIND.INVOKE_FUNC:

//Console.WriteLine(" (method)");
//_infoType = "Function";
//_property = false;
string strSignature = "";
if (funcDesc.cParams> 0)
{
IntPtr addrssOfMember;

oTypeInfo.AddressOfMember(funcDesc.memid, //Here where exception occured System.Runtime.InteropServices.ComTypes.INVOKEKIND.INVOKE_FUNC, out addrssOfMember);
}//end of if
}//end of switch
}//end of try
}//end of for

Regards
Usman



-- Modified Friday, May 14, 2010 3:06 AM
Questionlanguage localization using XML in VC++ Pin
punyah20108-May-10 9:03
punyah20108-May-10 9:03 
AnswerRe: language localization using XML in VC++ Pin
Cool_Dev18-May-10 2:04
Cool_Dev18-May-10 2:04 
QuestionHow to read Tyupe Libraries(TLBs) in C#? Pin
glitteringsound5-May-10 20:08
glitteringsound5-May-10 20:08 
AnswerRe: How to read Tyupe Libraries(TLBs) in C#? Pin
«_Superman_»6-May-10 15:51
professional«_Superman_»6-May-10 15:51 
QuestionCoCreateInstance HResult is failing, getting error -2147221164 stating that Class is not registered. Pin
pallaka3-May-10 3:24
pallaka3-May-10 3:24 
AnswerRe: CoCreateInstance HResult is failing, getting error -2147221164 stating that Class is not registered. Pin
«_Superman_»3-May-10 11:22
professional«_Superman_»3-May-10 11:22 
AnswerRe: CoCreateInstance HResult is failing, getting error -2147221164 stating that Class is not registered. Pin
Vi25-May-10 21:30
Vi25-May-10 21:30 
QuestionAbout COM+ Pin
NetQuestions29-Apr-10 19:41
NetQuestions29-Apr-10 19:41 
AnswerRe: About COM+ Pin
Michel Godfroid1-May-10 7:56
Michel Godfroid1-May-10 7:56 
GeneralRe: About COM+ Pin
NetQuestions24-May-10 19:09
NetQuestions24-May-10 19:09 
QuestionProblem with Breakpoint when Debugging a COM interop API with .NET 4.0 Pin
Hallmanac26-Apr-10 15:46
Hallmanac26-Apr-10 15:46 
QuestionGetting started with COM Pin
Ron Aldrich26-Apr-10 10:05
Ron Aldrich26-Apr-10 10:05 
AnswerRe: Getting started with COM Pin
Michel Godfroid26-Apr-10 11:42
Michel Godfroid26-Apr-10 11:42 
GeneralRe: Getting started with COM Pin
Ron Aldrich27-Apr-10 11:21
Ron Aldrich27-Apr-10 11:21 
GeneralRe: Getting started with COM Pin
Michel Godfroid27-Apr-10 12:23
Michel Godfroid27-Apr-10 12:23 
QuestionDevelop a PLug-In for IE in c# (like Tamper IE) Pin
shiv301026-Apr-10 3:18
shiv301026-Apr-10 3:18 
AnswerRe: Develop a PLug-In for IE in c# (like Tamper IE) Pin
Michel Godfroid26-Apr-10 3:25
Michel Godfroid26-Apr-10 3:25 

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.