473,791 Members | 2,899 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4115
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
3020
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 Advanced server. IIS5.0 Database: Oracle (Using ADODB to connect to the Database) App server running on the same machine (COM+)
2
8928
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 onclick="javaScript:alert('document.forms(0)='+document.forms(0)); parent.myFunc(document.forms(0));" type="button" value="Open" name="Button" ID="Button"> The strange part is that the debug alert says that the document.forms(0) is an object så all seem to be well. But...
25
3745
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 machines. The code opens MS Word through Automation and then opens a particular Word doc. It's still working fine on most machines; but on one or two of them, the user is getting an Automation Error. The code used is as follows: Dim objWord As...
3
4876
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 Developer (SP3 for Office, SP1 for developer, JET40SP8) on Windows XP Home Edition (SP1). The same behaviour occurs on Windows 98 too.
6
1377
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 System.Collections; using System.ComponentModel;
2
7285
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 switch, we've been getting a function sequence error with this SQLSTATE: State:S1010,Native:0,Origin: Here is a sample query we're running that generates the error UPDATE TOM.USERS SET TYPE=TYPE WHERE 1 = 0
0
3574
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 requests database, and query execution time exceeds 30 seconds, the following error reported: ===
11
2598
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 temperatures. T = 20 degrees at all times.... The 2D T-array looks like this:
6
3472
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 understand what this means. Can somebody tell me what is causing this? Do I have made some setup in a wrong way for some of my project where I build my library.
8
1918
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, but when using the C# COM server, there is a strange error indicating dll is not installed correctly (data link error). I have tried to delete the DLL at the same time to test whether the DLL could be found correctly when the client is invoking...
0
9669
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10207
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9993
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7537
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6776
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5430
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5558
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4109
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3713
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.