Click here to Skip to main content
15,888,454 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Good Evening to everybody.

I recently gave up in trying to consume an external dll functions in an old Access 2010 app, it just never worked; so I'm trying to use a new Project (program) that I'm developing as a desktop application with VS 2017 and VB NET, to use it as a proxy to consume the functions of this dll and returns the results to the Access 2010 app.

The program in VS 2017 indeed recognizes the dll, its attributes and functions.

I already got to connect the two apps, sending back and forth the necessary parameters through the clipboard, and even assignig values to several of its attributes. But when I try to execute a public function, the program fails, and the debug output window (I hpe is correct to say so) gives me the message (spanish):

'Facturacion_Electronica.exe' (CLR v4.0.30319: Facturacion_Electronica.exe): 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\FacturacionElectronica\v4.0_1.0.0.0__d18e1c28d757c7cd\FacturacionElectronica.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
Excepción producida: 'System.IO.FileNotFoundException' en Facturacion_Electronica.exe
El programa '[4416] Facturacion_Electronica.exe' terminó con código 0 (0x0).

It means something like. "Facturacion_Electronica.dll loaded. The PDB file couldn't be found or it cannot be opened".

If I use the statement "on error resume next" (just to avoid the program from stopping, and analyze the next functions, the error is (more or less):

"public function Boolean Grabar_Factura is missing or it can´t be found2

I saw this function comes in another dll that probably is referenced in (or called from) the first one I indeed can see the function with the object browser. It does exists, so I just don't know and can't figure out why it is not found in the program.

I'd really appreciate anybody's help or indications or hints about where to look for information to solve this problem. If I can't achieve this, the only option that I have left is to develop this functionality by myself, and it it would take me a long time. It's all about an electronic invoice generation.

What I have tried:

I've been trying to solve it, searching thru the internet for a great time. I'm aware I need to keep on searching, but I'd really like to save time.
Posted
Updated 20-Jan-18 13:14pm
v2
Comments
phil.o 18-Jan-18 20:17pm    
A few questions :)
- This external dll, which type is it? A .NET dll, or a c/c++ one?
- Can you show the exact error message you get?
Please, use the "Improve question" green widget to add details.
Miguel Altamirano Morales 19-Jan-18 10:46am    
Thank you very much for your reply, Phil. I updated my question as you suggested me.

The second error message appears only if I set the "on error resume next" statement in my procedure and is not exactly how I wrote it, but the idea is the same. If I don't use the "on error...." statement the program stops with the first error.

I'm thinking that maybe solving the first error, the subsequent could be arranged automatically.

Miguel Altamirano Morales 19-Jan-18 11:23am    
the dll is a NET one
Dotnet_Dotnet 19-Jan-18 10:55am    
sir the dll is managed coded or unmanaged
Miguel Altamirano Morales 19-Jan-18 11:26am    
Dotnet: Thanks for replying. Excuse me, I don't know that. I did not developed it. It was given by an ex-employee,and we don´t have the source code.

Is there a way to check that ?

Give a try:You can disassemble it,find the class and methods definitions, build your .def file,then use it as other regular DLL.
 
Share this answer
 
take a look at this post:
Create .lib file from .dll
 
Share this answer
 
Comments
Miguel Altamirano Morales 20-Jan-18 19:23pm    
Thank you very much my friend Southmountain (such a nice name).

The post you sent me in your second solution is for achieve the first one ?.

I'll read carefully what you suggested me.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900