PxPlus User Forum

Main Board => Discussions => Programming => Topic started by: HendersonS on May 13, 2020, 11:44:38 AM

Title: Working with DLL
Post by: HendersonS on May 13, 2020, 11:44:38 AM
Hi All,

Recently we are working with several DLL´s, and they give us error 15 when traying to load them, anyone knows more information about this error ?

thaks,
Henderson S.
Title: Re: Working with DLL
Post by: Devon Austen on May 13, 2020, 02:03:19 PM
This error is reported when PxPlus could not load the DLL. There are a couple of common reasons the DLL could not be loaded:

1. The DLL is 64-bit (32-bit applications cannot load 64-bit DLLs)
2. The DLL can't find or is missing dependencies (If you copied the DLL into the PxPlus directory you may need to copy it's dependencies as well or point pxplus at the DLL install directory instead)
3. Corrupted file

I don't know anything about that DLL you are trying to load so I can't guess which issue it is.
Title: Re: Working with DLL
Post by: Stéphane Devouard on May 14, 2020, 01:59:01 AM
Make sure this is a real Win32 DLL
A .Net component class could also be compiled as file with a .dll extension but would not be suitable for use with the PxPlus DLL() function
Title: Re: Working with DLL
Post by: HendersonS on May 14, 2020, 11:32:31 AM
thanks for your reply, i realized it is a 64 bit dll, is there any way to work in pxplus with 64 bit dll?
Title: Re: Working with DLL
Post by: Mike King on May 14, 2020, 11:51:02 AM
PxPlus 2020 (version 17), due to be released this month, will be available on Windows in either 32 or 64 bit. 
So, if you can wait a week or so you could use PxPlus 2020 to call your 64 Bit DLLs.
Title: Re: Working with DLL
Post by: Devon Austen on May 14, 2020, 11:59:30 AM
Our Windows PxPlus is 32-bit. 32-bit applications cannot load 64-bit DLLs.

Luckily we have a Windows 64-bit version of PxPlus that will be release very soon. You will need to have a license for PxPlus 2020 to use it though.

If that is not an option usually you can find a 32-bit version of the DLL you want to use.

If that is not an option then you will have to create a 64-bit executable/COM wrapper that PxPlus can invoke to interact with the 64-bit DLL. You will have to create the exe or COM wrapper using a compiled language like c++.

Here is some instructions on building a COM wrapper: https://manual.pvxplus.com/?Automation%20in%20PxPlus/Usage%20and%20Examples/COM%20Wrapper%20Example.htm
Title: Re: Working with DLL
Post by: HendersonS on May 14, 2020, 12:58:45 PM
Thanks for your help, now update or use a DLL 32 is not an option, to use a com wraper the link that contains a .zip doesn't work.
Title: Re: Working with DLL
Post by: Devon Austen on May 14, 2020, 01:54:32 PM
Try this link: http://www.pvxplus.com/downloads/misc/SimpleCOM.zip
Title: Re: Working with DLL
Post by: HendersonS on May 14, 2020, 04:38:11 PM
Thanks, I will try this way.