com

.NET consumer of ActiveX throwing TargetParameterCountException

I have a .NET (3.5 w/ Dev Studio 2008) app that hosts a visual Active X (written in C++ w/ Dev Studio 2003). Have access to all sources, but can't easily move the Active X control up to 2008. This as worked fine in the past. Made some changes to the Active X control and now, when calling one method on the Active X, I'm getting a TargetP...

Is it possible to read/write classes/structs written in C# from VB6?

I just wonder if that is possible. I know simple types can be read through com interface. Does anyone have experience with complex types as structs and classes? ...

C# COM objects with VB6/asp error

I'm trying to expose a C# class library via COM so that I can use it in a classic asp web site. I've used sn - k, regasm and gacutil. About all I can do now though is echo back strings. Methods which take Class variables as input are not working for me. ie my test method EchoPerson(Person p) which returns a string of the first and la...

Security risks: when Low IL process is allowed to launch elevated services ?

Are there security risks, when a low integrity process is allowed to launch a medium/high integrity process via COM ? ...

How to use visual leak detecter ( vld ) for com/atl dll projects?

I included vld.h file in my activex dll project. when i try to compile my project from visual studio 2008.I am getting the following error, 1>Registering output... 1>Project : error PRJ0050: Failed to register output. Please ensure you have the appropriate permissions to modify the registry. How to use visual leak detecter for com/act...

COM Events, Threading and silverlight!

Hi all, I'm working on a concept that will allow Silverlight to communicate with POS peripherals by using the POS for .Net library. I need to be able to able to call into the library to catch bar-code scans and print receipts etc. This all works fine if the application is a winforms app but in my proof of concept console app it the event...

COM port cannot be opened in asp.net

I following this article for sending SMS it is a winform application.. I have referenced all the Dll's to my asp.net application..... I use an aspx page to detect a mobile device connected to a PC..... But it alwys shows COM 'n' Port could not be opened..... using SMS; using GsmComm.GsmCommunication; using GsmComm.PduConverter; publi...

How to pass interface type/GUID reference to an automation method in Delphi

In Delphi you can pass class references around to compare the types of objects, and to instantiate them. Can you do the same with interface references being passed to a COM automation server? For example, you can define a method taking a GUID parameter using the type library editor: function ChildNodesOfType(NodeType: TGUID): IMBNode;...

Problems with native Win32api RichEdit control and its IRichEditOle interface

Hi All! As part of writing custom command (COM-Visible dll with class that implements Interwoven command interface) for one of Interwoven Worksite dialog boxes,I need to extract information from RichEdit textbox. The only connection to the existing dialog box is its HWND handle; Seemingly trivial task , but I got stuck : Using standa...

Getting notified about new COM server registration

I'm trying to find a way to identify a newly registered or unregistered (via regsvr32) COM servers, which are added to the registry (CLSID). Is there any callback function I can use? I don't really want to poll the registry... ...

Problem referencing directshow filter from C#

Hi, I have a custom DirectShow filter created by extending the ezrgb24 filter from the DirectShow sample documentation. I am using this filter (indirectly) in C# through a 3rd party multimedia SDK (LeadTools). Now I need to add a reference to the filter's DLL to the project so that I can cast an IUnknown interface retrieved by the SDK...

If I use a Type Library (.tlb) in a VB6 project, do I need to distribute it with the .exe?

If I make use of a Type Library in a VB6 project do I need to distribute the .tlb file (and perhaps even register it?) with the compiled exe on the target computer? ...

C# Late Binding for Parameterized Property

I'm trying to use late binding to connect to a COM automation API provided by a program called Amibroker, using a C# WinForms project. So far I've been able to connect to everything in the API except one item, which I believe to be a "parameterized property" based on extensive Googling. Here's what the API specification looks like acco...

Good freeware COM/ActiveX Type Library Explorer?

I used to have a dated, but valuable solution to display COM/ActiveX control- and type-library contents (ProgIDs, method names and signatures, enumerations, constants, interfaces/coclasses, etc.) of all such libraries registered on my system. It provided an Explorer-like overview of everything that was available to ActiveX development/...

Custom PreviewPane - Works in Windows7, not in Vista

Hi. I've written an explorer extension to display my custom file format in the Preview Pane. This works fine in Windows 7, but doesn't seem to work in Vista. The same DLL handles both thumbnails and the preview pane. The thumbnails side of things work in both Vista and Windows7. Adding logs to my code, Vistas only calling my DllGetC...

What is this exception ?

I am getting this exception while reading the shapes in excel sheet in c#: on code line of if (worksheet.Shapes.Count >= iCurrentRowIndex) { } Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Office.Interop.Excel._Worksheet'. This operation failed because the QueryInterface call on the COM...

Is there any reason against directly calling AddRef() inside QueryInterface() implementation?

When implementing IUnknown::QueryInterface() in C++ there're several caveats with pointers manipulation. For example, when the class implements several interfaces (multiple inheritance) explicit upcasts are necessary: class CMyClass : public IInterface1, public IInterface2 { }; //inside CMyClass::QueryInterface(): if( iid == __uuidof...

Exceptions generated by external component are fatal unless "enable.unmanaged.code.debugging" is on

Hi there, I have been struggling with unhandled fatal exceptions within an application that uses an external COM library. Enabling unmanaged code debugging magically turns the indescript fatal exceptions into well-defined, catcheable, exceptions. I can now go ahead and change my code so that these exceptions never occur, but is there ...

Deploying 32 and 64 bit COM objects on 64 bit machine from one VS setup project MSI.

I have a Shell Namespace Extension C++ COM DLL that must have both a 32 bit and 64 bit version installed on a 64 bit machine, because when 32 bit applications perform a file-> open the dialog that is presented is a 32 bit shell. The problem is that both my 32 bit and 64 bit COM objects have the same progid and the VS setup project will t...

.Net Com Interop Create Instance Slow

I have a .net 4 application that uses a Com Dll to send SMS messages. I used TlbImp to create the interop assembly and that is what is referenced in the application. When I try to create an instance of this class, it takes a really long time (2-5 seconds). I ran performance profile in VS 2010 and the call that takes the longest by far...