Hello,

I have the same problem as this poster http://www.daniweb.com/forums/thread89221.html but to summarize:

I have a VB6 project that worked fine until Sep. 2008.
I have not worked on it since then so when I started working on it in the last month and got error messages I was very surprised.

The project uses a third party dll called bgm_rap.dll that encapsulates some Crystal functionality, don't ask me what since the original programmers were consultants.

Now every time I start the program I get

Run-time error '53':
File not found: C:\WINDOWS\SYSTEM32\BGM_RAP.DLL

- I have verified that the dll is in the stated directory
- I have replace my dll with a copy from a running production computer
- I have tried to register it with regsvr32 only to get the following error

LoadLibrary("C:\Windows\System32\bgm_rap.dll") a échoué - Le module spécifié est introuvable.
(Trans.) LoadLibrary("C:\Windows\System32\bgm_rap.dll") has failed - the specified module cannot be found.

After researching this error on the web I realize that the dll might not have the Load module in it but that has not changed since the initial version of the dll.
Also, looking at the original installation files (Setup.lst) I see that this dll is NOT being SelfRegistered, just installed as shared.
- I have tried adding a reference to the dll in VB (Project -> References) only to get the following error:

Can't add a reference to the specified file.

Now I am at a total loss and my company needs to modify the program...

Hopefully someone on DaniWeb can help me find the solution.

Thanks

Yomet

OK, so after doing a bit more research I realize that DLLs created with VB and C++ behave differently when used in VB code. This explains why I am not able to add a reference to the DLL.

In the code I have the following lines

Public Declare Function InitCrystal Lib "C:\WINDOWS\SYSTEM32\BGM_RAP.DLL" () As Boolean
Public Declare Sub TermCrystal Lib "C:\WINDOWS\SYSTEM32\BGM_RAP.DLL" ()
Public Declare Function RunReport Lib "C:\WINDOWS\SYSTEM32\BGM_RAP.DLL" (ByVal repName As String, ByVal repPath As String, ByVal repFilter As String, ByVal iniFileName As String, ByVal bPrintPreview As Boolean) As Boolean

and the error always happen when one of these declared functions are called, so that makes sense.

'Starting the Crystal Print Engine
   Call InitCrystal

or

'Closing the Crystal Print Engine
   Call TermCrystal

What still does not make sense is why VB can't find the DLL

Yomet

Another update.

After trying everything I could think of, including re-installing VB, and some things I had help thinking of, I finally decided to install the actual application on my computer.

Low and behold - everything is back to normal and works the way it's supposed to!!!!!

I still don't know why this happened or what the installer did that I hadn't tried already but now it works.

Thread solved

HI.
Same problem. I solved installing .Net Framework 3.5 and everything ok.

Another solution, recompile the DLL using an older VC++ (97-2000).

I suspect this is problem with Windows updates.

Hope I could help you.

Jdn

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.