Click here to Skip to main content
15,899,754 members
Home / Discussions / C#
   

C#

 
GeneralRe: Second form always on top Pin
Le centriste4-Sep-07 10:46
Le centriste4-Sep-07 10:46 
GeneralRe: Second form always on top Pin
Giorgi Dalakishvili4-Sep-07 10:50
mentorGiorgi Dalakishvili4-Sep-07 10:50 
GeneralRe: Second form always on top Pin
Le centriste4-Sep-07 10:51
Le centriste4-Sep-07 10:51 
GeneralRe: Second form always on top Pin
Christian Graus4-Sep-07 10:50
protectorChristian Graus4-Sep-07 10:50 
GeneralRe: Second form always on top Pin
Le centriste4-Sep-07 10:53
Le centriste4-Sep-07 10:53 
QuestionPlugin Interface Architecture and Invalid Cast Exceptions Pin
gerdhub4-Sep-07 10:03
gerdhub4-Sep-07 10:03 
AnswerRe: Plugin Interface Architecture and Invalid Cast Exceptions Pin
Judah Gabriel Himango4-Sep-07 11:25
sponsorJudah Gabriel Himango4-Sep-07 11:25 
QuestionRe: Plugin Interface Architecture and Invalid Cast Exceptions Pin
gerdhub4-Sep-07 12:30
gerdhub4-Sep-07 12:30 
Ok, sorry, the question was not quite clear as I can see now.
Here's the cut-down problem:

There is a Main Program (exe), a Plugin dll, and an object library dll.

The Program loads and instances the Plugin dll, that works fine and is not the question.

But assume that I now have an object passed to the Plugin over the net.
The object is constructed using a class or structure defined in the object library dll on a remote computer.

I now try to cast the object to it's class / struct from within the plugin:


using objectLib;<br />
<br />
public void inputObject (object myObject) <br />
{<br />
objectLib.myClass newClass = (objectLib.myClass)myObject; // raises Invalid Cast Exception<br />
}<br />


During debug, myObject.GetType() results in "objectLib+myClass", what should be fine...
When I create a test object locally, say:

<br />
objectLib.myClass testClass = new objectLib.myClass();<br />


then testClass.GetType() also returns "objectLib+myClass", but neither

myObject is objectLib.myClass nor
myObject.GetType() == testClass.GetType()

returns true.

When I use this code only in an exe, without the plugin interface, it works fine.
AnswerRe: Plugin Interface Architecture and Invalid Cast Exceptions Pin
Judah Gabriel Himango4-Sep-07 13:13
sponsorJudah Gabriel Himango4-Sep-07 13:13 
GeneralRe: Plugin Interface Architecture and Invalid Cast Exceptions Pin
gerdhub4-Sep-07 13:24
gerdhub4-Sep-07 13:24 
AnswerRe: Plugin Interface Architecture and Invalid Cast Exceptions Pin
gerdhub4-Sep-07 22:36
gerdhub4-Sep-07 22:36 
AnswerRe: Plugin Interface Architecture and Invalid Cast Exceptions Pin
Skippums4-Sep-07 13:19
Skippums4-Sep-07 13:19 
AnswerRe: Plugin Interface Architecture and Invalid Cast Exceptions Pin
Skippums4-Sep-07 12:00
Skippums4-Sep-07 12:00 
GeneralRe: Plugin Interface Architecture and Invalid Cast Exceptions Pin
gerdhub4-Sep-07 12:32
gerdhub4-Sep-07 12:32 
QuestionLostfocus Pin
Assaf824-Sep-07 8:53
Assaf824-Sep-07 8:53 
AnswerRe: Lostfocus Pin
Christian Graus4-Sep-07 9:05
protectorChristian Graus4-Sep-07 9:05 
GeneralRe: Lostfocus Pin
Assaf824-Sep-07 9:16
Assaf824-Sep-07 9:16 
GeneralRe: Lostfocus Pin
Christian Graus4-Sep-07 9:23
protectorChristian Graus4-Sep-07 9:23 
GeneralRe: Lostfocus Pin
Assaf824-Sep-07 9:24
Assaf824-Sep-07 9:24 
GeneralRe: Lostfocus Pin
Urs Enzler4-Sep-07 21:31
Urs Enzler4-Sep-07 21:31 
Questionpassing a collection of objects Pin
jon-804-Sep-07 8:35
professionaljon-804-Sep-07 8:35 
AnswerRe: passing a collection of objects Pin
Christian Graus4-Sep-07 8:50
protectorChristian Graus4-Sep-07 8:50 
GeneralRe: passing a collection of objects Pin
jon-804-Sep-07 12:49
professionaljon-804-Sep-07 12:49 
Questiondraw on transparent form Pin
greekius4-Sep-07 8:06
greekius4-Sep-07 8:06 
AnswerRe: draw on transparent form Pin
Spacix One4-Sep-07 8:55
Spacix One4-Sep-07 8:55 

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.