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
2 answers

C# Outlook interop and OpenSharedItem for opening MSG files

Is there any tutorial or resource I can follow in order to use the OpenSharedItem outlook interop method. My goal is to read MSG files using it (as it can apparently do so).
Nikolaos
  • 1,449
  • 2
  • 15
  • 19
3
votes
2 answers

Loading all COM types of Excel dynamically?

I want to explore this path of working with Excel dynamically. I want to use Excel in my C# application without including dlls and stuff. I would just check first if the required Excel version is installed and run it. First I want to get all the…
Bitterblue
  • 13,162
  • 17
  • 86
  • 124
3
votes
1 answer

Marshalling arrays of VARIANT using P/Invoke

Situation: I have a managed (C#, .NET 2.0) application which uses an unmanaged (C++) DLL using P/Invoke. Along with the "simple" methods (POD arguments/return value) there's a requirement to pass a boost::variant value arrays to the code. The…
DarkWanderer
  • 8,739
  • 1
  • 25
  • 56
3
votes
2 answers

Clojure import java rename

I was wondering if there is a way of renaming an imported Java Type in clojure. Something like this: (ns foo (:import java.util.List :as JList)) If not; Do I have to then reference the type as FQCN (fully qualified class name)? UPDATE: This example…
ngarthl
  • 433
  • 2
  • 9
3
votes
1 answer

C# Calling C function crash when using LoadLibrary/GetProcAddress

I need to dynamically load DLL and invoke its methods C code header: __declspec(dllexport) int Init_Normalization_EN(char* path); __declspec(dllexport) const char* Process_Normalization_EN(char* input); C# code using [extern] to statically define…
ZivF
  • 125
  • 1
  • 8
3
votes
1 answer

How do you reference a WCF service in a COM interop enabled DLL?

Problem Summary: I have a C# DLL that is COM interop enabled/visible. This C# DLL has a service reference to a WCF service. When I instantiate the WCF service in the C# code, COM interop returns a error HRESULT (0x80131509). Problem Details: There…
pineconesundae
  • 332
  • 1
  • 13
3
votes
3 answers

How to declare a union in C#?

Observe the following sample code: struct DDD { [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 512, ArraySubType = UnmanagedType.I1)] byte[] x; } struct BBB { DDD x; } struct CCC { DDD x; ulong y; ulong…
mark
  • 59,016
  • 79
  • 296
  • 580
3
votes
2 answers

Groovy code cannot find Java constructor

When I run the main method in the Groovy code below, I get a groovy.lang.GroovyRuntimeException: Could not find matching constructor for: com.example.Person(java.lang.String, com.example.Pet). Why is that? I'm using the latest version of the…
Kiwi
  • 1,083
  • 11
  • 26
3
votes
4 answers

Dynamically importing a C/C++ DLL

From what I have learned, to use P/Invoke in F#, the function signature has to be declared first using DllImport like this: [] extern bool copyfile(char[] lpExistingFile, char[] lpNewFile, bool…
user194324
3
votes
1 answer

RemoveDuplicates function - how can I set multiple columns?

I'm trying to use the RemoveDuplicates function using Excel.Interop, but I'm stuck as to how to pass it the column array. I already know that I cannot pass it as a simple int[] array, as it gives an exception at runtime, and that I can pass a single…
Mario
  • 33
  • 1
  • 4
3
votes
2 answers

Mixed Assembly Not Discovering Native DLLs

I have a mixed mode dll with native dll dependencies. I am loading the mixed mode dll from a C# exe using Assembly.Load. However, the location of the mixed mode dll is not in the application bin directory, therefore it fails because it only looks…
Seth
  • 8,213
  • 14
  • 71
  • 103
3
votes
1 answer

Use a COM+ object in Visual Studio C# without using Interop-DLL

I am writing programs that use another Application. Lets say the Application ProgID is TheCompany.TheProg up untill now, i was using "Add References/COM" and selecting the TheProg Type Lib but it was mentioned by the 3ed party vendor that creating…
Tomer W
  • 3,395
  • 2
  • 29
  • 44
3
votes
3 answers

Are double* and double** blittable types? C#

I have a question regarding marshalling of C++ arrays to C#. Does the double* automatically convert to double[]? I know double is a blittable type, so double from C++ is the same as double from C#. And what about double**, does it convert to…
NumberFour
  • 3,551
  • 8
  • 48
  • 72
3
votes
4 answers

Hide Excel 2013 while programmatic change a workbook

A really good new feature of Excel 2013 is that it cannot forced to show more than one Excel workbook in one application. This seems the cause of my Problem: If I open an Excel workbook programmatically using c# and interop Excel 2013 starts with a…
Harald Pitro
  • 113
  • 1
  • 7
3
votes
1 answer

Supporting Outlook 2003 and 2007 at the same time with interop

Is it possible to access Outlook 2003 and 2007 from the same application, using the primary interop assemblies provided by Microsoft? I have read that it is very difficult (if possible at all) to develop for different versions of Outlook on the same…
Sandor Davidhazi
  • 888
  • 1
  • 9
  • 20