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_CompileEntryImport – PB Docs 2022 – PowerBuilder Library

PBORCA_CompileEntryImport – PB Docs 2022

PBORCA_CompileEntryImport

Description

Imports the source code for a PowerBuilder object into a library and
compiles it.

Syntax

Argument

Description

hORCASession

Handle to previously established ORCA
session.

lpszLibraryName

Pointer to a string whose value is the file name of
the library into which you want to import the
object.

lpszEntryName

Pointer to a string whose value is the name of the
object being imported.

otEntryType

A value of the PBORCA_TYPE enumerated data type
specifying the object type of the entry being imported. Values
are:

PBORCA_APPLICATION

PBORCA_BINARY

PBORCA_DATAWINDOW

PBORCA_FUNCTION

PBORCA_MENU

PBORCA_PIPELINE

PBORCA_PROJECT

PBORCA_PROXYOBJECT

PBORCA_QUERY

PBORCA_STRUCTURE

PBORCA_USEROBJECT

PBORCA_WINDOW

lpszComments

Pointer to a string whose value is the comments you
are providing for the object.

lpszEntrySyntax

Pointer to a buffer whose value is source code for
the object to be imported. If an export header exists in the
source code it is ignored. The source encoding for lpszEntrySyntax
is specified by the eImportEncoding property in the
PBORCA_CONFIG_SESSION structure.

lEntrySyntaxBuffSize

Length of the lpszEntrySyntax buffer. This length is
specified in bytes regardless of the source
encoding.

pCompErrorProc

Pointer to the PBORCA_CompileEntryImport callback
function. The callback function is called for each error that
occurs as the imported object is compiled.

The
information ORCA passes to the callback function is error level,
message number, message text, line number, and column number,
stored in a structure of type PBORCA_COMPERR. The object name and
script name are part of the message text.

If you don’t
want to use a callback function, set pCompErrorProc to
0.

pUserData

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

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

If you
are not using a callback function, set pUserData to
0.

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, library not found, or object could
not be saved in the library

-6 PBORCA_LIBNOTINLIST

Library not in list

-8 PBORCA_COMPERROR

Compile error

-9 PBORCA_INVALIDNAME

Name does not follow PowerBuilder naming
rules

-13 PBORCA_CURRAPPLNOTSET

The current application has not been
set

Usage

You must set the library list and current Application object before
calling this function.

PowerBuilder

In PowerBuilder 10 and higher, you must specify the source
encoding for the objects to be imported. You do this by setting the
eImportEncoding property in the PBORCA_CONFIG_SESSION structure and
calling PBORCA_ConfigureSession. For ANSI clients the default source
encoding is ANSI/DBCS; for Unicode clients the default source encoding
is Unicode.

Importing objects with embedded binary information

Two separate calls to PBORCA_CompileEntryImport are required to
import objects containing embedded binary data such as OLE objects. The
first call imports the source component. The second call imports the
binary component using an otEntryType argument set to PBORCA_BINARY and an
lpszEntrySyntax argument pointing to the start of the binary header
record.

When errors occur

When errors occur during importing, the object is brought into the
library but might need editing. An object with minor errors can be opened
in its painter for editing. If the errors are severe enough, the object
can fail to open in the painter and you will have to export the object,
fix the source code, and import it again. If errors are due to the order
in which the objects are compiled, you can call the
PBORCA_ApplicationRebuild function after all the objects are
imported.

Caution

When you import an entry with the same name as an existing entry,
the old entry is deleted before the import takes place. If an import
fails, the old object will already be deleted.

For information about callback processing for errors, see PBORCA_CompileEntryImportList.

Examples

This example imports a DataWindow called d_labels into the library
DWOBJECTS.PBL. The source code is stored in a buffer called
szEntrySource.

Each time an error occurs, PBORCA_CompileEntryImport calls the
callback CompileEntryErrors. In the code you write for CompileEntryErrors,
you store the error messages in the buffer pointed to by
lpUserData:

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

This example reads a source file, determines the encoding format of
the source file, and imports it into a PBL. If the file contains an
embedded binary object, this is also imported using a second call to
PBORCA_CompileEntryImport.

See also

PBORCA_LibraryEntryExport

PBORCA_CompileEntryImportList

PBORCA_CompileEntryRegenerate

PBORCA_ApplicationRebuild


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