com

Impersonation in asp.net not shared with com object.

So I have an ASP DOT NET web service which needs to impersonate Windows Authenticated users. This web service calls into a Com Api to perform database operations. It seems like the Impersonation does not persist into the Com Api. Is this because the Com DLL is loaded into its own memory space and treated as a separate process? Also what...

Ensuring Dispose is called when .net class expsed to COM

I've exposed a .net class to COM. The class inherits from IDisposable because I need to clean up some unmanaged resources. In the .net environment I would wrap my class in a using scope to ensure that Dispose() always gets called. Is there some facility to do this if I'm using the COM wrapper? I'm insantiating the class from VB6 and ...

How to handle Variant Missing

I'm new in C# world. I have a COM server written in C++ and in some situation it returns a variant_t::missing(). When I try to receive that value in C#: object a; a = comServer.Value // Value returns missing it throws a exception that I cannot event handle in C#. How I should do? ...

How to import COM into Ironpython?

In Cpython, I can use win32com. But, in ironpython, I didn't know how to import it. Because, in .net, one always use Visual Studio to interop the COM and to use it. ...

A registered tlb file on Windows 7 (64bit) isn't usable

I have a (VS 2008) C# project that needs to use a 3rd-party COM object. For that, I'm told, I need to register the COM objects's tlb file. So I do C:\Windows\Microsoft.NET\Framework64\v4.0.30319\regtlibv12.exe blahblah.tlb which gives me Registration of FREngine.tlb successful. But then I can't add a reference to it in the C# p...

Decyphering undocumented COM interfaces

Greetings all, I have a pointer to a COM object that implements an undocumented interface. I would really, really like to be able to use said interface. All I have is the IID though. Master software analyst Geoff Chappell has documented a host of these undocumented COM interfaces on his site; see IListView for example. Somehow he ev...

open and close com port

Hi guys, I have a small application to open the door using a relay controller. I have to open and close the COM port all time if someone comes in. In the morning, when lots of people come together controller responds very slow and i need to solve this problem fast. My question is, will i run in to memory issues if i keep it open all ...

COM VB.NET works well but C# need recompile

I have a simple C# class with COM attributes: [ComClass("1DC7B465-49FA-4ad1-893E-C19657E1ED25", "F97459E6-AB37-43e6-AC57-6AE5F9A9A835", "BD9F01C7-162A-4f95-9398-C126C152B965")] [ComVisible(true)] public class Class1 { } I need to use this class from VB6 application. It works well until I change AssemblyVersion of .NET...

Delphi plugin framework

Hello, I want to design Delphi plugin framework. There are three options: 1. DLL 2. BPL 3. COM interface Every option has some disadvantage. DLL - Promblem with MDI apllication, forms from plugin cannot be embeded to the host exe - mdi application. BPL - Every *.bpl plugin and *.exe host application must be compiled with the same versi...

Automating Com DLL interop version.

So when visual studio build the interop dll it gets 4.0.0.0. The TypeLib version is 4.0 But the actuall DLL version is 4.0.1.112 Is there anyway I can get visual studio to automatically build the interop DLL to assume the actuall DLL version? Could I alternatively get the interop DLL to use the version stamp from my app. I just need...

Passing complex information via COM to C# from Delphi code

For various reasons, such as protecting investment, etc. I need to pass a series of complex records (numerous fields and records) back and forth between Delphi and a C# program. I guess I should be using IEnumVariant, but don't seem to able to design this with the typelibrary designer. Any help would be appreciated. Thanks Update I g...

COM Server hang- detection and resolution

I have an application that sends requests to an out of proc COM server whom handles the requests and sends them back to the requesting application. The client application is really in control of the start-stop of this Out-of-Proc COM server and determines its lifetime so to say. Because this application has many hundreds of requests ...

How to find interfaces of an ActiveX control?

Given an instance of an ActiveX control, how do I enumerate it's interfaces? (I'd like to get the names of the interfaces). ...

How to choose a Java-COM bridge?

I have to create an application which automates Outlook and Word and I want to use Java for that task. (The only allowed alternative would be VB6, so...) After a quick Google survey I found several libraries, but I'm not sure which one to use: J-Interop SWT JACOB COM4J jacoZoom ... I have no idea how to compare these libraries and ...

COINIT_MULTITHREADED and mysterious crashes after using OleCreatePropertyFrame

Is there any benefit of using COINIT_MULTITHREADED in a DirectShow application? For now it has given me some troubles, but I am not sure if using CoInitializeEx(NULL, COINIT_APARTMENTTHREADED) is the right fix for the problems. The full story: I have a pretty straightforward web camera capture application with ability to choose the cap...

VS2010: Using COM in a .NET 2 Project

I have a .NET 2.0 project that needs to use a COM component (specifically Redemption). In Visual Studio 2010 I add a reference to the COM dll as I would in all prior VS versions (right click project->Add Reference->COM tab->select product->Ok). When I build and try and run the app I keep getting the following error: Creating an insta...

Com Initialization Error 0x80040154 loading c# COM Object with c++ Program

I'm working on my first COM project that is importing a c# DLL with a C# COM Wrapper class into a C++ native code application. Our application is based on the CSRegFreeCOMServer VS2008 sample project from Microsoft's All-In-One Framework. Our system is using - VS2008, .Net3.5, boost 1.4.2 and Qt 4.6.2. This application has been runn...

Controlling a service through a separate application

I'm writing a windows service to do some daily processing, and I want to have a user-friendly way to interact with it. I'll just be doing basic things like checking its status and viewing logs, though I may decide I want to throw in a function call or two as well. After doing some research, it sounds like I need a separate application to...

How do I get HRESULT returns from libraries imported to c# with tlbimp.exe?

I am using the GMFBridge directshow filter from c# and the import library seems to discard the HRESULTs. i.e [id(5), helpstring("Create render filters in empty render graph")] HRESULT CreateRenderGraph( [in] IUnknown* pSourceGraphSinkFilter, [in] IUnknown* pRenderGraph, [out, retval] IUnknown** pRenderGraphSourceFilter); [id(6), ...

How to specify C# DLL method for [MTAThread]

How to specify [MTAThread] methods for C# DLL ? [MTAThread] public int connect(string hostname, int param) ; Seems don't work. Or this is correct way ? I have executable with main function ([MTAThread] option) and everything works (same code). ...