WabIab.pas 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. {******************************************************************}
  2. { }
  3. { Borland Delphi Runtime Library }
  4. { Windows Address Book (WAB) functions interface unit }
  5. { }
  6. { Portions created by Microsoft are }
  7. { Copyright (C) 1995-2000 Microsoft Corporation. }
  8. { All Rights Reserved. }
  9. { }
  10. { The original file is: wabiab.h, released 31 Jan 2000. }
  11. { The original Pascal code is: WabIab.pas, released 15 Mar 2000. }
  12. { The initial developer of the Pascal code is Petr Vones }
  13. { (petr.v@mujmail.cz). }
  14. { }
  15. { Portions created by Petr Vones are }
  16. { Copyright (C) 2000 Petr Vones }
  17. { }
  18. { Obtained through: }
  19. { }
  20. { Joint Endeavour of Delphi Innovators (Project JEDI) }
  21. { }
  22. { You may retrieve the latest version of this file at the Project }
  23. { JEDI home page, located at http://delphi-jedi.org }
  24. { }
  25. { The contents of this file are used with permission, subject to }
  26. { the Mozilla Public License Version 1.1 (the "License"); you may }
  27. { not use this file except in compliance with the License. You may }
  28. { obtain a copy of the License at }
  29. { http://www.mozilla.org/MPL/MPL-1.1.html }
  30. { }
  31. { Software distributed under the License is distributed on an }
  32. { "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or }
  33. { implied. See the License for the specific language governing }
  34. { rights and limitations under the License. }
  35. { }
  36. {******************************************************************}
  37. unit WabIab;
  38. interface
  39. uses
  40. Windows, ActiveX, WabDefs;
  41. {$I WAB.INC}
  42. {$ALIGN ON}
  43. {$MINENUMSIZE 4}
  44. {$WEAKPACKAGEUNIT}
  45. (*$HPPEMIT '#include <wabiab.h>'*)
  46. { CreateOneOff *}
  47. //****** MAPI_UNICODE ((ULONG) 0x80000000) */
  48. //****** MAPI_SEND_NO_RICH_INFO ((ULONG) 0x00010000) */
  49. { RecipOptions }
  50. //****** MAPI_UNICODE ((ULONG) 0x80000000) */
  51. { QueryDefaultRecipOpt }
  52. //****** MAPI_UNICODE ((ULONG) 0x80000000) */
  53. { GetSearchPath }
  54. //****** MAPI_UNICODE ((ULONG) 0x80000000) */
  55. const
  56. { These are WAB only flags for IAdrBook::ResolveName }
  57. // MAPI_UNICODE ((ULONG) 0x80000000)
  58. WAB_RESOLVE_LOCAL_ONLY = ULONG($80000000);
  59. {$EXTERNALSYM WAB_RESOLVE_LOCAL_ONLY}
  60. WAB_RESOLVE_ALL_EMAILS = ULONG($40000000);
  61. {$EXTERNALSYM WAB_RESOLVE_ALL_EMAILS}
  62. WAB_RESOLVE_NO_ONE_OFFS = ULONG($20000000);
  63. {$EXTERNALSYM WAB_RESOLVE_NO_ONE_OFFS}
  64. WAB_RESOLVE_NEED_CERT = ULONG($10000000);
  65. {$EXTERNALSYM WAB_RESOLVE_NEED_CERT}
  66. WAB_RESOLVE_NO_NOT_FOUND_UI = ULONG($08000000);
  67. {$EXTERNALSYM WAB_RESOLVE_NO_NOT_FOUND_UI}
  68. WAB_RESOLVE_USE_CURRENT_PROFILE = ULONG($04000000);
  69. {$EXTERNALSYM WAB_RESOLVE_USE_CURRENT_PROFILE}
  70. WAB_RESOLVE_FIRST_MATCH = ULONG($02000000);
  71. {$EXTERNALSYM WAB_RESOLVE_FIRST_MATCH}
  72. WAB_RESOLVE_UNICODE = ULONG($01000000);
  73. {$EXTERNALSYM WAB_RESOLVE_UNICODE}
  74. // MAPI_DIALOG ((ULONG) 0x00000008)
  75. type
  76. IAddrBook = interface(IMAPIProp)
  77. function OpenEntry(cbEntryID: ULONG; lpEntryID: PEntryID; lpInterface: PIID;
  78. ulFlags: ULONG; var lpulObjType: ULONG; out lppUnk: IUnknown): HResult; stdcall;
  79. function CompareEntryIDs(cbEntryID1: ULONG; lpEntryID1: PEntryID;
  80. cbEntryID2: ULONG; lpEntryID2: PEntryID; ulFlags: ULONG;
  81. var lpulResult: ULONG): HResult; stdcall;
  82. function Advise(cbEntryID: ULONG; lpEntryID: PEntryID; ulEventMask: ULONG;
  83. lpAdviseSink: IMAPIAdviseSink; var lpulConnection: ULONG): HResult; stdcall;
  84. function Unadvise(ulConnection: ULONG): HResult; stdcall;
  85. function CreateOneOff(lpszName, lpszAdrType, lpszAddress: LPTSTR; ulFlags: ULONG;
  86. var lpcbEntryID: ULONG; var lppEntryID: PEntryID): HResult; stdcall;
  87. function NewEntry(ulUIParam, ulFlags, cbEIDContainer: ULONG;
  88. lpEIDContainer: PEntryID; cbEIDNewEntryTpl: ULONG; lpEIDNewEntryTpl: PEntryID;
  89. var lpcbEIDNewEntry: ULONG; var lppEIDNewEntry: PEntryID): HResult; stdcall;
  90. function ResolveName(ulUIParam, ulFlags: ULONG; lpszNewEntryTitle: LPTSTR;
  91. var lpAdrList: PAdrList): HResult; stdcall;
  92. function Address(var lpulUIParam: ULONG; lpAdrParms: PAdrParam;
  93. var lppAdrList: PAdrList): HResult; stdcall;
  94. function Details(var lpulUIParam: ULONG; lpfnDismiss: PFnDismiss;
  95. lpvDismissContext: Pointer; cbEntryID: ULONG; lpEntryID: PEntryID;
  96. lpfButtonCallback: PFnButton; lpvButtonContext: Pointer; lpszButtonText: LPTSTR;
  97. ulFlags: ULONG): HResult; stdcall;
  98. function RecipOptions(ulUIParam, ulFlags: ULONG; lpRecip: PAdrEntry): HResult; stdcall;
  99. function QueryDefaultRecipOpt(lpszAdrType: LPTSTR; ulFlags: ULONG;
  100. var lpcValues: ULONG; var lppOptions: PSPropValue): HResult; stdcall;
  101. function GetPAB(var lpcbEntryID: ULONG; var lppEntryID: PEntryID): HResult; stdcall;
  102. function SetPAB(cbEntryID: ULONG; lpEntryID: PEntryID): HResult; stdcall;
  103. function GetDefaultDir(var lpcbEntryID: ULONG; var lppEntryID: PEntryID): HResult; stdcall;
  104. function SetDefaultDir(cbEntryID: ULONG; lpEntryID: PEntryID): HResult; stdcall;
  105. function GetSearchPath(ulFlags: ULONG; var lppSearchPath: PSRowSet): HResult; stdcall;
  106. function SetSearchPath(ulFlags: ULONG; lpSearchPath: PSRowSet): HResult; stdcall;
  107. function PrepareRecips(ulFlags: ULONG; lpPropTagArray: PSPropTagArray;
  108. lpRecipList: PSPropTagArray): HResult; stdcall;
  109. end;
  110. {$EXTERNALSYM IAddrBook}
  111. implementation
  112. end.