FDynLibrary Class Reference

Platform independent dynamic library loader. More...

#include <fdynlib.h>

Inheritance diagram for FDynLibrary:
Inheritance graph
[legend]

Public Member Functions

 FDynLibrary (const char *name=0, bool addExtension=true)
 Constructor.
 ~FDynLibrary ()
 Destructor.
bool init (const char *name, bool addExtension=true)
 Loads the library if not already loaded.
void * getProcAddress (const char *name)
 Returns the address of the procedure name.
bool isLoaded ()
 Returns when the library was successfully loaded.
bool unload ()
 Unloads the library if it is loaded.
void * getPlatformInstance () const
 Returns the platform dependent representation of the library instance.

Data Fields

OBJ_METHODS(FDynLibrary,
FObject) protected void * 
instance

Detailed Description

Platform independent dynamic library loader.


Constructor & Destructor Documentation

FDynLibrary ( const char *  name = 0,
bool  addExtension = true 
)

Constructor.

Loads the specified dynamic library.

Parameters:
[in] name the path of the library to load.
[in] addExtension if true append the platform dependent default extension to name.
Remarks:
  • If name specifies a full path, the FDynLibrary searches only that path for the library.
  • If name specifies a relative path or a name without path, FDynLibrary uses a standard search strategy of the current platform to find the library;
  • If name is NULL the library is not loaded.
    • Use init() to load the library.
~FDynLibrary (  ) 

Destructor.

The destructor unloads the library.


Member Function Documentation

bool init ( const char *  name,
bool  addExtension = true 
)

Loads the library if not already loaded.

This function is normally called by FDynLibrary().

Remarks:
If the library is already loaded, this call has no effect.
void * getProcAddress ( const char *  name  ) 

Returns the address of the procedure name.

bool isLoaded (  )  [inline]

Returns when the library was successfully loaded.

bool unload (  ) 

Unloads the library if it is loaded.

This function is called by ~FDynLibrary ().

void* getPlatformInstance (  )  const [inline]

Returns the platform dependent representation of the library instance.


Field Documentation

OBJ_METHODS (FDynLibrary, FObject) protected void* instance
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
Empty

Copyright ©2013 Steinberg Media Technologies GmbH. All Rights Reserved.