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

Using SetWindowPos in C# to move windows around

I have the code below: namespace WindowMover { using System.Windows.Forms; static class Logic { [DllImport("user32.dll", EntryPoint = "SetWindowPos")] public static extern IntPtr SetWindowPos(IntPtr hWnd, int…
Matt
  • 25,943
  • 66
  • 198
  • 303
28
votes
1 answer

Interop between F# and C# lambdas

F# powerpack comes with a set of conversion methods to translate from Func<...> to F# functions, either standard or tupled ones. But is it possible to achieve the opposite: in case you want to call from F# code a C# method that takes Func<...> and…
Vagif Abilov
  • 9,835
  • 8
  • 55
  • 100
28
votes
10 answers

System.Data.SQLite from NuGet, interop dll not copied to output directory

I installed System.Data.SQLite Core (x86/x64) from NuGet. It built without warnings but threw System.DllNotFoundException regarding SQLite.Interop.dll. I rigged my projects to copy the SQLite.Interop.dll from under the NuGet package's directory to…
Vimes
  • 10,577
  • 17
  • 66
  • 86
28
votes
4 answers

How to load program resources in Clojure

How do you load program resources such as icons, strings, graphical elements, scripts, and so on in a Clojure program? I am using a project layout similar to that in many Java projects where there is a "resources" directory hanging off of a "source"…
clartaq
  • 5,320
  • 3
  • 39
  • 49
28
votes
5 answers

Marshal C++ struct array into C#

I have the following struct in C++: #define MAXCHARS 15 typedef struct { char data[MAXCHARS]; int prob[MAXCHARS]; } LPRData; And a function that I'm p/invoking into to get an array of 3 of these structures: void GetData(LPRData…
Adam Haile
  • 30,705
  • 58
  • 191
  • 286
28
votes
5 answers

Interact with other programs using Python

I'm having the idea of writing a program using Python which shall find a lyric of a song whose name I provided. I think the whole process should boil down to couple of things below. These are what I want the program to do when I run it: prompt me…
ttriet204
  • 353
  • 1
  • 5
  • 13
28
votes
3 answers

How to catch any Javascript exception in Clojurescript?

In my communication layer I have a need to be able to catch ANY javascript exception, log it down and proceed as I normally would do. Current syntax for catching exceptions in Clojurescript dictates that I need to specify the type of the exception…
27
votes
1 answer

Use Visual Studio Setup Project to automatically register and GAC a COM Interop DLL

I've created a .NET assembly for COM interop and it is working well on my development machine. I'm currently trying to figure out how to deploy the DLL to a target machine using Visual Studio's "Setup Project." How can I use the VIsual Studio…
Ben McCormack
  • 32,086
  • 48
  • 148
  • 223
27
votes
4 answers

CUDA bindings for .net?

I know that there are a lot of CUDA language bindings, such as PyCUDA, but are there any good bindings for .Net? The only one I've seen is this one, but I'd like to know if there are any others.
TraumaPony
  • 10,742
  • 12
  • 54
  • 74
27
votes
1 answer

Is PIA embedding broken in .NET 4.0 beta 2?

A while ago, I wrote some Word interop examples in Visual Studio beta 1, and set the reference to Microsoft.Office.Interop.Word to be embedded (set the "Embed Interop Types" = true in the reference properties). These worked fine, and I haven't run…
Jon Skeet
  • 1,421,763
  • 867
  • 9,128
  • 9,194
26
votes
6 answers

Restore a minimized window of another application

I'm adding some code to an app that will launch another app if it isn't already running, or if it is, bring it to the front. This requires a small amount of interop/WinAPI code, which I've gotten examples for from other sites but can't seem to get…
KeithS
  • 70,210
  • 21
  • 112
  • 164
26
votes
2 answers

Passing a C# callback function through Interop/pinvoke

I am writing a C# application which uses Interop services to access functions in a native C++ DLL. I am already using about 10 different functions which are working. Now I am not sure how to handle passing a callback as a parameter so that the DLL…
Trevor Elliott
  • 11,292
  • 11
  • 63
  • 102
26
votes
3 answers

Should cookie values be URL encoded?

When setting cookies, PHP url-encodes the cookie value (at least when not using setrawcookie) and it url-decodes the cookie value before making it available to the application in $_COOKIE. Is this an accepted standard? If I set a raw cookie value of…
AndreKR
  • 32,613
  • 18
  • 106
  • 168
26
votes
3 answers

Best way to execute a python script in a given conda environment

I want to execute a python script executed.py from another python script trigger.py using the subprocess package. The executed.py must be ran in a different conda environment than trigger.py (let say executed_env and trigger_env). What is the best…
Robin
  • 1,531
  • 1
  • 15
  • 35
26
votes
5 answers

How do you call a Scala singleton method from Java?

I'm trying to inject some Scala code into my existing Java app. (So, being said, I want some more fun). I create a singleton stuff in Scala ScalaPower.scala package org.fun class ScalaPower object ScalaPower{ def…
Phương Nguyễn
  • 8,747
  • 15
  • 62
  • 96