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

PBORCA_LibraryDirectory – PB Docs 2017 – PowerBuilder Library

PBORCA_LibraryDirectory – PB Docs 2017

PBORCA_LibraryDirectory

Description

Reports information about the directory of a PowerBuilder library,
including the list of objects in the directory.

Syntax

Argument

Description

hORCASession

Handle to previously established ORCA
session.

lpszLibName

Pointer to a string whose value is the file name of
the library for which you want directory
information.

lpszLibComments

Pointer to a buffer in which ORCA will put comments
stored with the library.

iCmntsBuffLen

Length of the buffer (specified in TCHARs) pointed to
by lpszLibComments. The recommended length is PBORCA_MAXCOMMENTS +
1.

pListProc

Pointer to the PBORCA_LibraryDirectory callback
function. The callback function is called for each entry in the
library.

The information ORCA passes to the callback
function is entry name, comments, size of entry, and modification
time, stored in a structure of type
PBORCA_DIRENTRY.

pUserData

Pointer to user data to be passed to the
PBORCA_LibraryDirectory callback function.

The user
data typically includes the buffer or a pointer to the buffer in
which the callback function formats the directory information as
well as information about the size of the buffer.

Return value

INT. Typical return codes are:

Return code

Description

0       PBORCA_OK

Operation successful

-1      PBORCA_INVALIDPARMS

Invalid parameter list

-4      PBORCA_BADLIBRARY

Bad library name

-7      PBORCA_LIBIOERROR

Library I/O error

Usage

You do not need to set the library list or current application
before calling this function.

Comments for the library

PBORCA_LibraryDirectory puts the library comments in the string
pointed to by lpszLibComments. The callback function can store comments
for individual objects in the UserData buffer.

Information about library entries

The information you get back about the individual entries in the
library depends on the processing you provide in the callback function.
ORCA passes information to the callback function about a library entry in
the structure PBORCA_DIRENTRY. The callback function can examine that
structure and store any information it wants in the buffer pointed to by
pUserData.

When you call PBORCA_LibraryDirectory, you do not know how many
entries there are in the library. There are two approaches you can
take:

  • Allocate a reasonably sized block of memory and reallocate the
    buffer if it overflows (illustrated in About ORCA callback
    functions
    ).

  • Let lpUserDataBuffer point to the head of a linked list. For
    each PBORCA_DIRENTRY returned, dynamically allocate a new list entry
    to capture the required information (illustrated in the example that
    follows).

Examples

This example defines a linked list header:

Each invocation of the DirectoryProc callback function allocates a
new linked list entry, defined as follows:

In these examples, session information is saved in the data
structure ORCA_Info, shown in About the examples.

See also

PBORCA_LibraryEntryInformation


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