Click here to Skip to main content
15,912,756 members
Home / Discussions / C#
   

C#

 
GeneralRe: run desktop application on webpage Pin
Heath Stewart25-Feb-05 5:22
protectorHeath Stewart25-Feb-05 5:22 
GeneralMessageBox shows no text Pin
Sailer0125-Feb-05 5:01
sussSailer0125-Feb-05 5:01 
GeneralRe: MessageBox shows no text Pin
Heath Stewart25-Feb-05 6:40
protectorHeath Stewart25-Feb-05 6:40 
GeneralRe: MessageBox shows no text Pin
GaMBiT_KC26-Feb-05 1:00
GaMBiT_KC26-Feb-05 1:00 
GeneralC# and Custom C++ interfaces Pin
vad_kr25-Feb-05 3:40
vad_kr25-Feb-05 3:40 
GeneralRe: C# and Custom C++ interfaces Pin
Heath Stewart25-Feb-05 6:14
protectorHeath Stewart25-Feb-05 6:14 
GeneralRe: C# and Custom C++ interfaces Pin
vad_kr27-Feb-05 21:06
vad_kr27-Feb-05 21:06 
GeneralRe: C# and Custom C++ interfaces Pin
Heath Stewart28-Feb-05 8:31
protectorHeath Stewart28-Feb-05 8:31 
What interface from which you derive doesn't dictate what types you pass as parameters. Even if you don't inherit from IDispatch (in managed code, using [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)] or ComInterfaceType.InterfaceIsDual) you can stil, for example, pass or return a SAFEARRAY.

Be suer to read those links I gave you in my first reply.

What you should be doing is using dual class interfaces, which expose interfaces for both VTBL binding (IUnknown) and automation. Even automation-only interfaces can be used by C++, but it can be a pain.

See the documentation for the ComInterfaceType.InterfaceIsDual member in the .NET Framework SDK for more information.

As far as performance, keep in mind that not only are you marshaling to different components you're marshaling across native and managed boundaries. The Common Language Runtime (CLR) marshals data for you in most cases, and it can take time depending on what the data is. C++.NET won't solve things either, since you'll be compiling managed code which will also target the CLR. In fact, until C++ .NET 2.0 (Managed C++ 2.0, as it's more commonly called) performance even within MC++ can be bad because of data being marshaled from native to managed within the same DLL. It really just depends on what you're doing.

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralCodepage in StreamReader Pin
matejka25-Feb-05 2:49
matejka25-Feb-05 2:49 
GeneralTreeView Problem Pin
WDI25-Feb-05 2:45
WDI25-Feb-05 2:45 
GeneralRe: TreeView Problem Pin
S. Senthil Kumar25-Feb-05 3:35
S. Senthil Kumar25-Feb-05 3:35 
GeneralFolder Icon Pin
mohamed seif25-Feb-05 1:33
mohamed seif25-Feb-05 1:33 
GeneralRe: Folder Icon Pin
Luis Alonso Ramos25-Feb-05 6:35
Luis Alonso Ramos25-Feb-05 6:35 
QuestionRemove + sign from datagrid? Pin
Marcus_225-Feb-05 1:16
Marcus_225-Feb-05 1:16 
GeneralC# custom events Pin
GaMBiT_KC25-Feb-05 0:58
GaMBiT_KC25-Feb-05 0:58 
GeneralRe: C# custom events Pin
sreejith ss nair25-Feb-05 1:30
sreejith ss nair25-Feb-05 1:30 
GeneralRe: C# custom events Pin
GaMBiT_KC25-Feb-05 1:37
GaMBiT_KC25-Feb-05 1:37 
GeneralRe: C# custom events Pin
GaMBiT_KC25-Feb-05 1:35
GaMBiT_KC25-Feb-05 1:35 
Generalc# remoting on windows xp pro is much slower compared to windows 2k pro Pin
Member 154579524-Feb-05 23:19
Member 154579524-Feb-05 23:19 
GeneralPocket PC disable toolbar Start Pin
sevan24-Feb-05 22:51
sevan24-Feb-05 22:51 
GeneralRe: Pocket PC disable toolbar Start Pin
Dave Kreskowiak25-Feb-05 5:01
mveDave Kreskowiak25-Feb-05 5:01 
Generalrotation using StringFormatFlags.DirectionVertical; Pin
dorwin24-Feb-05 22:45
dorwin24-Feb-05 22:45 
Generalas400 connection Pin
Reinier van de Wetering24-Feb-05 20:24
Reinier van de Wetering24-Feb-05 20:24 
GeneralRe: as400 connection Pin
spif200124-Feb-05 21:31
spif200124-Feb-05 21:31 
Generalquestion about ref Pin
Anonymous24-Feb-05 16:32
Anonymous24-Feb-05 16:32 

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.