Load DLL problem on guest Windows XP [libpq.dll]

Discussions about using Windows guests in VirtualBox.
Post Reply
dec-H0
Posts: 2
Joined: 11. Jan 2022, 16:16

Load DLL problem on guest Windows XP [libpq.dll]

Post by dec-H0 »

Host: Windows 10 Home 64bit
Guest: Windows XP Home 32bit

Under Windows XP I have a program running that connects to a PostgreSQL database.
The Postgres server is on windows10 and specifically on WSL ubuntu but it probably doesn't matter.

The issue is that the Application running under Windows XP does not see the libpq.dll library, which is in the application's run directory.

Under pure XP it works OK, under windows 10 it works OK but when XP is under VirtualBox it does not work.
I get the message "None of the dynamic libraries can be found: libpq.dll, libpq81.dll"
I tried to upload these libraries to windows and windows/system32 directory but still the same effect.
Has anyone encountered this behavior or did I miss something ?


Translated with DeepL Translator (free version)
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Load DLL problem on guest Windows XP [libpq.dll]

Post by mpack »

You should discuss XP problems on a Windows discussion site. VirtualBox is only responsible for the virtual hardware.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Load DLL problem on guest Windows XP [libpq.dll]

Post by scottgus1 »

dec-H0 wrote:Under Windows XP I have a program running that connects to a PostgreSQL database....
Windows XP does not see the libpq.dll library, which is in the application's run directory.
How are you trying to achieve the connection? A Virtualbox Shared Folder? A real host-OS shared folder? A network port number/pipe?
dec-H0 wrote:Under pure XP it works OK
I take this to mean that XP on a real computer can find the dll.

This may mean that the network type of the XP VM is not set correctly to enable finding the dll over the network. What network type is the VM set to? (Hint: a real XP PC would probably be on the LAN along with all the other computers. Virtualbox Bridged will achieve the same setup for the XP VM.)
dec-H0
Posts: 2
Joined: 11. Jan 2022, 16:16

Re: Load DLL problem on guest Windows XP [libpq.dll]

Post by dec-H0 »

scottgus1 wrote:How are you trying to achieve the connection? A Virtualbox Shared Folder? A real host-OS shared folder? A network port number/pipe?
I connect to standard port 5432 on host system
scottgus1 wrote:This may mean that the network type of the XP VM is not set correctly to enable finding the dll over the network.
The DLL library is not on the network drive. It is on the local drive of the guest system (drive C: of windows XP). The location "c:\myprogram\" contains both the executable file and the dll library.
The problem is not the database connection. Because there is no connection error. A "file not found" error is reported, which is strange because the file is in the directory where the EXE is. After copying the contents of the directory to the notebook (Windows XP) it is OK.

Maybe this is just an incorrect message. I'll install pgAdmin (if I can find an old version under XP) and see if it works.
Attachments
Error message
Error message
Zrzut ekranu (3).png (8.57 KiB) Viewed 2740 times
VB settings
VB settings
Zrzut ekranu (4).png (35.37 KiB) Viewed 2740 times
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Load DLL problem on guest Windows XP [libpq.dll]

Post by scottgus1 »

dec-H0 wrote:The DLL library is not on the network drive. It is on the local drive of the guest system (drive C: of windows XP). The location "c:\myprogram\" contains both the executable file and the dll library.
The problem is not the database connection.
Thanks, that clarifies the issue tremendously.

Since the program is looking for dlls in its own folder and is not looking out on the network, this goes back to what Mpack said above. This does not sound like a Virtualbox problem. You'll have to do troubleshooting inside XP using Microsoft tools to figure out why the program cannot find its dlls.
Post Reply