Problems with method AddrBook.Address

"Fernando Mauro" <[email protected]> Thu, 22 Sep 2005 09:58:19 -0300
Newsgroups gmane.comp.lang.delphi.jedi
Message-ID <[email protected]>
----------------------------------------------------------------------------
----

Save all,
I´m trying show the dialog box with address of  WAB, but don´t have results.
Simple receive "Parameter invalid" from windows, somebody can help-me?

The code:

procedure TMainForm.ToolButton9Click(Sender: TObject);
Var
  HandleWnd  : Cardinal;
  AdrParams  : PAdrParam;
  AdrList    : PAdrList;
  pCaptionTo : PChar;
  Number     : ULONG;
begin
  HandleWnd := Handle;

  Number  := MAPI_TO;
  AdrList := nil;

  GetMem(AdrParams, SizeOf(TAdrParam));
  try
    pCaptionTo := 'To:';

    Number := MAPI_TO;

    AdrParams.cbABContEntryID    := 0;
    AdrParams.lpABContEntryID    := nil;
    AdrParams.ulFlags            := DIALOG_MODAL;
    AdrParams.lpReserved         := nil;
    AdrParams.ulHelpContext      := 0;
    AdrParams.lpszHelpFileName   := nil;
    AdrParams.lpfnABSDI          := nil;
    AdrParams.lpfnDismiss        := nil;
    AdrParams.lpvDismissContext  := nil;
    AdrParams.lpszCaption        := 'MAPI ITP tests Address 1';
    AdrParams.lpszNewEntryTitle  := 'For this test dialog';
    AdrParams.lpszDestWellsTitle := 'Selected Recipients:';
    AdrParams.cDestFields        := 1;
    AdrParams.nDestFieldFocus    := 0;
    AdrParams.lppszDestTitles    := @pCaptionTo[0];
    AdrParams.lpulDestComps      := @Number;
    AdrParams.lpContRestriction  := nil;
    AdrParams.lpHierRestriction  := nil;

    OleCheck(AddrBook.Address(HandleWnd, AdrParams, AdrList));
  finally
    FreeMem(AdrParams, Sizeof(TAdrParam));
  end;
end;

This code was writen inside of wab example of delphi-jedi.org.

Thank´s a lot,
Fernando Mauro


[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/i7folB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/Delphi-JEDI/

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/