Let's say I want to catch a COM event:
The preliminary documentation says to do something as so:
ComAutomationEvent on_event = ComAutomationFactory.GetEvent(some_COM_obj, "SomeEvent");
on_event.EventRaised += OnEvent;
OnEvent sig is as follows:
private void OnEvent(object sender, ComAutomationEventArgs e)
ComAutomationEventArgs c...
I created a customized ActiveX control and exposed a method called "getDesktopWindows". Then I use the following javascript to call it:
var plugin = document.getElementById("myPlugin");
var wins = plugin.getDesktopWindows();
So far everything works just fine. Then I wrapped the code into a javascript function and use a flex application...
I have been searching for a tool to debug unreleased COM references, that usually cause e.g. Word/Outlook processes to hang in memory in case the code does not call Marshal.ReleaseCOMObject on all COM instances correctly. (Outlook 2007 partially fixes this for outlook addins, but this is a generic question).
Is there a tool that would ...
All,
I have a COM Server Component (a .Dll) which is developed by someone. When I invoke (using invoke()) a function in that COM Server, it throws the error 0x800706BE -The remote procedure call failed. Interestingly it throws this error only few times!!. it works fine for the rest of the times!!.
The issue is reported in a windows 2...
Hi,
I am trying to capture the name and path for an active Word application using COM components But whenever a dialog box (like save as.. or print etc.) is open, I get a COMException - "The message filter indicated that the application is busy". Is there a way around it for fetching the document details?
Thanks
...
During the modification of an existing ATL COM object I came across an article from the "The Old New Thing" blog called "The ways people mess up IUnknown::QueryInterface" and there was a discussion in the comments section that started when one of the respondents (Norman Diamond) pointed out that that in one of the article's examples that...
For example, in language X:
let x = CreateOject( "MyProgID" )
x.LateBoundCall()
x.Release() // (or setting x to Nothing in VB-like language, etc)
What happens to the DLL MyProgID lives in? Does COM unload DLLs automatically?
EDIT
This is assuming that the code above is in an executable that does not expose any COM.
...
Hi everybody.
I have an extensible product that allows 3rd party developers to write plugins for it. The aspects that can be extended are documented and interfaces are provided in the SDK. Currently, I'm using COM and I'm getting pretty comfortable with it. I especially like the ability to provide interface versioning in a unified manne...
I have a COM component written in C# that makes calls to ConfigurationManager.AppSettings.Get(...). This component is instantiated inside an unmanaged C++ application.
Every time, ConfigurationManager.AppSettings is unable to read the configuration file.
There might be two problems.
1) What should the app.config be called when the app...
I'm trying to run a VBScript script that uses a 7-year-old 3rd-party 32-bit COM component
on Windows Server 2008 R2, with the command-line 32-bit script host, SysWOW64\cscript.exe. When I call CreateObject on the class, it appears to be successful, but the very first time I try to use a property or method (I've tried several different ...
hi,
in my application i am using a third party tool for recording the audio. it is working fine in local system. when i place my project in server i got this error...
Retrieving the COM class factory for component with CLSID {3387A365-D5A3-4BEE-8095-C5CFD9ABE517} failed due to the following error: 80040154.
Exception Details: System.R...
Hi,
I'm creating a COM dll and it will be loaded by VBA. However, I noticed that for every excel instance (workbook), a new COM object is loading to memory. But I need to maintain single COM state irrespective of number of Excel instances exists.
Please help me achieve this purpose .
Thank you
...
Hi All.
I have written a COM dll, and wish to register it using
regsvr32 myComdll.dll
I get an error :
DllRegisterServer failed, Return code was: 0xc0000005
I want to debug my DllRegsiterServer function, but I do not know how to set up Visual Studio 2008 to run regsvr32 in debug mode...
Thanks
Roey
...
This is very odd.
We have some managed C++ (an assembly) which uses a .NET COM interop dll generated by TlbImp to make calls into a COM object. When we register the COM DLL we specify that we want it to execute within a surrogate (the "DLLSurrogate" registry entry).
Our COM DLL is 64-bit and is executing on a 64-bit platform.
When we ...
Hello
Can we call COM exposed interface METHODS at runtime one by one. This can be achieved in case of WIN32 DLL's using reflections. But SAME job need to be done with COM Dll or COM EXE, We'll be able to view all exposed methods of that COM DLL or COM EXE and ony by one we need to call all of them.(Remember I need to call unmanaged cod...
I have spent numerous hours searching and experimenting, but I have not been able to accomplish full interoperability between C# and Borland C++ Builder 6 (notably in handling events in a C++ application that are raised by the C# COM object).
I have been able to make calls to a COM object from the C++ application, but I have not been ab...
Ultimately I want to determine if the machine my program is running on is a laptop or desktop. I'd like to do this with JNA and msn's PowrProf lib, GetPwrCapabilities Function using the LidPresent flag.
Part of the SYSTEM_POWER_CAPABILITIES struct (which is the argument for the GetPwrCapabilities method)
BYTE spare...
Hi,
I had a problem with my program for opening an excel file through the use of PIA. here below is my sample code; any suggestions?
path = @"C:\\Test Template.xls";
wb = objExcel.Workbooks.Open(path, Missing.Value, Missing.Value , Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value,...
How to iterate (infact access) the vtable of COM coclass(that will implement the methods of its exposed interfaces).?
Only I need to access vtable where all addresses of exposed methods of its interfaces are stored.
e.g Say
Math is COM object
and its exposed interface is "Operations"
and "Sum" is the method of this interface.
I need ...
I thought I had a working solution for converting .mdi files to PDF using the Microsoft Office Document Imaging object model. The solution is in a Windows Service, but now I'm running into some errors that I'm having trouble tracking down info on.
The exception I get is:
The server threw an exception.
(Exception from HRESULT: 0x80...