Hi,
I’m writing EM DLL. Well, I based my work on samples\mail\extmail from C API and it turned out that I don’t know the way how to control how may times code in MainEntryPoint() is executed. In sample, there is if(gHooksRegistered) clause, but it occured that it’s simply ignored and gHooksRegistered stays always FALSE. Can anyone help me or tell me what I’m doing wrong? Thanks in advance.
Subject: Broken samples?
extenension manager (as nsf_hook) is loaded once per process (nlnotes, nupdate, …).
MainEntryPoint should be called once per process. Memory is not shared between processed.
you can limit your extension manager to once specific process, either by Win32 functions (getmodulefilename?) or there’s a notes-function (addinquerydefault?) that returns tasks name (update, …) which will be empty for nlnotes.exe
if you need to share memory between files use win32 functions like MemMappedFile, …
much luck,
Johannes
Subject: RE: Broken samples?
THANK YOU!
Your replay was… claryfing. Thanks again.
For those of you who had same “problems” as I, the function name is CreateFileMapping, but trivial Visual Studio directive #pragma data_seg(“.SHARED”) seems to be fine.
Anyway, thank you, Johannes.
Bye!