Sophie

Sophie

distrib > * > 2010.0 > * > by-pkgid > 943b1476818e5ec34d7058ed3b879448 > files > 88

libmapi-devel-0.8.2-1.1481.3mdv2010.0.i586.rpm

<html>
  <head>
    <title>MAPIClientLibraries 0.8 API Documentation</title>
    <link href="doxygen.css" rel="stylesheet" type="text/css"/>
    <link href="apidocs.css" rel="stylesheet" type="text/css"/>
  </head>
  <body>
    <div id="website">
    <div class="header"></div>
      <div id="middle_side">
	<div id="right_side_home">
<!-- Generated by Doxygen 1.5.9 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>libmapi/IProfAdmin.c File Reference</h1>MAPI Profiles interface.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;libmapi/libmapi.h&gt;</code><br>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IProfAdmin_8c.html#8f6e0d9d7aecbdf78657eaebfa8d31d3">ChangeProfilePassword</a> (const char *profile, const char *old_password, const char *password)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IProfAdmin_8c.html#12b1fdb6b5964bd9fd24286e9595017a">CreateProfile</a> (const char *profile, const char *username, const char *password, uint32_t flag)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IProfAdmin_8c.html#46de05800a82185a48f4b4ba47f2b782">CreateProfileStore</a> (const char *profiledb, const char *ldif_path)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IProfAdmin_8c.html#3acba1e05a43df2b64b4a82ec2798082">DeleteProfile</a> (const char *profile)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IProfAdmin_8c.html#9a97b02cad858552d6a24c76cccd49a8">FindProfileAttr</a> (struct mapi_profile *profile, const char *attribute, const char *value)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IProfAdmin_8c.html#3e503caa812de7ec2d53f03f53ee4ca1">GetDefaultProfile</a> (char **profname)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IProfAdmin_8c.html#2fa9b75dcb9dc31e38e5ad4c3fdf63d0">GetProfileAttr</a> (struct mapi_profile *profile, const char *attribute, unsigned int *count, char ***value)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IProfAdmin_8c.html#80fc75b95aea0e94972f8c780a84565b">GetProfileTable</a> (struct SRowSet *proftable)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IProfAdmin_8c.html#f583325ef0be0c104f8a60b3065d5753">LoadProfile</a> (struct mapi_profile *profile)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IProfAdmin_8c.html#a0451fe01688a57e34d572993732aefe">mapi_profile_add_string_attr</a> (const char *profile, const char *attr, const char *value)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IProfAdmin_8c.html#c87e45d36e8bc277517630659b568123">mapi_profile_delete_string_attr</a> (const char *profname, const char *attr, const char *value)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">_PUBLIC_ const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IProfAdmin_8c.html#84ec710b1bf13ea0378ca9e805d49ad9">mapi_profile_get_ldif_path</a> (void)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IProfAdmin_8c.html#df945a7a72431c6f603ec0cdf5eff8ee">mapi_profile_modify_string_attr</a> (const char *profname, const char *attr, const char *value)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IProfAdmin_8c.html#9f57e997c5abac3ba42a5335cf7221f0">OpenProfile</a> (struct mapi_profile *profile, const char *profname, const char *password)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IProfAdmin_8c.html#714fa290608519268427cfda413bb86a">ProcessNetworkProfile</a> (struct mapi_session *session, const char *username, mapi_profile_callback_t callback, const void *private_data)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IProfAdmin_8c.html#bd85338f723b5e7fc4bdd040fa4b774b">RenameProfile</a> (const char *old_profile, const char *profile)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IProfAdmin_8c.html#72afe789058f7e6b3be9e7fb537d5445">SetDefaultProfile</a> (const char *profname)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IProfAdmin_8c.html#6b10af8a00a2f32a9d840a3a2e9ce4db">ShutDown</a> (struct mapi_profile *profile)</td></tr>

</table>
<hr><h2>Detailed Description</h2>
MAPI Profiles interface. 
<p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="8f6e0d9d7aecbdf78657eaebfa8d31d3"></a><!-- doxytag: member="IProfAdmin.c::ChangeProfilePassword" ref="8f6e0d9d7aecbdf78657eaebfa8d31d3" args="(const char *profile, const char *old_password, const char *password)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS ChangeProfilePassword           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>profile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>old_password</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>password</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Change the profile password of an existing MAPI profile<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>profile</em>&nbsp;</td><td>the name of the profile to have its password changed </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>old_password</em>&nbsp;</td><td>the old password </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>password</em>&nbsp;</td><td>the new password</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise MAPI error.</dd></dl>
<dl class="note" compact><dt><b>Note:</b></dt><dd>Developers may also call <a class="el" href="IUnknown_8c.html#8237c7fc76377cb07f3f55920d6f20de">GetLastError()</a> to retrieve the last MAPI error code. Possible MAPI error codes are:<ul>
<li>MAPI_E_INVALID_PARAMETER: One of the following argument was not set: profile, old_password, password</li><li>MAPI_E_NOT_FOUND: The profile was not found in the database</li></ul>
</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="IProfAdmin_8c.html#12b1fdb6b5964bd9fd24286e9595017a">CreateProfile</a>, <a class="el" href="IProfAdmin_8c.html#80fc75b95aea0e94972f8c780a84565b">GetProfileTable</a>, <a class="el" href="IProfAdmin_8c.html#2fa9b75dcb9dc31e38e5ad4c3fdf63d0">GetProfileAttr</a>, <a class="el" href="IProfAdmin_8c.html#714fa290608519268427cfda413bb86a">ProcessNetworkProfile</a>, <a class="el" href="IUnknown_8c.html#8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> </dd></dl>

<p>References <a class="el" href="IProfAdmin_8c_source.html#l00342">mapi_profile_modify_string_attr()</a>.</p>

</div>
</div><p>
<a class="anchor" name="12b1fdb6b5964bd9fd24286e9595017a"></a><!-- doxytag: member="IProfAdmin.c::CreateProfile" ref="12b1fdb6b5964bd9fd24286e9595017a" args="(const char *profile, const char *username, const char *password, uint32_t flag)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS CreateProfile           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>profile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>username</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>password</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&nbsp;</td>
          <td class="paramname"> <em>flag</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Create a profile in the MAPI profile database<p>
This function creates a profile named <em>profile</em> in the MAPI profile database and sets the specified username in that profile.<p>
This function may also set the password. If the flags include OC_PROFILE_NOPASSWORD then the password will not be set. Otherwise, the specified password argument will also be saved to the profile.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>profile</em>&nbsp;</td><td>the name of the profile </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>username</em>&nbsp;</td><td>the username of the profile </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>password</em>&nbsp;</td><td>the password for the profile (if used) </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>flag</em>&nbsp;</td><td>the union of the flags.</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise MAPI error.</dd></dl>
<dl class="note" compact><dt><b>Note:</b></dt><dd>Developers may also call <a class="el" href="IUnknown_8c.html#8237c7fc76377cb07f3f55920d6f20de">GetLastError()</a> to retrieve the last MAPI error code. Possible MAPI error codes are:<ul>
<li>MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized. The MAPI subsystem must be initialized (using MAPIInitialize) prior to creating a profile.</li><li>MAPI_E_NOT_ENOUGH_RESOURCES: MAPI subsystem failed to allocate the necessary resources to operate properly</li><li>MAPI_E_NO_SUPPORT: An error was encountered while setting the MAPI profile attributes in the database.</li></ul>
<p>
profile information (including the password, if saved to the profile) is stored unencrypted.</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="IProfAdmin_8c.html#3acba1e05a43df2b64b4a82ec2798082">DeleteProfile</a>, <a class="el" href="IProfAdmin_8c.html#72afe789058f7e6b3be9e7fb537d5445">SetDefaultProfile</a>, <a class="el" href="IProfAdmin_8c.html#3e503caa812de7ec2d53f03f53ee4ca1">GetDefaultProfile</a>, <a class="el" href="IProfAdmin_8c.html#8f6e0d9d7aecbdf78657eaebfa8d31d3">ChangeProfilePassword</a>, <a class="el" href="IProfAdmin_8c.html#80fc75b95aea0e94972f8c780a84565b">GetProfileTable</a>, <a class="el" href="IProfAdmin_8c.html#714fa290608519268427cfda413bb86a">ProcessNetworkProfile</a>, <a class="el" href="IUnknown_8c.html#8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> </dd></dl>

<p>References <a class="el" href="IProfAdmin_8c_source.html#l00287">mapi_profile_add_string_attr()</a>.</p>

</div>
</div><p>
<a class="anchor" name="46de05800a82185a48f4b4ba47f2b782"></a><!-- doxytag: member="IProfAdmin.c::CreateProfileStore" ref="46de05800a82185a48f4b4ba47f2b782" args="(const char *profiledb, const char *ldif_path)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS CreateProfileStore           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>profiledb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>ldif_path</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Create a profile database<p>
This function creates a new profile database, including doing an initial setup.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>profiledb</em>&nbsp;</td><td>the absolute path to the profile database intended to be created </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>ldif_path</em>&nbsp;</td><td>the absolute path to the LDIF information to use for initial setup.</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise MAPI error.</dd></dl>
<dl class="note" compact><dt><b>Note:</b></dt><dd>Developers may also call <a class="el" href="IUnknown_8c.html#8237c7fc76377cb07f3f55920d6f20de">GetLastError()</a> to retrieve the last MAPI error code. Possible MAPI error codes are:<ul>
<li>MAPI_E_CALL_FAILED: profiledb or ldif_path is not set</li><li>MAPI_E_NOT_ENOUGH_RESOURCES: ldb subsystem initialization failed</li><li>MAPI_E_NO_ACCESS: connection or ldif add failed</li></ul>
</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="IUnknown_8c.html#8237c7fc76377cb07f3f55920d6f20de">GetLastError</a>, <a class="el" href="IProfAdmin_8c.html#84ec710b1bf13ea0378ca9e805d49ad9">mapi_profile_get_ldif_path</a> </dd></dl>

</div>
</div><p>
<a class="anchor" name="3acba1e05a43df2b64b4a82ec2798082"></a><!-- doxytag: member="IProfAdmin.c::DeleteProfile" ref="3acba1e05a43df2b64b4a82ec2798082" args="(const char *profile)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS DeleteProfile           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>profile</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Delete a profile from the MAPI profile database<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>profile</em>&nbsp;</td><td>the name of the profile to delete</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise MAPI error.</dd></dl>
<dl class="note" compact><dt><b>Note:</b></dt><dd>Developers may also call <a class="el" href="IUnknown_8c.html#8237c7fc76377cb07f3f55920d6f20de">GetLastError()</a> to retrieve the last MAPI error code. Possible MAPI error codes are:<ul>
<li>MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized. The MAPI subsystem must be initialized (using MAPIInitialize) prior to creating a profile.</li><li>MAPI_E_NOT_FOUND: The profile was not found in the database.</li></ul>
</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="IProfAdmin_8c.html#12b1fdb6b5964bd9fd24286e9595017a">CreateProfile</a>, <a class="el" href="IProfAdmin_8c.html#8f6e0d9d7aecbdf78657eaebfa8d31d3">ChangeProfilePassword</a>, <a class="el" href="IProfAdmin_8c.html#80fc75b95aea0e94972f8c780a84565b">GetProfileTable</a>, <a class="el" href="IProfAdmin_8c.html#2fa9b75dcb9dc31e38e5ad4c3fdf63d0">GetProfileAttr</a>, <a class="el" href="IProfAdmin_8c.html#714fa290608519268427cfda413bb86a">ProcessNetworkProfile</a>, <a class="el" href="IUnknown_8c.html#8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> </dd></dl>

</div>
</div><p>
<a class="anchor" name="9a97b02cad858552d6a24c76cccd49a8"></a><!-- doxytag: member="IProfAdmin.c::FindProfileAttr" ref="9a97b02cad858552d6a24c76cccd49a8" args="(struct mapi_profile *profile, const char *attribute, const char *value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS FindProfileAttr           </td>
          <td>(</td>
          <td class="paramtype">struct mapi_profile *&nbsp;</td>
          <td class="paramname"> <em>profile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>attribute</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>value</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Search the value of an attribute within a given profile 
</div>
</div><p>
<a class="anchor" name="3e503caa812de7ec2d53f03f53ee4ca1"></a><!-- doxytag: member="IProfAdmin.c::GetDefaultProfile" ref="3e503caa812de7ec2d53f03f53ee4ca1" args="(char **profname)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS GetDefaultProfile           </td>
          <td>(</td>
          <td class="paramtype">char **&nbsp;</td>
          <td class="paramname"> <em>profname</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the default profile from the database<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>profname</em>&nbsp;</td><td>the result of the function (name of the default profile)</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise MAPI error.</dd></dl>
<dl class="note" compact><dt><b>Note:</b></dt><dd>Developers may also call <a class="el" href="IUnknown_8c.html#8237c7fc76377cb07f3f55920d6f20de">GetLastError()</a> to retrieve the last MAPI error code. Possible MAPI error codes are:<ul>
<li>MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized</li><li>MAPI_E_NOT_FOUND: The profile was not found in the database</li></ul>
<p>
On success GetDefaultProfile profname string is allocated. It is up to the developer to free it when not needed anymore.</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="IProfAdmin_8c.html#72afe789058f7e6b3be9e7fb537d5445">SetDefaultProfile</a>, <a class="el" href="IProfAdmin_8c.html#80fc75b95aea0e94972f8c780a84565b">GetProfileTable</a>, <a class="el" href="IUnknown_8c.html#8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> </dd></dl>
<dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="fetchappointment_8c-example.html#a1">fetchappointment.c</a>, <a class="el" href="fetchmail_8c-example.html#a1">fetchmail.c</a>, and <a class="el" href="mapi__sample1_8c-example.html#a2">mapi_sample1.c</a>.</dl>
<p>References <a class="el" href="IProfAdmin_8c_source.html#l00989">GetProfileTable()</a>.</p>

</div>
</div><p>
<a class="anchor" name="2fa9b75dcb9dc31e38e5ad4c3fdf63d0"></a><!-- doxytag: member="IProfAdmin.c::GetProfileAttr" ref="2fa9b75dcb9dc31e38e5ad4c3fdf63d0" args="(struct mapi_profile *profile, const char *attribute, unsigned int *count, char ***value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS GetProfileAttr           </td>
          <td>(</td>
          <td class="paramtype">struct mapi_profile *&nbsp;</td>
          <td class="paramname"> <em>profile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>attribute</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int *&nbsp;</td>
          <td class="paramname"> <em>count</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char ***&nbsp;</td>
          <td class="paramname"> <em>value</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Retrieve attribute values from a profile<p>
This function retrieves all the attribute values from the given profile. The number of results is stored in <em>count</em> and values are stored in an allocated string array in the <em>value</em> parameter that needs to be free'd using <a class="el" href="IUnknown_8c.html#52246b3bbc755db550d9d13e772dd479">MAPIFreeBuffer()</a>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>profile</em>&nbsp;</td><td>the name of the profile to retrieve attributes from </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>attribute</em>&nbsp;</td><td>the attribute(s) to search for </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>count</em>&nbsp;</td><td>the number of results </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>the resulting values</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise MAPI error.</dd></dl>
<dl class="note" compact><dt><b>Note:</b></dt><dd>Developers may also call <a class="el" href="IUnknown_8c.html#8237c7fc76377cb07f3f55920d6f20de">GetLastError()</a> to retrieve the last MAPI error code. Possible MAPI error codes are:<ul>
<li>MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized</li><li>MAPI_E_INVALID_PARAMETER: Either profile or attribute was not set properly</li><li>MAPI_E_NOT_FOUND: The profile was not found in the database</li></ul>
</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="IProfAdmin_8c.html#72afe789058f7e6b3be9e7fb537d5445">SetDefaultProfile</a>, <a class="el" href="IProfAdmin_8c.html#3e503caa812de7ec2d53f03f53ee4ca1">GetDefaultProfile</a>, <a class="el" href="IUnknown_8c.html#52246b3bbc755db550d9d13e772dd479">MAPIFreeBuffer</a>, <a class="el" href="IProfAdmin_8c.html#80fc75b95aea0e94972f8c780a84565b">GetProfileTable</a>, <a class="el" href="IUnknown_8c.html#8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> </dd></dl>

</div>
</div><p>
<a class="anchor" name="80fc75b95aea0e94972f8c780a84565b"></a><!-- doxytag: member="IProfAdmin.c::GetProfileTable" ref="80fc75b95aea0e94972f8c780a84565b" args="(struct SRowSet *proftable)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS GetProfileTable           </td>
          <td>(</td>
          <td class="paramtype">struct SRowSet *&nbsp;</td>
          <td class="paramname"> <em>proftable</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Retrieve the profile table<p>
This function retrieves the profile table. Two fields are returned:<ul>
<li>PR_DISPLAY_NAME: The profile name stored as a UTF8 string</li><li>PR_DEFAULT_PROFILE: Whether the profile is the default one(1) or not(0), stored as an integer</li></ul>
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>proftable</em>&nbsp;</td><td>the result of the call</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise MAPI error.</dd></dl>
<dl class="note" compact><dt><b>Note:</b></dt><dd>Developers may also call <a class="el" href="IUnknown_8c.html#8237c7fc76377cb07f3f55920d6f20de">GetLastError()</a> to retrieve the last MAPI error code. Possible MAPI error codes are:<ul>
<li>MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized</li><li>MAPI_E_NOT_FOUND: The profile was not found in the database</li></ul>
</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="IProfAdmin_8c.html#72afe789058f7e6b3be9e7fb537d5445">SetDefaultProfile</a>, <a class="el" href="IUnknown_8c.html#8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> </dd></dl>

<p>Referenced by <a class="el" href="IProfAdmin_8c_source.html#l00941">GetDefaultProfile()</a>, and <a class="el" href="IProfAdmin_8c_source.html#l00814">RenameProfile()</a>.</p>

</div>
</div><p>
<a class="anchor" name="f583325ef0be0c104f8a60b3065d5753"></a><!-- doxytag: member="IProfAdmin.c::LoadProfile" ref="f583325ef0be0c104f8a60b3065d5753" args="(struct mapi_profile *profile)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS LoadProfile           </td>
          <td>(</td>
          <td class="paramtype">struct mapi_profile *&nbsp;</td>
          <td class="paramname"> <em>profile</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Load a MAPI Profile and sets its credentials<p>
This function loads a named MAPI profile and sets the MAPI session credentials.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise MAPI error.</dd></dl>
<dl class="note" compact><dt><b>Note:</b></dt><dd>Developers may also call <a class="el" href="IUnknown_8c.html#8237c7fc76377cb07f3f55920d6f20de">GetLastError()</a> to retrieve the last MAPI error code. Possible MAPI error codes are:<ul>
<li>MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized</li><li>MAPI_E_INVALID_PARAMETER: The profile parameter is not initialized</li><li>MAPI_E_NOT_ENOUGH_RESOURCES: MAPI subsystem failed to allocate the necessary resources to perform the operation</li></ul>
</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="IProfAdmin_8c.html#9f57e997c5abac3ba42a5335cf7221f0">OpenProfile</a>, <a class="el" href="IUnknown_8c.html#8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> </dd></dl>

<p>Referenced by <a class="el" href="cdo__mapi_8c_source.html#l00107">MapiLogonProvider()</a>.</p>

</div>
</div><p>
<a class="anchor" name="a0451fe01688a57e34d572993732aefe"></a><!-- doxytag: member="IProfAdmin.c::mapi_profile_add_string_attr" ref="a0451fe01688a57e34d572993732aefe" args="(const char *profile, const char *attr, const char *value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS mapi_profile_add_string_attr           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>profile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>attr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>value</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Add an attribute to the profile 
<p>Referenced by <a class="el" href="IProfAdmin_8c_source.html#l00712">CreateProfile()</a>, and <a class="el" href="IProfAdmin_8c_source.html#l01240">ProcessNetworkProfile()</a>.</p>

</div>
</div><p>
<a class="anchor" name="c87e45d36e8bc277517630659b568123"></a><!-- doxytag: member="IProfAdmin.c::mapi_profile_delete_string_attr" ref="c87e45d36e8bc277517630659b568123" args="(const char *profname, const char *attr, const char *value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS mapi_profile_delete_string_attr           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>profname</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>attr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>value</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Delete an attribute 
</div>
</div><p>
<a class="anchor" name="84ec710b1bf13ea0378ca9e805d49ad9"></a><!-- doxytag: member="IProfAdmin.c::mapi_profile_get_ldif_path" ref="84ec710b1bf13ea0378ca9e805d49ad9" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ const char* mapi_profile_get_ldif_path           </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get default ldif_path<p>
This function returns the path for the default LDIF files.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="IProfAdmin_8c.html#46de05800a82185a48f4b4ba47f2b782">CreateProfileStore</a> </dd></dl>

</div>
</div><p>
<a class="anchor" name="df945a7a72431c6f603ec0cdf5eff8ee"></a><!-- doxytag: member="IProfAdmin.c::mapi_profile_modify_string_attr" ref="df945a7a72431c6f603ec0cdf5eff8ee" args="(const char *profname, const char *attr, const char *value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS mapi_profile_modify_string_attr           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>profname</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>attr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>value</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Modify an attribute 
<p>Referenced by <a class="el" href="IProfAdmin_8c_source.html#l00785">ChangeProfilePassword()</a>, and <a class="el" href="IProfAdmin_8c_source.html#l00896">SetDefaultProfile()</a>.</p>

</div>
</div><p>
<a class="anchor" name="9f57e997c5abac3ba42a5335cf7221f0"></a><!-- doxytag: member="IProfAdmin.c::OpenProfile" ref="9f57e997c5abac3ba42a5335cf7221f0" args="(struct mapi_profile *profile, const char *profname, const char *password)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS OpenProfile           </td>
          <td>(</td>
          <td class="paramtype">struct mapi_profile *&nbsp;</td>
          <td class="paramname"> <em>profile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>profname</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>password</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Load a profile from the database<p>
This function opens a named profile from the database, and fills the mapi_profile structure with common profile information.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>profile</em>&nbsp;</td><td>the resulting profile </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>profname</em>&nbsp;</td><td>the name of the profile to open </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>password</em>&nbsp;</td><td>the password to use with the profile</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise MAPI error.</dd></dl>
<dl class="note" compact><dt><b>Note:</b></dt><dd>Developers may also call <a class="el" href="IUnknown_8c.html#8237c7fc76377cb07f3f55920d6f20de">GetLastError()</a> to retrieve the last MAPI error code. Possible MAPI error codes are:<ul>
<li>MAPI_E_NOT_ENOUGH_RESOURCES: ldb subsystem initialization failed</li><li>MAPI_E_NOT_FOUND: the profile was not found in the profile database</li><li>MAPI_E_COLLISION: profname matched more than one entry</li></ul>
</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="cdo__mapi_8c.html#cd55ca55043b2a1c025c370725f1292a">MAPIInitialize</a>, <a class="el" href="IUnknown_8c.html#8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> </dd></dl>

<p>Referenced by <a class="el" href="cdo__mapi_8c_source.html#l00107">MapiLogonProvider()</a>.</p>

</div>
</div><p>
<a class="anchor" name="714fa290608519268427cfda413bb86a"></a><!-- doxytag: member="IProfAdmin.c::ProcessNetworkProfile" ref="714fa290608519268427cfda413bb86a" args="(struct mapi_session *session, const char *username, mapi_profile_callback_t callback, const void *private_data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS ProcessNetworkProfile           </td>
          <td>(</td>
          <td class="paramtype">struct mapi_session *&nbsp;</td>
          <td class="paramname"> <em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>username</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">mapi_profile_callback_t&nbsp;</td>
          <td class="paramname"> <em>callback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&nbsp;</td>
          <td class="paramname"> <em>private_data</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Process a full and automated MAPI profile creation<p>
This function process a full and automated MAPI profile creation using the <em>username</em> pattern passed as a parameter. The functions takes a callback parameter which will be called when the username checked matches several usernames. Private data needed by the callback can be supplied using the private_data pointer.<p>
<div class="fragment"><pre class="fragment">   <span class="keyword">typedef</span> int (*mapi_callback_t) callback(struct SRowSet *, <span class="keywordtype">void</span> *private_data);
</pre></div><p>
The callback returns the SRow element index within the SRowSet structure. If the user cancels the operation the callback return value should be SRowSet-&gt;cRows or more.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>session</em>&nbsp;</td><td>the session context </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>username</em>&nbsp;</td><td>the username for the network profile </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>callback</em>&nbsp;</td><td>function pointer callback function </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>private_data</em>&nbsp;</td><td>context data that will be provided to the callback</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise MAPI error.</dd></dl>
<dl class="note" compact><dt><b>Note:</b></dt><dd>Developers may also call <a class="el" href="IUnknown_8c.html#8237c7fc76377cb07f3f55920d6f20de">GetLastError()</a> to retrieve the last MAPI error code. Possible MAPI error codes are:</dd></dl>
<ul>
<li>MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized. The MAPI subsystem must be initialized (using MAPIInitialize) prior to creating a profile.</li><li>MAPI_E_END_OF_SESSION: The NSPI session has not been initialized</li><li>MAPI_E_CANCEL_USER: The user has aborted the operation</li><li>MAPI_E_INVALID_PARAMETER: The profile parameter was not set properly.</li><li>MAPI_E_NOT_FOUND: One of the mandatory field was not found during the profile creation process.</li></ul>
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd>OpenProfileStore, MAPILogonProvider, <a class="el" href="IUnknown_8c.html#8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> </dd></dl>

<p>References <a class="el" href="IProfAdmin_8c_source.html#l00287">mapi_profile_add_string_attr()</a>, <a class="el" href="IUnknown_8c_source.html#l00082">MAPIFreeBuffer()</a>, <a class="el" href="nspi_8c_source.html#l00515">nspi_DNToMId()</a>, <a class="el" href="nspi_8c_source.html#l00391">nspi_GetMatches()</a>, <a class="el" href="nspi_8c_source.html#l00599">nspi_GetProps()</a>, <a class="el" href="nspi_8c_source.html#l00750">nspi_GetSpecialTable()</a>, and <a class="el" href="nspi_8c_source.html#l00232">nspi_QueryRows()</a>.</p>

</div>
</div><p>
<a class="anchor" name="bd85338f723b5e7fc4bdd040fa4b774b"></a><!-- doxytag: member="IProfAdmin.c::RenameProfile" ref="bd85338f723b5e7fc4bdd040fa4b774b" args="(const char *old_profile, const char *profile)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS RenameProfile           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>old_profile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>profile</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Rename a profile<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>old_profile</em>&nbsp;</td><td>old profile name </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>profile</em>&nbsp;</td><td>new profile name</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise MAPI error. </dd></dl>

<p>References <a class="el" href="IProfAdmin_8c_source.html#l00989">GetProfileTable()</a>.</p>

</div>
</div><p>
<a class="anchor" name="72afe789058f7e6b3be9e7fb537d5445"></a><!-- doxytag: member="IProfAdmin.c::SetDefaultProfile" ref="72afe789058f7e6b3be9e7fb537d5445" args="(const char *profname)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS SetDefaultProfile           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>profname</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set a default profile for the database<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>profname</em>&nbsp;</td><td>the name of the profile to make the default profile</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise MAPI error.</dd></dl>
<dl class="note" compact><dt><b>Note:</b></dt><dd>Developers may also call <a class="el" href="IUnknown_8c.html#8237c7fc76377cb07f3f55920d6f20de">GetLastError()</a> to retrieve the last MAPI error code. Possible MAPI error codes are:<ul>
<li>MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized</li><li>MAPI_E_INVALID_PARAMETER: The profile parameter was not set properly.</li><li>MAPI_E_NOT_FOUND: The profile was not found in the database</li></ul>
</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="IProfAdmin_8c.html#3e503caa812de7ec2d53f03f53ee4ca1">GetDefaultProfile</a>, <a class="el" href="IProfAdmin_8c.html#80fc75b95aea0e94972f8c780a84565b">GetProfileTable</a>, <a class="el" href="IUnknown_8c.html#8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> </dd></dl>

<p>References <a class="el" href="IProfAdmin_8c_source.html#l00342">mapi_profile_modify_string_attr()</a>.</p>

</div>
</div><p>
<a class="anchor" name="6b10af8a00a2f32a9d840a3a2e9ce4db"></a><!-- doxytag: member="IProfAdmin.c::ShutDown" ref="6b10af8a00a2f32a9d840a3a2e9ce4db" args="(struct mapi_profile *profile)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS ShutDown           </td>
          <td>(</td>
          <td class="paramtype">struct mapi_profile *&nbsp;</td>
          <td class="paramname"> <em>profile</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Release a profile<p>
This function releases the credentials associated with the profile.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>profile</em>&nbsp;</td><td>the profile to release.</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise MAPI error.</dd></dl>
<dl class="note" compact><dt><b>Note:</b></dt><dd>Developers may also call <a class="el" href="IUnknown_8c.html#8237c7fc76377cb07f3f55920d6f20de">GetLastError()</a> to retrieve the last MAPI error code. Possible MAPI error codes are:<ul>
<li>MAPI_E_INVALID_PARAMETER: The profile parameter was not set or not valid </li></ul>
</dd></dl>

</div>
</div><p>
</div>
</div>
<br/>
<table style="clear:both; margin: 0.5em auto; width:80%; text-align: center; background-color:#f8f8f8; border:2px solid #e0e0e0; padding:5px;">
<tr>
<td> 
  <img alt="Creative Commons License" src="CC_SomeRightsReserved.png" width="90" height="30" border="0" /><br />
  <img alt="Creative Commons Attribution icon" src="24px-Cc-by_white.svg.png" width="24" height="24" border="0" />
  <img alt="Creative Commons Share Alike icon" src="24px-Cc-sa_white.svg.png" width="24" height="24" border="0" />
</td>
<td> <i><strong class="selflink">This content</strong> is licensed under the Creative Commons<br />
Attribution ShareAlike License v. 3.0:<br />
<a href="http://creativecommons.org/licenses/by-sa/3.0/" class="external free" title="http://creativecommons.org/licenses/by-sa/3.0/" rel="nofollow">http://creativecommons.org/licenses/by-sa/3.0/</a></i>
</td></tr></table>
<br/>
</div>
</div>
</body>
</html>