Function _conUnRegisterDll() Foundation

Unregisters DLL written in C before unload

Syntax
BOOL XPPAPIENTRY _conUnRegisterDll(ULONG dllHandle);
Parameters
dllHandle
The handle of the DLL to unregister. If the handle is not of type ULONG, a type cast is necessary when passing the value.
Return

The function returns TRUE if the unregistration was succesfull. If FALSE is returned, the DLL probably was never registered using _conRegisterDll() .

Description

Unregisters a DLL previously registered via _conRegisterDll() from the Xbase++ runtime. If a <destroyFunc> function was specified in the XppDllRegistration record passed in the corresponding call to _conRegisterDll(), it is called implicitly with <userData> as its parameter before unregistration is performed.

When _conUnRegisterDll() is called, it is very likely that other DLLs are already deinitialized, so calling other C-API functions or even functions of the C-library must be avoided.

Every call to _conRegisterDll() must be matched by a corresponding call to _conUnregisterDll(). This is very important to keep the runtime information of Xbase++ consistent. Failure to do so could lead to unexpectable errors.

Examples
// ------------------------------------------------ 
// C-API code for dynamic unregistration of a DLL 
// see _conRegisterDll() 

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.