Writing Plug-In Initialization Functions; Initialization Functions For Windows Platforms - Netscape DIRECTORY SERVER 6.2 - PLUG-IN Manual

Table of Contents

Advertisement

Writing Plug-in Initialization Functions

In some cases, you may need to send an LDAP result back to the client. For
example, if you are writing a pre-operation bind function and an error occurs
during the processing of the function, the function should return a non-zero value,
log an error message, and send the appropriate LDAP result code back to the client.
For information on the appropriate result code to return to the client, refer to the
chapter that documents the type of plug-in you are writing.
Writing Plug-in Initialization Functions
Before the Directory Server can call your plug-in function, the function be must
properly initialized. To do this, you must write an initialization function for your
server plug-in. The initialization function should do the following:
Specify the plug-in compatibility version.
1.
Register each of your plug-in functions.
2.
Return a value to the Directory Server.
3.
Your initialization function should have a prototype similar to the following:
int my_init_function( Slapi_PBlock pb );
Notice that in the initialization function, the Directory Server passes a single
argument of type

Initialization Functions for Windows Platforms

If you are writing an initialization function for a plug-in that runs on Windows NT
or Windows 2000, make sure to export the initialization function. For example:
__declspec(dllexport) int my_init_function(Slapi_PBlock pb);
On top of exporting the initialization function, you must also specify the name of
the initialization function in a
In addition to the initialization function, you might need to export other functions
contained in your plug-in. In particular, you will need to export any functions that
are not specifically registered by your initialization functions, such as the entry
store and entry fetch plug-in functions that are described in Chapter 9. Registering
plug-in functions is described in detail in the next section, "Registering Your
Plug-In Functions."
32
Netscape Directory Server Plug-In Programmer's Guide • December 2003
.
Slapi_PBlock
file.
.def

Advertisement

Table of Contents
loading

This manual is also suitable for:

Directory server 6.2

Table of Contents