When running the PB 2022 R3 IDE in x86 mode, if I run my application, I get an error calling external function %s. This DLL works fine with PB 12.5. Are there any requirements for DLLs with PB 2022 R3?
- You are here:
- Home
- Q&A
- Q&A
- PowerBuilder
- PB 2022 R3 x86 external DLL
- Robert Piskac
- PowerBuilder
- Monday, 19 August 2024 15:00 PM UTC
- Tuesday, 20 August 2024 12:32 PM UTC
- PowerBuilder
- # 1
I forgot to publish my developer environment.
Apple iMac M1
Parallels VM
Windows 11 ARM
- Monday, 19 August 2024 19:41 PM UTC
- PowerBuilder
- # 2
Hi, Robert -
What software (Visual Studio, perchance?) and version are you using to create the DLL?
Can you please supply the function's prototype for the DLL function you are calling, and also the external function declaration in PB for that DLL function?
- Robert Piskac
- Monday, 19 August 2024 19:48 PM UTC
Function Long PBSIsClipboardImageAvailable() Library "pbwinlib.dll"
Function long PBClipboardSave(long hWnd, long dataType, ref string strPathFile, ref long awidth, ref long aheight) Library "pbwinlib.dll" alias for "PBClipboardSave;Ansi";
Function long PBSConvertImage(long convertType, ref string fileFrom, ref string fileTo) Library "pbjpeg.dll" alias for "PBSConvertImage;Ansi"
Function long PBClipboardDIBResizeSave(long hWnd, long dataType, ref string aszFileName, long awidth, long aheight) Library "pbwinlib.dll" alias for "PBClipboardDIBResizeSave;Ansi"
Function long PBClipboardDIBGetSize(long hWnd, long dataType, ref long awidth, ref long aheight) Library "pbwinlib.dll"
Function long PBScanPicture(long hWnd, long topWhole, long topFrac, long leftWhole, long leftFrac, long rightWhole, long rightFrac, long bottomWhole, long bottomFrac, long Show, long Flag) Library "pbscan32.dll"
// *********************************************************************
//
//
//
//
// *********************************************************************
long WINAPI PBSIsClipboardImageAvailable(void)
{
if (IsClipboardFormatAvailable(CF_DIB))
return(1);
return(0);
}
From Depends DLL exporter
PBSBrowseForFolder
PBSRunAndWait
PBSGetFirstFile
PBSGetNextFile
PBSGetEnv
PBSGetOpenFileName
PBSOpenComPort
PBSSetComPort
PBSComWrite
PBSComRead
PBSCloseComPort
PBSIsClipboardImageAvailable
PBClipboardSave
HttpGetFile
PBClipboardDIBResizeSave
PBClipboardDIBGetSize
Visual Studio 2022
DLL works in my OLD PB 12.5 application , but not in the PB 2022 R# IDE runtime.
-
Helpful Loading... Helpful 0
- Roland Smith
- Tuesday, 20 August 2024 12:46 PM UTC
-
Helpful Loading... Helpful 1
- Monday, 19 August 2024 16:32 PM UTC
- PowerBuilder
- # 3
From the first post: When running the PB 2022 R3 IDE in x86 mode. Yes it's in the directory, I even put the full path to the DLL in the declaration just in case. Running in x86 mode with x86 dll that works in PB 12.5 application. I will make a x64 version to see if there is a bug in the IDE where it wants x64 dll.
- Robert Piskac
- Monday, 19 August 2024 22:09 PM UTC
-
Helpful Loading... Helpful 0
- Robert Piskac
- Monday, 19 August 2024 22:09 PM UTC
-
Helpful Loading... Helpful 0
- Chris Pollach @Appeon
- Monday, 19 August 2024 23:11 PM UTC
-
Helpful Loading... Helpful 0
- Monday, 19 August 2024 16:27 PM UTC
- PowerBuilder
- # 4
no. there are 0 differences in that regard.
you either:
1 - are running 64 bit pb and the dll is 32 bit (or 32bit pb and dll is 64bit)
2 - do not have the dll in the application directory or in the system path
- Page :
- 1
However, you are not allowed to reply to this question.
To quote Chris Pollach's response from a Mac/ARM/Parallels question last week (https://community.appeon.com/index.php/qna/q-a/run-powerbuilder-in-macos-m3-harware-using-parallels):
"Both the PB IDE & runtime are built using Microsoft C++ 2022 (in PB 2022 R3), and require an Intel or Intel compliant CPU in order to run."