Click here to Skip to main content
15,881,172 members
Home / Discussions / C#
   

C#

 
QuestionC# - Using Memory Streams with XML [modified] Pin
Ostrich2220-Oct-09 3:50
Ostrich2220-Oct-09 3:50 
AnswerRe: C# - Using Memory Streams with XML Pin
Keith Barrow20-Oct-09 4:00
professionalKeith Barrow20-Oct-09 4:00 
AnswerRe: C# - Using Memory Streams with XML Pin
Covean20-Oct-09 4:04
Covean20-Oct-09 4:04 
GeneralRe: C# - Using Memory Streams with XML Pin
Ostrich2220-Oct-09 4:06
Ostrich2220-Oct-09 4:06 
AnswerRe: C# - Using Memory Streams with XML Pin
OriginalGriff20-Oct-09 4:08
mveOriginalGriff20-Oct-09 4:08 
AnswerRe: C# - Using Memory Streams with XML Pin
Mirko198020-Oct-09 4:14
Mirko198020-Oct-09 4:14 
AnswerRe: C# - Using Memory Streams with XML Pin
Luc Pattyn20-Oct-09 4:24
sitebuilderLuc Pattyn20-Oct-09 4:24 
QuestionHow to catch an event fired within a late-binded, custom written DLL. [modified] Pin
MatthysDT20-Oct-09 2:55
MatthysDT20-Oct-09 2:55 
This is regarding late binding on a custom DLL in C#.

Basically, I have a self-written DLL which I wrapped using TLBIMP.exe.
Now I am trying to map the DLL's events to that of my own form. The events inside the DLL originate from a class.
I have tried almost every solution I was able to Google and nothing works.

Please do not reply to my thread if you have just Googled for a solution yourself, I need to hear from someone who has done this before. I've tried Google.

Details:

O.k, I'm going to use simpler names than that of my actual code.

My DLL file is called wrapper_MyDLL.dll and I load it as follows:
System.Reflection.Assembly _assembly = Assembly.LoadFile("wrapper_MyDLL.dll");


I save the Type as follows:
System.Type _classType = _assembly.GetType("wrapper_MyDLL.MyModuleClass");


I save the Class Object as follows:
object _classObject = Activator.CreateInstance(_classType);


Now from this point on I have tried so many different pieces of code to get the event that I'd rather not try to provide my attempted solution.
However, I can give some detail about my DLL.

If I loop through _assembly.getTypes() I get (among other) the following two classes:
* wrapper_MyDLL.MyModuleClass<br />
* wrapper_MyDLL.__MyModule_ReceivedMessageEventHandler


Inside the class wrapper_MyDLL.MyModuleClass, the DLL exposes the following (among other):
Methods:
* add_ReceivedMessage<br />
* remove_ReceivedMessage

Event(s):
* ReceivedMessage

Inside the class wrapper_MyDLL.__MyModule_ReceivedMessageEventHandler, the DLL exposes the following (among other):
Methods:
* get_Method<br />
* get_Target

Properties:
* Method<br />
* Target<br />

Now, how do I go about having that event (ReceivedMessage) fire in a method in my C# project?

If you think you can help and need any more info, let me know. Smile | :)

Kind Regards


modified on Tuesday, October 20, 2009 9:14 AM

AnswerRe: How to catch an event fired within a late-binded, custom written DLL. Pin
Eddy Vluggen20-Oct-09 7:22
professionalEddy Vluggen20-Oct-09 7:22 
GeneralRe: How to catch an event fired within a late-binded, custom written DLL. Pin
MatthysDT21-Oct-09 20:15
MatthysDT21-Oct-09 20:15 
QuestionDateTimePicker with BackColor Pin
blind198520-Oct-09 2:54
blind198520-Oct-09 2:54 
Questiondatagridview question Pin
akram300220-Oct-09 2:27
akram300220-Oct-09 2:27 
AnswerRe: datagridview question Pin
Calla20-Oct-09 2:36
Calla20-Oct-09 2:36 
GeneralRe: datagridview question Pin
akram300220-Oct-09 2:40
akram300220-Oct-09 2:40 
AnswerRe: datagridview question Pin
stancrm20-Oct-09 2:39
stancrm20-Oct-09 2:39 
GeneralRe: datagridview question Pin
akram300220-Oct-09 2:44
akram300220-Oct-09 2:44 
GeneralRe: datagridview question Pin
akram300220-Oct-09 3:31
akram300220-Oct-09 3:31 
GeneralRe: datagridview question Pin
jaypatel51220-Oct-09 7:06
jaypatel51220-Oct-09 7:06 
QuestionCreation of a site collection in MOSS 2007 using C#.NET 2008 [modified] Pin
mgr_2k720-Oct-09 2:07
mgr_2k720-Oct-09 2:07 
AnswerRe: Creation of a site collection in MOSS 2007 using C#.NET 2008 Pin
Richard MacCutchan20-Oct-09 3:16
mveRichard MacCutchan20-Oct-09 3:16 
AnswerMy vote of 1 Pin
Keith Barrow20-Oct-09 3:22
professionalKeith Barrow20-Oct-09 3:22 
QuestionHow to merge 2 multidimensional Array into Single one in C# Pin
basantakumar20-Oct-09 1:44
basantakumar20-Oct-09 1:44 
AnswerRe: How to merge 2 multidimensional Array into Single one in C# Pin
Jacobb Michael20-Oct-09 2:06
Jacobb Michael20-Oct-09 2:06 
AnswerRe: How to merge 2 multidimensional Array into Single one in C# Pin
Richard MacCutchan20-Oct-09 4:29
mveRichard MacCutchan20-Oct-09 4:29 
GeneralRe: How to merge 2 multidimensional Array into Single one in C# Pin
basantakumar26-Oct-09 4:38
basantakumar26-Oct-09 4: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.