Hi,
I have a C# dll that implements COM. Is there a way to configure the project to create the SxS manifest for this dll (exposing COM information) and embed it into resources.
As I understand, running the mt tool as post-build step could be an option.
But there are 2 problems:
1. manifest created with mt does not expose the Prog_ID
2. ...
I have a website based on Vs2008, .NET 3.5SP1 C# code. One of the functions requires it to interop with a COM-based DLL that creates PDFs.
About once every 3 to 4 weeks, anything COM related (e.g. generating PDFs) is completely hosed. I get the following error:
Creating an instance of the COM
component with CLSID
{7A91D523-4...
I am getting the following error on my workstation when I am trying to work with a COM object.
An unhandled exception of type
'System.Runtime.InteropServices.COMException'
occurred in CarteGraphInterface.exe
Additional information: Retrieving the
COM class factory for component with
CLSID
{3963F0F8-6B0C-4A65-90F4-F6016...
Hi,
I've been trying to render the entire canvas in an IWebBrowser2 control to a bitmap. IViewObject::Draw seems to be the most promising approach, but I can't get it to render anything that would requires a scroll to show. While I could automate the scrolling and stitch the images together, this would look weird with any fixed positi...
I have a library that exports an unmanaged C routine that returns pointers to COM IUnknown-based objects. The DLL is not registered, and is not server. I would like to use the COM types from C#.
I have already written C# interfaces for the COM types. What is the C# equivalent of calling LoadLibrary() and GetProcAddress()? How would ...
Hi,
I have developed an embedded application which requests status information from a device down a communications channel. My customer requires that these will be sent with a specific time period, so what I am looking for is a PC terminal application which can send a text string command repeatedly at a set interval over a period of ti...
I'm working with some COM objects in C#, one of them has a function called SetLogFile that takes an IntPtr. How can I create the file in C# then pass it as an IntPtr to that COM function?
EDIT: The function requires an open file handle: http://msdn.microsoft.com/en-us/library/aa915939.aspx
...
I'm doing some stereoscopic work which means I have need to work with two instances of various filters (i.e. a camera source that receives an IP stream), and this is proving not to be trivial.
I even tried copying the IPCamfilter.ax to IPCamfilter.ax and manually making new CLSID entries in the reg, and the clone shows up, but won't wor...
Hello.
How can i check if COM Object exists (is registered / is available / can run without problems) before running actions using them?
My application should use other applications COM's (InteropServices) but before i start some action, i would like to check whether i can create COM objects.
It woudnt be a problem if COM's where in sa...
I am new to COM and trying to understand the difference between STA and MTA. I tried to create an example that would show that COM can manage calls to object created in STA that is not thread-safe.
MyCalcServer class here is created using ATL Simple Object. The settings used are the same as in this article:
Threading Model: Apartment...
How to get the properties of an interface within the type library the interface is defined, Keeps returning HRESULT but would like it to return the actual value of the property.
EDIT:
IDL:
interface IMyClassInterface : IDispatch
{
[propget, id(1), helpstring("Gets user Type")] HRESULT getUserDefineTypeVal([out,retval] UserDefineEnu...
Hello,I'm up against a problem when loading a class in a managed library from a COM Interop library.
basically I have some Unmanaged C++ code and a COM Interop library written in C#. And finally a 3rd library which is referenced by the COM Interop library which contains a class:
public class MyClass{
public MyClass(){}
}
What I'd l...
I maintain a fairly large application which does a lot of talking with Lotus Notes. Recently in the last couple of months, some users have been having problem connecting to the Lotus Notes Session, I use the following code to get the session
Set Session = CreateObject("Notes.NotesSession")
This error seems to be popping up only for a c...
Hi Guys,
Is it OK/possible to have a shared memory in a COM object which will be consumed by applications built using C# and/or C++?
Can C# access shared memory in COM object without crash?
Thanks,
Adi Barda
...
Is there any reason why microsoft is still sticking to COM technology(Office components are still COM).. when all that is done with COM is do-a-ble with .Net in a better and efficient manner
...
We have an ASP.NET 1.1 web application. It invokes a C++ COM object which in turn invokes a .NET COM object. Originally, this .NET COM object was a .NET 1.1 assembly. Now, we need to modify this .NET COM object and in the process we now use Visual Studio 2008 so it is a .NET 2.0 COM object now. We now find that our ASP.NET 1.1 web applic...
First, COM is like black magic for me. But I need to use COM dll in one project I'm working on.
So, I have a DLL I am developing and I need some functionalities that are available in a separate COM DLL. When I look to the COM DLL with Depends.exe I see methods like DllGetClassObject() and other functions but none of the functions I'm i...
I've created and registered a managed COM library in C# on my development machine. I've successfully registered it and created a .tlb file with regasm, and successfully imported the tlb into a c++ console app used for testing.
My COM assembly is called "efcAPI.dll" and it references another assembly that has not been set up for COM or r...
I need to implement a simple ATL COM object that implements a specific interface for which I have been given both a .tlb file and a .idl file. The interface is very simple and only consists of a single method. I have created many ATL objects in the past but never one that has to implement a specific interface. What do I need to achiev...
Consider the following C# code using a COM object.
MyComObject o = new MyComObject;
try
{
try
{
var baz = o.Foo.Bar.Baz;
// do something with baz
}
finally
{
Marshal.ReleaseComObject(baz);
}
}
finally
{
Marshal.ReleaseComObject(o);
}
This will release the COM objects o and baz, but not the temporary objects returnd by...