interop

Blittable Value Types

Here is a list of blittable types. It contains Int32 and Int64. But I don't see just plain "int" on the list. How does C# treat the plain "int" type? Does it just get replaced with Int32 or Int64 depending on the system? Or is there a subtle difference? Will using "int" ever cause a performance hit for marshalling? ...

How can I run some common code from both (a) scheduled via Windows Task & (b) manually from within WinForms app?

Hi, QUESTION - How can I run some common code from both (a) scheduled via Windows Task & (b) manually from within WinForms app? BACKGROUND: This follows on from the http://stackoverflow.com/questions/2489999/how-can-i-schedule-tasks-in-a-winforms-app thread REQUIREMENTS C# .NETv3.5 project using VS2008 There is an existing funct...

Python XML + Java XML interoperability.

Hello. I need a recommendation for a pythonic library that can marshall python objects to XML(let it be a file). I need to be able read that XML later on with Java (JAXB) and unmarshall it. I know JAXB has some issues that makes it not play nice with .NET XML libraries so a recommendation on something that actually works would be great. ...

Mono vs .NET Interop curiosity

I'm developing a huge console application for Unix using C# via Mono. If I develop that app using M Visual Studio and .NET 3.5 and I carefully neglect to use win32 specific API calls, should I expect that application to automatically work in my Unix box? Or should I just get MonoDevelop and go the Mono way? ...

COM access to classic ASP intrinsic objects

I'm converting a VB6 COM object that works with classic ASP to a c# .Net COM Object Interop_COMSVCS.ObjectContext objContext; Interop_COMSVCS.AppServer objAppServer; objAppServer = null; // need to initialize before using objAppServer = new Interop_COMSVCS.AppServer(); objContext = objAppServer.G...

Some languages don't work when using Word 2007 Spellcheck from Interop

I'm using the Word 2007 spellchecker via Interop in a VB.net desktop app. When using the default language (English), it works fine. If I set the language to French via LanguageId, it also works. But if I set it to French (Canadian) (Word.WdLanguageID.wdFrenchCanadian), it doesn't work. There's no error message, it simply runs and says t...

Using Word COM objects in .NET, WinWord process won't quit after calling Word.Documents.Add

I'm running into the classic scenario where, when creating Word COM objects in .NET (via the Microsoft.Office.Interop.Word assembly), the WinWord process won't exit even though I'm properly closing and releasing the objects. I've narrowed it down to the use of the Word.Documents.Add() method. I can work with Word in other ways without ...

Exposing.NET assembly as COM 101

I have trouble to expose a .NET assembly in COM. It seems that I must be missing some basic step because I think I followed all tutorials and documentation I found as well as common sense, but still when I do (in a test VBScript): Set o = CreateObject("MyLib.MyClass") It keeps saying that the object cannot be created. Here are the st...

Automatically creating C# wrappers from c headers?

Is there a way to automatically create p/invoke wrappers for .net from a c header? Of course I could create them by hand, but maintaining them would be painful, and I'd probably make a mistake somewhere resulting in hard to debug crashes. I tried SWIG, but it created full classes where simple structs would be sufficient. Another proble...

Threaded Erlang C-Node(cnode) Interoperability howto?

I am at a point in my Erlang development where I need to create a C-Node (see link for C-Node docs). The basic implementation is simple enough, however, there is a huge hole in the doc. The code implements a single threaded client and server. Ignoring the client for the moment... The 'c' code that implements the server is single threade...

Registration-Free .net libraries with legacy VB6 applications

I've been searching for hours for resources on how to successfully use registration free Com interop. I've found some resources on using old COM libraries in .net applications, but allmost nothing on using new .NET libraries in COM applications (more spcecific: VB6 applications) Basically my search gave two useful resources: http://msdn...

Unexpected Event Behavior When Using VB6 with COM Interop (C#)

We are using a COM Interop (C#) to allow for a VB6 application to send data to a server. Once the server receives the data, the managed code will raise a DataSent event. This event is only fired after a correlation ID is returned to the original caller. About 1% of the time, we've encountered VB6 executing the raised event before fin...

Invoking .Net COM assembly from Powerbuilder application (without registration)

We have a Powerbuilder 10 application that is using .Net COM assemblies. We are trying to embed the manifest in the PB application (to invoke COM assemblies without registration). The merged manifest file has added sections for dependecies on the .Net COM assemblies. We have tries various tools to inject the new manifest with different r...

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 done some serious googling to solve this issue, but so far with no luck. I've also read t...

Using Word COM objects in .NET, InlineShapes not copied from template to document

Using .NET and the Word Interop I am programmatically creating a new Word doc from a template (.dot) file. There are a few ways to do this but I've chosen to use the AttachedTemplate property, as such: Dim oWord As New Word.Application() oWord.Visible = False Dim oDocuments As Word.Documents = oWord.Documents Dim oDo...

How do I marshal a pointer to an array of pointers to structures?

I have a C function with the following signature: int my_function(int n, struct player **players) players is a pointer to an array of pointers to struct player objects. n is the number of pointers in the array. The function does not modify the array nor the contents of the structures, and it does not retain any pointers after return...

Why doesn’t Office-applications get focus when run from another application on Win 2008?

I have some different COM-Interop examples that when run on Windows 2008 (Office 2007) always open minimized in the task bar. On Windows 2003 or XP they open like I want them to. Has there been any changes to how Windows deals with this? Or to Office? I know that I can close windows with CTRL-SHIFT-ALT, and by that get them to start m...

Dynamic Keyword and WPF hosted in MFC

We're looking to port a massive MFC app to WPF. In the interim, we want to host the new WPF controls in the legacy app until the entire app has been replicated. Hosting WPF controls in MFC is pretty straightforward, but one of the challenges we've had in the past is sharing data between the hosting MFC app and the hosted WPF control. ...

Where can I find a good description on how to use COM with Windows Services?

Hi there, I'm looking to pass parameters into a Windows Service not only upon launch but while it's still running as well. I've heard the best way to do this would be through the COM but I have no idea where to even get started. Are there any good places you can recommend where I can find some helpful information about how to get started...

Visual C# | Capturing data from a window in a closed-source third-party Win32 application

I'm planning on creating a C# Windows Forms app as an extension for a third-party Win32 application but I'm stumped as to how to do this right now. The farthest I've gotten is knowing it involves Win32 Hooking and that there's this open source project called EasyHook that's supposed to allow me to do this. I'd like to know how I can ge...