PBORCA_CompileEntryRegenerate
Description
Compiles an object in a PowerBuilder library.
Syntax
|
1 2 3 4 5 6 |
INT PBORCA_CompileEntryRegenerate ( PBORCA hORCASession, LPTSTR lpszLibraryName, LPTSTR lpszEntryName, PBORCA_TYPE otEntryType, PBORCA_ERRPROC pCompErrorProc, LPVOID pUserData ); |
|
Argument |
Description |
|---|---|
|
hORCASession |
Handle to previously established ORCA |
|
lpszLibraryName |
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 |
|
pCompErrorProc |
Pointer to the PBORCA_CompileEntryRegenerate callback The information ORCA If you don’t want to use |
|
pUserData |
Pointer to user data to be passed to the The If |
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 |
|
-5 PBORCA_LIBLISTNOTSET |
Library list not set |
|
-6 PBORCA_LIBNOTINLIST |
Library not in library list |
|
-7 PBORCA_LIBIOERROR |
Library I/O error |
|
-11 PBORCA_COMPERROR |
Compile error |
Usage
You must set the library list and current Application object before
calling this function.
When errors occur
In order to fix errors that occur during the regeneration, you need
to export the source code, fix the errors, and import the object,
repeating the process until it compiles correctly.
Sometimes you can open objects with minor errors in a PowerBuilder
painter and fix them, but an object with major errors must be exported and
fixed.
For information about callback processing for errors, see PBORCA_CompileEntryImportList.
Examples
This example compiles a DataWindow called d_labels in the library
DWOBJECTS.PBL.
Each time an error occurs, PBORCA_CompileEntryRegenerate calls the
callback CompileEntryErrors. In the code you write for CompileEntryErrors,
you store the error messages in the buffer pointed to by lpUserData. In
the example, the lpUserData buffer has already been set up:
|
1 2 3 4 5 6 7 8 |
PBORCA fpError; int nReturnCode; fpError = (PBORCA_ERRPROC) ErrorProc; nReturnCode = PBORCA_CompileEntryRegenerate( lpORCA_Info->hORCASession, _TEXT("c:\app\dwobjects.pbl"), _TEXT("d_labels"), PBORCA_DATAWINDOW, fpError, lpUserData ); |
In these examples, session information is saved in the data
structure ORCA_Info, shown in About the examples.
See also