com

Hosting the .NET runtime in a Delphi Program

I was looking into using some .NET code from within a Delphi program, I will need to make my program extensible using .net assemblies and predefined functions (I already support regular DLLs). After a lot of searching online, I found Managed-VCL, but I'm not ready to pay $250 for what I need, I also found some newsgroups with code that...

Exposing inherited members of a COM vb.net class

I have two vb.net class: Public MustInherit Class Class1 Private m_sProperty1 As String = "" Public Property sProperty1() As String Get Return m_sProperty1 End Get Set(ByVal value As String) m_sProperty1 = value End Set End Property End Class <ComClass("classid","inter...

CLSIDFromProgID is successful but CreateInstace fails! Why?

I am trying to create an instance of a COM object. I have the class name that implements the interface and I get a CLSID by using CLSIDFromProgID(). So since I am getting a CLSID I thought everything should be fine from now on. However when I do a call to CreateInstance and pass in the CLSID, I get an error saying "Class not registered"....

CoCreateInstance fails for class Microsoft_Office Excel Worksheet. 0x80040514 "Class not registered"

A sample I'm working on calls CoCreateInstance for class Microsoft_Office Excel Worksheet. It fails with HRESULT of 0x80040514 ("Class not registered"). Other Excel classes (Excel.Application) are registered on the system, but not the one for Worksheet .....Is it possible to register this class? Update: I'm using Microsoft's DSOFram...

Do COM component invoked asynchronously from asp.net run on IO thread or worker thread??

I need to call a third party COM component from an asp.net site. The site is designed to run to pages asynchronously (marking the page and webpart as async). The page registers and invokes async calls by the standard page.RegisterAsyncTask() method. Async methods/components invoked on the managed components would be run on IO threads ...

COM, VARIANT containing BSTR. Who allocates?

OK, so I couldn't really think of an apropos title that summarizes this. The IPrintPipelinePropertyBag interface has the method AddProperty which aptly enough "adds a property to a property bag." http://msdn.microsoft.com/en-us/library/aa506384.aspx AddProperty( [in, string] const wchar_t *pszName, [in] const VARIANT *pVa...

How do I get a .NET assembly running under Delphi from a network drive?

I have a Delphi 5 executable that calls into a .NET assembly via the free Delphi .NET code, and for the most part, this works great. However, one of the requirements of my application is that our clients be able to use this from a networked share as well as local. On my test machine, I can't get this to work, I just get an error messag...

Fork or copy a users browser session in IE

Is it possible to fork a users session (or do something similar) in a Internet Explorer plugin? I want to process the page the user is on when they click a button in the toolbar. To avoid interrupting the users browsing, I'd like to "copy" everything so I can parse and process the page in the background. The processing can involve thing...

How to register COM libraries at runtime?

Let's say I'm developing an application that installs COM component and installer registers them. This works great. Now the software is required to run from a memory stick. How can I register my libraries runtime and make sure, that the registry is cleaned up after running the application? ...

Can Ruby import a .NET dll ?

I am interested in using/learning RoR in a project where I have to use a .NET dll. Is Ruby capable of importing a .NET dll? ...

Free memory from a SafeArrayGetElem call?

I have some code in C# which has a com wrapper. This com wrapper is used in a native c++ application. The c++ code uses a method which returns an array of instances of a class from the c# library. The instances come from a SafeArray like so: for (long i =min; i<=max;i++) { IMyInterface *l = (IMyInterface *)malloc(sizeof IMyInterf...

How to get a DIB implemented in a C++/COM library into a .NET client using that COM object

We have a COM object implemented with C++/ATL that includes a method which will return a DIB. We are also writing a .NET application that will use this COM object. Since we are writing both, we have the liberty of deciding how best to return this DIB from the COM object. To clarify, would it be best to return a native windows handle t...

SAFEARRAY of structs

Does anyone know how to create a SAFEARRAY in C++ to house an array of user defined structs? ...

Handling custom .Net exceptions in COM+ (VB)?

Hi, I'm about to start writing a .Net component which will be called from a VB COM+ service (the new component is a DLL which calls out to a webservice and returns based on the response). I'm not sure how to handle error conditions that might occur in the .Net code in the calling VB. The two types of errors I'm worried about are: exc...

How do I find the sample rate of microphone audio using Skype4Com?

I am using the Skype4Com COM object to intercept audio from the microphone. I know that it is 16 bit mono, but how do I find out what its sample rate is? ...

Use .NET COM in vb6

Im having trouble using a .NET COM in vb6, It compiles ok and I use regasm to register it, add a reference to it in the vb6 project, it even has intellisense. But when I try to make make an instance it gives me an 'Automation Error'. Any one can help? Thanks in advance. ...

How to build an ActiveX object in C++ that can be scripted using Javascript

I can use VS08's MFC/ActiveX template to create a C++ ActiveX object that I can load into a HTML page and script with Javascript. But I can't figure out how to create an interface that allows me to call custom methods on my component with Javascript. Could you please tell me how to accomplish that? I have spent over two hours on google ...

What do you think is making this C++ code slow? (It loops through an ADODB recordset, converts COM types to strings, and fills an ostringstream)

This loop is slower than I would expect, and I'm not sure where yet. See anything? I'm reading an Accces DB, using client-side cursors. When I have 127,000 rows with 20 columns, this loop takes about 10 seconds. The 20 columns are string, int, and date types. All the types get converted to ANSI strings before they are put into th...

.NET COM DLL Deployment

What is the best way to do a .NET COM DLL Deployment, I'm having problems using it in the client machine. The COM is being used in a VB6 app.I can add a reference, but when I try to use create objects it gives me an Automation Error. Thanks in advance. ...

How to run Google Earth Inside a WPF Control

Hi: I’m trying to run Google earth inside WPF but I don’t know how. Basically I have managed to run Google Earth in a Windows Form Control inside a Windows Form, everything was OK. Trying to do the same thing in WPF, well, give strange result a small Google Earth screen placed anywhere in the form an not inside the User Control I have...