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
1256
votes
22 answers

How to call shell commands from Ruby

How do I call shell commands from inside of a Ruby program? How do I then get output from these commands back into Ruby?
CodingWithoutComments
  • 35,598
  • 21
  • 73
  • 86
804
votes
43 answers

How do I properly clean up Excel interop objects?

I'm using the Excel interop in C# (ApplicationClass) and have placed the following code in my finally clause: while (System.Runtime.InteropServices.Marshal.ReleaseComObject(excelSheet) != 0) { } excelSheet =…
HAdes
  • 16,713
  • 22
  • 58
  • 74
393
votes
12 answers

How can I make SQL case sensitive string comparison on MySQL?

I have a function that returns five characters with mixed case. If I do a query on this string it will return the value regardless of case. How can I make MySQL string queries case sensitive?
StevenB
  • 3,965
  • 2
  • 15
  • 4
278
votes
1 answer

Convert Kotlin Array to Java varargs

How can I convert my Kotlin Array to a varargs Java String[]? val angularRoutings = arrayOf("/language", "/home") // this doesn't work web.ignoring().antMatchers(angularRoutings) How to pass an ArrayList to a varargs method…
robie2011
  • 3,678
  • 4
  • 21
  • 20
271
votes
29 answers

How do I copy a string to the clipboard?

I'm trying to make a basic Windows application that builds a string out of user input and then adds it to the clipboard. How do I copy a string to the clipboard using Python?
tester
  • 22,441
  • 25
  • 88
  • 128
226
votes
12 answers

Better way to cast object to int

This is probably trivial, but I can't think of a better way to do it. I have a COM object that returns a variant which becomes an object in C#. The only way I can get this into an int is int test = int.Parse(string.Format("{0}", myobject)) Is…
Steve
  • 11,763
  • 15
  • 70
  • 103
205
votes
11 answers

Git interoperability with a Mercurial Repository

I use GIT on a Mac. Enough said. I have the tools, I have the experience. And I want to continue to use it. No wars here... The problem is always with interoperability. Most people use SVN, which is great for me. Git SVN works out of the box, and is…
Hugo Sereno Ferreira
  • 8,600
  • 7
  • 46
  • 92
155
votes
3 answers

What is the size of a boolean In C#? Does it really take 4-bytes?

I have two structs with arrays of bytes and booleans: using System.Runtime.InteropServices; [StructLayout(LayoutKind.Sequential, Pack = 4)] struct struct1 { [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[]…
biv
  • 1,613
  • 3
  • 13
  • 21
149
votes
15 answers

How do I read text from the Windows clipboard in Python?

How do I read text from the (windows) clipboard with python?
Foo42
  • 3,024
  • 4
  • 22
  • 17
108
votes
11 answers

How to deal with files with a name longer than 259 characters?

I'm working on an application which walks through every file in some directories and does some actions with those files. Among others, I must retrieve the file size and the date when this file was modified. Some file full names (directory + file…
Arseni Mourzenko
  • 50,338
  • 35
  • 112
  • 199
101
votes
13 answers

How do multiple languages interact in one project?

I heard some people program in multiple languages in one project. I can't imagine how the languages interact with each other. I mean there is no Java method like myProgram.callCfunction(parameters); never happens or am I wrong?
n00ki3
  • 14,529
  • 18
  • 56
  • 65
91
votes
10 answers

How to make a Swift String enum available in Objective-C?

I have this enum with String values, which will be used to tell an API method that logs to a server what kind of serverity a message has. I'm using Swift 1.2, so enums can be mapped to Objective-C @objc enum LogSeverity : String { case Debug =…
bogen
  • 9,954
  • 9
  • 50
  • 89
84
votes
5 answers

Is it possible to call a C function from C#.Net

I have a C lib and want to call function in this library from C# application. I tried creating a C++/CLI wrapper on the C lib by adding the C lib file as linker input and adding the source files as additional dependencies. Is there any better way…
Chinjoo
  • 2,697
  • 6
  • 28
  • 45
83
votes
3 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
  • 993
  • 1
  • 7
  • 6
83
votes
19 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
  • 11,739
  • 12
  • 50
  • 73
1
2 3
99 100