Any one help me with C API

I am trying to built a extmail.dll in CV++ 9.0 using the notes C API1.I created the extmail.dll file and complied it without any error

2.I changed the extmail.dll as nextmail.dll in the notes directory

3.Followed the procedure which is given in the read me of the Sample\mail\extmail in the notes C API toolkit

4.I made necessary changes in the notes.ini file as

ExtMgr_Addins=extmail

5.After saving the notes.ini and opening the notes ,notes get crashed . nsd is running

6.If i remove the Extmgr_Addins from the notes.ini then notes is working fine

Please any one help me with this .Iam struck up with is for 7 days ,after this gets work only I have to code for my requirement

Subject: Any one help me with C API

What does the generated nsd-file tell you?

Are there any loglines written? I checked the code and saw that there are many loglines being written. Manybe it shows at what point it goes wrong.

You could try to immediately exit the callback function to reduce the possibilities where it fails. This will tell you whether or not the EM is loaded and invoked at all.

You could also add extra logging to an external file, so you can see how far it goes well.

Subject: RE: Any one help me with C API

No the extmail.log file is not created.I coudn’t find at what point its going wrong.I think the problem is with the EM.I am new to lotus notes and have never worked with API’s

Can you say me where could I have made the mistake

Subject: RE: Any one help me with C API

Sorry I cannot help but I am curious what you are trying to accomplish with extmail plugin.

Thanks.

Subject: RE: Any one help me with C API

Hi CauActually with the help of this code only I have to start my project .Once this code worked I can gohead with my project.I just want to know how this dll function works in the lotus notes/domino

Subject: RE: Any one help me with C API

Hi Rajesh,

I’m facing similar problem.

Can you please let me know if you have a figured out a way in solving this? If yes, how?

~raghav

Subject: Any one help me with C API

Did you compile it using the command line makefile, or did you try to do it through an IDE? The most common mistake people make when starting with the C API is to miss the structure packing, which must be on a single byte, not the default. Obviously, that is handled in their makefile, but if you went through an IDE, you could miss it.

Subject: RE: Any one help me with C API

Hi ben,I don’t know how to compile it in command line makefile,can you help me with it.I created extmail.dll using IDE ,I couldn’t find any makefile in the output folder.Please help me with this

waiting for your reply

Subject: RE: Any one help me with C API

you must have /Zp or /Zp1 among your flags. I assume you are compiling on windows… or alternately you must be able to set it somewhere from project properties menus. On MS VC++ 6.0 that I use (the supported compiler on windows) it can be set through project settings, “C/C++”, “Code generation”, “Struct member alignment” - it should say “1 byte”

Subject: RE: Any one help me with C API

Hi thanks for the replyYa I am compiling in windows ,Project setting are already as you said the “Struct member alignment” is set to /Zp1 ,Can you give me some more information regarding the Configuration setting

waiting for your reply

Subject: RE: Any one help me with C API

here are my flags in project settings that i use to compile an EM code:

/nologo /Zp1 /MTd /W3 /GX /Od /D “W32” /D “WIN32” /D “_DEBUG” /D “_WINDOWS” /D “_MBCS” /D “_USRDLL” /D “eml” /FR"Debug/" /Fp"Debug/emlauncher.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c

/D “eml” /Fp"Debug/emlauncher.pch" are names used in the project, the rest might need to be there (apart of course of “Debug” ones)

Subject: RE: Any one help me with C API

Hi I followed the procedure and made all the changes as you said ,still the notes client is crashing when I modify the notes.ini.

Can you send the flags for the linker such that I can verify mine.

waiting for your reply

Subject: RE: Any one help me with C API

Ya I compiled it with the IDE not through command line make file. thanks for the reply ,I will do as you say and will come back with the result