Click here to Skip to main content
15,913,685 members
Home / Discussions / C#
   

C#

 
AnswerRe: How long the database connection stays open Pin
spiritboy25-Mar-09 9:43
spiritboy25-Mar-09 9:43 
GeneralRe: How long the database connection stays open Pin
netJP12L25-Mar-09 10:30
netJP12L25-Mar-09 10:30 
GeneralRe: How long the database connection stays open Pin
dano2k325-Mar-09 22:49
dano2k325-Mar-09 22:49 
QuestionTrouble with arrays and nested classes [modified] Pin
robertkjr3d25-Mar-09 9:06
robertkjr3d25-Mar-09 9:06 
AnswerRe: Trouble with arrays and nested classes Pin
dan!sh 25-Mar-09 9:24
professional dan!sh 25-Mar-09 9:24 
GeneralRe: Trouble with arrays and nested classes Pin
Xmen Real 25-Mar-09 19:38
professional Xmen Real 25-Mar-09 19:38 
AnswerRe: Trouble with arrays and nested classes Pin
DaveyM6925-Mar-09 9:32
professionalDaveyM6925-Mar-09 9:32 
QuestionCOM interface inheritance Pin
Ravadre25-Mar-09 8:48
Ravadre25-Mar-09 8:48 
Hi,
I am fighting with COM again Smile | :) , ow I'm struggling with following problem:

Let's say we have COM interfaces defined as:
IA : IUnknown
IB : IA
IC : IB


What I've tried to do is creating C# interfaces:

[ComImport, System.Security.SuppressUnmanagedCodeSecurity,
     Guid("00-this-is-valid-guid-000"),
     InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
interface IA
{
 method1();
}


The same for IB, with following difference:
interface IB : IA
IB does not duplicate IA's methods. The same for IC.

Now, when I try to create instance of IC using other COM method (from another interface) I receive error (Exception from HRESULT: 0x88990012 to be exact - but I guess that wont be helpful).
When I copy-paste method1() from IA to IB, and remove inheritance, but leave inheritance between IB and IC the code seems to work. What is even more surprising, I have pretty the same situation with other "inheritance tree" (IA -> IE -> IF) and I don't have problems with them, what is even funnier, when i completely remove IA, interfaces IE and IF are working properly. Does anyone have an idea what is exactly going on, or have any references that could help me solve that one? (I've read tons about marshalling and COM on msdn, but I haven't found answer for this one).

To be exact: All methods from interfaces are defined in correct order (the same order as in *.h file), but some methods has invalid argument (no arguments, even though they should take some, this seems to not break anything, as long as those methods are not invoked of course, and make developing easier (I start with blank ones, and fill the ones I need).
Questionbutton in textbox Pin
behzadcp25-Mar-09 8:31
professionalbehzadcp25-Mar-09 8:31 
AnswerRe: button in textbox Pin
dan!sh 25-Mar-09 9:21
professional dan!sh 25-Mar-09 9:21 
GeneralRe: button in textbox Pin
behzadcp25-Mar-09 9:46
professionalbehzadcp25-Mar-09 9:46 
GeneralRe: button in textbox Pin
dan!sh 25-Mar-09 9:53
professional dan!sh 25-Mar-09 9:53 
GeneralRe: button in textbox - sort of OT Pin
DaveyM6925-Mar-09 10:21
professionalDaveyM6925-Mar-09 10:21 
GeneralRe: button in textbox - sort of OT Pin
ramz_g25-Mar-09 19:27
ramz_g25-Mar-09 19:27 
GeneralRe: button in textbox - sort of OT Pin
dan!sh 25-Mar-09 20:18
professional dan!sh 25-Mar-09 20:18 
AnswerRe: button in textbox Pin
Henry Minute25-Mar-09 11:04
Henry Minute25-Mar-09 11:04 
QuestionGraphical data representation Pin
hotthoughtguy25-Mar-09 8:23
hotthoughtguy25-Mar-09 8:23 
AnswerRe: Graphical data representation Pin
0x3c025-Mar-09 9:20
0x3c025-Mar-09 9:20 
QuestionMs WORD Bug Pin
Morad SAJID25-Mar-09 8:22
Morad SAJID25-Mar-09 8:22 
Questionsalam Pin
hotthoughtguy25-Mar-09 7:46
hotthoughtguy25-Mar-09 7:46 
AnswerRe: salam Pin
0x3c025-Mar-09 7:48
0x3c025-Mar-09 7:48 
GeneralRe: salam Pin
hotthoughtguy25-Mar-09 8:11
hotthoughtguy25-Mar-09 8:11 
GeneralRe: salam Pin
dan!sh 25-Mar-09 9:10
professional dan!sh 25-Mar-09 9:10 
GeneralRe: salam Pin
0x3c025-Mar-09 9:19
0x3c025-Mar-09 9:19 
AnswerRe: salam Pin
Henry Minute25-Mar-09 11:10
Henry Minute25-Mar-09 11:10 

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.