Strange error using a dll

  • Thread starter Thread starter Torben Laursen
  • Start date Start date
T

Torben Laursen

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
 
Did you set a reference to this using the COM tab from Add References, and
make your call against the generated Interop assembly?
Peter
 
Torben said:
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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top