com

Visual Studio COM access

Is it possible to control Visual Studio like you can control Excel through the Python COM API? I'm trying to kick off a build through COM (don't ask!) An example would be much appreciated. ...

Releasing an OLE IStorage file handle in C#

I'm trying to embed a PDF file into a Word document using the OLE technique described here: http://blogs.msdn.com/brian_jones/archive/2009/07/21/embedding-any-file-type-like-pdf-in-an-open-xml-file.aspx I've tried to implement the C++ code provided in C# so that the whole project's in one place and am almost there except for one roadblo...

Accessing a com object's vtable in c#

EDIT: I am attempting to encapsulate a 3rd party com object in .net classes and at the same time fix a bug with it. I was hoping to replace a method in the com object's vtable with a call to my own method which would provide a bug free implementation of the method. I was trying to test this out on something very basic, but given the a...

Addref on COM RCW

Is it possible to increase the RCW reference count on an unknown interface? (i.e. not the reference count on the underlying COM object) I have some old COM server code int Method1(object comobject) { try { // do something with comobject return 0; } finally { Marshal.ReleaseComObject(comobject); }...

COM Exception 0x800A11F9 - Cannot activate application.

I have a C# 2.0 (WinForms) project in which I try to activate word 2003 (word is installed on the system). By using the following code: private void ActivateWord() { this.Activate(); if (m_WordDocument != null) { try { m_WordDocument.Activate(); if (m_WordDocument.Application != null...

IDataobject->SetData failed

I tried to uset IDataObject to put a some text to clipboard. But the GlobalUnlock fails. What I'm doing wrong? IDataObject *obj; HRESULT ret; assert(S_OK == OleGetClipboard(&obj)); FORMATETC fmtetc = {0}; fmtetc.cfFormat = CF_TEXT; fmtetc.dwAspect = DVASPECT_CONTENT; fmtetc.lindex = -1; fmtetc.tymed = TYMED_HGLOBAL; STGMEDIUM medium =...

Accessing MFC classes inside ATL project in VC++ 2008

I have created an ATL Project with all default options using VC++ 2008. I have added Simple ATL object (interface IDemo) and some interface moethos inside the simple object. I want to use MFC classes (e.g. CDatabase, CRecordset and lots more) inside my ATL project. How can I achieve this? ...

Can a program that controls IE detect if a HTTP 30x code is encountered?

I am trying to control an InternetExplorer.Application via the COM interface, using Perl, Win32::OLE, and information from MSDN. My goal is to get as good an idea as possible about what IE is doing. (Related to this question.) IE uses events to notify my program when it has finished various stages of processing a certain URL (NavigateCo...

Access violation after GetInterface/QueryInterface in Delphi

Hi everyone! First, I'm very new in Delphi and COM, but I should build COM application in Delphi. I read a lot of articles and notes on the internets, but COM and COM in Delphi are still not clear to me. My sources - http://www.everfall.com/paste/id.php?wisdn8hyhzkt (about 80 lines). I try to make a COM Interface and Impl class - it w...

Not able to instantiate PDF browser control from AcroPDF.dll using COM and .NET interop

When I try to instantiate a PDF browser control like this in C#: AcroPDFLib.AcroPDFClass acrobat = new AcroPDFLib.AcroPDFClass(); I get a COMException with this message: Creating an instance of the COM component with CLSID {CA8A9780-280D-11CF-A24D-444553540000} from the IClassFactory failed due to the following error: 80004005. ...

Tool for analyzing memory leaks in a COM object

Hi, If there is a tool for analyzing memory leaks in a c++ COM Object, please provide a link here If no such tool exist, what would be the best way to handle memory leaks ? Thank You ...

iTunes COM interface on OS/X

Is the iTunes COM interface available on Mac OS/X? From the documentation I could find, it seems much more extensive than the Applescript interface I could expose through the Automator program. Disclaimer: absolute OS/X newbie here. ...

Passing a string from C# to cpp with COM

I have a C# COM server which is consumed by a cpp client. One of the C# methods returns a string. In cpp the returned string is represented in Unicode (UTF-16), at least according to the memory view. Is this always the case with COM strings? Is there a way to use UTF-8 instead? I saw some code where strings were passed between cpp an...

More efficient way to find media item in WMP media library?

Hello, all. I am messing around with the WMPLib component provided by Windows Media Player 12 (wmp.dll) in VB.NET with .NET Framework 3.5 SP1. I am trying to retrieve a media item from my media library based on its name (assuming there are no duplicate names). At the moment, I'm grabbing the entire media library, and looping through ev...

Limewire API: does it exist?

Does anyone know if there is something like a Limewire API? I need to be able to make Limewire download files programmatically. EDIT: It seems Limiwire doesn't have an API. Is there any other Gnutella P2P cliente that does? ...

VB.Net plugin using Matlab COM Automation Server...Error: 'Could not load Interop.MLApp'

My Problem: I am using Matlab COM Automation Server to call and execute matlab .m files from a VB.Net plugin for a CAD program called Rhino 3D. The code works flawlessly when set up as a simple Windows Application in Visual Studio, but when I insert it (and make the requisite reference) into my .Net plugin and test it in the CAD program...

Silverlight file download for COM Interop

Is the following possible in Silverlight when a button is clicked? An Excel template is downloaded from a remote server and saved to the local machine An instance of the template is then opened on the client A macro is then executed within the new Excel document I can do everything apart from saving the template to the local machine...

Getting error "Activex Component cannot create Object" while using .NET dll in VB 6 Code

HI, I am deploying a VB6 application on client machine. The Application need to access code from a C#.NET dll. I created a COM object of the .NET dll and used it VB 6 using the side by side versioning (Registration free COM). It is running fine on the development machine but on the client machine it is throwing an error "ActiveX Componen...

How can I access the controls in a Windows Forms Designer window through a VS macro?

I'm just getting started on this, so bear with me. I was looking into writing some macros to provide keyboard shortcuts in the Windows Forms Designer in Visual Studio. In particular I was hoping to create shortcuts for manipulating certain properties of the selected control in the designer. Obviously to do this I need to somehow access t...

UI thread is blocking a background thread calling a COM object

Hello, I am working on an application that communicates with an external device via a third-party COM library. I'm attempting to have all communication to the device go through a background thread both to prevent problems with communication from screwing up my app and to get rid of some other complexities introduced by having communica...