有人用过C++API吗?一个小问题迫切希望大家的帮助。在线等待中。。。。
hlf 2004-06-09 10:48:48 在一个钩子函数中,我想把邮件的附件拆离到硬盘中,但运行时提示:
应用程序出现未知异常"unknown software exception(0x80000003),location 0x77f813b1",我的代码是:
STATUS ExtractAttach(NOTEHANDLE hNote)
{
STATUS error=NOERROR;
BLOCKID bhAttachment;
char FileName[MAXPATH+1];
char FullFileName[MAXPATH+1];
int Att;
for (Att = 0; MailGetMessageAttachmentInfo(hNote, Att,&bhAttachment, FileName,NULL, NULL, NULL, NULL, NULL); Att++)
{
strcpy(FullFileName,"");
strcat(FullFileName,"c:\\");
strcat(FullFileName,FileName);
printf("FileName=%s",FullFileName);
//Extract attachment
//下面这句错误
if (error = NSFNoteExtractFile(hNote,bhAttachment,FullFileName,NULL))
{
printf ("Error: unable to extract attachment.\n");
NSFNoteClose(hNote);
return (ERR(error));
}
}
return(error);
}
先谢过了