description | title | ms.date | f1_keywords | helpviewer_keywords | ms.assetid | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Learn more about: CAtlDllModuleT Class |
CAtlDllModuleT Class |
11/04/2016 |
|
|
351d5767-8257-4878-94be-45a85e31a72d |
This class represents the module for a DLL.
template <class T>
class ATL_NO_VTABLE CAtlDllModuleT : public CAtlModuleT<T>
T
Your class derived from CAtlDllModuleT
.
Name | Description |
---|---|
CAtlDllModuleT::CAtlDllModuleT | The constructor. |
CAtlDllModuleT::~CAtlDllModuleT | The destructor. |
Name | Description |
---|---|
CAtlDllModuleT::DllCanUnloadNow | Tests if the DLL can be unloaded. |
CAtlDllModuleT::DllGetClassObject | Returns a class factory. |
CAtlDllModuleT::DllMain | The optional entry point into a dynamic-link library (DLL). |
CAtlDllModuleT::DllRegisterServer | Adds entries to the system registry for objects in the DLL. |
CAtlDllModuleT::DllUnregisterServer | Removes entries in the system registry for objects in the DLL. |
CAtlDllModuleT::GetClassObject | Returns a class factory. Invoked by DllGetClassObject. |
CAtlDllModuleT
represents the module for a dynamic-link library (DLL) and provides functions used by all DLL projects. This specialization of CAtlModuleT class includes support for registration.
For more information on modules in ATL, see ATL Module Classes.
CAtlDllModuleT
Header: atlbase.h
The constructor.
CAtlDllModuleT() throw();
The destructor.
~CAtlDllModuleT() throw();
Tests if the DLL can be unloaded.
HRESULT DllCanUnloadNow() throw();
Returns S_OK if the DLL can be unloaded, or S_FALSE if it cannot.
Returns the class factory.
HRESULT DllGetClassObject(
REFCLSID rclsid,
REFIID riid,
LPVOID* ppv) throw();
rclsid
The CLSID of the object to be created.
riid
The IID of the requested interface.
ppv
A pointer to the interface pointer identified by riid. If the object does not support this interface, ppv is set to NULL.
Returns S_OK on success, or an error HRESULT on failure.
The optional entry point into a dynamic-link library (DLL).
BOOL WINAPI DllMain(DWORD dwReason, LPVOID /* lpReserved*/) throw();
dwReason
If set to DLL_PROCESS_ATTACH, the DLL_THREAD_ATTACH and DLL_THREAD_DETACH notification calls are disabled.
lpReserved
Reserved.
Always returns TRUE.
Disabling the DLL_THREAD_ATTACH and DLL_THREAD_DETACH notification calls can be a useful optimization for multithreaded applications that have many DLLs, that frequently create and delete threads, and whose DLLs do not need these thread-level notifications of attachment/detachment.
Adds entries to the system registry for objects in the DLL.
HRESULT DllRegisterServer(BOOL bRegTypeLib = TRUE) throw();
bRegTypeLib
TRUE if the type library is to be registered. The default value is TRUE.
Returns S_OK on success, or an error HRESULT on failure.
Removes entries in the system registry for objects in the DLL.
HRESULT DllUnregisterServer(BOOL bUnRegTypeLib = TRUE) throw();
bUnRegTypeLib
TRUE if the type library is to be removed from the registry. The default value is TRUE.
Returns S_OK on success, or an error HRESULT on failure.
Creates an object of the specified CLSID.
HRESULT GetClassObject(
REFCLSID rclsid,
REFIID riid,
LPVOID* ppv) throw();
rclsid
The CLSID of the object to be created.
riid
The IID of the requested interface.
ppv
A pointer to the interface pointer identified by riid. If the object does not support this interface, ppv is set to NULL.
Returns S_OK on success, or an error HRESULT on failure.
This method is called by CAtlDllModuleT::DllGetClassObject and is included for backward compatibility.
CAtlModuleT Class
CAtlExeModuleT Class
Class Overview
Module Classes