com-interop

new method declaration in derived interface

笑着哭i 提交于 2021-02-04 21:10:30
问题 I lately studied some code and encountered a derived interface that declares new method with exactly the same name and signature as a base interface: public interface IBase { Result Process(Settings settings); } public interface IDerived : IBase { new Result Process(Settings settings); } I'm wondering if there could be a reason for this. According to my understanding I can safely remove the latter method declaration and leave IDerived empty without possibly breaking any code using it. Am I

new method declaration in derived interface

邮差的信 提交于 2021-02-04 21:10:04
问题 I lately studied some code and encountered a derived interface that declares new method with exactly the same name and signature as a base interface: public interface IBase { Result Process(Settings settings); } public interface IDerived : IBase { new Result Process(Settings settings); } I'm wondering if there could be a reason for this. According to my understanding I can safely remove the latter method declaration and leave IDerived empty without possibly breaking any code using it. Am I

How can I share an interface between VB6 and C#?

二次信任 提交于 2021-01-27 07:10:49
问题 I would like to be able to code a class interface which I can implement in C# and VB6 classes so that these classes can be handled in the same way within VB6 code but I can't make this work. In VB6 I want to have come class VB6Class using the Implements key word to implement some interface ISharedInterface. In C# I want to have some other class C#Class which I can expose to COM as also implementing ISharedInterface. The goal is that VB6 code will then be able to operate on VB6Class and C

Can I simplify method signatures I am not using in a ComImport?

℡╲_俬逩灬. 提交于 2020-12-06 19:27:12
问题 I am trying to call GetImageDlg on IWiaDevMgr2 . There are a number of quite complicated methods (which I am not using) referencing a number of types (that I am also not using). As I cannot find a TLB or an IDL from which to automatically generate my ComImport , I would prefer to avoid having to manually translate all of the referenced types. Can I "skip" methods and types by substituting from [InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("79C07CF1-CBDD-41ee-8EC3-F00080CADA7A")]

Can I simplify method signatures I am not using in a ComImport?

☆樱花仙子☆ 提交于 2020-12-06 19:26:57
问题 I am trying to call GetImageDlg on IWiaDevMgr2 . There are a number of quite complicated methods (which I am not using) referencing a number of types (that I am also not using). As I cannot find a TLB or an IDL from which to automatically generate my ComImport , I would prefer to avoid having to manually translate all of the referenced types. Can I "skip" methods and types by substituting from [InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("79C07CF1-CBDD-41ee-8EC3-F00080CADA7A")]

Can I simplify method signatures I am not using in a ComImport?

一曲冷凌霜 提交于 2020-12-06 19:26:53
问题 I am trying to call GetImageDlg on IWiaDevMgr2 . There are a number of quite complicated methods (which I am not using) referencing a number of types (that I am also not using). As I cannot find a TLB or an IDL from which to automatically generate my ComImport , I would prefer to avoid having to manually translate all of the referenced types. Can I "skip" methods and types by substituting from [InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("79C07CF1-CBDD-41ee-8EC3-F00080CADA7A")]

Can I simplify method signatures I am not using in a ComImport?

*爱你&永不变心* 提交于 2020-12-06 19:25:59
问题 I am trying to call GetImageDlg on IWiaDevMgr2 . There are a number of quite complicated methods (which I am not using) referencing a number of types (that I am also not using). As I cannot find a TLB or an IDL from which to automatically generate my ComImport , I would prefer to avoid having to manually translate all of the referenced types. Can I "skip" methods and types by substituting from [InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("79C07CF1-CBDD-41ee-8EC3-F00080CADA7A")]

Can I simplify method signatures I am not using in a ComImport?

狂风中的少年 提交于 2020-12-06 19:25:40
问题 I am trying to call GetImageDlg on IWiaDevMgr2 . There are a number of quite complicated methods (which I am not using) referencing a number of types (that I am also not using). As I cannot find a TLB or an IDL from which to automatically generate my ComImport , I would prefer to avoid having to manually translate all of the referenced types. Can I "skip" methods and types by substituting from [InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("79C07CF1-CBDD-41ee-8EC3-F00080CADA7A")]