Delphi
OpenMailbox, CloseMailbox sample.
// Sample 1: uses AIRMail SDK; var Handle: TMailboxHandle: begin Handle := OpenMailbox('c:\sample\Folders.dbx'); //Try open mailbox file 'c:\sample\Folders.dbx' if Handle > OMS_NOERROR then CloseMailbox(Handle) //If mailbox file open OK, close the mailbox file else WriteLn('Open mailbox file problem: ' + TokenizeErrorCode(Handle)); //If mailbox file open error – write the error code end;
// Sample 2: uses AIRMail SDK; var PSTFileName: string; PSTHandle: dword; begin PSTFileName := ParamStr(1); //Get .PST file name from command line PSTHandle := OpenMailbox(PChar(PSTFileName)); //Open selected PST file by Mailbox Core if PSTHandle > OMS_NOERROR then //If Mailbox open OK begin //… Mailbox content routines CloseMailbox(PSTHandle); //Close Opened mailbox end; end;
© AIRMail SDK Team 2005-2008, please contact as