com

Cannot instantiate delphi written application.exe using IIS, MVC4, C# and COM

可紊 提交于 2019-12-06 03:01:41
My web application is a web interface for a desktop application called MyApplication.exe. My web application is written in C# (MVC4) that communicates with the MyApplication.exe (written in delphi) via COM-Objects. When 16 clients invoke the web app via the browser, 16 MyApplication.exe instances will be created on the server: My Problem: if client number 17 invokes the web application, I get the following exception in my eventlog: "System Error. Code: 8. Not enough storage is available to process this command." The process explorer indicates, that the worker process w3wp.exe consumes ~600 MB

Custom COM class factory for managed in-proc server

馋奶兔 提交于 2019-12-06 03:01:15
I'm looking at implementing custom COM activation logic for a managed class library, in MkParseDisplayName/BindToObject manner . This way, creating an object from VB might look like this: obj = GetObject("clsid:12341234-1234-1234-1234-123412341234:!UniqueObjectId") That would not be a problem for an out-of-proc server (using CoRegisterClassObject ). However, for an in-proc server, I'd need to alter the implementation of DllGetClassObject , which is normally provided by mscoree.dll . Is this possible at all? The only other option I see is to create a C# singleton object to serve as class

How do I render the scrollable regions of a canvas with IViewObject::Draw?

谁说胖子不能爱 提交于 2019-12-06 02:55:21
I've been trying to render the entire canvas in an IWebBrowser2 control to a bitmap. IViewObject::Draw seems to be the most promising approach, but I can't get it to render anything that would requires a scroll to show. While I could automate the scrolling and stitch the images together, this would look weird with any fixed position elements. Is this even doable? Additionally, I've tried to set the controller's size to one that would allow the entire contents to display without needing to scroll, but Windows caps the max size to the current screen resolution, so that only gets me partially

tlbexp.exe changes method names' case

天大地大妈咪最大 提交于 2019-12-06 02:52:16
问题 I have a rather strange problem. I am exporting an interface from a C# library to COM. I have enabled the 'register with COM' project setting, so it calls tlbexp.exe to make the type libs. We use camel case on our method names and I noticed that the exported type library changes these any method that happens to coincide with a class name to Pascal case... e.g interface IFoo { void randomClass() } class RandomClass { } The exported IFoo in the type lib defines IFoo->RandomClass() instead of

Retrieve COM ProgID from exe without registering it

半城伤御伤魂 提交于 2019-12-06 02:43:07
问题 Background: I would like to extract the COM data from a VB6 application so I can register it correctly (according to Microsoft best practice) the application. I am using WiX 3.0 and heat.exe will not extract the data (known issue with heat) and I do not have ready access to the associated TLB file. The VB6 application does not have compatibility turned on so it regenerates the COM GUIDs every build (They want to have the application be able to run side by side with an older version.) I

C# COM Office Automation - RPC_E_SYS_CALL_FAILED

醉酒当歌 提交于 2019-12-06 02:37:01
问题 I'm writing a C# program that acts as a PowerPoint 2007 plugin. On some machines, some calls to the PowerPoint object model throw a COMException with the message RPC_E_SYS_CALL_FAILED . I couldn't find any specific advice on what to do regarding this error, or how to avoid it. From Googling it looks like something to do with the message queue or Single-Threaded Apartments. Or am I way off? Example of the error message is: System call failed. (Exception from HRESULT: 0x80010100 (RPC_E_SYS_CALL

Which blocking threading operations in .NET will handle COM messages when blocked?

懵懂的女人 提交于 2019-12-06 02:26:25
When creating a new STA thread to host an STA COM component, it is the responsibility of that thread to pump Windows messages related to COM. From what I've been able to gather, certain built in .NET threading primitives such as lock (Monitor.Enter) will do this for you while waiting for the object to be released by another thread. Another way of making .NET pump COM messages for you that I've seen is to use .Join(). Where can I find a complete list of built in threading primitives with this behaviour? Would waiting on a WaitHandle support this? What about WaitAny(), or the new concurrent

How do I debug a .net Fatal Execution Engine Error?

前提是你 提交于 2019-12-06 02:20:15
问题 As a developer, I'm trying to setup a development environment on our brand new VMWare ESX server. Things are not working out: somewhere during the SharePoint Product & Technologies Configuration Wizard, the application just disappears, and in the event log I find the following error: .NET Runtime version 2.0.50727.3082 - Fatal Execution Engine Error (7A0979C6) (80131506) Now I know all this sounds suspiciously like a ServerFault.com style problem (and a very generic error message, lots of

Why are public fields and properties interchangeably binary compatible?

戏子无情 提交于 2019-12-06 02:12:24
问题 In the day job, I work on a VB6 (I know, but don't mock the afflicted...) application that uses a number of libraries we have written (also in the ever illustrious VB6). One of these supporting libraries had a load of private members exposed via public properties, and I was asked to remove the properties, and promote the private member variables into public fields with the same name as the original properties. Now, I'm no COM expert, but I was under the impression that each and every exposed

Errors when calling certain Excel VBA macros from C#

有些话、适合烂在心里 提交于 2019-12-06 02:08:16
I have been struggling and searching on this problem to no avail... I have a few test macros that work perfectly when run from Excel, but either fail or don't work when called from C#, using the interop... I am using MS Visual Studio 2012 (on 64 bit Windows 7) to create a console application that will call the VBA macro TestMacro() written in Excel 2007. Here is the C# code to call the macro: (I basically copied what was done here Run Office Macros by Using Automation from Visual C# .NET ) using System; using System.Collections.Generic; using System.Linq; using System.Text; using System