|
Prev: Error winbase.h wincon.h in Aprq2
Next: auto_ptr array
From: vshalarora82 on 1 Apr 2008 03:41 Hi All, I am using Simle MAPI Console Application from Microsoft([url]http://download.microsoft.com/download/mapi/utility/21/w9xnt4/en-us/smplmapi.exe[/url]). It works fine when my default mail client is Outlook, but when my default mail client is outlook express then it shows an error. [MAPIAllocateBuffer (strlen ( rgchMsgID ) + 1, (LPVOID FAR*) prgchMsgID ); strcpy ( *prgchMsgID, rgchMsgID );] When program allocates memory for Message ID using MAPIAllocateBuffer, then it returns 0x80004005. After that when strcpy executes, an excetpion (0xC0000005: Access Violation) is generated. If you know the cause, please help me. Thanks, Vishal Arora -- vshalarora82 ------------------------------------------------------------------------ Posted via http://www.codecomments.com ------------------------------------------------------------------------
From: David Lowndes on 1 Apr 2008 13:51 >It works fine when my default mail client is Outlook, but when my >default mail client is outlook express then it shows an error. > >[MAPIAllocateBuffer (strlen ( rgchMsgID ) + 1, (LPVOID FAR*) prgchMsgID >); >strcpy ( *prgchMsgID, rgchMsgID );] > >When program allocates memory for Message ID using MAPIAllocateBuffer, >then it returns 0x80004005. After that when strcpy executes, an >excetpion (0xC0000005: Access Violation) is generated. Clearly that code is a sample not production code. If the MAPIAllocateBuffer has failed you should not be trying to write to where it ought to have put the allocated buffer. You're experiencing a symptom of a problem that's presumably occurred sometime before these immediate lines of code - you need to do some more debugging and compare the results you get with Outlook and OE. Dave
From: Vish on 11 Apr 2008 03:44 On Apr 1, 10:51 pm, David Lowndes <Dav...(a)example.invalid> wrote: > >It works fine when my default mail client is Outlook, but when my > >default mail client is outlook express then it shows an error. > > >[MAPIAllocateBuffer (strlen ( rgchMsgID ) + 1, (LPVOID FAR*) prgchMsgID > >); > >strcpy ( *prgchMsgID, rgchMsgID );] > > >When program allocates memory for Message ID using MAPIAllocateBuffer, > >then it returns 0x80004005. After that when strcpy executes, an > >excetpion (0xC0000005: Access Violation) is generated. > > Clearly that code is a sample not production code. If the > MAPIAllocateBuffer has failed you should not be trying to write to > where it ought to have put the allocated buffer. > > You're experiencing a symptom of a problem that's presumably occurred > sometime before these immediate lines of code - you need to do some > more debugging and compare the results you get with Outlook and OE. > > Dave thanks David Vishal
From: Vish on 22 Apr 2008 00:48 On Apr 11, 12:44 pm, Vish <vshalaror...(a)gmail.com> wrote: > On Apr 1, 10:51 pm, David Lowndes <Dav...(a)example.invalid> wrote: > > > > > >It works fine when my default mail client is Outlook, but when my > > >default mail client is outlook express then it shows an error. > > > >[MAPIAllocateBuffer (strlen ( rgchMsgID ) + 1, (LPVOID FAR*) prgchMsgID > > >); > > >strcpy ( *prgchMsgID, rgchMsgID );] > > > >When program allocates memory for Message ID using MAPIAllocateBuffer, > > >then it returns 0x80004005. After that when strcpy executes, an > > >excetpion (0xC0000005: Access Violation) is generated. > > > Clearly that code is a sample not production code. If the > > MAPIAllocateBuffer has failed you should not be trying to write to > > where it ought to have put the allocated buffer. > > > You're experiencing a symptom of a problem that's presumably occurred > > sometime before these immediate lines of code - you need to do some > > more debugging and compare the results you get with Outlook and OE. > > > Dave > > thanks David > > Vishal Hi David, I came to know that MAPIAllocateBuffer is defined in Extended MAPI header file. We can use only Simple MAPI with Outlook Express. So i think we can't use MAPIAllocateBuffer with Outlook Express. Regards, Vishal
|
Pages: 1 Prev: Error winbase.h wincon.h in Aprq2 Next: auto_ptr array |