Public Member Functions | Protected Attributes

DynamicFct< FCT > Struct Template Reference

link dynamicly to functions by using GetModuleHandle() and GetProcAddress() More...

#include <utility.h>

Collaboration diagram for DynamicFct< FCT >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 DynamicFct (LPCTSTR moduleName, UINT ordinal)
 DynamicFct (LPCTSTR moduleName, LPCSTR name)
FCT operator* () const
 operator bool () const

Protected Attributes

FCT _fct

Detailed Description

template<typename FCT>
struct DynamicFct< FCT >

link dynamicly to functions by using GetModuleHandle() and GetProcAddress()

Definition at line 965 of file utility.h.


Constructor & Destructor Documentation

template<typename FCT>
DynamicFct< FCT >::DynamicFct ( LPCTSTR  moduleName,
UINT  ordinal 
) [inline]

Definition at line 967 of file utility.h.

    {
        HMODULE hModule = GetModuleHandle(moduleName);

        _fct = (FCT) GetProcAddress(hModule, (LPCSTR)ordinal);
    }
template<typename FCT>
DynamicFct< FCT >::DynamicFct ( LPCTSTR  moduleName,
LPCSTR  name 
) [inline]

Definition at line 974 of file utility.h.

    {
        HMODULE hModule = GetModuleHandle(moduleName);

        _fct = (FCT) GetProcAddress(hModule, name);
    }

Member Function Documentation

template<typename FCT>
DynamicFct< FCT >::operator bool (  ) const [inline]

Definition at line 982 of file utility.h.

{return _fct? true: false;}
template<typename FCT>
FCT DynamicFct< FCT >::operator* (  ) const [inline]

Definition at line 981 of file utility.h.

{return _fct;}

Member Data Documentation

template<typename FCT>
FCT DynamicFct< FCT >::_fct [protected]

Definition at line 985 of file utility.h.


The documentation for this struct was generated from the following file:

ROS Explorer Source Code Documentation
generated on 02.01.2013 by doxygen

ROS Explorer Homepage