473,396 Members | 2,010 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,396 software developers and data experts.

Problem with .NET 2005 Managed to Native Transition

1
Hi All. Well, I have been trying a few things to solve this problem, but please let me set the sage first.

I have a .net 2005 class lib in C++ that is using fastdelegates to wrap a VC6 DLL that has callbacks. The VC6 DLL callsback fine to the 2005 class lib and when the callback tries to do something like...

void SetText(String ^s)
{
if ( ccl.InvokeRequired )
{
SetTextCallback ^d = gcnew SetTextCallback(this,&Classname::SetText);
ccf.Invoke(d,gcnew String { s } );
}
else
{
ccl.Items->Add(s);
}
}

eventually the program gets "stuck" when trying to return back to the main call to the VC6 DLL that generates the callbacks. When we break in the debugger, the top of the call stack is "[Managed to Native Transtion]" and the next frame is the call to the VC6 DLL.

It seems that when the invoking is done, it is exhibiting some sort of bug that does not allow the call to the VC6 DLL to return, it just "spins" forever.

Has anyone seen this? Any help on how to trace it down / fix?

Thanks in Advance.
Jun 10 '07 #1
0 985

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Slawomir Lisznianski | last post by:
Do ref classes indeed support instantiation on the stack? Similarly, can native classes be instantiated on gc heap? When you try to have a ref class instance on the stack, you'll get: R :...
7
by: Gustavo L. Fabro | last post by:
Greetings! Some classes that once compiled without problems on VS 2003 have now problems on VS 2005 Beta 1. I'm talking about a __nogc class that is exported with __declspec(dllexport). The...
1
by: Bern McCarty | last post by:
What do you make of this? I cannot tell for sure but it almost seems as the the transition thunk to get back from the native bool method to the managed caller is looking at eax and, if any bit is...
13
by: bonk | last post by:
Hello, I am trying to create a dll that internally uses managed types but exposes a plain unmanaged interface. All the managed stuff shall be "wrapped out of sight". So that I would be able to...
3
by: Mali Guven | last post by:
Hello, I have a native DLL (written in C) which is supposed to call a managed DLL (was written in C#, and an entry point was injected modifying the ildasm'd code). The exectuable calls the...
7
by: Asfar | last post by:
I have a MFC dll in which one of the parameters is of LPSTR. The declaration of my MFC dll looks like extern "C" __declspec(dllexport) int WINAPI EXPORT TestPInvokeFunc(LPSTR szFileName, LPSTR...
2
by: Haroon_Saeed | last post by:
Hey, I wrote a managed c++ class library in viusal studio 2005. This managed c++ dll calls native C++ methods of an SDK. When I referenced this managed c++ library in a console applciation...
1
by: Ward Bekker | last post by:
Hi, Because of a nasty exception (see below), in some non-managed/non .net com stuff that my application is talking to, my stack trace (also below) does not show something useful. I would...
5
by: =?Utf-8?B?U2hhcm9u?= | last post by:
I have a class that is writen in unmanaged pure native C++. This class files (h and cpp) are inserted to a managed C++ (VC++ 2005, C++/CLI) DLL compoenet. This DLL compoenet is used in a C#...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.