com

Adding Ribbon support to Excel COM Addin

I have a MS Office COM addin written in C# (Visual Studio 2005) and uses a COM Shim dll. The addin DOES NOT use VSTO technology and supports Excel XP and higher. The addin adds a new toolbar and a menu. The addin works fine in Excel 2007 but it is displayed in a separate tab named "AddIns" along with its toolbars and menu. I want integr...

How do I use Reg-Free COM for a vb6 dll reference in a .net project?

I've been trying to solve this issue for a long time, and nothing seems to work. I have a COM DLL written in vb6. I add a reference to this DLL in .net, with the 'isolated' and 'copy local' properties set to true on the reference. Apparently this is supposed to enable reg-free com. But it doesn't work. If I try on another computer, or ...

Search Outlook Contact using COM?

I want to add support for searching for local Outlook contacts to my ATL/WTL app. Does anyone know of the Outlook COM interface (Office 2003 or greater) allows you to search for contacts? I already have LDAP lookup support but users want to be able to search their private contacts as well. Any information would be welcome. ...

Using ,NET Generic List ToArray in a COM Called Wrapper causes access violation, am I missing something?

I'm having a problem when trying to pass an array back to a COM caller. Basically, I have a generic List of classes, that I want to return to the COM caller, you can't use generics in COM, so it's got to be strongly typed. I figured just returning a .ToArray() on the List would give me what I need. When I use it in VB6, it works perfe...

Using COM object in C++ with MinGW compiler

Hi, I have an in-process COM server (i.e. DLL) I'd like to use from a C++ application that's to be compiled with the MinGW suite (using CodeLite IDE). I don't quite know where to start, any tips, suggestions or sample code anyone? Cheers, Matt ...

Is DirectX on Java possible?

Is there an easy way to use DirectX in Java? In particular, DirectX's video APIs. I know that C# might be a more natural choice, but I have my devious reasons for wanting to do something so perverse. ...

oleview could able create instance but cocreateinstance fails

Hi, I could able to create instance of the com server using oleview. But when i do the same thing in code with cocreateinstance it gives the error E_NOINTERFACE or 0x80004002. By breaking cocreate instance if found that Queryinterface return this error. How could i resolve it? Please help many thanks in advance. ...

How to run a hosted ironpython 1.1 from an Excel add-in?

I am writing an Excel add-in that hosts IronPython 1.1 and I want to provide the Excel.Application COM object to the PythonEngine instance. My C# can access members of the COM object just fine. However, when my IronPython script accesses members of the COM object, I get a "System.ArgumentException: Object of type 'System.Int32' cannot b...

COM / OLE / ActiveX / IDispatch confusion

I can't wrap my head around the differences among these terms. Are COM and ActiveX synonyms? Is ActiveX object just a COM object that exposes IDispatch? Lots of older MSDN pages mention IDispatch without any COM context. Does it have a separate history, and was just introduced under the COM 'umbrella' later in its lifecycle? Wher...

How should I check that [out] params in COM can be used?

Officially one should not use [out] parameters from COM functions unless the function succeeded this means that there are (at least) three ways to see if an [out] parameter can be used. Consider the following interface interface IFoo : IUnknown { HRESULT GetOtherFoo([out] IFoo** ppFoo); HRESULT Bar(); }; Which of the follow...

fails to set default audio device using Windows Media Encoder

Hello everyone, I am refering the following document section "Windows Media API for Capturing the Screen" to capture screen and the original code works ok. When I am adding additional feature (I just added several lines to make it record from default audio device), it fails at thew following line (I debugged and looks like it fails at C...

DISPhelper Library

Has anyone used DISPhelper library? I wanna know if it's really a better way to use this library if you're pretty new to COM technology. I'd appreciate your feedbacks. thanks.. ...

Unable to access Excel's Application.ComAddIns property if there are no AddIns installed

This code snipped for the Windows Scripting Host displays the number of COM-AddIns currently installed into Excel. It works fine except for when there are no COM-AddIns installed. I believe it should output a "0", but instead it raises an exception (code 800A03EC). Does anyone know why? test.vbs Set objExcel = CreateObject("Excel.App...

Registration-free COM not working on Windows Server 2003

I have created the necessary manifests for my COM server DLL and a client application to work registration-free in Windows XP. I've tested all kinds of combinations (with and without a registration) and in all cases the client application sees the side-by-side version of the library if the manifests are present, and the registered one i...

What's the difference between CoCreateInstance() and CoGetClassObject() when creating objects on the same machine?

I understand that CoCreateInstance finds the COM server for the given class id, creates the object instance for that id and retrieves an interface from that object instance. CoGetClassObject() finds the COM server for the class id, creates an instance of the class factory for that class id and retrieves that class factory interface which...

Controlling VirtualBox via COM from Python?

Hello. I'm trying to control latest Sun VirtualBox via it's COM interface from Python. But, unfortunately, the following code don't work: import win32com.client VBOX_GUID = "{B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F}" try : oVbox = win32com.client.Dispatch( VBOX_GUID ) oVbox.FindMachine( "kubuntu" ) except Exception as oEx: print str...

When and why use CoLoadLibrary?

The description of CoLoadLibrary() says it does pretty much the same as LoadLibraryEx() - loads a DLL into the process. COM classes creation functions - CoCreateInstance() and CoGetClassObject() - both do load the necessary DLL into the process too. Then why is CoLoadLibrary() needed in the first place and how should it be used? ...

Where is using null BSTR documented?

It's at least common practice to treat null BSTR (null WCHAR* pointer) as an empty string and design all the code manipulating BSTRs accordingly. Answers to this question say the same. Where is this practice documented? Is there any official document describing this convention? ...

Using the MSHTML interfaces IHTMLChangeSink, IHTMLChangeLog and RegisterForDirtyRange in VB6

Is this even possible? I can implement IHTMLChangeSink, but not IHTMLChangeLog, but I cannot call RegisterForDirtyRange or CreateChangeLog in VB6. ...

ASP.NET, IIS and COM

Hello I'm not that familiar with COM and was hoping that someone out there, who is, could help verify what I have below is correct. If I have two completely separate Requests (request 1 & request 2), then this creates two separate instances of my WebApplication. So far so boring. If each instance then contacts the SAME web service,...