|
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.
Kind Regards
modified on Tuesday, October 20, 2009 9:14 AM
|
|
|
|
|
I got absolutely no idea on how you'd hook up that event, and you don't want me to Google. If it were an interview-question, I'd suggest sending a message to the mainform and handle it in the WndProc. Kinda like InterOpping to yourself
I are Troll
|
|
|
|
|
See, that's why I asked you not to reply if you don't actually know what my problem is.
You marked your response as an ANSWER while in fact I still have no answer at all.
What am I supposed to do now? Repost my post as a new to regain my post's "unanswered" status?
Sorry for coming across as hostile, I appreciate the suggestion you made.
The thing is, here are many posters who, for some reason, try to answer just about every problem whether they know the answer or not, simply to up their number of posts. And once a post has been answered it has much less of a chance of being seen by someone who could actually help.
Understand my reasoning?
|
|
|
|
|
Hi!
I will use the DateTimePicker with working BackColor in a project of me, but in the project I need to see witch part of the customformated DateTimePicker is selected. A normal DateTimePicker from MS has this funktion but on that i can't change the BackColor.
Thanks,
blind1985
|
|
|
|
|
i have tow datagridview i wanna delete from the first grid and add the deleted row to other grid ...
thx all
|
|
|
|
|
And what kind of problems with performing this are you having?
|
|
|
|
|
i dont have problem
but i wanna take the professional solution
using datagrid classes
thx for reply
|
|
|
|
|
what's the problem ?
DataGridViewRow firstRow = grid1.Rows[0];
grid1.Rows.Remove(firstRow);
grid2.Rows.Add(firstRow);
that's all...
|
|
|
|
|
|
can i do that by doubleclik on row???
|
|
|
|
|
Ya you can!!
just write this code in the datagridviewcelldoubleclick event.
your job is done dude!!
|
|
|
|
|
I created a site collection in a Web Application using the following code snippet in a Console Application:
============================================================================
SPWebApplication webApp = SPWebApplication.Lookup(new Uri("http://devportal.domain.local"));
webApp.Sites.Add(
"/", // site URL
"testsite", // site title
"Test Site Description", // site description
1033, // site LCID that represents the language, e.g. 1033 = en-US
"STS#0", // site template, e.g. STS#0 = Team Site
@"localdomain\my_alias", // site owner login
"Test Owner", // site owner name
"abc@def.com"); // email
Console.WriteLine("Site Created");
Console.ReadLine();
============================================================================
However, I am not able to view the same? How should I view it?
modified on Tuesday, October 20, 2009 8:33 AM
|
|
|
|
|
mgr_2k7 wrote: How should I view it?
As a total mess! What is this supposed to be about and what is its relevance to the C# forum?
|
|
|
|
|
mgr_2k7 wrote: How should I view it?
Poorly.
This code is a mess and made less readable by the fact you haven't enclosed it in pre tags.
When I did decipher the code, SPWebApplication is a Sharepoint class, so you've posted to the wrong forum.
CCC solved so far: 2 (including a Hard One!)
|
|
|
|
|
Hello Friends,
I am facing problem to merger 2 or multipule Multidimensional Array into Single Multidimensional Array in C#.
Please help me how can I do this.
|
|
|
|
|
Hi Friend!
The more clarity you give to your question will get the answer fast.
Please try to give the code and errors so that some one can help you with
clear idea
thanks
|
|
|
|
|
basantakumar wrote: I am facing problem
Well you need to describe it in better detail than this. Show us what code you are using, what you expect to happen, and what is (or is not) happening, that causes you a problem.
|
|
|
|
|
Thanks a lot. I have done that.
|
|
|
|
|
I have a similar requirement, could you please help me how you did this?
|
|
|
|
|
Hi
i'm looking for which how to visual studio generate code when u are working on design mode. for example, suppose u have a web project with visual studio, when u add gridView to yout web page, it generate aspx code in .aspx file on the specific line of page, when u change some default properties of gridView, it add code to .aspx, and when u delete gridView, it delete gridView code that wrote to aspx file. i'm looking for a best way to accomplish this (user design form and my application generate aspx code for it).
can anybody help me ?
thanks
|
|
|
|
|
hdv212 wrote: i'm looking for a best way to accomplish this (user design form and my application generate aspx code for it).
Hi What do you mean,
what do you really expect from others....
i don't get you...!
|
|
|
|
|
Hi jasome
i want when user works in design time and drag & drop a controls on the web page and change it's properties, my application create appropriate aspx code for that.
|
|
|
|
|
hdv212 wrote: i want when user works in design time and drag & drop a controls on the web page and change it's properties, my application create appropriate aspx code for that.
As I suggest below, you have a lot of code to write; none of this happens by magic.
|
|
|
|
|
hdv212 wrote: i'm looking for a best way to accomplish this (user design form and my application generate aspx code for it).
If I understand your question correctly, you want to design an applcation that does the same as Visual Studio. It would allow a user to drag and drop controls onto a form, and your application would generate the actual aspx code, to make it run. This is not a trivial task, IMHO, as you will need to create libaries of classes for all the tools you are to offer, with each class having the properties necessary to generate the images and the code.
|
|
|
|
|
Hi,
I am trying to read emails using c# code..by establishing connection with gmail pop3 server..I receive mails which are in quoted-printable encoded format..how can I decode that..pls help me..
|
|
|
|