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
1162
votes
20 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
  • 33,560
  • 21
  • 70
  • 85
767
votes
42 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
  • 15,789
  • 18
  • 54
  • 74
311
votes
11 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,145
  • 2
  • 13
  • 4
213
votes
24 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
  • 20,193
  • 21
  • 80
  • 120
197
votes
10 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,665
  • 6
  • 41
  • 88
196
votes
11 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,197
  • 13
  • 66
  • 98
172
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
  • 2,478
  • 4
  • 19
  • 20
141
votes
2 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,453
  • 3
  • 11
  • 20
105
votes
12 answers

How do I read text from the clipboard?

How do I read text from the (windows) clipboard with python?
Foo42
  • 2,486
  • 4
  • 19
  • 17
91
votes
9 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
  • 45,791
  • 28
  • 101
  • 185
80
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,863
  • 2
  • 15
  • 9
79
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,261,211
  • 792
  • 8,724
  • 8,929
78
votes
12 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
  • 13,009
  • 15
  • 52
  • 65
78
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,595
  • 6
  • 24
  • 44
76
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
  • 8,549
  • 8
  • 44
  • 82
1
2 3
99 100