com

Properly extending a COM interface (IDL)

I am working with some legacy c++ code and I need to extend an interface. The current interfaces are for example: [ object, uuid(guid), version(1.0), dual, nonextensible, oleautomation ] interface IInfo : ITask { // Methods here } [ object, uuid(guid), version(1.0), dual, nonextensible, oleautomation ] interf...

Remote COM server instantiation

I have a COM interface to start and use a program. This works great on a local machine. Is there a possibility to start that program on another machine, through the network without installing other software on it or making changes to the program? ...

Classic.ASP calling .NET component via COM

I have a Classic-ASP application running in IIS 7 (integrated mode) that needs to call a .NET library that was properly registered as COM. Everything seems to work find, but I cannot debug the library even if i put several breakpoints in it. The VS debugger seems to step over without breaking. This is my ASP code: Dim sso: Set sso = S...

How do I get/set Domino read status of messages via Domino COM Object?

I have an application that interacts with Domino via the Domino COM object. I can send, find, delete messages without problem but getting/setting the unread status does not work. The Domino COM object has method to get the read status but it always come back as read. Anyone have a workaround that works? I've had no success with anything ...

Need to unmarshal interface pointers again which are received through QueryInterface?

If I receive a interface pointer present in the other apartment than the current, I am required to Marshal it at the sending apartment side and Un-marshal it at the receiving side. On interface pointer thus received can I do a QueryInterface? If I did the QueryInterface, is the pointer thus received is a usable interface pointer or does ...

'argument' : ambiguous conversions from 'Foo *const ' to 'IUnknown *'

I've got an ATL class: class Foo : public CComObjectRootEx<CComMultiThreadModel>, public CComCoClass<Foo, &CLSID_Foo>, public IPlugin, public IEventSubscriber { // ... }; I need to pass it to another object, like this: pOther->MethodTakingIUnknown(this); When I do this, I get the following error message: error ...

Register managed assemblies with COM without using the GAC

I'm wondering if it possible to register assemblies with COM without having to register it with the GAC. We need to deploy some .net libraries that are exposed to classic asp using a CCW. But deployments are a nightmare. ...

C# COM Server - Testing in C++

I have some C# interfaces exposed to COM: interface IMyInterface { IMyListObject[] MyList { get; } } interface IMyListObject { //properties that don't matter } So far I'm testing how our assembly is exposed to COM from C++ and most is working just fine. My current problem is at one point I have 2 instances of IMyInterfac...

Why is COM ignoring my DllSurrogate entry?

I'm aware of this question, but I've followed the steps listed there and I'm still stumped. I've got a class, registered as follows (this is an RGS file): HKCR { NoRemove CLSID { ForceRemove {5CB1D770-BF72-4F3D-B4DA-85E0542126F4} = s 'ExamplePlugin Class' { val AppID = s '%APPID%' InprocS...

Can I force my COM object to use DllSurrogate?

See this question and this question. It turns out that to load a COM class into a surrogate process, you must not specify any of the CLSCTX_INPROC flags when calling CoCreateInstance. So: how do I allow my host to use CLSCTX_ALL, but allow the individual COM classes to opt in to using DLLHOST? The reason I ask is that I locate my COM ...

Problem with storing COM pointers in global singleton object

Background The application I am working with has several COM DLLs. One of the COM DLLs has a global singleton object, which stores pointers to COM interfaces in other DLLs. Because it is a global singleton object, I have employed the lazy initialization idiom because it is possible that the interface I am trying to get a pointer to ex...

How can I insert a footer in word?

I'm using this to open an RTF in Word and save it as a PDF: Object oMissing = System.Reflection.Missing.Value; //null for VB Object oTrue = true; Object oFalse = false; Microsoft.Office.Interop.Word.Application oWord = new Microsoft.Office.Interop.Word.Application(); ...

Writing to stdout from within a Microsoft VBA macro

I'm using Python (and the Win32 extensions) to execute macros in an Excel spreadsheet via the COM interface, as shown below: import win32com.client o = win32com.client.Dispatch("Excel.Application") o.Visible = 1 o.Workbooks.Open (r"C:\test.xls") o.Application.Run("macro1") What I'd like to do is have the Excel macro output text warnin...

Ituneslib API with itunes 9.0 compatibility issue

Ituneslib api stopped working with itunes 9.0. (exception in first interaction) Is there an alternative API ? has anyone found a solution for it ? It works perfectly in several computers with itunes 8.x, and just doesn't open (doesn't create COM object with itunes 9.x) Any workarounds ? ...

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

Hello, 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 b...

TypeLib name in Delphi 2007

When editing a type library for a COM DLL, it appears that in Delphi 2007, the type library name is always set to the name of the project. If I go and change that name, the change is ignored and eventually resets to the project name. Back in Delphi 7 I could specify the name of the type library. What is the expected behavior? Should we...

InPlaceActivate on ATL control not called until mouse event

I have an ActiveX control written in C++ that I created with VS2008 and ATL. For the most part, it is a pretty standard (not modified much from the original template) control, except that instead of using IDispatchImpl, I have created my own IDispatchEx implementation. This control is only used in Internet Explorer, and I have been tes...

Use VB6 COM DLL as a shell or interface with .NET code behind

I have a widely used but old VB6 COM DLL that needs additional functionality. I would like to get rid of the old DLL but it's used by at least 27 applications that I don't want to recompile. Is there a way to use the "old VB6 COM DLL" (and all of it's COMie -ness) as a shell or interface with .NET code behind it actually doing the all ...

How to call win32 CreateMutex from .Net

Hello, I've been successfully creating a .net mutex like this: SingleIns = new Mutex(true, AppName); for a while. It works in XP, Vista, but apparently not in Windows7. So I need to make an interop call to a Win32 library so other Com components can identify the mutex. I found the following code, but the Win32Calls. is not found... is...

.NET dll in PowerBuilder (as COM) problem with Lists

All, I am trying to access a .NET dll registered as a COM Object with PowerBuilder 10. I keep running into problems where .NET objects return lists. I have built out a very simple class for a proof of concept, and to better explain what I am encountering. See below: .NET: public class ListsArrays { public int[] GetArray() { ...