interop

Why am I getting an Out of Memory Error doing ASP .NET Excel Interop?

我的梦境 提交于 2019-12-21 21:26:33
问题 This was working..and I moved the disposal code to the finally block, and now it fails every time. I have a test spreadsheet with 4 records, 6 columns long. Here is the code I'm using to bring it in. This is ASP .Net 3.5 on IIS 5 (my pc) and on IIS 6 (web server). It blows up on the line right before the catch: "values = (object[,])range.Value2;" with the following error: 11/2/2009 8:47:43 AM :: Not enough storage is available to complete this operation. (Exception from HRESULT: 0x8007000E (E

Calling Python from .NET via C++ bridge

丶灬走出姿态 提交于 2019-12-21 20:56:06
问题 Once per a couple of months I google for "Call Python from .NET" when I am too tired to reinvent/port stuff and find some cool code in Python. The two popular solutions are to start an external process or to use IronPython IronPython is not an option for me since the reason I might want to use Python is usually some libraries that depend on NumPy/ScyPy. Recently I started to learn the very basics of C++ and have found that one could embed Python in C++, and have found an article with an

How to Interop to C++ with Namespace

浪尽此生 提交于 2019-12-21 20:26:12
问题 I have a C++ function, that I want to expose to C# for consumption. The catch is that the C++ code declaration is wrapped in namespace : namespace OhYeahNameSpace { extern "C" __declspec(dllexport) void Dummy(); } My question is, how to define the corresponding C# structure? I believe that C# code must be made aware of the existence of OhYeahNameSpace , am I right? Edit: I think a lot of people misunderstand my point ( no thanks due to a typo in my original example; fixed). I am asking about

Using ActiveX PropertyBags from C#

戏子无情 提交于 2019-12-21 19:55:41
问题 I have created a .NET user control with an ActiveX interface. It works well. Now, I want to be able to read and write from the property bag for the ActiveX interface. How would I do this? 回答1: The easiest is to use client script to pass the parameters values to the ActiveX <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title></title> <script language="javascript"> function Rundata(file) { var winCtrl = document.getElementById("YourActiveX"); winCtrl.Option1 = file;

C# .NET Charts Libraries/Code? [closed]

邮差的信 提交于 2019-12-21 19:25:54
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I am creating some reporting software that will generate excel workbooks with charts and all related data. Besides the built in libraries and .NET Office integration features, is there any other tools or code that people found useful to creating similar projects? EDIT: I am targeting winforms. 回答1: I've used

C# .NET Charts Libraries/Code? [closed]

陌路散爱 提交于 2019-12-21 19:25:33
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I am creating some reporting software that will generate excel workbooks with charts and all related data. Besides the built in libraries and .NET Office integration features, is there any other tools or code that people found useful to creating similar projects? EDIT: I am targeting winforms. 回答1: I've used

didBeginContact passed PKPhyicsObject

前提是你 提交于 2019-12-21 17:18:37
问题 I have a helper method which extends SKPhysicsContact extension SKPhysicsContact { /// - returns: `[SKPhysicsBody]` containing all the bodies that match `mask` func bodiesMatchingCategory(mask: UInt32) -> [SKPhysicsBody] { let bodies = [bodyA, bodyB] return bodies.filter { ($0.categoryBitMask & mask) != 0 } } } in didBeginContact() I call this method on the passed in contact . func didBeginContact(contact: SKPhysicsContact) { let ballMask: UInt32 = 0x1 << 2 let ball = contact

Array from C++ to C#

*爱你&永不变心* 提交于 2019-12-21 17:13:34
问题 I am trying to pass a double array (its actually a std::vector, but converted at transfer) from a c++ dll into a c# script (unity). Using the approach outlined here https://stackoverflow.com/a/31418775. I can successfully get the size of the array printing on my console in unity however I am not able to use "CoTaskMemAlloc" to allocate memory for the array since I am using Xcode and it doesnt seem to have COM. For a little more background this array is part of a control for a GUI, c++ creates

How do I implement the dispose pattern in c# when wrapping an Interop COM Object?

China☆狼群 提交于 2019-12-21 17:06:54
问题 My class contains an object from Interop and calls a method on it which causes it to alloc stuff. It also exposes a method to free that stuff, so I expect I should call this in Dispose(): class MyClass : IDisposable { private DllName.ComClassName comInstance; void SomeMethod() { comInstance = new DllName.ComClassName(); comInstance.AllocStuff(); } public void Dispose() { comInstance.FreeThatStuff(); } } Now, I should expand all that to follow the Dispose pattern. I have no other disposable or

Java client to WCF service interop with mutual certificate - Cannot resolve KeyInfo for verifying signature

旧巷老猫 提交于 2019-12-21 12:32:41
问题 Exception: MessageSecurityException: Cannot resolve KeyInfo for verifying signature: KeyInfo 'SecurityKeyIdentifier I have to set up a WCF service to receive SOAP calls from a Java client that is sending signed content with the following header: <soap:Header> <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" soap:mustUnderstand="1"> <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="Signature-2"> <ds:SignedInfo xmlns:ds=