Link to home
Start Free TrialLog in
Avatar of lfgmartins
lfgmartins

asked on

Help me with this complicated code

1---------------------------------------------------------------------
{ Test whether MAPI is available - if not, raise an exception }
 
procedure TEmail.CheckMapi;
{$IFDEF RESSTRING}
resourcestring
{$ELSE}
const
{$ENDIF RESSTRING}
  SNoMapi = 'MAPI services are not available on this system';
begin
  if not MapiAvailable then { call function in SMAPI.PAS }
    raise EMapiUnavailable.Create(SNoMapi);
end;

2---------------------------------------------------------
procedure TEmail.DoMapiError(ErrorCode: Integer);
begin
  if Assigned(FOnMapiError) then
    FOnMapiError(Self, ErrorCode);
end;

if MapiResult <> SUCCESS_SUCCESS then
      DoMapiError(MapiResult);

Thanks, Luis
Avatar of kabix
kabix

What exactly the problem is?
hi Luis,

what's the question??

Avatar of lfgmartins

ASKER

Sry, what I want is if you please comment the code because I don't understand these lines of code.

- resourcestring
- raise EMapiUnavailable.Create(SNoMapi);
- FOnMapiError(Self, ErrorCode);
- DoMapiError(MapiResult);

Thanks,
Luis
ASKER CERTIFIED SOLUTION
Avatar of cero
cero

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial