1. Erick Bergsma
  2. PowerBuilder
  3. Wednesday, 20 November 2019 20:22 PM UTC

Hello all...

I am having issues registering a DLL in my Windows 10 environment.

What I've discovered is that the code in the DLL is PB code, but I am not sure from what version.

I'm considering just adding all the PBLs to my main app, and changing the calls, but it seems as if there are about 100 calls to change.

Perhaps the quickest fix is to take this code and re-compile the DLL.

I've never done this before.  

Can someone help me understand the process?

I've tried doing a deploy, and creating DLL rather than PBDs, but when I try to register that DLL, is says...

...was loaded but the entry-point DLLRegisterServer was not found

Can someone point me in the right direction?

Who is viewing this page
Accepted Answer
Roland Smith Accepted Answer Pending Moderation
  1. Wednesday, 20 November 2019 20:51 PM UTC
  2. PowerBuilder
  3. # Permalink

The only time a DLL needs to be registered is when it implements a COM interface. Since you can't do that in PowerBuilder, there is NEVER a need to register a DLL from a PB app.

 

Comment
  1. Erick Bergsma
  2. Friday, 6 December 2019 16:43 PM UTC
Thanks again Roland.

I did what you previously suggested and just brought the PBL into the main application and referenced the calls.

As I understand, the reason the DLL was made is so that other apps could use them.

Those have since been decommissioned, so it was good to just bring in the logic to the main app.
  1. Helpful
There are no comments made yet.
Erick Bergsma Accepted Answer Pending Moderation
  1. Thursday, 21 November 2019 14:27 PM UTC
  2. PowerBuilder
  3. # 1

Hi Roland...  Thanks for responding...

"what exactly am I trying to do"...

This might get lengthy...

I have an app, that is written in PB9, that is about to be de-commissioned...so the ask is to just make it work for a little longer.

This app, apparently, reads BLOBs (manufacturing drawings) from an Oracle database, and allows the user to save the files.  Apparently the ETL of the drawings didn't work 100%, so the old app needs to remain.

The app uses a 2 DLLs, that were written in-house many years ago, and 1 of the DLLs won't register in Windows 10.  It tells me that it can't be found.  I tried all the tricks, to copy the file in both the System32 and SysWow64 directories, but still no luck.

The PB app creates an OLEObject...hence my reference to a DLL, since the documentation I have says I need to register 2 DLL fir this app to work...

oleVault = create oleobject
listatus = oleVault.ConnectToNewObject("Dmacsvault.OraBlobs")

 

Started looking for the source code for the DLL, and I discovered another PB app called DMacsVault, and in that code, are all the calls that the main app is trying to use...like...

oleVault.of_connectdb(lsdbms, lslogid, lslogpw, lsserver, lbautocommit)

oleVault.of_getblob(alobjid, asdir, ref lsfilelist, ref llfilecount)

oleVault.of_saveblob(REF lul_new_object_id, &

...etc...etc...etc...

All those functions are in that other PB app I found...

So, my first inclination is to just bring all the code from the second app into the main app, and tweak the calls.

...but, the ask is to not migrate...not do any code change... just get it to work...

So, the second inclination is to re-compile that DMacsVault code I found into a DLL that I can then register in Windows 10.

...but I've never done that in PB before, and can't seem to find examples of anyone that did.

So... that's what I'm trying to do.

Doesn't make sense to me, in many ways, but I'm going to try.

 

(...sorry you asked...???) :-)

 

 

 

 

 

 

 

 

 

 

 

 

 

Comment
  1. Roland Smith
  2. Thursday, 21 November 2019 20:05 PM UTC
The PB9 HTML help file explains everything under:

Application Techniques

Program Access Techniques

Chapter 19 PowerBuilder Runtime Automation Server



The problem you will run into is that PowerBuilder no longer supports this feature. It was dropped starting with 11.5. You probably should just include the code objects in the calling application and call the functions in the normal PowerBuilder way.
  1. Helpful
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Wednesday, 20 November 2019 20:57 PM UTC
  2. PowerBuilder
  3. # 2

When a PowerBuilder application is compiled to machine code, it produces an EXE file and optionally a DLL file for individual libraries. If you compile to P-Code, it produces an EXE file and optionally a PBD file for individual libraries.

The PBD/DLL files cannot be used by a non-PowerBuilder application and they cannot be used by a PowerBuilder application that is a different version of PB from the one they were compiled with.

 

What exactly are you trying to do?

Comment
  1. Roland Smith
  2. Wednesday, 20 November 2019 20:59 PM UTC
If you are writing a C\C++ program you can use PBNI functionality to instantiate PB objects from a PB DLL or PBD but you must know what version they were compiled with.
  1. Helpful
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.