Re: C++/CLI Integrating third party assembly into native C++



"kyle.schmidt" <kyleschmidt@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:3D0E5935-574F-499F-9318-9E6BEE9305F8@xxxxxxxxxxxxxxxx
I have a third party .NET assembly for which I have no control over that I
have to integrate into my app. My app is a large native C++ application. I
have other .NET assemblies that have integrated into the app successfully,
but this particular assembly is giving me problems. To integrate this .NET
assembly I'm using C++/CLI which should be fairly straightforward.

The assembly has a singleton engine that needs to be initialized so I can
get a NameValueCollection of providers from it. I can code up a C# sample
app
to do just that, launch the code through VS2005, and everything works as
expected. I get 5 providers returned which is the correct number. The
exact
same code in C++/CLI, changed for syntax, always returns 0 providers in
the
collection when launched through VS2005 both with and without the
debugger.
However, I have discovered that running the C++/CLI code through a command
line or through windows explorer will work correctly and return 5
providers.

My questions then are, what is different between launching a C++/CLI app
through VS2005 without debugging vs through windows explorer that would be
causing things to work differently? Is there something the third party
provider could check at run-time to disable functionality, but only with
the
C++ environment? The third party tool has been dotfuscated, so is there
anything in the dotfuscator that could be preventing this from working
correctly?

How is the list of providers loaded?

The only thing that comes to mind as a possible explanation is that when
running under the debugger, VS will use a "hosting process", so the name of
your process will be different than you might think. If the code is somehow
locating the providers by matching the process name (exe name) against some
resource, that might be the source of your problem.

There's an option "Use hosting process" in the Tools|Options pages
somewhere - you might try unchecking that to see if it makes any difference.

-cd


.



Relevant Pages

  • Re: God I Love Delphi7
    ... Windows Forms are extremely easy to use. ... Where do you put those assemblies on ... application config files shoule be placed in your app directory. ... know what version of an assembly to use and what framework it needs. ...
    (borland.public.delphi.non-technical)
  • Re: CPU Racing w/ Idle App
    ... loading and binding assemblies in an app domain. ... > component from SyncFusion... ... >> WinXP Pro machines that are fully updated. ...
    (microsoft.public.dotnet.framework)
  • Re: CPU Racing w/ Idle App
    ... loading and binding assemblies in an app domain. ... > component from SyncFusion... ... >> WinXP Pro machines that are fully updated. ...
    (microsoft.public.dotnet.framework.performance)
  • Re: CPU Racing w/ Idle App
    ... loading and binding assemblies in an app domain. ... > component from SyncFusion... ... >> WinXP Pro machines that are fully updated. ...
    (microsoft.public.dotnet.framework.clr)
  • Re: MOSS and ADFS
    ... who has ADFS running with MOSS'07. ... Central Admin Page: ... Click application management -> authentication providers ... If you want to go looking for the assemblies that do come with ADFS, ...
    (microsoft.public.windows.server.active_directory)