MAPI and openning the address book
Help...
I managed to make a VC++ application which can open my outlook address book. Yet, it fails to work when the default mail programm is not outlook..
the failure is at :
if ( FAILED(hResult = MAPIInitialize(NULL)))
how can i solve this?
Any help will be HIGHLY appreciated
Re: MAPI and openning the address book
What is the hResult error code?
I use in my program MAPI initialization like in the piece of code bellow. Is better to use pointers to function and get address using GetProcAddress()to avoid conflicts with old MAPI DLLs( some function are not exported). And it works for me. Doesn't matter if OUTLOOK is or isn't default E-mail client.
But I don't know if this is your real problem.
typedef ULONG (FAR PASCAL * PFNMAPIINITIALIZE)( LPVOID );
PFNMAPIINITIALIZE lpfnMAPIInitialize;
HMODULE hLibrary = LoadLibrary( "MAPI32.DLL" )
lpfnMAPIInitialize = (PFNMAPIINITIALIZE)GetProcAddress( hLibrary, "MAPIInitialize" );
HRESULT hr = lpfnMAPIInitialize( NULL );
Re: MAPI and openning the address book
Hi
I thank you for your answear.. yet..I got the same result..
the hResult error code is 0x80004005 = Unspecified error ...
what can cause it.....?
Re: MAPI and openning the address book
Unspecified error(E-FAIL) means NOTHING.
Take a look to Task Manager if Mapisp32(MAPI spooler) process is running on your machine? Otherwise you can't open MAPI session. And take a look to MSDN for Mapisp32.
Maybe there is the problem after setting up OUTLOOK as non default E-mail client.
Good luck
Re: MAPI and openning the address book
are you able now to open the address book and export the contact in it ? if yes...i,d like have a clue of how to do it
thanks1
VincE
Re: MAPI and openning the address book
Re: MAPI and openning the address book
Send me your e-mail and i will be happy to help
Re: MAPI and openning the address book
I found that if i installed explorer my system directory consists of MAPI32.dll , yet,if I install Eudora or netscape,during the installation MAPI32.dl is being renamed !
Ill look into it some more
Thank u 4 your help
Re: MAPI and openning the address book
my email is
[email protected]
thanks!
Re: MAPI and openning the address book
thanks for the code!
does Outlook must be the default mail client ??