473,386 Members | 1,819 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

LoaderLock Detected and remoting

I'm using .NET 2.0, I have a manged windows service which uses a mixed
C++ assembly. I also have a mangaged dll that defines the interface to
the mixed assembly. Another application communicates with the service
through remoting using the managed interface.

Mostly this works ok, but when a call a particular function I get the
"loadlock detected" exception. I have a test app that can call the
function successfully, the difference being that no remoting is
involved. I have tried putting a break point at the entry point of my
function, but this is never hit.

Any ideas?

Dec 18 '06 #1
1 1382
I've narrowed this down a bit. The problem occurs in the following
case:

// shared interfaces C#.NET
interface A
{
B CreateB()
C CreateC()
}
interface B
{
void foo(C);
}
interface C
{
// some properties
}

// on the server C++.NET
class Aclass : public MarshalObjectByRef, public A
{
public:
virtual B CreateB() = A::CreateB { return (B)gcnew Bclass(); }
virtual C CreateC() = A::CreateC { return (C)gcnew Cclass(); }
};
class Bclass : public MarshalObjectByRef, public B
{
public:
virtual void foo(C obj) = B::foo { return; }
};
class Cclass : public MarshalObjectByRef, public c
{
// ...
};
// on the remote client C#.NET
B Bobj = A.CreateB();
C Cobj = A.CreateC();

// this works
Bobj.foo(null);

// this produces a load lock exception
Bobj.foo(Cobj);

ropo wrote:
I'm using .NET 2.0, I have a manged windows service which uses a mixed
C++ assembly. I also have a mangaged dll that defines the interface to
the mixed assembly. Another application communicates with the service
through remoting using the managed interface.

Mostly this works ok, but when a call a particular function I get the
"loadlock detected" exception. I have a test app that can call the
function successfully, the difference being that no remoting is
involved. I have tried putting a break point at the entry point of my
function, but this is never hit.

Any ideas?
Dec 19 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: jnospamster | last post by:
I am getting a LoaderLock message in an application I have written for ..Net 2.0 in C#. It contains only pure managed assemblies. The application consists of 1 dll and 2 .exe projects which...
3
by: Ron | last post by:
I have two forms. When I click on new entry I hide current form and show form2 as soon as I click on a textbox in form2 I get a loaderlock error. What is this? How can I get rid of this?
11
by: Beorne | last post by:
I'm trying to call a third party dll routine from C# using pinvoke. Unfortunately I obtain a LoaderLock exception and my application stops. I've seen that it must be some uncorrect behaviour of...
3
by: aaron.m.johnson | last post by:
Help me understand this, please. I have an older VC++ COM DLL that I'm using in a C# project. One of the COM objects takes a callback object as a parameter so that it can spin off a thread and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.