232 lines
6.4 KiB
HTML
232 lines
6.4 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
|
|
<title>Qp2dlopen()--Dynamically Load an i5/OS PASE Module</title>
|
|
<!-- Begin Header Records -->
|
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|
<!-- US Government Users Restricted Rights -->
|
|
<!-- Use, duplication or disclosure restricted by -->
|
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|
<!-- Change History: -->
|
|
<!-- YYMMDD USERID Change description -->
|
|
<!-- Edited by Kersten Jan 02 -->
|
|
<!-- Created by V2DCIJB on 23 Nov 1999 -->
|
|
<!--End Header Records -->
|
|
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
|
</head>
|
|
<body>
|
|
<a name="Top_Of_Page"></a>
|
|
<!-- Java sync-link -->
|
|
<script type="text/javascript" language="Javascript" src="../rzahg/synch.js">
|
|
</script>
|
|
|
|
<h2>Qp2dlopen()--Dynamically Load an i5/OS PASE Module</h2>
|
|
|
|
<div class="box" style="width: 70%;">
|
|
<br>
|
|
Syntax
|
|
|
|
<pre>
|
|
#include <qp2user.h>
|
|
|
|
QP2_ptr64_t Qp2dlopen(const char *path,
|
|
int flags,
|
|
int ccsid);
|
|
</pre>
|
|
|
|
<br>
|
|
Service Program Name: QP2USER<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
Default Public Authority: *USE<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
Threadsafe: Yes<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
</div>
|
|
|
|
<p>Qp2dlopen() dynamically loads an i5/OS PASE module by calling the i5/OS
|
|
PASE dlopen() function.</p>
|
|
|
|
<br>
|
|
|
|
|
|
<h3>Parameters</h3>
|
|
|
|
<dl>
|
|
<dt><strong>path</strong></dt>
|
|
|
|
<dd>(Input) A pointer to a null-terminated string that identifies the stream
|
|
file in the Integrated File System that contains the i5/OS PASE module to
|
|
load. This API copies the input path string and converts the copy from the
|
|
CCSID specified by the <strong>ccsid</strong> argument to the current i5/OS
|
|
PASE CCSID (required by the i5/OS PASE dlopen function).
|
|
|
|
<p>If the input path pointer is null, the function result is a value for the
|
|
main application that lets you find symbols in the i5/OS PASE process global
|
|
name space, which includes all symbols exported by the i5/OS PASE program and
|
|
shared executables except those loaded by i5/OS PASE dlopen using option
|
|
RTLD_LOCAL.</p>
|
|
|
|
<br>
|
|
<br>
|
|
</dd>
|
|
|
|
<dt><strong>flags</strong></dt>
|
|
|
|
<dd>(Input) Flags passed to the i5/OS PASE dlopen function to control its
|
|
behavior. These constants, declared in qp2user.h, match constants in AIX header
|
|
dlfcn.h (without the leading prefix, QP2_) and can be <strong>OR</strong>ed
|
|
together for the flags argument:<br>
|
|
<br>
|
|
<table cellpadding="5">
|
|
<!-- cols="25 75" -->
|
|
<tr>
|
|
<td align="left" valign="top"><em>QP2_RTLD_NOW (0x00000002)</em></td>
|
|
<td align="left" valign="top">Load all dependents of the module being loaded
|
|
and resolve all symbols. Either QP2_RTLD_NOW or QP2_RTLD_LAZY must be
|
|
specified.<br>
|
|
<br>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top"><em>QP2_RTLD_LAZY (0x00000004)</em></td>
|
|
<td align="left" valign="top">Allow the system to defer loading dependent
|
|
modules. Either QP2_RTLD_NOW or QP2_RTLD_LAZY must be specified.<br>
|
|
<br>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top"><em>QP2_RTLD_GLOBAL (0x00010000)</em></td>
|
|
<td align="left" valign="top">Load the module into the global name space.
|
|
Exported symbols in the module will be visible in the main application and will
|
|
be used when resolving symbols used by other i5/OS PASE dlopen calls.<br>
|
|
<br>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top"><em>QP2_RTLD_LOCAL (0x00080000)</em></td>
|
|
<td align="left" valign="top">Load the module into a local name space. This
|
|
option is the default when neither QP2_RTLD_GLOBAL nor QP2_RTLD_LOCAL is
|
|
specified. It prevents symbols in the module being loaded from being used when
|
|
resolving symbols used by other dlopen calls.<br>
|
|
<br>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top"><em>QP2_RTLD_MEMBER (0x00040000)</em></td>
|
|
<td align="left" valign="top">Specifies that the <em>path</em> argument string
|
|
may contain the name of a member in an archive (shared library).<br>
|
|
<br>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top" nowrap><em>QP2_RTLD_NOAUTODEFER
|
|
(0x00020000)</em></td>
|
|
<td align="left" valign="top">Prevent deferred imports in the module being
|
|
loaded from being automatically resolved by subsequent loads.</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
<br>
|
|
</dd>
|
|
|
|
<dt><strong>ccsid</strong></dt>
|
|
|
|
<dd>(Input) Specifies the CCSID for the input <em>path</em> argument string.
|
|
Zero means the path is in the (EBCDIC) job default CCSID.</dd>
|
|
</dl>
|
|
|
|
<br>
|
|
|
|
|
|
<h3>Authorities</h3>
|
|
|
|
<table border cellpadding="5">
|
|
<!-- cols="80 20" -->
|
|
<tr>
|
|
<th align="left" valign="bottom">Object Referred to</th>
|
|
<th align="center" valign="bottom">Authority<br>
|
|
Required</th>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">Each directory in the path to the i5/OS PASE
|
|
module</td>
|
|
<td align="center" valign="top">*X</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">i5/OS PASE module</td>
|
|
<td align="center" valign="top">*R</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
|
|
|
|
<h3>Return Value</h3>
|
|
|
|
<p>Sucessful completion returns a non-zero function result that can be used to
|
|
call APIs Qp2dlsym and Qp2dlclose (and also i5/OS PASE functions dlsym and
|
|
dlclose). Resources allocated for the function result are not freed until the
|
|
i5/OS PASE program ends or the value is passed to API Qp2dlclose (or i5/OS
|
|
PASE dlclose).</p>
|
|
|
|
<p>A zero function result indicates an error. The caller can check ILE
|
|
<strong>errno</strong> or i5/OS PASE <strong>errno</strong> (if ILE
|
|
<strong>errno</strong> is zero), or call the Qp2dlerror API for more
|
|
information about the error.</p>
|
|
|
|
<br>
|
|
|
|
|
|
<h3>Related Information</h3>
|
|
|
|
<ul>
|
|
<li><a href="http://www.ibm.com/servers/aix/library/" target="blank">i5/OS
|
|
PASE dlopen()--See AIX documentation</a><img src="www.gif" alt="Link outside Information Center"><br>
|
|
<br>
|
|
</li>
|
|
|
|
<li><a href="qp2dlerror.htm">Qp2dlerror()--Retrieve i5/OS PASE Dynamic Load
|
|
Error Information</a><br>
|
|
<br>
|
|
</li>
|
|
|
|
<li><a href="qp2errnop.htm">Qp2errnop()--Retrieve i5/OS PASE errno
|
|
Pointer</a><br>
|
|
<br>
|
|
</li>
|
|
|
|
<li><a href="qp2runpase.htm">Qp2RunPase()--Run an i5/OS PASE Program</a></li>
|
|
</ul>
|
|
|
|
<br>
|
|
|
|
<hr>
|
|
API introduced: V5R2
|
|
|
|
<hr>
|
|
<center>
|
|
<table cellpadding="2" cellspacing="2">
|
|
<tr align="center">
|
|
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> | <a href=
|
|
"pase1.htm">i5/OS PASE APIs</a> | <a href="aplist.htm">APIs by category</a>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</center>
|
|
</body>
|
|
</html>
|
|
|