com

Unload a COM control when working in VB6 IDE

Part of my everyday work is maintaining and extending legacy VB6 applications. A common engine is written in C/C++ and VB6 uses these functions in order to improve performance. When it comes to asynchronous programming, a C interface is not enough and we rely on COM controls to fire events to VB6. My problem is that when I register th...

How to trace COM objects exceptions?

I have a DLL with some COM objects. Sometimes, this objects crashes and register an error event in the Windows Event Log with lots of hexadecimal informations. I have no clue why this crashes happens. So, How can I trace those COM objects exceptions? ...

C++ Problems with #import of .NET out-of-proc server.

In C++ program, I am trying to #import TLB of .NET out-of-proc server. I get errors like: z:\server.tlh(111) : error C2146: syntax error : missing ';' before identifier 'GetType' z:\server.tlh(111) : error C2501: '_TypePtr' : missing storage-class or type specifiers z:\server.tli(74) : error C2143: syntax error : missing ...

How to register COM from VS Setup project?

I have marked my DLL as vsdraCOM, and I can see it in the registry after installing, but my application does not see the COM interface until I call RegAsm on it manually. Why could this be? The COM registration does not work on Vista (confirmed myself) and on XP (confirmed by a colleague). Using Visual Studio 2005 on XP. ...

Is there a method for handling errors from COM objects in RDML?

Is there a method for handling errors from COM objects in RDML? For instance, when calling Word VBA methods like PasteSpecial, an error is returned and the LANSA application crashes. I cannot find anything in the documentation to allow handling of these errors. Actually, error handling in general is a weak-point for LANSA and RDML, but ...

Delphi and COM: TLB and maintenance issues

In the company that i work, we develop all the GUI in C#, but the application kernel is mainly developed in Delphi 5 (for historical reasons), with a lot of components made in COM+. Related to this very specific sort of application a I two questions: Experienced guys in Delphi and/or COM, do you have any workrounds to work with the bug...

How do I unregister COM dlls initially added with RegSvr32 when the /u arg doesn't work?

Right, initially ran: c:\regsvr32 Amazing.dll then, (accidentally - I might add) I must have run it again, and (indeed) again when new versions of 'Amazing.dll' were released. Yes - I know now I should've run: c:\regsvr32 /u Amazing.dll beforehand - but hey! I forgot. To cut to the chase, when add the COM reference in VS, I can see...

Sharepoint COMException 0x81020037

I am working on a SharePoint application that supports importing multiple documents in a single operation. I also have an ItemAdded event handler that performs some basic maintenance of the item metadata. This event fires for both imported documents and manually created ones. The final piece of the puzzle is a batch operation feature ...

Notification of drop in drag-drop in Windows

My C# program has a list of files that can be dragged from it and dropped into another program. My requirements are that the file be copied to a different directory first. So, can I be notified of the drop operation so that I can only copy the file if operation succeeds? I'd rather wait till I know it needs to be copied before actually ...

How to implement Type-safe COM enumerations in Delphi ?

How could i implement Type-Safe Enumerations in Delphi in a COM scenario ? Basically, i'd like to replace a set of primitive constants of a enumeration with a set of static final object references encapsulated in a class ? . In Java, we can do something like: public final class Enum { public static final Enum ENUMITEM1 = new Enum (...

What do I need to do to implement an "out of proc" COM server in C#?

I am trying to implement an "out of proc" COM server written in C#. How do I do this? I need the C# code to be "out of proc" from my main C++ application, because I cannot load the .NET runtime into my main process space (WHY?: My C++ code is in a DLL that is loaded into many different customer EXE's, some of which use different version...

COMException "Library not registered." while using System.DirectoryServices

I have only just started received the following error in my windows forms application under dot net 2 framework on windows 2000 when using System.DirectoryServices. {System.Runtime.InteropServices.COMException} System.Runtime.InteropServices.COMException: {"Library not registered."} _className: Nothing _COMPlusExceptionCode: -532459...

Has .NET made raw COM and DCOM programming redundant ?

Has the introduction of the .net framework made raw programming in COM and DCOM redundant ? (Except for using some COM+ services, e.g. for transaction management through the System.EnterpriseServices namespace) ...

How do you display a dialog from a hidden window application?

Apologies in advance if I use duff terminology in this question, I'm working at the edge of my understanding of Win32. I have developed a COM component (dll) that implements an Edit() method displaying a WTL modal dialog. The complete interface to this COM component corresponds to a software standard used in the chemical process indust...

How to do a simple mail merge in OpenOffice

I need to do a simple mail merge in OpenOffice using C++, VBScript, VB.Net or C# via OLE or native API. Are there any good examples available? ...

Maintain the correct version for a COM dll referenced in a .NET project

I want to reference a COM DLL in a .NET project, but I also want to make sure that the interop DLL created will have the correct version (so that patches will know when the DLL must be changed). If I use TlbImp I can specify the required version with the /asmversion flag but when I add it directly from VisualStudio it gets a version tha...

How do I return an array of strings from an ActiveX object to JScript

I need to call into a Win32 API to get a series of strings, and I would like to return an array of those strings to JScript. This is for script that runs on local machine for administration scripts, not for the web browser. My IDL file for the COM object has the interface that I am calling into as: HRESULT GetArrayOfStrings([out, retv...

What is the best source for information on COM error codes?

I'm at a loss for where to get the best information about the meaning, likely causes, and possible solutions to resolve COM errors when all you have is the HRESULT. Searching Google for terms like '80004027' is just about useless as it sends you to random discussion groups where 90% of the time, the question 'What does 80004027 mean?' i...

Managed OleDB provider written in C#

An OleDB provider is a binary implementing COM interfaces provided by Microsoft. From that it seems to be possible to create a provider using C#. Is that correct? Is there a sample demonstrating that? If not, would you discourage me from doing that? I see that there are multiple unmanaged samples but I can't find any managed. ...

MapPoint 2009 Load Performance

I'm having some problems integrating MS MapPoint 2009 into my WinForms .Net 2.0 application in C#. I've added the ActiveX MapPoint control onto a form and have no problems getting it to display a maps and locations; my concern is the time it takes to load a map once it is created. The tests on my development machine have shown the av...