1<?xml version="1.0" encoding="UTF-8" standalone="no"?> 2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 3<html xmlns="http://www.w3.org/1999/xhtml"> 4 <head> 5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 6 <title>DB_MPOOLFILE->set_pgcookie()</title> 7 <link rel="stylesheet" href="apiReference.css" type="text/css" /> 8 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /> 9 <link rel="start" href="index.html" title="Berkeley DB C API Reference" /> 10 <link rel="up" href="memp.html" title="Chapter��8.�� The DB_MPOOLFILE Handle" /> 11 <link rel="prev" href="mempset_maxsize.html" title="DB_MPOOLFILE->set_maxsize()" /> 12 <link rel="next" href="mempset_priority.html" title="DB_MPOOLFILE->set_priority()" /> 13 </head> 14 <body> 15 <div class="navheader"> 16 <table width="100%" summary="Navigation header"> 17 <tr> 18 <th colspan="3" align="center">DB_MPOOLFILE->set_pgcookie()</th> 19 </tr> 20 <tr> 21 <td width="20%" align="left"><a accesskey="p" href="mempset_maxsize.html">Prev</a>��</td> 22 <th width="60%" align="center">Chapter��8.�� 23 The DB_MPOOLFILE Handle 24 </th> 25 <td width="20%" align="right">��<a accesskey="n" href="mempset_priority.html">Next</a></td> 26 </tr> 27 </table> 28 <hr /> 29 </div> 30 <div class="sect1" lang="en" xml:lang="en"> 31 <div class="titlepage"> 32 <div> 33 <div> 34 <h2 class="title" style="clear: both"><a id="mempset_pgcookie"></a>DB_MPOOLFILE->set_pgcookie()</h2> 35 </div> 36 </div> 37 </div> 38 <pre class="programlisting">#include <db.h> 39 40int 41DB_MPOOLFILE->set_pgcookie(DB_MPOOLFILE *mpf, DBT *pgcookie); </pre> 42 <p> 43 The <code class="methodname">DB_MPOOLFILE->set_pgcookie()</code> method specifies a byte string that 44 is provided to the functions registered to do input or output 45 processing of the file's pages as they are read from or written to, 46 the backing filesystem store. (See the 47 <a class="xref" href="mempregister.html" title="DB_ENV->memp_register()">DB_ENV->memp_register()</a> 48 documentation for more information.) 49 </p> 50 <p> 51 The <code class="methodname">DB_MPOOLFILE->set_pgcookie()</code> method configures a file in the 52 cache, not only operations performed using the specified 53 <a class="link" href="memp.html" title="Chapter��8.�� The DB_MPOOLFILE Handle">DB_MPOOLFILE</a> handle. 54 </p> 55 <p> 56 The <code class="methodname">DB_MPOOLFILE->set_pgcookie()</code> method may not be called after the 57 <a class="xref" href="mempfopen.html" title="DB_MPOOLFILE->open()">DB_MPOOLFILE->open()</a> 58 method is called. If the file is already open in the cache when 59 <a class="xref" href="mempfopen.html" title="DB_MPOOLFILE->open()">DB_MPOOLFILE->open()</a> is 60 called, the information specified to <code class="methodname">DB_MPOOLFILE->set_pgcookie()</code> 61 will replace the existing information. 62 </p> 63 <p> 64 The <code class="methodname">DB_MPOOLFILE->set_pgcookie()</code> <span> 65 <span> 66 method returns a non-zero error value on failure and 0 on success. 67 </span> 68 69 </span> 70 </p> 71 <div class="sect2" lang="en" xml:lang="en"> 72 <div class="titlepage"> 73 <div> 74 <div> 75 <h3 class="title"><a id="id1692894"></a>Parameters</h3> 76 </div> 77 </div> 78 </div> 79 <div class="sect3" lang="en" xml:lang="en"> 80 <div class="titlepage"> 81 <div> 82 <div> 83 <h4 class="title"><a id="id1692794"></a>pgcookie</h4> 84 </div> 85 </div> 86 </div> 87 <p> 88 The <span class="bold"><strong>pgcookie</strong></span> parameter is a byte 89 string provided to the functions registered to do input or output 90 processing of the file's pages. 91 </p> 92 </div> 93 </div> 94 <div class="sect2" lang="en" xml:lang="en"> 95 <div class="titlepage"> 96 <div> 97 <div> 98 <h3 class="title"><a id="id1693092"></a>Class</h3> 99 </div> 100 </div> 101 </div> 102 <p> 103 <a class="link" href="env.html" title="Chapter��5.�� The DB_ENV Handle">DB_ENV</a>, <a class="link" href="memp.html" title="Chapter��8.�� The DB_MPOOLFILE Handle">DB_MPOOLFILE</a> 104 </p> 105 </div> 106 <div class="sect2" lang="en" xml:lang="en"> 107 <div class="titlepage"> 108 <div> 109 <div> 110 <h3 class="title"><a id="id1692902"></a>See Also</h3> 111 </div> 112 </div> 113 </div> 114 <p> 115 <a class="xref" href="memp.html#memplist" title="Memory Pools and Related Methods">Memory Pools and Related Methods</a> 116 </p> 117 </div> 118 </div> 119 <div class="navfooter"> 120 <hr /> 121 <table width="100%" summary="Navigation footer"> 122 <tr> 123 <td width="40%" align="left"><a accesskey="p" href="mempset_maxsize.html">Prev</a>��</td> 124 <td width="20%" align="center"> 125 <a accesskey="u" href="memp.html">Up</a> 126 </td> 127 <td width="40%" align="right">��<a accesskey="n" href="mempset_priority.html">Next</a></td> 128 </tr> 129 <tr> 130 <td width="40%" align="left" valign="top">DB_MPOOLFILE->set_maxsize()��</td> 131 <td width="20%" align="center"> 132 <a accesskey="h" href="index.html">Home</a> 133 </td> 134 <td width="40%" align="right" valign="top">��DB_MPOOLFILE->set_priority()</td> 135 </tr> 136 </table> 137 </div> 138 </body> 139</html> 140