Click to See Complete Forum and Search --> : name mangling


Raghunandhan
June 7th, 1999, 05:38 AM
hi ,
while developing a mapi application , i have included mapi.h header file which is having function declerations.
mapi32.dll is exporting function MAPISendMail().In file mapi.h header file MAPISendMail()function is declared inside extern "C" block.But my application is searching for _MAPISendMail@20 i.e, with name decorations.Can u please help me to solve the problem.
Software : VC6 & NT4

ALM
June 7th, 1999, 08:35 AM
The "name decorations" you're seeing are for the PASCAL (_stdcall) specifier, not for C++.

It looks like you're not linking with a required .LIB file (ie. mapi32.lib). However, I've always seen MAPI-related code use LoadLibrary/GetProcAddress to access the MAPI functions. Check out the (nice) MAPI classes here in CodeGuru submitted by Rob Manderson: http://www.codeguru.com/internet/imapi.shtml.

Good luck!