Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Using dynamic libraries – PB Docs 80 – PowerBuilder Library

Using dynamic libraries – PB Docs 80

Using dynamic libraries

You can store the objects used in your PowerBuilder application
in more than one library and, when you run the application, dynamically
load any objects that are not contained in the application’s
executable file. This allows you to break the application into smaller
units that are easier to manage and makes the executable file smaller.
You do this by using dynamic libraries. If you compile using Pcode,
PowerBuilder builds PowerBuilder dynamic libraries (PBD files).
If you use machine code, PowerBuilder builds Dynamic Link Libraries (DLL
files).

When you distribute your application to users, you distribute
the executable, the dynamic libraries, and PowerBuilder runtime
DLLs. If you make revisions to the application, you must rebuild
and distribute all the dynamic libraries required by the executable.

For more information about deployment, see Application
Techniques

.

Dynamic library names

PowerBuilder dynamic libraries are given the name of the PBL
with the extension .pbd. For example, the Pcode library built from
test.pbl is named test.pbd.

Machine-code dynamic libraries are given the extension .dll.
For example, the machine-code library built from test.pbl is named
test.dll.

Reducing the size of dynamic libraries

When PowerBuilder builds a dynamic library, it copies the
compiled versions of all objects
from the source
library (PBL file) into the dynamic library. The easiest way to
specify source libraries is to simply use your standard PowerBuilder
libraries as source libraries.

However, then your dynamic libraries might be larger than
they need to be because they include all objects from the source
library, not just the ones used in your application. You may want
to create a PowerBuilder library that contains only the objects
that you want to be in a dynamic library.

proc.gif To create the source library:

  1. In the Library painter, place in one standard
    PowerBuilder library (a PBL file) all the objects that you want
    in the dynamic library.

    If you need to create a new library, select Entry>Library>Create
    from the menu bar, then drag or move the objects into the new library.

  2. Make sure the application’s library search
    path includes the new library.

note.gif Multiple dynamic libraries You can use as many dynamic libraries as you want in an application.
Just create a source library (PBL file) for each of them.

Specifying the dynamic libraries in your project

When you define your project, you tell PowerBuilder which
of the libraries in the application’s library search path
will be dynamic by checking the PBD or DLL checkbox next to the
library name in the Project painter.

Including
additional resources for a dynamic library

When building a dynamic library, PowerBuilder does not inspect
the objects; it simply copies the compiled form of the objects into
the dynamic library. Therefore, if any of the objects in the library
use resources (pictures, icons, and pointers)–either
specified in a painter or assigned dynamically in a script

–and
you don’t want to provide these resources separately, you
must list the resources in a PowerBuilder resource (PBR) file. Doing
so enables PowerBuilder to include the resources in the dynamic
library when it builds it.

proc.gif To reference additional resources:

  1. List the resources in a PBR file, as described
    in “Using PowerBuilder
    resource files”
    .

  2. Use the Resource File Name box in the Project
    painter workspace to reference the PBR file in the dynamic library.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x