I'm trying to get into COM interop
So, there is a simple example:
SpeechLib.SpVoice voice = new SpVoice();
voice.Speak("Hello sucker!",SpeechVoiceSpeakFlags.SVSFDefault);
Of course I have to add reference to %windir%\system32\speech\common\sapi.dll before, and VS will add Interop.SpeechLib.dll to the project folder, and now I hav...
Is there a maximum number of times that a DLL can be registered and unregistered in a specific time period?
Here's what I mean and why: I have a Continuous Integration package that builds my VB6 applications and in order to build each of the 80 components of the solution, I:
retrieve each project's dependencies
in turn
register the dl...
Ok i created a .net assembly and it works fine from my asp.net website. I now want to host it as COM, so i can use it on an old legacy asp website. It kinda works, except it won't read the appsettings from the configuration file.
I would think it should read it from the same folder where i registered my assembly with regasm and where th...
I have an out-of-process COM server written in C++, which is called by some C# client code. A method on one of the server's interfaces returns a large BSTR to the client, and I suspect that this is causing a memory leak. The code works, but I am looking for help with marshalling-out BSTRs.
Simplifying a bit, the IDL for the server metho...
I'm trying to run a legacy VB6 application on my desktop (it doesn't have a user interface, being a command-line app), and when I do, I get a message box saying
Run-time error '4099':
Method '~' of object '~' failed
This means nothing to me; does anyone have an idea what is going wrong?
...
I am writing a Visual Studio add in and need to marshall a managed CodeElements object to it's unmananged form. I just need the pointer in memory, as I can cast it and treat it like a CodeElement on the unmanaged side.
[DllImport("CodeMethodsToString.dll")]
private static extern BSTR* CodeMethodsToString(void* functionObject);
p...
Hi,
We are using Universal Document Coverter with its virtual printing and COM server libraries. Can the COM server libraries be available for .MHT files? Thanks
...
Okay, I have a plugin for IE that when installed needs to (with the user's permission) restart IE.
To do this I have a DLL that is invoked by the installer. And it works, but the problem is that when IE is restarted on Vista, it is restarted with the administrator privileges of the installer, which is a problem for a number of reasons.
...
Ok, this line of code:
XMLHTTP40 http = new XMLHTTP40();
Throws a System.Runtime.InteropServices.COMException and complains that:
Retrieving the COM class factory for component with CLSID {88D969C5-F192-11D4-A65F-0040963251E5} failed due to the following error: 80040154.
I have googled that and I guess the DLL needs to be regist...
Good afternoon,
does anyone know if and how it's possible to see COM / Interop objects properly (in their correct type) in VisualStudio's debugger? All I get is the 'evil' System.__ComObject value (even though it correctly identifies the type)?
E.g.:
...
MSDN article on CoRevokeGetClassObject() says that when the COM server calls it the class object referenced by clients is not released. Then the following comes:
If other clients still have pointers to the class object and have caused the reference >count to be incremented by calls to IUnknown::AddRef, the reference count will not be...
Hi,
I am using IMoniker::BindToObject function, and I have read the article on MSDN.
The article doen't say the first parameter can be NULL, but the example code on the following page uses NULL as the argument :
http://msdn.microsoft.com/en-us/library/dd407292%28VS.85%29.aspx
(hr = pMoniker->BindToStorage(0, 0, IID_IPropertyBag, (voi...
I hope the title of this question makes sense.
What I want to know is if I develop an Active X control (developed in C++/CLI) that is dependent on other native (i.e. non-COM) assemblies, will the Active X control work in IE? I.e. will it be able to download the native assemblies locally or is it only the Active X control assembly itself...
I am running some multi-threaded code that does the following.
On an STA thread, I create a
'worker' thread, and run it.
The STA thread then waits for the worker
thread to exit.
The worker thread calls a method on a proxy to an STA COM
object on the STA thread, and then exits.
In step 2, I'm using Thread.Join() to wait for the worke...
I have a new assignment coming up shortly where I have re-architect some legacy COM applications in .Net WPF. If possible I need to re-use functionality or existiing code however I suspect the scope for this is limited.
I need to replicate existing functionality but need to achieve it using a modern and extensible architecture.
Does a...
Is it possible for 2 exes to communicate through a COM (ActiveX?) interface? Can a COM DLL coordinate data-sharing between 2 seperate processes?
...
I have a typelib that describes some interfaces. As some of these interfaces are used as a category, I want to add the category IDs to the typelib. So the question is:
a) how can this be done in Delphi (2007 and up)?
or as an alternative
b) is it possible and advisable to use the interface GUID for the CATID?
...
I am using python for making a COM local server. In fact, the whole COM part is implemented in a dll and my python script is calling that dll thanks to ctypes. It works ok when I run the script manually.
I would like to see my server automatically ran when a COM client request it. I know that it is possible by giving the command line as...
I am trying to get the rcom package for R working. It seems to have installed ok:
> install.packages("rcom");
--- Please select a CRAN mirror for use in this session ---
trying URL 'http://mira.sunsite.utk.edu/CRAN/bin/windows/contrib/2.9/rcom_2.2-1.zip'
Content type 'application/zip' length 204632 bytes (199 Kb)
opened URL
downloaded...
My experience with it has been that it's a total mess, and causes problems that are difficult to diagnose and fix for non-black-belt Windows developers.
What are the use cases that make COM shine?
...