Re: [Mingw-users] DLL/.NET invalid access to memory location
- Date: Mon, 07 Apr 2008 07:35:49 -0400
- From: Earnie Boyd <earnie@xxxxxxxxxxxxxxxxxxxxx>
- Subject: Re: [Mingw-users] DLL/.NET invalid access to memory location
Quoting dnorrell@xxxxxxx:
> I have built a number of DLLs using MinGW on Win2003. The code is
> written in C and is ported from Linux/Unix. The DLLs build fine, and
> to my knowledge the code is stable. They work fine when tested
> against programs compiled using MinGW. However, I'm trying to make
> calls on these DLLs from within .NET applications. This works fine in
> many cases, and I have no problems with stability. However, when
> installed on certain machines and when running some applications I
> randomly get the following error from .NET.
>
> Unable to load DLL 'mydll.dll': Invalid access to memory location.
> (Exception from HRESULT: 0x800703E6)
>
> Now, this behaviour seems to be random, it can work fine but switch
> to a different machine, or even a different app on the same machine,
> and I started getting the error again. It seems to occur when the DLL
> is being loaded initially when the app is starting and before
> anything in the DLL even gets called. I've checked permissions,
> dependencies and nothing seems to consistently fix the problem.
>
> Has anyone had similar problems or know what might be going wrong here?
>
IIRC, W2003 allows you to set a setting that moves 1/2 of the system
space to user space. 0x8000703E6 is normally system space. You may
need to simply rebase the dll. My thinking is that this could be
caused by the producer of the dll having the 1/2 system space feature
on while the troubled systems do not. On the other hand 0x800703E6 may
be just a bogus address left over by not properly initializing HRESULT.
Earnie
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Register now and save $200. Hurry, offer ends at 11:59 p.m.,
Monday, April 7! Use priority code J8TLD2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users