Problem / use case
EnsureCEALibraryLoaded caches the loaded library handle in a module-level static (mCEALibraryHandle) for the life of the Excel session. There's no macro to release it, so after rebuilding cea_excel.dll during development, the developer must fully close and reopen Excel (VBA holds the file handle/mapping open) before the new DLL takes effect.
Proposed solution
Add a diagnostic macro (e.g. ReloadCEALibrary) in modCEATest.bas that calls FreeLibrary on the cached handle and resets mCEALibraryHandle/mCEALibraryPath, so a rebuilt DLL can be picked up without restarting Excel.
Additional context
source/bind/excel/vba/modCEADeclare.bas.
Drafted with Claude's assistance
- Confirmed by reading
EnsureCEALibraryLoaded and finding no FreeLibrary call or reload entry point anywhere in the module.
Problem / use case
EnsureCEALibraryLoadedcaches the loaded library handle in a module-level static (mCEALibraryHandle) for the life of the Excel session. There's no macro to release it, so after rebuildingcea_excel.dllduring development, the developer must fully close and reopen Excel (VBA holds the file handle/mapping open) before the new DLL takes effect.Proposed solution
Add a diagnostic macro (e.g.
ReloadCEALibrary) inmodCEATest.basthat callsFreeLibraryon the cached handle and resetsmCEALibraryHandle/mCEALibraryPath, so a rebuilt DLL can be picked up without restarting Excel.Additional context
source/bind/excel/vba/modCEADeclare.bas.Drafted with Claude's assistance
EnsureCEALibraryLoadedand finding noFreeLibrarycall or reload entry point anywhere in the module.