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

Failed to load DLL: Invalid access to memory location

Hi,

I'm a noob with C# .NET (in fact, I've only just started looking at it within the last 24 hours) so please excuse me.

[DllImportAttribute("test.dll", EntryPoint = "_test@24", CharSet = CharSet.Ansi, ExactSpelling = false, SetLastError = false, PreserveSig = true, CallingConvention = CallingConvention.Winapi, BestFitMapping = false, ThrowOnUnmappableChar = false)]
[PreserveSigAttribute()]

I am trying to use that with a DLL that is packed with yoda's protector 1.03.3 and I am getting the error quoted in the subject title when trying to call the function. I'm using code directly taken from a working project and all my debugging has shown the parameters and everything leading up to the function call to be completely correct.

I've been reading around and believe it could have something to do with the DLL relocs trying to access read-only memory or something similar to that? If so, how would I go about solving this? Editing the DLL is not really feasible, as the original author lost his source code a long time ago, and unpacking it is not the easiest of things. Also, I *believe* this code works fine in .NET 2003 as the original application used for the exact same DLL was compiled under .NET 2003, but in the 2008 version it's causing this error.

Any ideas?

Thanks,

Nick
Feb 5 '09 #1
0 2482

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

Similar topics

5
by: Rudolf Ball | last post by:
Dear NG, i want to load a plugin (WinForm) in my Applikation. That works fine. Now I want to globalize that plugin. So I have to load the Satellite Assembly, as well. But how can I load this...
12
by: Sharon | last post by:
I’m wrote a small DLL that used the FreeImage.DLL (that can be found at http://www.codeproject.com/bitmap/graphicsuite.asp). I also wrote a small console application in C++ (unmanaged) that uses...
0
by: Eric Twietmeyer | last post by:
Hello, Am I mistaken in thinking that if I have a mc++ dll that I should be able to link against it (so long as it has exported symbols via declspec(dllexport)) in an unmanaged application? I...
3
by: Gustavo L. Fabro | last post by:
Greetings! I'm testing VS 2005 Beta 2, and I've compiled a program that runs just fine on my computer (where VS is installed). I've tried to run this same program on another computer (after...
9
by: Tim D | last post by:
Hi, I originally posted this as a reply to a rather old thread in dotnet.framework.general and didn't get any response. I thought it might be more relevant here; anyone got any ideas? My...
22
by: Brett Romero | last post by:
If my UI app uses three DLLs and two of those DLLs reference something named utilities.dll, does the UI app load utilities.dll twice or does the compiler recognize what is going on and load...
5
by: stryfedll | last post by:
Hello, I have installed PHP 5.2, MySQL 5.0, and Apache 2.2. Everything works fine except the error mentioned in the subject. Here is the error log for Apache which shows the problem... ...
1
by: Doctorslicer | last post by:
Hi All, We have a large multi project application in MFC that we are converting to managed code. We have been able to add /CLR to all of the projects and have compiled successfully but encounter...
1
by: sachinv1821 | last post by:
hi all , i am getting this Problem i am Unable to Load the DLL/ACM, the Problem with this (DLL /ACM ) is its a C code but this DLL using the C++ library i written a wrapper for C++ library and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.