PBORCA_LibraryEntryCopy
Description
Copies a PowerBuilder library entry from one library to
another.
Syntax
1 2 3 4 5 |
INT PBORCA_LibraryEntryCopy ( HPBORCA hORCASession, LPTSTR lpszSourceLibName, LPTSTR lpszDestLibName, LPTSTR lpszEntryName, PBORCA_TYPE otEntryType ); |
Argument |
Description |
---|---|
hORCASession |
Handle to previously established ORCA |
lpszSourceLibName |
Pointer to a string whose value is the file name of |
lpszDestLibName |
Pointer to a string whose value is the file name of |
lpszEntryName |
Pointer to a string whose value is the name of the |
otEntryType |
A value of the PBORCA_TYPE enumerated data type PBORCA_APPLICATION PBORCA_DATAWINDOW PBORCA_FUNCTION PBORCA_MENU PBORCA_QUERY PBORCA_STRUCTURE PBORCA_USEROBJECT PBORCA_WINDOW PBORCA_PIPELINE PBORCA_PROJECT PBORCA_PROXYOBJECT |
Return value
INT. Typical return codes are:
Return code |
Description |
---|---|
0 PBORCA_OK |
Operation successful |
-1 PBORCA_INVALIDPARMS |
Invalid parameter list |
-3 PBORCA_OBJNOTFOUND |
Object not found |
-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.
Unlike PBORCA_CompileEntryImport, which requires two separate API
calls, PBORCA_LibraryEntryCopy automatically copies the source component
and then copies the binary component of an object if it is present.
Examples
This example copies a DataWindow named d_labels from the library
SOURCE.PBL to DESTIN.PBL:
1 2 3 4 5 |
lpORCA_Info->lReturnCode = PBORCA_LibraryEntryCopy( lpORCA_Info->hORCASession, _TEXT("c:\app\source.pbl"), _TEXT("c:\app\destin.pbl"), _TEXT("d_labels"), PBORCA_DATAWINDOW); |
This example assumes that the pointers for lpszSourceLibraryName,
lpszDestinationLibraryName, and lpszEntryName point to valid library and
object names and that otEntryType is a valid object type:
1 2 3 4 5 |
lpORCA_Info->lReturnCode = PBORCA_LibraryEntryCopy( lpORCA_Info->hORCASession, lpszSourceLibraryName, lpszDestinationLibraryName, lpszEntryName, otEntryType ); |
See also