Rick Strahl's Web Log
Wind, waves, code and everything in between...
WebLog Posts in Category COM
July, 2015 (5)
June, 2015 (5)
May, 2015 (5)
April, 2015 (3)
March, 2015 (5)
February, 2015 (4)
January, 2015 (5)
December, 2014 (3)
November, 2014 (2)
October, 2014 (3)
September, 2014 (2)
August, 2014 (1)
July, 2014 (2)
June, 2014 (4)
May, 2014 (3)
April, 2014 (1)
March, 2014 (2)
February, 2014 (2)
January, 2014 (3)
December, 2013 (4)
November, 2013 (5)
October, 2013 (4)
September, 2013 (3)
August, 2013 (2)
Visual Studio (38)
Web Services (17)
Web Api (16)
Microsoft AJAX (8)
Web Connection (7)
Sql Server (7)
West Wind Ajax Toolkit (7)
Live Writer (5)
Entity Framework (5)
Html Help Builder (5)
ASP.NET vNext (4)
Visual Studio (4)
Source Control (4)
Software Development (3)
Help Builder (3)
Internet Explorer (2)
Web Deployment Projects (1)
Web Design (1)
Control Development (1)
Dynamic Types (1)
Creating STA COM compatible ASP.NET Applications
September 18, 2012 - Maui, Hawaii
When it comes to deploying STA COM components in ASP.NET only WebForms has native support for STA component. Other technologies like MVC, ASMX Web Services and WCF run only in MTA mode. If you need to run your STA COM Components in ASP.NET here is what you need to know and a few tools that help you create STA compatible handlers.
Unable to cast transparent proxy to type <type>
January 13, 2012 - Maui, Hawaii
If you've ever run into the Unable to cast Transparent Proxy to
error, you know how frustrating it can be. Usually this is caused by multiple assemblies causing unexpected load behaviors. Here's what the problem is and how you can check for problems.
An easy way to create Side by Side registrationless COM Manifests with Visual Studio
October 09, 2011 - Hood River, Oregon
Registrationless COM makes it possible to run COM components without registry configuration making for an xCopy deployable solution. The process is not terribly difficult but not easy to debug if something goes wrong. Here's how you can use registrationless COM in your apps.
COM ByteArray and Dynamic type issues in .NET
July 18, 2011 - Hood River, Oregon
Ran into an interesting issue today with binary data passed from COM to .NET via a dynamic instance. The result was rather unexpected with dynamic failing to properly cast the binary to byte or even a basic object instance.
ActiveX component can't create Object Error? Check 64 bit Status
June 19, 2011 - Hood River, Oregon
When moving applications to 64 bit servers be sure to check that you don't call old school, 32 bit COM objects. If you do these COM object calls fail. Thankfully IIS 7 and later allows Application Pool configuration to enable 32 bit operation to work around this issue. Here's how.
The dynamic Type in C# Simplifies COM Member Access from Visual FoxPro
September 13, 2010 - Maui, Hawaii
The addition of the new dynamic typing in the .NET runtime greatly simplifies COM Interop when passing FoxPro objects to .NET. Dynamic types remove the need to use explicit Reflection on dynamically generated FoxPro types that are returned over COM interop and so reduce code complexity and produce more natural and readable code removing one of the annoyances in FoxPro and .NET COM Interop.
September 27, 2008 - Maui, Hawaii
If you're using the Web Browser Control or the Internet.Application Shell object, you might need to call Javacript t code inside the pages loaded in the browser to manipulate the page from say a WinForms app that interacts with the Web Browser control. Some things are just much easier to do with client side script code and being able to initiate this code from .NET can be very useful. This entry describes how you can access the DOM to call script functions both in .NET and FoxPro.
Accessing a SafeArray Result from a COM Call in C#
August 26, 2008 - Maui, Hawaii
I'm calling a COM object from managed code that's returning a binary response, which is returned as a SafeArray of bytes from the COM server. The problem is the SafeArray is not exactly easily accessed in .NET and the debugger provides some misleading information for the returned COM type. Here's how to access the SafeArray from C# code.
VBScript.RegExp and the . Operator on multi-line Content
December 05, 2007 - Maui, Hawaii
Note to self: Remember that the COM RegEx parser doesn't deal with the . operator the same way in multi-line content as .NET or most other RegEx parsers do. I've just spent 20 minutes troubleshooting a RegEx expression that works just fine in RegEx Buddy and .NET code, but failed in one of my...
Reflection, GetMember() and COM Objects?
September 17, 2007 - Hood River, Oregon
I'm working on an old app that interfaces with a legacy COM object. In reviewing some of my wwDataBinder code I noticed that it didn't work against COM objects for databinding. With a few minor changes I've been able to make the binding code work by using the the higher level Type.InvokeMember...
Generics and COM Interop don't mix
July 10, 2007 - Hood River, Oregon
COM Interop is rarely fun, but it looks like it's getting to be less and less useful as time goes on and new .NET Runtime features come along that don't work well over COM. It appears that Generic types can't be exported over COM and be usable to a client like Visual FoxPro. When I create a class...
Hosting the .NET Runtime in Visual FoxPro
July 01, 2007 - Hood River, Oregon
Interop with .NET from FoxPro can be accomplished fairly easily by using COM Interop. With COM Interop you can take advantage of .NET's COM Callable Wrapper to wrap up .NET components and make them available as COM objects. I've written extensively about this interaction (here and here)...
Hosting a WCF Service in a non-.NET Client
June 15, 2007 - Hood River, Oregon
I'm still screwing around Web Connection and trying out a quick proof of concept tonight and thought I'd share a few steps on how to host a WCF in a non .NET client via COM Interop client like Visual FoxPro. This article discusses WCF server and client creation in general terms and in addition covers the interop issues to make it work in these clients.
STA Threading Issues in ASP.NET
June 15, 2007 - Hood River, Oregon
Recently I built an HttpHandler to replace my ISAPI interface for Web Connection, which is an application interface that provides Web connectivity to Visual FoxPro. The ISAPI extension has been working fine for many years, however with the advent of IIS 7 I figured it's time to create a more...
C# HRESULT comparison
April 18, 2007 - Maui, Hawaii
I just had a little brain freeze dealing with HRESULT error from a COMException. When dealing with COM objects you still need to deal with the unfortunate COM idiosyncrasies like HRESULT values which get returned from just about every COM call. COMException exposes this HRESULT as an int value. Now...
© Rick Strahl, West Wind Technologies, 2005 - 2015