C# Interop Object Security Permissions Problem

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: John Cullen (JohnCullen_at_antispamcompany.com)
Date: 03/15/04


Date: Mon, 15 Mar 2004 13:44:47 -0500

I seem to be running into an issue with creating an instance of a .net
object registered with COM interop from a legacy VC++6 MFC application.

My set up goes like this:

C++/MFC Windows Service spawns a process which in turn creates an instance
of my in-process (DLL) C# object through COM interop.

Everything works fine if I set up the service to log into an administrator
account... however if I have my service log in using the system account, I
run into issues creating the C# object.

My call to COleDispachDriver.CreateDispatch(<classname>) returns an "Invalid
Class String" CO_E_CLASSSTRING 0x800401F3L error when attempting to create
my C# object.

I have no issues with my legacy app creating "normal" ActiveX objects
written in VB6.



Relevant Pages

  • Re: Thinking Clearly
    ... How many within the Delphi community are using ... It doesn't leverage the things that the .NET framework ... designed from day one to be able to interop with all sorts of "legacy" code. ...
    (borland.public.delphi.non-technical)
  • Re: Thinking Clearly
    ... Win32 as Interop is a perfectly suitable solution. ... .NET has been designed to do: leverage "legacy" code. ...
    (borland.public.delphi.non-technical)
  • C++/CLI and unmanaged code
    ... The library really is legacy stuff (goto's and setjump/ ... longjumps abound). ... Can anyone point me to some up to date information about interop ...
    (microsoft.public.dotnet.languages.vc)
  • VCC+ and .Net assemblies
    ... Has anyone used the COM interop to acess .Net asseblies from an unmanaged ... For various reasons we have a legacy VS 6.0 C++ application that we would ...
    (microsoft.public.dotnet.framework)
  • VCC+ and .Net assemblies
    ... Has anyone used the COM interop to acess .Net asseblies from an unmanaged ... For various reasons we have a legacy VS 6.0 C++ application that we would ...
    (microsoft.public.dotnet.framework.interop)