Click here to Skip to main content
15,860,861 members
Home / Discussions / COM
   

COM

 
AnswerRe: Can we calculate/extract Virtual Table address some how from DIA SDK? Pin
Richard MacCutchan4-Nov-10 23:34
mveRichard MacCutchan4-Nov-10 23:34 
GeneralRe: Can we calculate/extract Virtual Table address some how from DIA SDK? Pin
glitteringsound5-Nov-10 0:12
glitteringsound5-Nov-10 0:12 
GeneralRe: Can we calculate/extract Virtual Table address some how from DIA SDK? Pin
Richard MacCutchan5-Nov-10 1:52
mveRichard MacCutchan5-Nov-10 1:52 
GeneralRe: Can we calculate/extract Virtual Table address some how from DIA SDK? Pin
glitteringsound5-Nov-10 2:10
glitteringsound5-Nov-10 2:10 
GeneralRe: Can we calculate/extract Virtual Table address some how from DIA SDK? Pin
Richard MacCutchan5-Nov-10 2:27
mveRichard MacCutchan5-Nov-10 2:27 
QuestionQuering a COM object in .net Pin
cable beach19-Oct-10 20:03
cable beach19-Oct-10 20:03 
AnswerRe: Quering a COM object in .net Pin
«_Superman_»19-Oct-10 21:42
professional«_Superman_»19-Oct-10 21:42 
GeneralRe: Quering a COM object in .net Pin
cable beach20-Oct-10 13:26
cable beach20-Oct-10 13:26 
Thanks for the answer, but in order to cast, you need to have a type to cast to. In this case, the variable being passed (as an object), is actually a vb6 form, and to get the type means that I need a reference to the vb6 dll, and the form needs to be an exported type.

If I was using VB.net (and I have tried this), I can just reference properties of the object without casting, or creating a reference, presumably using late binding to query the object at runtime "under the bonnet" - this is all taken care of for the VB developer.

My question is: how can I do the same thing in c#?

To clarify the sample code:

VB6 code:

dim obj as MREPlugin32.MREPlugin<br />
...<br />
set obj = new MREPlugin32.MREPlugin<br />
obj.Init(Me)<br />


VB.net code (this works):
public Sub Init(obj as Object)<br />
    dim location as string = obj.Location<br />
End Sub<br />



So how can I do this?
C# Code:
public Void Init(object obj)<br />
    {<br />
    string location = obj.Location;  // Somehow, without any external references.<br />
    }<br />

GeneralRe: Quering a COM object in .net Pin
Lim Bio Liong24-Oct-10 20:40
Lim Bio Liong24-Oct-10 20:40 
GeneralRe: Quering a COM object in .net Pin
cable beach25-Oct-10 13:17
cable beach25-Oct-10 13:17 
QuestionShell Extension Pin
A_Fa15-Oct-10 18:47
A_Fa15-Oct-10 18:47 
QuestionIHTMLElement2 functions crash in IE7 when scrolling browser control programmatically Pin
castielle_alana15-Oct-10 1:38
castielle_alana15-Oct-10 1:38 
AnswerRe: IHTMLDocument2 functions crash in IE7 when scrolling browser control programmatically Pin
castielle_alana15-Oct-10 1:44
castielle_alana15-Oct-10 1:44 
QuestionCoInitialize return code Pin
alex__b14-Oct-10 23:30
professionalalex__b14-Oct-10 23:30 
AnswerRe: CoInitialize return code [modified] Pin
Sauro Viti14-Oct-10 23:46
professionalSauro Viti14-Oct-10 23:46 
GeneralRe: CoInitialize return code Pin
alex__b15-Oct-10 0:05
professionalalex__b15-Oct-10 0:05 
QuestionInvoke methods in OCX in c# Pin
Viratsaran11-Oct-10 20:18
Viratsaran11-Oct-10 20:18 
AnswerRe: Invoke methods in OCX in c# Pin
«_Superman_»13-Oct-10 20:31
professional«_Superman_»13-Oct-10 20:31 
QuestionConvert document to PDF format Pin
hemananthan15-Sep-10 19:29
hemananthan15-Sep-10 19:29 
AnswerRe: Convert document to PDF format Pin
Member 45243333-Jul-11 22:40
Member 45243333-Jul-11 22:40 
GeneralRe: Convert document to PDF format Pin
Nitin K. Kawale12-Jul-11 0:34
professionalNitin K. Kawale12-Jul-11 0:34 
QuestionGetting an access to idispatch member of idispatch interface Pin
Altankhuu11-Sep-10 21:25
Altankhuu11-Sep-10 21:25 
AnswerRe: Getting an access to idispatch member of idispatch interface Pin
«_Superman_»12-Sep-10 19:21
professional«_Superman_»12-Sep-10 19:21 
GeneralRe: Getting an access to idispatch member of idispatch interface Pin
Altankhuu19-Sep-10 21:56
Altankhuu19-Sep-10 21:56 
AnswerRe: Getting an access to idispatch member of idispatch interface Pin
Lim Bio Liong26-Oct-10 1:38
Lim Bio Liong26-Oct-10 1:38 

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.