WuxDllExt.h#

Interfaces for subscribing to DllMain callbacks.

The lib/WuxDllExt.cpp runtime file defines DllMain and calls all the registered clients.

This is relevant if and only if the target is a DLL and not a standalone executable.

Functions

int WuxGetDllInstancesCount()#

Return the number of registered clients.

Returns:

int

CWuxDllInstance **WuxGetDllInstances()#

Return the array of the registered clients.

The number of elements is provided by WuxGetDllInstancesCount.

Returns:

CWuxDllInstance**

HMODULE WuxGetDllInstance()#

Return the instance of the DLL.

This handle is cached when DllMain is called with the reason DLL_PROCESS_ATTACH.

Returns:

HMODULE

class CWuxDllInstance#

Base class for DllMain clients.

Public Functions

CWuxDllInstance()#

Construct the instance and register it to DllMain.

virtual ~CWuxDllInstance()#

Unregister the instance from DllMain.

virtual BOOL OnProcessAttach(HMODULE hDllInstance)#

Process the DLL_PROCESS_ATTACH notification.

Return TRUE on success, otherwise FALSE.

The default implementation is empty and returns True.

Returns:

bool

virtual BOOL OnThreadAttach(HMODULE hDllInstance)#

Process the DLL_THREAD_ATTACH notification.

Return TRUE on success, otherwise FALSE.

The default implementation is empty and returns True.

Returns:

bool

virtual BOOL OnThreadDetach(HMODULE hDllInstance)#

Process the DLL_THREAD_DETACH notification.

Return TRUE on success, otherwise FALSE.

The default implementation is empty and returns True.

Returns:

bool

virtual BOOL OnProcessDetach(HMODULE hDllInstance)#

Process the DLL_PROCESS_DETACH notification.

Return TRUE on success, otherwise FALSE.

The default implementation is empty and returns True.

Returns:

bool