473,382 Members | 1,615 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,382 software developers and data experts.

Unmanaged pointer in second appdomain

Hi,

I am trying to set a void* in my second AppDomain ad, but I always get
an unhandled exception in kernel32.dll before the FInfo::Init function
starts.

Here's my code snippet
FInfo* F = new FInfo (Id, Ptr); //Ptr is a void* to the address of
a function in unmanaged code that I want to call later in the managed
code.

ad->DoCallBack (new CrossAppDomainDelegate (F ,&FInfo::Init));
What am I doing incorrectly? Is there some security permission that I
have to grant for the second appdomain to access the pointer in the
unmanaged code?
Here's the exception and call stack:

Unhandled exception at 0x7c812a5b (kernel32.dll) in Axis.exe:
0xE0434F4D: 0xe0434f4d.

kernel32.dll!RaiseException() + 0x52
mscorwks.dll!CorExitProcess() + 0x5420
mscorwks.dll!ReleaseFusionInterfaces() + 0x49762
mscorlib.dll!799de0bc()
mscorlib.dll!79af6973()
mscorlib.dll!799d7f1f()
mscorlib.dll!79c19d20()
mscorwks.dll!791b5b01()
mscorwks.dll!CorExitProcess() + 0xc6ce
mscorwks.dll!791b7618()
mscorwks.dll!791b5bc8()
mscorwks.dll!CorCreateMiniDump() + 0x33f99
mscorwks.dll!ReleaseFusionInterfaces() + 0x9b490
mscorwks.dll!ReleaseFusionInterfaces() + 0x9b5e4
mscorwks.dll!ReleaseFusionInterfaces() + 0x203b1
0e9d4b25()
mscorlib.dll!79c19d20()
mscorwks.dll!GetCompileInfo() + 0xf7a
mscorwks.dll!CorExitProcess() + 0x4e851
0e9d75e2()

Nov 8 '07 #1
0 970

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

Similar topics

0
by: Bryan | last post by:
I have a multi-threaded C# console application that uses WMI (System.Management namespace) to make RPC calls to several servers (600+ ) and returns ScheduledJobs. The section of my code that...
7
by: Timothy Shih | last post by:
Hi, I am trying to figure out how to use unmanaged code using P/Invoke. I wrote a simple function which takes in 2 buffers (one a byte buffer, one a char buffer) and copies the contents of the byte...
2
by: hykim | last post by:
I want to call a unmanaged dll's function returning some STRUCT's pointer. the next is definition of a STRUCT. ----------------------------------------------------------------------- typedef...
15
by: Bryan | last post by:
I have a multi-threaded C# console application that uses WMI (System.Management namespace) to make RPC calls to several servers (600+ ) and returns ScheduledJobs. The section of my code that...
2
by: Mark Traudt | last post by:
The following managed C++ function is called from an unmanaged C++ DLL: double Divide( double num, double denom ) { if( denom == 0.0 ) throw new std::exception( "divide by zero" ); return num...
0
by: Lokkju | last post by:
I am pretty much lost here - I am trying to create a managed c++ wrapper for this dll, so that I can use it from c#/vb.net, however, it does not conform to any standard style of coding I have seen....
4
by: William F. Kinsley | last post by:
My understanding is that when I re-compile a existing MFC application with the /clr switch, that the code generated is managed(with some exceptions) but that the data isn't, i.e. not garbage...
5
by: R. MacDonald | last post by:
Hello, all, I am currently working on a .Net (VB) application that invokes routines in unmanaged (Fortran) DLLs. The unmanaged routines then communicate with the .Net application by means of a...
6
by: Stephen Walch | last post by:
Our application environment consists of three basic layers: 1. Third-party unmanaged DLLs that were written before the CLR was invented and maintain a significant amount of information (including...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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...

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.