com

How can I test if a COM type is registered?

Say I've got a load of COM types and I'd like to check if a particular type has been registered. I can use Activator.CreateInstance to actually try and create the class, but I was wondering if there's a simpler way actually check in advance if the class is actually registered. I'd prefer not to go to the registry directly - I'm looking...

How to get rid COM context error

Hi, Am working on a windows form application which uses interop to call a COM dll. I keep getting this error in the app method where the flow is like this: 1.Fetch about 7 records[R] from database 2.For each of this record,app instantiates a COM class using Interop and does some processing/calculation using the same. 3.Then the app fet...

Mapping COM VARIANT Types to actual types using a map

I am writing a COM wrapper for a COM object that sends different types of values from a client and want to map these types in a Map to their actual C++ type, such as VT_BSTR to a wstring, etc. I was thinking of defining an enumuration of all COM Variant types and then using a map to have that Enum as the key and the actual type containi...

What's a good book/guide on developing COM applications on Visual Studio ?

I am a web developer with some C++ background. I need a relatively straightforward way to understand COM and its capabilities. Ultimately, I should be able to write an ActiveX or XPCOM component that I can interact with from javascript. Thanks. ...

Using x64 dll in x86 application

I have a DLL that needs to operate large ammounts of memory and must be x64 to do that, but the application, which calls it is x86 and can not be converted to x64. COM is already used for interaction between application and the dll. Is it possible to use surrogate process for that purpose? I know that it is possible to do such a thing...

Recreating a COM DLL, do I need to worry about the GUID?

A change needs to be made in a DLL. The DLL was originally coded in VB6 (not by me), and the source code lost. It is very simple in its functionality, so I recreated it from scratch, but I only have access to VB Express 2008. I created it first as a normal DLL then realized it had to be a COM DLL. Fortunately, an excellent article at h...

COM registration with WIX in 32bit and 64bit Windows

I created an installer for my AnyCPU DLLs. I've marked my assemblies with teh Assembly=.net directive in my project as well. The installer seems to be able to register the COM servers successfully on my XP 32bit machine, but fails to do so in my Windows7 Machine. I did run the installer in admin mode. Also I looked up the Win764 registry...

How can I get the right click event object file name?

I created a ATL/COM project, and implement the IShellExtInit interface. In the Initialize method, I use the DrapDropFile function to get the file names of the files whose selected in the folder. e.g. 1.In the folder C:\WINDOWS\MyFolder\ contains the files: a.png, b.bmp, c.jpg 2.Right click the "b.bmp". 3.In the Initialize method, I...

Burn a CD from Silverlight

Hello, I have a Silverlight application with a large DataGrid. I have added the ability to export the contents of that DataGrid to Excel, PDF, and several other formats. In my export dialog, I have a checkbox that says "Burn to CD". The reason I'm trying to do this is my user base really wants to be able to export files directly to a CD...

Freeing JavaScript's ActiveXObject()?

I'm calling a C# COM component using javascript: keystore = new ActiveXObject("RBCrypto.KeyStore");. I've noticed this instance stays around until I exit the browser. Is there anyway to "release" that object when the user leaves the page? Currently i'm using: window.onunload=function() //when a user leaves the page close the keystore { ...

make my activex control removable from manage addons

I have an activex control. I want my users to be able to remove it. This MS article implies that you can remove controls if you installed them yourself: You can only delete ActiveX controls that you have downloaded and installed. You can't delete ActiveX controls that were preinstalled or add-ons of any kind, but you can ...

Calling F# (.Net dll) code from php

Hello, I was wondering if it was possible to call some F# code from php. It seems like Phalanger does the trick. Is anybody using it ? For this solutions and others( if there are any?), what requirements does it have on the server to run the code ? Thank you ...

Is there a replacement for "CLR SPY" Com-Interop "spy" program

This utility used to be on gotdotnet. http://www.ssw.com.au/ssw/Standards/DeveloperGeneral/netTools.aspx#CLRSpy But now it's gone. Is there a replacement for "spying" on com-interop between running programs? ...

C++/CLI 64-bit COM

I have a C++/CLI assembly that wraps a native 32-bit dll. The assembly is used both from .Net and COM (office). Now I have a customer that runs 64-bit office. Is it possible to create a C++/CLI assembly that uses a native 32-bit dll and exports a 64-bit com interface? ...

Use C# DLL as COM under Delphi

Hi! We got a DLL written by C# programmers, compiled to usable as COM object. We consult these developers to get the function names, and syntaxes, and we can use it after we registered it with regasm. This is ok, but we have more questions to produce faster development (on changes), and some things are not understandable or not workin...

How to export constant strings from .Net to COM?

I have a .NET DLL which I call from a VB6 project. Until now, I've had a public static class with a bunch of public const String STRING_NAME = "STRING VALUE"; When I needed to use one of them from VB6, I directly wrote inline the literal value in the code. Now I'd like to replace those literals with the .NET constants. I have t...

how to launch my COM out of proc server from a managed com interop dll

I have written a c# com out of proc automation server which references my managed COM Interop dll which holds the application object model, it all works fine. When importing my dll from say unmanaged C++ it works fine it launches the out of proc server and everything works by using COM to access it, but when i do the same from managed...

Asynchronous COM C++ calls

Following up from part of this question, what is the best way to have a worker thread that invokes a COM procedure in a DLL, to do this asynchronously so that the worker thread is not blocked on this call? Note that a call to this COM DLL can take a long time as it will do DB accesses and possible run long running queries. I wondered i...

System.EnterpriseServices and Powershell Locking dll

I am trying to use System.EnterpriseServices to uninstall a c# com+ component, replace the dll and reinstall the new version. The problem is that when I get to the line copy-item the script always fails because System.EnterpriseSerivces is locking the destination file. If I break the script up into two sections one that calls Unistal...

Expose an enumeration from a wrapped COM component

I'm writing a class library in .NET that wraps a COM dll and exposes specific functionality to be consumed by other .NET code. The COM library has several enumerations defined and I've used some of the enum types as parameters like so: //C# public void TransactionTypeSetByEnum(COMComponent.TransactionType transType) { this.Transact...