1. Nathalie Meurant
  2. PowerBuilder
  3. Monday, 5 August 2019 13:10 PM UTC
Hello,
Currently, I migrate all my applications to PB17 R3.
All must run under win10 and 64 bit.
My only problem is that I am using an external dll library called printdlg.dll.
The application function under 32 bit but no way to run it under 64 bit.
I have the problem running the executable and not the runtime. Because I think that under PB it executes it in 32bit.
The mistake I have is:
Error number: 14
Error text: Error opening the printdlg.dll DLL for the external function at line 2 of the constructor event of the u_cpp_printdlg object.
Window / Menu: u_cpp_printdlg
Object: u_cpp_printdlg
Object event: constructor
Line: 2

As you can see, he finds the file but he can not open it correctly and read it.
Does anyone have an idea to help me?
Thanks in advance.

Best regards
Nathalie Meurant
Nathalie Meurant Accepted Answer Pending Moderation
  1. Tuesday, 6 August 2019 07:34 AM UTC
  2. PowerBuilder
  3. # 1

Hi Roland, 

 

Thanks you for your help. 

But i can't recompile this DLL because i haven't the source code of this DLL. 

And i didn't found printdlg for 64bit and i have no knowlidge about C++.

 

 

Comment
  1. Roland Smith
  2. Tuesday, 6 August 2019 13:29 PM UTC
You should be able to use the PrintDlg function in comdlg32.dll which is part of Windows. Windows will automatically load the correct bitness version of comdlg32.dll, you don't have to worry about it.
  1. Helpful
There are no comments made yet.
Nathalie Meurant Accepted Answer Pending Moderation
  1. Monday, 5 August 2019 13:59 PM UTC
  2. PowerBuilder
  3. # 2

Printdlg.dll is a microsoft DLL, it's not a customize DLL.

And there are no printdlg64.

.NET can use printdlg with somes modifications. 

So what can i do?

Comment
  1. Roland Smith
  2. Monday, 5 August 2019 17:20 PM UTC
The PrintDlg function is in comdlg32.dll which despite its name, comes in 32bit and 64bit flavors.

https://docs.microsoft.com/en-us/previous-versions/windows/desktop/legacy/ms646940(v=vs.85)
  1. Helpful
  1. Nathalie Meurant
  2. Tuesday, 6 August 2019 13:44 PM UTC
It's not a function printdlg but the file printdlg.dll.

It's 2 different things
  1. Helpful
  1. Nathalie Meurant
  2. Tuesday, 6 August 2019 14:40 PM UTC


While chatting with you, I just realized that I made a mix between what currently exists (printdlg function) and a file created by a developer who named it printdlg.dll.

In fact, he created a DLL via PowerBuilder and used it with the userobject cplusplus.

Having never used this technique, I did not notice that it was a DLL created by us and not by microsoft.



Sorry for this mistake.

I ll try to recompile this file in 64 bit and then test it.



  1. Helpful
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Monday, 5 August 2019 13:44 PM UTC
  2. PowerBuilder
  3. # 3

The developer of printdlg.dll will have to recompile and make a 64bit build.

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.