Re: MAPIInitialize(NULL) used to fail after 10-15 successfully attempts!!!



Make sure you compile the appropriate source file from EDK 5.5 where
HrOpenExchangePublicStore is declared.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"shivaraj" <shivaraj.malannavar@xxxxxxxxx> wrote in message
news:1179901230.173563.240800@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi Dmitry,

Did you step into HrOpenExchangePublicStore to see which line fails? What
is
the value of hr?

I dont know how to degug a dll using VC++. I will figure it out and
let you know my findings. And also i will send across the hr value
also.


Regards,
Shivaraj

On May 17, 10:06 pm, "Dmitry Streblechenko" <dmi...@xxxxxxxxxxx>
wrote:
I guess there is a reason why MS does not support .Net and MAPI in the
same
process space.
Java is probably not any different.

Dmitry Streblechenko (MVP)http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"shivaraj" <shivaraj.malanna...@xxxxxxxxx> wrote in message

news:1179381270.643949.262350@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx



Hi Dmitry,

one more thing wich i observed is :
My application which loads this exchange spcific DLL, runs as a
service. Application is a java code which loads this DLL from
"System.loadLibrary" method.

For some test purpose i converted this DLL into a EXE and tried
running in a loop. It never failed !!! even with my old approach
(initialize and uninitialize each time) as well as the new approach of
just initializing it once it did not fail. Not even a single time i
got this mapiinitialize error or "HrOpenExchangePrivateStore" failure.
But not sure why as a DLL its failing !!! Not sure its related to this
but please let me know your inputs on this.

Regards,
Shivaraj

On May 16, 9:55 pm, "Dmitry Streblechenko" <dmi...@xxxxxxxxxxx> wrote:
I don't see a problem with leaving MAPI initialized. Be that for 7
seconds
or 7 days.
What was the error when you left MAPI initialized? What method
returned
it?

Dmitry Streblechenko (MVP)http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"shivaraj" <shivaraj.malanna...@xxxxxxxxx> wrote in message

news:1179299652.564678.103920@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Hi Dmitry Streblechenko,

Thanks for your reply. Basically in my application this mailbox
and public folders will be fetched once in 7 days in customer side.
So even though my application will be contineously running, what i
felt is, whenever a request comes initialize it, fetch that info
and
then uninitialize it as the new request to fetch comes only after 7
days.
Going with your approach, If i initialize when my application
starts and never uninitialize MAPI, then for ever it will be in
initialzed mode... Will this cayse any problems ? as after next 7
days
when the request comes then, the one initialized nearly 7 days back
will still be alive and will it serve my purpose? I have any way
tried
this approach by keeping 2 hours of delay in my test machine ...
but
what i observed is after 10-15 successfull trials i got error
message
while opening private and public stores !!! So not sure if this
error
is related to the above mapiinitialized contineously running ...
please clarify my doubts.

Regards,
Shivaraj

On May 9, 9:54 pm, "Dmitry Streblechenko" <dmi...@xxxxxxxxxxx>
wrote:
Most versions of MAPI shipped with Outlook have problems when
MAPIInitialize/MAPIUninitialize are called too many times.
Why not call MAPIInitialize once when your app starts and leave
MAPI
initialized until your app exits?

Dmitry Streblechenko (MVP)http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"shivaraj" <shivaraj.malanna...@xxxxxxxxx> wrote in message

news:1178688767.790493.116890@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Hi Everyone,

I posted a similer query 10 days back but there was no responce
to
that. here with i am resending similer query. please help in in
resolving this issue.
I am facing some issues with MAPI. I am trying to get mailbox
information from 2000/2003 and 2007 exchange servers. For this
MAPI
seems to be the only common approach (except we have to install
cdo
libraries speratly on 2007).
I am running my code repetedly for each 1 min to get this
information. For nearly 10-15 times it fetched this info
properly
but
after 10-15 times "MAPIInitialize(NULL)" call is failing. But
again
after 2-3 failures it started fine and continued fetching
information
for nearly 10-12 more cycles and failed again. I kept counter to
see
mapiinitialize and mapiuninitialize calls are in sync. Everything
seems to be fine. But still not getting why mapiinitialization is
failing some times.

Please help in resolving this issue.

Regards,
Shivaraj- Hide quoted text -

- Show quoted text -- Hide quoted text -

- Show quoted text -- Hide quoted text -

- Show quoted text -




.



Relevant Pages


Loading