interop

Fast (in means of developer time) way to use a lot of C++ code from Java

穿精又带淫゛_ 提交于 2019-12-12 13:49:24
问题 Background: We are designing a physics app, that will do a lot of data analysis, but our focus is integrating physical electronic equipement. Basically I would like to be able to call root (it's a big data analysis library from CERN written in C++) library written in C++ library from Java. Basically ability to use ROOT classes from Java (and doing it without losing much time to code JNI wrappers) is a showstopper to us (if it will be hard, most probably we will be using Qt). I can think of

Prevent actions to be added to the word undo redo OR Remove actions from the undo redo CommandBarComboBox

痴心易碎 提交于 2019-12-12 12:34:57
问题 We are inserting content controls programmatically in word document and we don't want to add actions to the undo stack of word. The only way that we found is to access the undo commandbar-combobox and to remove the items related to inserting content control action, we are using the code below : var commandBars = _wordDocument.CommandBars.Cast<CommandBar>(); var standardCommandBar = commandBars.First(bar => bar.Name.Equals("Standard")); CommandBarComboBox undoControl = standardCommandBar

WCF - Object as known type -> interoperable?

£可爱£侵袭症+ 提交于 2019-12-12 12:27:49
问题 Actually there should be a straight forward answer to this question (is about the "Object" property below): Having the following data contract: [KnownType(typeof(bool))] [KnownType(typeof(int))] [KnownType(typeof(string))] [KnownType(typeof(Customer))] [KnownType(typeof(Client))] public class Transaction { // properties [DataMember(Name = "UID")] public int UID{} [DataMember(Name = "Type")] public Enums.TransactionType Type{} [DataMember(Name = "Data")] public Object Data{} } and the

Writing a managed wrapper for unmanaged (C++) code - custom types/structs

谁说我不能喝 提交于 2019-12-12 12:15:15
问题 faacEncConfigurationPtr FAACAPI faacEncGetCurrentConfiguration( faacEncHandle hEncoder); I'm trying to come up with a simple wrapper for this C++ library; I've never done more than very simple p/invoke interop before - like one function call with primitive arguments. So, given the above C++ function, for example, what should I do to deal with the return type, and parameter? FAACAPI is defined as: #define FAACAPI __stdcall faacEncConfigurationPtr is defined: typedef struct faacEncConfiguration

IBM DataPower 3.7.1.x issues with WCF clients

二次信任 提交于 2019-12-12 11:29:44
问题 I'm trying to consume an IBM DataPower 3.7.1.x web service in WCF getting the following error message: Cannot find a token authenticator for the 'System.IdentityModel.Tokens.X509SecurityToken' token type. Tokens of that type cannot be accepted according to current security settings. The HTTP response is coming back as 200 and I can see the correct SOAP response while debugging it in Fiddler. However, the WCF clients doesn't seem to know how to process the BinarySecurityToken element in the

Call any Java method from C#

ぐ巨炮叔叔 提交于 2019-12-12 10:53:58
问题 Is there a way using JNI and C# code to create a program that invoke any given Java method? Assume that I have a jar containing classes hierarchy and I'm responsible for loading the JVM and these classes, can I write a C# program that receives the java method signature + arguments values on the fly and call the java code? Please try to restrict your answers to free technologies (JNI solutions prefered). 回答1: IKVM is one option. It implements a JVM in .Net and provides interop tools. 回答2: IMHO

How can I create an shared context between OpenGL and OpenCL with glfw3 on OSX?

扶醉桌前 提交于 2019-12-12 10:15:44
问题 I am building a particle system using OpenGL and OpenCL. I need to share VBOs between OpenGL and OpenCL and therefore create an OpenCL context with the appropriate properties. I am aware that glfw3 exposes some native API functions however I can't figure out how to access the CGL ones. https://github.com/glfw/glfw/blob/master/include/GLFW/glfw3native.h I basically need to find how to run this with glfw3: CGLContextObj kCGLContext = CGLGetCurrentContext(); CGLShareGroupObj kCGLShareGroup =

Import WinAPI Function in *.VBS File

一笑奈何 提交于 2019-12-12 09:34:42
问题 Using visual basic in say Excel, I am able to declare WinAPI functions using the DECLARE keyword - e.g. Declare Function SetLocaleInfo Lib "kernel32" Alias "SetLocaleInfoA" ( _ ByVal Locale As Long, ByVal LCType As Long, ByVal lpLCData As String ) As Boolean However when using this syntax in a *.VBS file - it fails with a compile error. Can anyone tell me what I need to do to run WinAPI functions from *.VBS files? 回答1: You can't run WinAPI functions from VBScript without some extra third

what's wrong in my code related to COM?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 09:14:57
问题 *****BLOCK_1**** if( strcmpi(appName.c_str(),MSSQL)==0 ||strcmpi(appName.c_str(),MSSQL2005)==0 ) { if (FAILED(CoCreateInstance (CLSID_SQLDMOServer, NULL, CLSCTX_INPROC_SERVER, IID_ISQLDMOServer, (LPVOID*)&m_pSQLServer))) { DMOAvailable=false; IDiscoverPtr pICalc; HRESULT hRes=CoCreateInstance(Test::CLSID_SqlClass, NULL, CLSCTX_INPROC_SERVER,Test::IID_IDiscover, reinterpret_cast<void**> (&pICalc)); if(FAILED(hRes)) { cout << "CoCreateInstance Failed on CLSID_SQLDMOServer\n"; return FALSE; } **

Best method of calling managed code(c#) from unmanaged C++

混江龙づ霸主 提交于 2019-12-12 08:55:00
问题 We have developed a s/w architecture consisting of set of objects developed in C#. They make extensive use of events to notify the client of changes in status, etc. The intention originally was to allow legacy code to use these managed objects through COM interop services. That was easy to write in the design specification but, I'm seeing that actually implementing it is more problematic. I've searched for many hours looking for a good sample of event handling using this method. Before we