What is a GCHandle? (Need simple explanation ;o)

  • Thread starter Thread starter darrel
  • Start date Start date
D

darrel

I'm trying to get a page up using some sample code that interfaces with a
3rd party application using .net.

The sample code the company provides, when I run it, produces this error:

==================================================================
An unhandled exception of type 'System.ArgumentException' occurred in
mscorlib.dll
Additional information: Cannot pass a GCHandle across app domains.
==================================================================

I've never had an error like this. Instead of appearing on the web page,
this causes vs.net to pop-up and shows the error in a modal box within
vs.net

The specific error doesn't show up on google, but what I can piece together
is that the GCHandle is a memory stack? Where would one begin to figure out
what is causing this? Is this something I could have done, or would this be
an issue inherit within the 3rd party DLLs? I'm also not clear what an 'app
domain' is...is that a 'chunk' of reserved memory?

-Darrel
 
Is the third party application an executable or a COM dll. From your error
it seems that it is an executable. Also how are you trying to access it?
 
Is the third party application an executable or a COM dll. From your error
it seems that it is an executable. Also how are you trying to access it?

It's DTSearch, and I'm a bit frustrated.

They claimed it was .net, but I'm finding it is only 'sort of' .net

At this point, they have a dll wrapper that then supposedly works with the
object.

To access it, I add a reference in my project to the API wrapper, and then
on my system, I need to add a reference to the actual application dll.

So, that, with a lack of documentation, and a lack of expert .net skills is
causing me some frustration. ;o)

-Darrel
 
Seems that your 3rd party component is written in C++.NET, other .NET
language need not take care of GCHandle stuffs ourselves.

Ah. I'm using VB.net, so maybe that's an issue.
I suggest you to inform your 3rd party component's author about this and see
if they'll provide instructions on how to fix this.

Will do. With crossed fingers. ;o)

-Darrel
 
Back
Top