com

Is this a self-assignment bug in ATL::CComVariant?

ATL::CComVariant has a handful of assignment operators. What I see in the implementation is that in assignment operators accepting LPCOLESTR, IUnknown* or IDispatch* the first action is to call Clear(). If the operator in invoked in such a way that a member variable of the same object is passed CComVariant variant; variant = L"string...

PHP COM: Word FileConverters

I'm trying to use PHP COM to save docx files as html using Word. I am using a Windows installation with apache 2.2.x and PHP5. Office 2007 is installed. Using the following code to list fileconverters: $word = new COM('word.application') or die('Unable to instantiate word.'); foreach($word->FileConverters as $converter) { var_dump(...

How can we check that a binary EXE (PE) is COM Exe or Win32 Exe?

I need to check programatically whether a given EXE binary is a COM EXE or Win32 EXE. Is there any way to do this? Is the Import Table an answer to this? If somehow I can determine this from the registry, where in the registry should I look to find out if a binary is regsitered for COM? (This is specific to EXEs, as DLLs are not a proble...

how to know about the type of com server using type library?

Hello, Is there any attribute or property or method available in type library which tells that whether given type library is in proc COM server or Out of proc COM server. Regards Usman ...

COM method offsets in Delphi

In Delphi, how do I find out the the address of a COM method? I can hardcode the offsets //0 is the offset of the QueryInterface method p := TPonterArray(pointer(SomeInterface)^)[0]; but I would prefer to use symbolic names. The folllowing obviously does not work: var M : TMethod; ... M := TMethod(SomeInterface.QueryInterface); Tha...

Is it possible to cache/serialize a COM object in PHP?

I have a large(ish) COM object that works as the back end of my PHP application. Every time i refresh the page, PHP creates a new object of the COM interface. This is however slow. Is there any way to serialize/cache the COM object so that I can access the already initialized object? Or is there maybe some other workaround. I would also...

Debugging Namespace Extensions using Visual Studio

What is the best way to debug a namespace extension using Visual Studio? It's not convenient to use regsvr32 to register and unregister the extension and to restart the Explorer for each and every build. Attaching the debugger to the extension would be a nice benefit. Is there a simple way to debug a namespace extension using Visual Stu...

WPF Thread: "COM object that has been separated from its underlying RCW cannot be used."

I am getting following error: "COM object that has been separated from its underlying RCW cannot be used." I am sure the problem is because COM object is being called not on the thread it has been created - STA. I tried to implement IDisposable but it has not worked for me. There is a couple of posts dealing with similar problem but ...

download a file using windows IStream

I'm implementing dragging a virtual file out of a website and onto the desktop with an activex control. How do I create an IStream on my http url, so Windows can execute the drop? The example I'm looking at uses SHCreateStreamOnFile to copy a local file; there must be an analogous function for other types of streams like http file dow...

How to connect a C++ COM To a WCF Service

Hello all, I'm looking to a way to connect a COM+ legacy application to a WCF Service, i have been researching this since a couple of days and i haven been lucky to find any useful information, can anyone point me into the right direction on this? I Need the old COM+ component to make calls to a new C# WCF Service so I Need some kind of...

Can COM Component be used in platforms other than windows ?

I wanted to know whether is it possible to make use of COM component in other platforms like linux,etc.., My question is that COM component is supposed to be registered with OS & For that OS need something like registry so that client can use COM components. Can anyone shed light on my question ? ...

VS 2008 use of component class and ...! ??

What is COM..?/ ...

PHP5 COM(), DOTNET(): how to start?

Where I'm stuck is the right parameter syntax to instantiate an object using PHP's com() and dotnet() classes to load .net assemblies, windows system applications and components beyond the usual MS Office apps. If successfully created, working with the objects isn't an issue here. Can anyone explain what each part of each parameter mea...

C++ Exposed property for COM in idl is showing as lower case "all of a sudden"

I have this old C++ COM component. I took the latest code base, built it and found that one of the properties has become lower case. For example, in the pre-compiled dll i have a property "Type", but when building from source it's called "type". The idl shows that the property is called "Type". So what could possibly be happening her...

How can I get an IWebBrowser2 reference to the Internet Explorer window opened by clicking on a link?

Suppose I open a new Internet Explorer window by, for example, clicking a link with target="_blank" in the HTML link. Further suppose I'm doing so programmatically via COM. I realize I can attach to the DWebBrowserEvents2::NewWindow3 event, and be notified when a new window will be opened. How do I get a reference to that newly opened wi...

Extract all images from PowerPoint using COM

How do I extract all the images from a PowerPoint file programatically using COM? ...

Attach .net app to another process

I have a .net Console application that uses a COM component to generate PDF. Basically it prints the input document as PDF and is configured as a printer in the Desktop. Now, this component is singleton by design and does not support multiple instances. My application works fine if this process is not already running. However, if an i...

Is using implicit conversion for an upcast instead of QueryInterface() legal with multiple inheritance?

Assume I have a class implementing two or more COM interfaces (exactly as here): class CMyClass : public IInterface1, public IInterface2 { }; QueryInterface() must return the same pointer for each request of the same interface (it needs an explicit upcast for proper pointer adjustment): if( iid == __uuidof( IUnknown ) ) { *ppv ...

Group information for Microsoft COM Principal

Java programmer in a COM world, apologies in advance if the terminology isn't quite right. My Java app is going to receive a message from a COM component written by some folks who are COM developers. They want to include in the message some Principal information. On the basis of that information I'm going to make an authorisation decisi...

How to get Outlook 2003 accounts list using Outlook 2003 object model

Is it possible to get list of all existing accounts from Outlook 2003 using only standard COM? It means I can't use Redemption library, but only default Outlook 2003 object model . It's much easy to get accounts at Outlook 2007/2010: dynamic outlook = AutomationFactory.GetObject("Outlook.Application"); var accounts = outlook.Session.Ac...