Questions tagged [interop]

Interoperability is a requirement for one computer system or programming language to work with another.

Interoperability is a requirement for one computer system or programming language to work with another.

A number of computer systems, especially Microsoft's .NET Framework, reduce this term to Interop.

5732 questions
3
votes
1 answer

How to dynamically load VB 6.0 dll in C#?

I have a VB 6.0 dll which has a method like below: Public Function PrintDemo() As Integer PrintDemo = 10 End Function The dll is registered on my machine. I need to load this dll dynamically into C#. Below is the way I tried in C#: Type obj =…
superuser
  • 445
  • 1
  • 13
  • 30
3
votes
2 answers

How to get GetFunctionPointerForDelegate for method with SafeHandle or workaround

This is code example which causes MarshalDirectiveException. Good explanation of SafeHandles could be found here. [SuppressUnmanagedCodeSecurity] private delegate SafeHandle…
Pavel Savara
  • 3,427
  • 1
  • 30
  • 35
3
votes
2 answers

Asynchronous Pluggable Protocols

Using this as reference, I'm trying to create an asynchronous pluggable protocol that is only temporarily available to my app (and not registered systemwide). I'm using CoInternetGetSession and then calling RegisterNameSpace to do it. However, when…
HS.
  • 15,442
  • 8
  • 42
  • 48
3
votes
1 answer

Clojure and Java interoperation: Java.math.BigInteger

I have a clojure code that has an output of BigInteger. (ns com.domain.tiny (:gen-class :name com.domain.tiny :methods [#^{:static true} [binomial [int int] java.math.BigInteger]])) (defn binomial "Calculate the binomial coefficient." …
prosseek
  • 182,215
  • 215
  • 566
  • 871
3
votes
1 answer

How to set file version for an Interop DLL generated using ilasm

We have several C# projects that use a legacy COM DLL via COM Interop. In order to properly use some of the methods of the COM DLL we are forced to perform manual intermediate language (IL) modifications by first disassembling the DLL to IL,…
alexg
  • 653
  • 7
  • 29
3
votes
1 answer

Program freezes at oWord.Documents.Open(oTemplatePath)?

I have put together a simple C# Winforms Application that queries AS400 data based on user criteria and returns the results in a ListView Control. On Button_Click() I then store the Headers and Data in a .txt file. Below I am trying to use that .txt…
Analytic Lunatic
  • 3,853
  • 22
  • 78
  • 120
3
votes
2 answers

Java AWT in .NET

Is there an equivalent for Java AWT that works on .NET? I usually use IKVM for Java bytecode translation, but IKVM AWT support is fairly limited.
Ahmed Khalaf
  • 1,220
  • 12
  • 28
3
votes
1 answer

WPF Control inside a transparent winform is not displayed

I create a simple WPF UserControl (any control will do) and insert it into a Winform (using an ElementHost). This works fine. The WPF control is embedded in the WinForm and when the WinForm is moved around the WPF control moves with it just like a…
Ury J.
  • 31
  • 2
3
votes
6 answers

Turning C# methods into C++ methods

I'm exploring various options for mapping common C# code constructs to C++ CUDA code for running on a GPU. The structure of the system is as follows (arrows represent method calls): C# program -> C# GPU lib -> C++ CUDA implementation lib A method in…
Morten Christiansen
  • 19,002
  • 22
  • 69
  • 94
3
votes
1 answer

Delcom USB 7-segment display C#

I am attempting to change the display of a Delcom USB 7-segment display in Unity (Mono framework) with C#. I am able to find the device and read the serial number, but I am unable to properly send control packets. I'm pretty positive that I am…
Geo Ego
  • 1,315
  • 7
  • 27
  • 53
3
votes
1 answer

CLR ICLRControl::GetCLRManager fails with error HOST_E_INVALIDOPERATION

I have a native process which uses .NET component via COM interop. Once the process is up, I am trying to get interface pointers to the various CLR managers such as ICLRDebugManager, ICLRGCManager, etc. using the ICLRControl interface pointer. I'm…
WinCPP
  • 75
  • 2
  • 8
3
votes
2 answers

Hide all windows for a process (ex. Internet Explorer)

I am using WatiN to script actions in Internet Explorer that run in the background of the user's machine. (I know...hacky). I am able through WatiN to make the Internet Explorer window not show. However, during my script, some HTML dialogs are…
helios456
  • 1,624
  • 16
  • 24
3
votes
2 answers

SafeArrayTypeMismatchException when passing c# struct to unmanaged C++ DLL

Hi I'm new to C# and C++ programming and trying to use an unmanaged C++ dll in a C# project (.NET 3.5). I'm stuck on this error: System.Runtime.InteropServices.SafeArrayTypeMismatchException: Specified array was not of the expected type. Here is the…
orikon
  • 293
  • 2
  • 8
  • 18
3
votes
6 answers

C# - Java interoperation

Can you give me some pointers on making C# code and Java code interoperate? Let's define the interoperation as something simple: allow (from Java code) the instantiantion and method calling of a class defined in C#, and, possibly, the other way…
Cristian Diaconescu
  • 34,633
  • 32
  • 143
  • 233
3
votes
3 answers

C# controls in a MFC Application

I am responsible for the User Interface of an application written completely in Visual C++ using MFC and some third-part controls. I would like to use C# (WinForms or even better WPF) to improve the application look&feel. I would like some advices…
Javier De Pedro
  • 2,219
  • 4
  • 32
  • 49