FIDAL - Financial Data Access Library

  Home | Documentation | Download
 

 

NAME
    FD_Shutdown - C Function


SYNOPSIS
    #include "fidal.h"

    FD_RetCode FD_Shutdown( void );

DESCRIPTION

Free internal resources used by the FIDAL. This function will typically be called before your application exit.

Prior to the shutdown, all resources allocated and in possession of the user of the library must be freed with their corresponding "Free" function (example: FD_UDBaseAlloc => FD_UDBaseFree, FD_HistoryAlloc => FD_HistoryFree etc.). Failure to do so will result in the return of the error FD_MEM_LEAK.

FD_Shutdown shall be called only if FD_Initialize return code was FD_SUCCESS.

Multithread user: Make sure that all thread are not using anymore the FIDAL before calling FD_Shutdown.

RETURN VALUE

FD_SUCCESSOperation is successful
FD_BAD_PARAMOne of the parameter has an unexpected valued.
FD_BAD_OBJECTMemory corruption or a bad pointer was provided.
FD_MEM_LEAKSome objects were NOT freed prior to the shutdown.
FD_ALLOC_ERRMemory corruption detected
FD_UNKNOWN_ERROperation failed for unknown/unexpected reason

For other error code, or to match a number to an error description, check the FD_RetCode enumeration in "FIDAL/c/include/fd_common.h"

SEE ALSO

FD_Initialize


EXAMPLE

#include <stdio.h>
#include "fidal.h"

int main( void )
{
   FD_RetCode retCode;

   retCode = FD_Initialize( NULL );

   if( retCode != FD_SUCCESS )
      printf( "Cannot initialize FIDAL (%d)!\n", retCode );
   else
   {
      printf( "FIDAL correctly initialized.\n" );

      /* ... other FIDAL functions can be used here. */

      retCode = FD_Shutdown();
      if( retCode != FD_SUCCESS )
         printf( "Library shutdown failed (%d)\n", retCode );
   }

   return 0;
}

Google  SourceForge Logo
  Web FidalSoft.org
 

Copyright? 2006 TicTacTec LLC. All Rights Reserved. Last Update: 07/21/06, Unique Visitor: