interop

Clojure Jython interop

Hi, I was wondering if anyone has tried somehow calling Jython functions from within Clojure, and how you went about doing this if so. I have not used Jython, but I would imagine the Jython interpreter can be invoked in the same way as any other java code, and Python programs can be run within it. However I wonder if it would be possi...

How to exclude a thread from global hook.

Hi, We are hooking TextOut(),ExtTextOut() and DrawText() methods GLOBALLY . i.e. hhook = SetWindowsHookEx(WH_CBT, function_address, module_handle, 0); But we want to exclude our application (which we are using to install/uninstall hook) from being hooked. If the last argument to SetWindowsHookEx() is 0(zero) it will hook all the ex...

Using a C++ callback interface in C#

Hey, I am writing an application that needs to record video using DirectShow - to do this, I am using the interop library DirectShowLib, which seems to work great. However, I now have the need to get a callback notification as samples are written to a file, so I can add data unit extensions. According to the msdn documentation, in C++...

How to use a dll made in vb 6 to c#.net 3.5 application ?

How to use a dll made in vb 6 to c#.net 3.5 application ? Although we have interop feature but it requires to map all the functions of the dll. Is there any other way around that is quick and reliable. Further is there any tool that might convert this vb 6 dll to .net assembly ? Thanks in advance. ...

C++/CLI : Interop window is not properly configured

Hi, I'm trying to load a WPF control in a C++/CLI application, using the HwndSource class. Here is my code : UBOOL MyWindowWrapper::Init(const HWND InParentWindowHandle) { Interop::HwndSourceParameters sourceParams( "WindowName" ); sourceParams.PositionX = 0; sourceParams.PositionY = 0; sourceParams.ParentWindow = (Int...

Python C interoperability

I wish to wrap an existing C (pure C that is. No C++) library into Python so that I can call it from Python scripts. Which approach among the various available (C Api, SWIG etc.) would be the most suitable? ...

Strong name a 3rd party Interop DLL

Hello! I have a 3rd party library I need to use. this library however, is not signed, so I used Signer to strong name it. One of its dependencies is an Interop library (also provided by the 3rd party) which I cannot sign since it seems to have unmanaged code. At runtime, when the 3rd party code needs to load the Interop library it fails ...

Access MS-Word spell-checker from (unmanaged) C++

I found a few articles on interacting with the MS-Word spell-checker from C# and managed C++ using .NET. (For anyone interested: this and this) But I couldn't find anything comparable on doing it through standard unmanaged C++ in an MFC app, using COM. I assume the .NET examples are actually using COM meaning it's possible, but is it l...

How do I expose a C++ method to my C# application?

I am currently learning VC++. I have created an application that has functionality to block/allow IP addresses and I would like to expose this functionality to a C# application. I have defined the following members in my header file, which reference methods in my .cpp file (bare with me if that's obvious, as this is my second day of C+...

Error crops up after weeks of running a website.

I have a website based on Vs2008, .NET 3.5SP1 C# code. One of the functions requires it to interop with a COM-based DLL that creates PDFs. About once every 3 to 4 weeks, anything COM related (e.g. generating PDFs) is completely hosed. I get the following error: Creating an instance of the COM component with CLSID {7A91D523-4...

How to free IntPtr in C#?

How to free ptrSentFromPinvokedDLL? IntPtr ptrSentFromPinvokedDLL= IntPtr.Zero; int resultFromVendor = CallVendorDll(ref ptrSentFromPinvokedDLL); resultFromVendor = DoMoreWorkFromVendorDLL( ptrSentFromPinvokedDLL, "workonthis"); // Free ptrSentFromPinvokedDLLhere Thanks in advance ...

How to delete slides from PowerPoint using c#?

I want to delete a particular slide from a PowerPoint presentation using C#. Can anyone help me out on this? ...

C# Trying to use WM_CAP_SET_SEQUENCE_SETUP to allow me to maintain control of the application during video capture.

Hi, thanks for reading. At the moment im making an application to capture video from a webcam, and at the same time click various buttons that write to a text file to make notes on the video. I'v pretty much got everything down now apart from that the WM_CAP_SEQUENCE takes away control of the application by default during capture... so ...

How do I get a list of recipients whose mailbox I have shared access to via Outlook Interop

Hi, I'm trying to get some information on the recipients whose mailboxes I have shared access to. I know this can be found via OutlookSpy (IMAPISession -> OpenProfileSection -> 00020D0A-0000-0000-C000-00000000004 -> 0x0390), but I don't know where I can get this information via Outlook Interop. Thanks. ...

C#/vb.net type mismatch looking up a constructor by reflection (Integer() vs System.Int32[])

I'm passing a type name and some parameters from C# code into a navigation framework written in VB. The navigation framework looks for a constructor on the type that matches the parameters passed in using Type.GetConstructor(Types()). The constructor that I'm looking for expects an array of integers -- Integer() in vb. But it gets an ...

"Memory could not be written" error passing an HGLOBAL from VB.Net to a C DLL

We are using visual studio 2008-My requirement is to allocate some memory, store data into that allocated memory and pass the memory address to a DLL written in C. But when try to pass this memory address to a function in that DLL my application crashes and shows the message "The memory could not be written". ''//Memory allocation Code ...

Silverlight to Javascript interop UTF encoding/decoding

How do I get both alerts, one invoked from silverlight and the other invoked from javascript, to show the same data in the same way. eg. ���� != ýÿýÿý System.Windows.Browser.HtmlPage.Window.Alert( data ); alert(parameters); Silverlight3 code, sending data to javascript function: System.Windows.Browser.HtmlPage.Window....

Cannot call COM object created from STAThread from oher STA threads

I am new to COM and trying to understand the difference between STA and MTA. I tried to create an example that would show that COM can manage calls to object created in STA that is not thread-safe. MyCalcServer class here is created using ATL Simple Object. The settings used are the same as in this article: Threading Model: Apartment...

Bullet indents in PowerPoint 2007 compatibility mode via .NET interop issue

Hello. I've got a really difficult bug and I can't see the fix. The subject drives me insane for real for a long time. Let's consider the following scenario: 1) There is a PowerPoint 2003 presentation. It contains the only slide and the only shape, but the shape contains a text frame including a bulleted list with a random textual repr...

Office 2003 interop problems, interface, method not found.

This problem is making me crazy. Actually I have multiple problems. First one: Why on earth are is there a _Worksheet and a Worksheetinterface in the Excel interop. They both look the same, except for some attributes on the methods. It's confusing! Second of all: my job today is making a VB.NET file more strict, by settings Option ...