Click here to Skip to main content
15,905,877 members
Home / Discussions / C#
   

C#

 
AnswerRe: c# Pin
Colin Angus Mackay15-Aug-07 4:19
Colin Angus Mackay15-Aug-07 4:19 
GeneralRe: c# Pin
Scott Dorman15-Aug-07 4:21
professionalScott Dorman15-Aug-07 4:21 
GeneralRe: c# Pin
Justin Perez15-Aug-07 4:22
Justin Perez15-Aug-07 4:22 
GeneralRe: c# Pin
Bert delaVega15-Aug-07 5:39
Bert delaVega15-Aug-07 5:39 
GeneralRe: c# Pin
Justin Perez15-Aug-07 5:43
Justin Perez15-Aug-07 5:43 
QuestionInvalidCastException for interface Pin
__DanC__15-Aug-07 3:54
__DanC__15-Aug-07 3:54 
AnswerRe: InvalidCastException for interface Pin
Justin Perez15-Aug-07 3:57
Justin Perez15-Aug-07 3:57 
AnswerRe: InvalidCastException for interface Pin
Scott Dorman15-Aug-07 4:14
professionalScott Dorman15-Aug-07 4:14 
So you have an interface that looks like this:
C#
public interface IMyFunctions
{
   SomeFunction(IntPtr param1, int param2);
   SomeFunction(MyClass param1, MyEnum param2);
}
which is defined in assembly Interfaces.dll?

In some other assembly you have a class that looks like
C#
public class SomeClass : IMyFunction
{
   SomeFunction(IntPtr param1, int param2) { ... };
   SomeFunction(MyClass param1, MyEnum param2) { ... };
}
Assuming that the above is reasonably correct to your implementation, you get an InvalidCastException when you try to do what?

What do you mean "they are defined with the same GUID"? There are no GUIDs that you can set that have any kind of impact on the compiler and runtime behavior.

Have you stepped through the code with a debugger attached to see where the exception is actually ocurring? That should give you a better idea of what is going wrong.

-----------------------------
In just two days, tomorrow will be yesterday.

http://geekswithblogs.net/sdorman

GeneralRe: InvalidCastException for interface Pin
__DanC__15-Aug-07 4:43
__DanC__15-Aug-07 4:43 
QuestionVideo/Picture Control [modified] Pin
kibromg15-Aug-07 3:32
kibromg15-Aug-07 3:32 
AnswerRe: Video/Picture Control Pin
Judah Gabriel Himango15-Aug-07 4:28
sponsorJudah Gabriel Himango15-Aug-07 4:28 
GeneralRe: Video/Picture Control Pin
kibromg15-Aug-07 4:50
kibromg15-Aug-07 4:50 
GeneralRe: Video/Picture Control Pin
Judah Gabriel Himango15-Aug-07 5:13
sponsorJudah Gabriel Himango15-Aug-07 5:13 
GeneralRe: Video/Picture Control Pin
kibromg15-Aug-07 7:27
kibromg15-Aug-07 7:27 
AnswerRe: Video/Picture Control Pin
pbraun15-Aug-07 12:57
pbraun15-Aug-07 12:57 
Questionproblem with source safe bindings in visual studio Pin
blakey40415-Aug-07 3:23
blakey40415-Aug-07 3:23 
QuestionC# toolbar Pin
kkosala15-Aug-07 2:59
kkosala15-Aug-07 2:59 
AnswerRe: C# toolbar Pin
Judah Gabriel Himango15-Aug-07 4:27
sponsorJudah Gabriel Himango15-Aug-07 4:27 
QuestionHow I can Convert the Language Type Pin
Thaer Hamael15-Aug-07 2:53
Thaer Hamael15-Aug-07 2:53 
AnswerRe: How I can Convert the Language Type Pin
Giorgi Dalakishvili15-Aug-07 3:02
mentorGiorgi Dalakishvili15-Aug-07 3:02 
GeneralRe: How I can Convert the Language Type Pin
Thaer Hamael15-Aug-07 3:10
Thaer Hamael15-Aug-07 3:10 
GeneralRe: How I can Convert the Language Type Pin
leckey15-Aug-07 3:12
leckey15-Aug-07 3:12 
GeneralRe: How I can Convert the Language Type Pin
Giorgi Dalakishvili15-Aug-07 3:12
mentorGiorgi Dalakishvili15-Aug-07 3:12 
AnswerRe: How I can Convert the Language Type Pin
Dan Neely15-Aug-07 3:35
Dan Neely15-Aug-07 3:35 
QuestionUploading two files Pin
minniemooo15-Aug-07 2:52
minniemooo15-Aug-07 2:52 

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.