/*! ****************************************************************************
\ingroup SYS_LOADING_GROUP
\fn void* dspl_load()
\brief
Perform dynamic linking and load DSPL-2.0 functions.

This function attempts to link to the library `libdspl.dll` in
Windows system and the `libdspl.so` library on the Linux system.
The library is assumed to be in the same directory as the application.
user, or the path to the library is registered in the operating path variables
system.

Upon successful binding and loading of library functions, the handle is returned
libraries, as well as in the address space of the application appear
pointers to DSPL-2.0 functions.

\note
The returned handle is of type `void *`, which can be cast on Windows
to type `HINSTANCE`. In practice, this is not necessary, because this
the type is cast to `HINSTANCE` automatically if the compiler flag is set,
indicating that the application is being built on Windows.

An example of a simple program that implements dynamic binding with DSPL-2.0.

\code
#include <stdio.h>
#include <stdlib.h>
#include "dspl.h"

int main (int argc, char* argv[])
{
  void * hdspl; /* DSPL handle */
  hdspl = dspl_load (); /* Dynamic linking */
  
  /* Check the pointer. If `NULL`, then the link failed */
  if (! hdspl)
  {
    printf ("libdspl loading error! \n");
    return -1;
  }
  
  /*
  The link was successful, you can call the functions of DSPL-2.0
  */
  
  /*
  Before correctly terminating the application, you must unlink
  library and clear memory.
  */
  dspl_free (hdspl);

  return 0;
}

\endcode



\author
Bakhurin Sergey
www.dsplib.org
**************************************************************************** */




/*! ****************************************************************************
\ingroup SYS_LOADING_GROUP
\fn void dspl_free(void* handle)
\brief
Cleans up the previously linked DSPL-2.0 dynamic library.

This cross-platform function clears the library `libdspl.dll` in
Windows system and from the library `libdspl.so` on the Linux system.
After cleaning the library, all functions will become unavailable.

\param [in] handle
Handle of the previously linked DSPL-2.0 library. \n
This pointer can be `NULL`, in this case no action
are being produced.

\author
Bakhurin Sergey
www.dsplib.org
**************************************************************************** */
