interop

Interoperate between C# and Java using web services without a Java EE application server?

徘徊边缘 提交于 2019-12-19 04:12:37
问题 I'm in a difficult position: We have a 3rd party enterprise system that exposes a Java-based API. However, we are a 100% .Net oriented development team. Essentially, I need to wrap the Java API with something that C# code can call. Web services would be great, but the only Java application server supported on our infrastructure is WebSphere 6.1. This means the ancient (and deprecated) JAX-RPC web service framework is the only way for us to expose web services. Just getting a simple proof-of

Calling unmanaged C++ library (dll) from C# creates an access violation error (0xc0000005)

耗尽温柔 提交于 2019-12-19 04:05:15
问题 This question was migrated from Code Review Stack Exchange because it can be answered on Stack Overflow. Migrated 8 years ago . Sorry for the long question. I just wanted to include everything that I know about the problem at the moment. I'm using Visual Studio 2008 to create a Windows Form program in C# that calls a library written in C++. The C++ DLL analyzes measurement data, which consists of several samples. The samples are passed to the library by a function ( PDSetWaveSample ) which

What is required to enable marshaling for a COM interface?

旧时模样 提交于 2019-12-19 03:59:20
问题 I have a 32-bit ATL COM component without a type library. It has a class factory for one given class that implements several interfaces. When I use it as an in-proc server, everything works fine - the client side invokes CoCreateInstance(), the object is instantiated and QueryInterface() retrieves a pointer to a requested interface. But when I put the component into COM+ I no longer can instantiate the class - CoCreateInstance() now returns E_NOINTERFACE. I believe the problem is that COM+

CUDA + OpenGL Interop without deprecated functionality

旧时模样 提交于 2019-12-19 03:44:13
问题 I've previously been able to populate textures in CUDA for use in OpenGL by: Create and initialize the GL texture ( gl::GenTextures() , etc.) Create a GL Pixel Buffer Object Register the PBO with CUDA In the update/render loop: cudaGraphicsMapResource() with the PBO Launch the kernel to update the PBO cudaGraphicsUnmapResource() the PBO from CUDA Load the GL program, bind texture, render as normal Wash, rinse repeat. However, I'm wondering if PBOs are still the best way to write a texture

Exception HResult 0x800a03ec when trying to open Excel with Microsoft.Office.Interop.Excel.Workbooks.Open()

喜你入骨 提交于 2019-12-19 03:14:19
问题 Following Exception is thrown if I try to open an excel file on a client machine: Exception from HRESULT: 0x800A03EC Inner Exceptions: (empty) Stack Trace: at Microsoft.Office.Interop.Excel.Workbooks.Open(String Filename, Object UpdateLinks, Object ReadOnly, Object Format, Object Password, Object WriteResPassword, Object IgnoreReadOnlyRecommended, Object Origin, Object Delimiter, Object Editable, Object Notify, Object Converter, Object AddToMru, Object Local, Object CorruptLoad) at (own

Yet another System.Runtime.InteropServices error

落花浮王杯 提交于 2019-12-18 19:31:27
问题 Every project we have with MongoDB will, at one point of another, have a problem with the System.Runtime.InteropServices library that doesn't load. This time the error is interesting: The outer exception can't find the version 4.3.0.0 of the lib. But the inner exception can't find version 4.0.0.0 Does anyone have an idea about that? More information about the problem: So, NuGet has 4.3.0.0 installed <?xml version="1.0" encoding="utf-8"?> <packages> <package id="System.Runtime" version="4.3.0"

C# - way to programmatically advance Powerpoint slide show?

一笑奈何 提交于 2019-12-18 18:58:13
问题 I'd like to be able to advance through a Powerpoint presentation by pressing buttons in a Windows form. Here's some code I've found from http://bytes.com/topic/c-sharp/answers/272940-open-powerpoint-presentation-c-window-form that opens a Powerpoint presentation slide show: Microsoft.Office.Interop.PowerPoint.Application oPPT; Microsoft.Office.Interop.PowerPoint.Presentations objPresSet; Microsoft.Office.Interop.PowerPoint.Presentation objPres; //the location of your powerpoint presentation

Call C# methods from C++ without using COM

瘦欲@ 提交于 2019-12-18 16:55:32
问题 Is there a way to create C# objects and call methods from unmanaged C++, but without using COM Iterop? I am looking for something like JNI (but for .Net), where you can manually create the VM, create objects, etc. 回答1: If you are using C++/CLI then you can interact directly with both the managed world and unmanaged code, so interop is trivial. You can also host the CLR yourself, and whilst the hosting API is COM based, you can then create any managed object. The process isn't a difficult as

Can/how do you host a full VB6 Form in a C# WPF app?

我是研究僧i 提交于 2019-12-18 13:30:00
问题 I am currently exploring the option of porting some older VB6 application to WPF with C#. The plan, in phase one, is to port several key forms and not all the application. The theoretical goal is to open the VB6 form in a container of some sort within WPF via an ActiveX dll. Is this even possible? I've tried looking at the Interop and can't seem to find a solid example of how get it to work with anything but Win32 controls, not a full form. I have full access to the old VB6 code and can

Different Interop references on two different computers doesn't work

拜拜、爱过 提交于 2019-12-18 13:08:24
问题 When I add a reference to Microsoft.Office.Interop.Excel on my computer, Visual Studio adds this to the project file: <COMReference Include="Excel"> <Guid>{00020813-0000-0000-C000-000000000046}</Guid> <VersionMajor>1</VersionMajor> <VersionMinor>5</VersionMinor> <Lcid>0</Lcid> <WrapperTool>primary</WrapperTool> <Isolated>False</Isolated> </COMReference> There is another developer on the team who gets errors and needs to add a DLL file to the project called Interop.Excel.dll, which replaces