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
82
votes
4 answers

Call F# code from C#

I am playing around with F# and C#, and would like to call F# code from C#. I managed to get it to work the other way around in Visual Studio by having two projects in the same solution, and adding a reference of the C# code to the F# project. …
ZeroKelvin
  • 1,923
  • 2
  • 15
  • 9
80
votes
5 answers

Excel interop: _Worksheet or Worksheet?

I'm currently writing about dynamic typing, and I'm giving an example of Excel interop. I've hardly done any Office interop before, and it shows. The MSDN Office Interop tutorial for C# 4 uses the _Worksheet interface, but there's also a Worksheet…
Jon Skeet
  • 1,421,763
  • 867
  • 9,128
  • 9,194
77
votes
4 answers

How to use Microsoft.Office.Interop.Excel on a machine without installed MS Office?

I'm writing an application which works with excel files. I need a feature to delete a sheet. I have to use an assembly Microsoft.Office.Interop.Excel.dll. It's running fine on developer machine but when I try to deploy it on server I'm getting an…
John Wales
  • 1,265
  • 2
  • 14
  • 20
76
votes
7 answers

Git as mercurial client? Why no git-hg?

This is a question that's been bothering me for a while. I've done my homework and checked stackoverflow and found at least these two topics about my question: Git for Mercurial like git-svn and Git interoperability with a Mercurial repository I've…
Kai Inkinen
  • 2,581
  • 2
  • 21
  • 21
70
votes
4 answers

Using Kotlin class in Java: Cannot find symbol

I have found this similar question regarding Android, but I am using plain Java with Maven as build tool. I think it is better to post a new question. I have created a Kotlin class to which I am trying to refer from Java class as…
Vojtěch
  • 11,312
  • 31
  • 103
  • 173
63
votes
2 answers

How to access static inner Java class via Clojure interop?

Basically what I need to do is this FileChannel.MapMode.READ_ONLY I tried doing the obvious (.. FileChannel MapMode READ_ONLY) but that ends up throwing an exception java.lang.NoSuchFieldException: MapMode even the / notation specified as for…
Jakub Arnold
  • 85,596
  • 89
  • 230
  • 327
63
votes
7 answers

Excel Interop - Efficiency and performance

I was wondering what I could do to improve the performance of Excel automation, as it can be quite slow if you have a lot going on in the worksheet... Here's a few I found myself: ExcelApp.ScreenUpdating = false -- turn off the redrawing of the…
Vincent Van Den Berghe
  • 5,425
  • 2
  • 31
  • 40
62
votes
8 answers

Using a C++ class member function as a C callback function

I have a C library that needs a callback function to be registered to customize some processing. Type of the callback function is int a(int *, int *). I am writing C++ code similar to the following and try to register a C++ class function as the…
Methos
  • 13,608
  • 11
  • 46
  • 49
61
votes
4 answers

What is the interop dll?

I need some clarification. I have a Reportwriter dll that uses Crystal Reports. It is written in VB6. I have to add this dll to my asp.net project, where it creates an interop dll. To my understanding, the interop dll is there as an intermediary so…
Prabu
  • 4,097
  • 5
  • 45
  • 66
59
votes
5 answers

Calling a C# library from python

Anyone can share a working example on how to call a simple C# library (actually its WPF) from python code? (I have tried using IronPython and had too much trouble with unsupported CPython library my python code is using so I thought of trying the…
ychuri
  • 661
  • 1
  • 8
  • 9
59
votes
9 answers

How do you call Python code from C code?

I want to extend a large C project with some new functionality, but I really want to write it in Python. Basically, I want to call Python code from C code. However, Python->C wrappers like SWIG allow for the OPPOSITE, that is writing C modules and…
pgb
  • 638
  • 1
  • 6
  • 9
58
votes
8 answers

Calling C# code from C++, but ExecuteInDefaultAppDomain() is too limited

I need to be able to invoke arbitrary C# functions from C++. In-process Interoperability suggests using ICLRRuntimeHost::ExecuteInDefaultAppDomain(), but this only allows me to invoke methods having this format: int method(string arg) What is the…
Gili
  • 86,244
  • 97
  • 390
  • 689
58
votes
2 answers

COM object that has been separated from its underlying RCW cannot be used

I am trying to use the OpcRcw.da.dll. If I interop this dll inside a test console project everything works, but if I build dll project to do my interop gymnastic and ref my library into my console project I am getting this error: COM object that…
kevin marchand
  • 615
  • 1
  • 6
  • 5
55
votes
3 answers

Use a .jar java library API in C#?

I'm an entry level programmer so please be descriptive in your responses. I am trying to use a Java API given as a .jar file in my C# .net application. I don't know much Java, but this .jar file says "no main-class manifest attribute" when I try to…
timmyg
  • 1,057
  • 3
  • 12
  • 14
53
votes
8 answers

Write Array to Excel Range

I'm currently trying to write data from an array of objects to a range in Excel using the following code, where objData is just an array of strings: private object m = System.Type.Missing; object[] objData = getDataIWantToWrite(); Range…
Jon Artus
  • 6,268
  • 11
  • 42
  • 41