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.

5522 questions
75
votes
4 answers

Turn a simple C# DLL into a COM interop component

How do I make a C# DLL into a COM interop DLL that can be consumed by a VB6 application?
Elena Lawrence
  • 913
  • 1
  • 7
  • 6
75
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,511
  • 2
  • 20
  • 20
75
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,237
  • 2
  • 14
  • 18
73
votes
16 answers

Exception from HRESULT: 0x800A03EC Error

I am getting "HRESULT: 0x800A03EC" error when running Excel add-in with following code: Excel.Range rng = ActiveSheet.Cells[x, y] as Excel.Range; string before = rng.Value2; string cleanV =…
Daniil Shevelev
  • 10,633
  • 11
  • 43
  • 63
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,165
  • 2
  • 29
  • 38
57
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
  • 3,809
  • 4
  • 41
  • 65
56
votes
6 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
  • 10,908
  • 11
  • 41
  • 47
55
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
  • 79,807
  • 86
  • 218
  • 314
55
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
  • 585
  • 1
  • 5
  • 5
54
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,007
  • 3
  • 11
  • 14
52
votes
8 answers

Calling C# code from C++

I need to be able to invoke arbitrary C# functions from C++. http://www.infoq.com/articles/in-process-java-net-integration suggests using ICLRRuntimeHost::ExecuteInDefaultAppDomain() but this only allows me to invoke methods having this format: int…
Gili
  • 76,473
  • 85
  • 341
  • 624
52
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
  • 5,948
  • 11
  • 39
  • 41
50
votes
4 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
  • 571
  • 1
  • 6
  • 9
49
votes
1 answer

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

I have some COM component which I call from some c# dll. I also have a winforms app that uses that .dll. When I close the app I get this exception: COM object that has been separated from its underlying RCW cannot be used. The stack trace…
Yaron Naveh
  • 21,660
  • 31
  • 97
  • 151
44
votes
2 answers

IntPtr, SafeHandle and HandleRef - Explained

Without pointing me to MSDN, could someone give a concise, clear explanation of the purpose of each of these and when to use them. (IntPtr, SafeHandle and HandleRef)
user62572
  • 1,308
  • 2
  • 15
  • 24