-
July 8th, 2001, 08:32 AM
#1
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
-
July 8th, 2001, 09:43 AM
#2
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 );
-
July 8th, 2001, 10:05 AM
#3
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.....?
-
July 8th, 2001, 10:27 AM
#4
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
-
July 20th, 2001, 12:17 PM
#5
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
-
July 20th, 2001, 12:42 PM
#6
Re: MAPI and openning the address book
-
July 22nd, 2001, 08:13 AM
#7
Re: MAPI and openning the address book
Send me your e-mail and i will be happy to help
-
July 22nd, 2001, 08:19 AM
#8
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
-
July 23rd, 2001, 07:40 AM
#9
Re: MAPI and openning the address book
my email is
vhuard@qc.aira.com
thanks!
-
July 23rd, 2001, 11:56 AM
#10
Re: MAPI and openning the address book
thanks for the code!
does Outlook must be the default mail client ??
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|