473,396 Members | 1,678 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.

Strange error using a dll

Hi

I have a dll written in C++ builder that I have been using for several years
by calling it using VBA or C++ from VS.

But I cannot use it from a C# program. When I try to use a function inside
it I get this strange exception:
Unable to load DLL 'DB_Forms.dll': Invalid access to memory location.
(Exception from HRESULT: 0x800703E6)

Can anyone give me some hints on what may be wrong?

PS I am using VS2005

Thanks Torben
Oct 3 '06 #1
2 4101
Did you set a reference to this using the COM tab from Add References, and
make your call against the generated Interop assembly?
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Torben Laursen" wrote:
Hi

I have a dll written in C++ builder that I have been using for several years
by calling it using VBA or C++ from VS.

But I cannot use it from a C# program. When I try to use a function inside
it I get this strange exception:
Unable to load DLL 'DB_Forms.dll': Invalid access to memory location.
(Exception from HRESULT: 0x800703E6)

Can anyone give me some hints on what may be wrong?

PS I am using VS2005

Thanks Torben
Oct 3 '06 #2

Torben Laursen wrote:
Hi

I have a dll written in C++ builder that I have been using for several years
by calling it using VBA or C++ from VS.

But I cannot use it from a C# program. When I try to use a function inside
it I get this strange exception:
Unable to load DLL 'DB_Forms.dll': Invalid access to memory location.
(Exception from HRESULT: 0x800703E6)

Can anyone give me some hints on what may be wrong?

PS I am using VS2005

Thanks Torben
What is the function signature of the function inside the .dll and what
is the corresponding C# p/invoke signature you are using?

Oct 3 '06 #3

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

Similar topics

5
by: Sam | last post by:
Guys facing a strange problem any clue would really rescue me.. i am using a ASP application with following things Server : Intel Xeon (TM) CPU 2GHz, 2GB RAM, 136GB HDD OS : Windows 2000...
2
by: Olaf | last post by:
I have a frameset page witch contains the myFuc() function. The function is accessed from a page in one of the frames in the frameset. An example is shown below. <input...
25
by: Neil Ginsberg | last post by:
I have a strange situation with my Access 2000 database. I have code in the database which has worked fine for years, and now all of a sudden doesn't work fine on one or two of my client's...
3
by: Sebastian C. | last post by:
Hello everybody Since I upgraded my Office XP Professional to SP3 I got strange behaviour. Pieces of code which works for 3 years now are suddenly stop to work properly. I have Office XP...
6
by: Tamir Khason | last post by:
I recieve the very strange error while compiling project: "object reference net set to the instance of the object" in line 0 !!! The first lines in this .cs are using System; using...
2
by: tommydkat | last post by:
Hi! I'm updating a Windows application that we develop that uses a DB2 database. We switched from using Microsoft Developer Studio 6 to Visual Studio .Net 2003 to build our app and since that...
0
by: ivb | last post by:
Hi all, I am using DB2 8.1.11.1 on NT with ASP.NET 1.1 When application make connection to database (via ADO.NET), it set "Connection timeout" parameter to 30 seconds. After, when my webpage...
11
by: Martin Joergensen | last post by:
Hi, I've encountered a really, *really*, REALLY strange error :-) I have a for-loop and after 8 runs I get strange results...... I mean: A really strange result.... I'm calculating...
6
by: tony | last post by:
Hello! I have several projects where each one build a library.(class library or window control library). Now I get some strange compile error when building the *.exe file and doesn't...
8
by: =?Utf-8?B?R2Vvcmdl?= | last post by:
Hello everyone, I am migrating my C++ COM server to managed code (C# COM server). I am using the same client to use the same COM class in COM server. The C++ version COM server works properly,...
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: 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
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
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.