Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1358 lines
59 KiB

  1. /*
  2. * M A P I V A L . H
  3. *
  4. * Macros used to validate parameters on standard MAPI object methods.
  5. * Used in conjunction with routines found in MAPIU.DLL.
  6. *
  7. * Copyright 1986-1996 Microsoft Corporation. All Rights Reserved.
  8. */
  9. #ifndef _INC_VALIDATE
  10. #define _INC_VALIDATE
  11. #ifdef __cplusplus
  12. extern "C" {
  13. #endif
  14. #define MAKE_ENUM(Method, Interface) Interface##_##Method
  15. typedef enum _tagMethods
  16. {
  17. /* IUnknown */
  18. MAKE_ENUM(QueryInterface, IUnknown) = 0,
  19. MAKE_ENUM(AddRef, IUnknown), /* For completness */
  20. MAKE_ENUM(Release, IUnknown), /* For completness */
  21. /* IMAPIProps */
  22. MAKE_ENUM(GetLastError, IMAPIProp),
  23. MAKE_ENUM(SaveChanges, IMAPIProp),
  24. MAKE_ENUM(GetProps, IMAPIProp),
  25. MAKE_ENUM(GetPropList, IMAPIProp),
  26. MAKE_ENUM(OpenProperty, IMAPIProp),
  27. MAKE_ENUM(SetProps, IMAPIProp),
  28. MAKE_ENUM(DeleteProps, IMAPIProp),
  29. MAKE_ENUM(CopyTo, IMAPIProp),
  30. MAKE_ENUM(CopyProps, IMAPIProp),
  31. MAKE_ENUM(GetNamesFromIDs, IMAPIProp),
  32. MAKE_ENUM(GetIDsFromNames, IMAPIProp),
  33. /* IMAPITable */
  34. MAKE_ENUM(GetLastError, IMAPITable),
  35. MAKE_ENUM(Advise, IMAPITable),
  36. MAKE_ENUM(Unadvise, IMAPITable),
  37. MAKE_ENUM(GetStatus, IMAPITable),
  38. MAKE_ENUM(SetColumns, IMAPITable),
  39. MAKE_ENUM(QueryColumns, IMAPITable),
  40. MAKE_ENUM(GetRowCount, IMAPITable),
  41. MAKE_ENUM(SeekRow, IMAPITable),
  42. MAKE_ENUM(SeekRowApprox, IMAPITable),
  43. MAKE_ENUM(QueryPosition, IMAPITable),
  44. MAKE_ENUM(FindRow, IMAPITable),
  45. MAKE_ENUM(Restrict, IMAPITable),
  46. MAKE_ENUM(CreateBookmark, IMAPITable),
  47. MAKE_ENUM(FreeBookmark, IMAPITable),
  48. MAKE_ENUM(SortTable, IMAPITable),
  49. MAKE_ENUM(QuerySortOrder, IMAPITable),
  50. MAKE_ENUM(QueryRows, IMAPITable),
  51. MAKE_ENUM(Abort, IMAPITable),
  52. MAKE_ENUM(ExpandRow, IMAPITable),
  53. MAKE_ENUM(CollapseRow, IMAPITable),
  54. MAKE_ENUM(WaitForCompletion, IMAPITable),
  55. MAKE_ENUM(GetCollapseState, IMAPITable),
  56. MAKE_ENUM(SetCollapseState, IMAPITable),
  57. /* IMAPIContainer */
  58. MAKE_ENUM(GetContentsTable, IMAPIContainer),
  59. MAKE_ENUM(GetHierarchyTable, IMAPIContainer),
  60. MAKE_ENUM(OpenEntry, IMAPIContainer),
  61. MAKE_ENUM(SetSearchCriteria, IMAPIContainer),
  62. MAKE_ENUM(GetSearchCriteria, IMAPIContainer),
  63. /* IABContainer */
  64. MAKE_ENUM(CreateEntry, IABContainer),
  65. MAKE_ENUM(CopyEntries, IABContainer),
  66. MAKE_ENUM(DeleteEntries, IABContainer),
  67. MAKE_ENUM(ResolveNames, IABContainer),
  68. /* IDistList */
  69. MAKE_ENUM(CreateEntry, IDistList),
  70. MAKE_ENUM(CopyEntries, IDistList),
  71. MAKE_ENUM(DeleteEntries, IDistList),
  72. MAKE_ENUM(ResolveNames, IDistList),
  73. /* IMAPIFolder */
  74. MAKE_ENUM(CreateMessage, IMAPIFolder),
  75. MAKE_ENUM(CopyMessages, IMAPIFolder),
  76. MAKE_ENUM(DeleteMessages, IMAPIFolder),
  77. MAKE_ENUM(CreateFolder, IMAPIFolder),
  78. MAKE_ENUM(CopyFolder, IMAPIFolder),
  79. MAKE_ENUM(DeleteFolder, IMAPIFolder),
  80. MAKE_ENUM(SetReadFlags, IMAPIFolder),
  81. MAKE_ENUM(GetMessageStatus, IMAPIFolder),
  82. MAKE_ENUM(SetMessageStatus, IMAPIFolder),
  83. MAKE_ENUM(SaveContentsSort, IMAPIFolder),
  84. MAKE_ENUM(EmptyFolder, IMAPIFolder),
  85. #ifdef OLD_STUFF
  86. /* IMsgStore */
  87. MAKE_ENUM(Advise, IMsgStore),
  88. MAKE_ENUM(Unadvise, IMsgStore),
  89. MAKE_ENUM(CompareEntryIDs, IMsgStore),
  90. MAKE_ENUM(OpenEntry, IMsgStore),
  91. MAKE_ENUM(SetReceiveFolder, IMsgStore),
  92. MAKE_ENUM(GetReceiveFolder, IMsgStore),
  93. MAKE_ENUM(GetReceiveFolderTable, IMsgStore),
  94. MAKE_ENUM(StoreLogoff, IMsgStore),
  95. MAKE_ENUM(AbortSubmit, IMsgStore),
  96. MAKE_ENUM(GetOutgoingQueue, IMsgStore),
  97. MAKE_ENUM(SetLockState, IMsgStore),
  98. MAKE_ENUM(FinishedMsg, IMsgStore),
  99. MAKE_ENUM(NotifyNewMail, IMsgStore),
  100. /* IMessage */
  101. MAKE_ENUM(GetAttachmentTable, IMessage),
  102. MAKE_ENUM(OpenAttach, IMessage),
  103. MAKE_ENUM(CreateAttach, IMessage),
  104. MAKE_ENUM(DeleteAttach, IMessage),
  105. MAKE_ENUM(GetRecipientTable, IMessage),
  106. MAKE_ENUM(ModifyRecipients, IMessage),
  107. MAKE_ENUM(SubmitMessage, IMessage),
  108. MAKE_ENUM(SetReadFlag, IMessage),
  109. /* IABProvider */
  110. MAKE_ENUM(Shutdown, IABProvider),
  111. MAKE_ENUM(Logon, IABProvider),
  112. /* IABLogon */
  113. MAKE_ENUM(GetLastError, IABLogon),
  114. MAKE_ENUM(Logoff, IABLogon),
  115. MAKE_ENUM(OpenEntry, IABLogon),
  116. MAKE_ENUM(CompareEntryIDs, IABLogon),
  117. MAKE_ENUM(Advise, IABLogon),
  118. MAKE_ENUM(Unadvise, IABLogon),
  119. MAKE_ENUM(OpenStatusEntry, IABLogon),
  120. MAKE_ENUM(OpenTemplateID, IABLogon),
  121. MAKE_ENUM(GetOneOffTable, IABLogon),
  122. MAKE_ENUM(PrepareRecips, IABLogon),
  123. /* IXPProvider */
  124. MAKE_ENUM(Shutdown, IXPProvider),
  125. MAKE_ENUM(TransportLogon, IXPProvider),
  126. /* IXPLogon */
  127. MAKE_ENUM(AddressTypes, IXPLogon),
  128. MAKE_ENUM(RegisterOptions, IXPLogon),
  129. MAKE_ENUM(TransportNotify, IXPLogon),
  130. MAKE_ENUM(Idle, IXPLogon),
  131. MAKE_ENUM(TransportLogoff, IXPLogon),
  132. MAKE_ENUM(SubmitMessage, IXPLogon),
  133. MAKE_ENUM(EndMessage, IXPLogon),
  134. MAKE_ENUM(Poll, IXPLogon),
  135. MAKE_ENUM(StartMessage, IXPLogon),
  136. MAKE_ENUM(OpenStatusEntry, IXPLogon),
  137. MAKE_ENUM(ValidateState, IXPLogon),
  138. MAKE_ENUM(FlushQueues, IXPLogon),
  139. /* IMSProvider */
  140. MAKE_ENUM(Shutdown, IMSProvider),
  141. MAKE_ENUM(Logon, IMSProvider),
  142. MAKE_ENUM(SpoolerLogon, IMSProvider),
  143. MAKE_ENUM(CompareStoreIDs, IMSProvider),
  144. /* IMSLogon */
  145. MAKE_ENUM(GetLastError, IMSLogon),
  146. MAKE_ENUM(Logoff, IMSLogon),
  147. MAKE_ENUM(OpenEntry, IMSLogon),
  148. MAKE_ENUM(CompareEntryIDs, IMSLogon),
  149. MAKE_ENUM(Advise, IMSLogon),
  150. MAKE_ENUM(Unadvise, IMSLogon),
  151. MAKE_ENUM(OpenStatusEntry, IMSLogon),
  152. /* IMAPIControl */
  153. MAKE_ENUM(GetLastError, IMAPIControl),
  154. MAKE_ENUM(Activate, IMAPIControl),
  155. MAKE_ENUM(GetState, IMAPIControl),
  156. /* IMAPIStatus */
  157. MAKE_ENUM(ValidateState, IMAPIStatus),
  158. MAKE_ENUM(SettingsDialog, IMAPIStatus),
  159. MAKE_ENUM(ChangePassword, IMAPIStatus),
  160. MAKE_ENUM(FlushQueues, IMAPIStatus),
  161. #endif
  162. /* IStream */
  163. MAKE_ENUM(Read, IStream),
  164. MAKE_ENUM(Write, IStream),
  165. MAKE_ENUM(Seek, IStream),
  166. MAKE_ENUM(SetSize, IStream),
  167. MAKE_ENUM(CopyTo, IStream),
  168. MAKE_ENUM(Commit, IStream),
  169. MAKE_ENUM(Revert, IStream),
  170. MAKE_ENUM(LockRegion, IStream),
  171. MAKE_ENUM(UnlockRegion, IStream),
  172. MAKE_ENUM(Stat, IStream),
  173. MAKE_ENUM(Clone, IStream),
  174. /* IMAPIAdviseSink */
  175. MAKE_ENUM(OnNotify, IMAPIAdviseSink),
  176. /* IWABObject */
  177. MAKE_ENUM(GetLastError, IWABObject),
  178. MAKE_ENUM(AllocateBuffer, IWABObject),
  179. MAKE_ENUM(AllocateMore, IWABObject),
  180. MAKE_ENUM(FreeBuffer, IWABObject),
  181. MAKE_ENUM(Backup, IWABObject),
  182. MAKE_ENUM(Import, IWABObject),
  183. } METHODS;
  184. /* Macro wrappers to hide the Validate function return handling */
  185. #if defined(_X86_) || defined( WIN16 )
  186. #ifdef __cplusplus
  187. /* C++ methods can't take the address of the This pointer, so we must
  188. use the first parameter instead */
  189. #define ValidateParameters(eMethod, First) \
  190. { HRESULT _hr_; \
  191. _hr_ = __CPPValidateParameters(eMethod, (LPVOID) &First); \
  192. if (HR_FAILED(_hr_)) return (_hr_); }
  193. #define UlValidateParameters(eMethod, First) \
  194. { HRESULT _hr_; \
  195. _hr_ = __CPPValidateParameters(eMethod, &First); \
  196. if (HR_FAILED(_hr_)) return (ULONG) (_hr_); }
  197. /* Methods called by MAPI should have correct parameters
  198. - just assert in Debug to check */
  199. #define CheckParameters(eMethod, First) \
  200. AssertSz(HR_SUCCEEDED(__CPPValidateParameters(eMethod, &First)), "Parameter validation failed for method called by MAPI!")
  201. #else /* __cplusplus */
  202. /* For methods that will be called by clients
  203. - validate always */
  204. #define ValidateParameters(eMethod, ppThis) \
  205. { HRESULT _hr_; \
  206. _hr_ = __ValidateParameters(eMethod, ppThis); \
  207. if (HR_FAILED(_hr_)) return (_hr_); }
  208. #define UlValidateParameters(eMethod, ppThis) \
  209. { HRESULT _hr_; \
  210. _hr_ = __ValidateParameters(eMethod, ppThis); \
  211. if (HR_FAILED(_hr_)) return (ULONG) (_hr_); }
  212. /* Methods called by MAPI should have correct parameters
  213. - just assert in Debug to check */
  214. #define CheckParameters(eMethod, ppThis) \
  215. AssertSz(HR_SUCCEEDED(__ValidateParameters(eMethod, ppThis)), "Parameter validation failed for method called by MAPI!")
  216. #endif /* __cplusplus */
  217. #endif /* _X86_ || WIN16 */
  218. /* Prototypes for functions used to validate complex parameters.
  219. */
  220. #define FBadPropVal( lpPropVal) (FAILED(ScCountProps( 1, lpPropVal, NULL)))
  221. #define FBadRgPropVal( lpPropVal, cValues) \
  222. (FAILED(ScCountProps( cValues, lpPropVal, NULL)))
  223. #define FBadAdrList( lpAdrList) \
  224. ( AssertSz( ( offsetof( ADRLIST, cEntries) \
  225. == offsetof( SRowSet, cRows)) \
  226. && ( offsetof( ADRLIST, aEntries) \
  227. == offsetof( SRowSet, aRow)) \
  228. && ( offsetof( ADRENTRY, cValues) \
  229. == offsetof( SRow, cValues)) \
  230. && ( offsetof( ADRENTRY, rgPropVals) \
  231. == offsetof( SRow, lpProps)) \
  232. , TEXT("ADRLIST doesn't match SRowSet")) \
  233. || FBadRowSet( (LPSRowSet) lpAdrList))
  234. STDAPI_(BOOL)
  235. FBadRglpszW( LPWSTR FAR *lppszW,
  236. ULONG cStrings);
  237. STDAPI_(BOOL)
  238. FBadRowSet( LPSRowSet lpRowSet);
  239. STDAPI_(BOOL)
  240. FBadRglpNameID( LPMAPINAMEID FAR * lppNameId,
  241. ULONG cNames);
  242. STDAPI_(BOOL)
  243. FBadEntryList( LPENTRYLIST lpEntryList);
  244. /* BAD_STANDARD_OBJ
  245. *
  246. * This macro insures that the object is a writable object of the correct size
  247. * and that this method belongs to the object.
  248. *
  249. * NOTES ON USE!
  250. * This depends upon using the standard method of declaring the object
  251. * interface.
  252. *
  253. * prefix is the method prefix you chose when declaring the object interface.
  254. * method is the standard method name of the calling method.
  255. * lpVtbl is the name of the lpVtbl element of your object.
  256. */
  257. #define BAD_STANDARD_OBJ( lpObj, prefix, method, lpVtbl) \
  258. ( IsBadWritePtr( (lpObj), sizeof(*lpObj)) \
  259. || IsBadReadPtr( (void *) &(lpObj->lpVtbl->method), sizeof(LPVOID)) \
  260. ||( ( LPVOID) (lpObj->lpVtbl->method) != (LPVOID) (prefix##method)))
  261. #define FBadUnknown( lpObj ) \
  262. ( IsBadReadPtr( (lpObj), sizeof(LPVOID) ) \
  263. || IsBadReadPtr( (lpObj)->lpVtbl, 3 * sizeof(LPUNKNOWN) ) \
  264. || IsBadCodePtr( (FARPROC)(lpObj)->lpVtbl->QueryInterface ))
  265. /*
  266. * IUnknown
  267. */
  268. /*
  269. * QueryInterface
  270. */
  271. #define FBadQueryInterface( lpObj, riid, ppvObj) \
  272. ( IsBadReadPtr( riid, sizeof(IID)) \
  273. || IsBadWritePtr( ppvObj, sizeof(LPVOID)))
  274. /*
  275. * AddRef
  276. * No parameter validation required.
  277. */
  278. #define FBadAddRef( lpObj) FALSE
  279. /*
  280. * Release
  281. * No parameter validation required.
  282. */
  283. #define FBadRelease( lpObj) FALSE
  284. /*
  285. * GetLastError
  286. */
  287. #define FBadGetLastError( lpObj, hResult, ulFlags, lppMAPIError )\
  288. (IsBadWritePtr( lppMAPIError, sizeof(LPMAPIERROR)))
  289. /*
  290. * IMAPIProp
  291. */
  292. /*
  293. * SaveChanges
  294. * No parameter validation required.
  295. */
  296. #define FBadSaveChanges( lpObj, ulFlags) FALSE
  297. /*
  298. * GetProps
  299. */
  300. #define FBadGetProps( lpObj, lpPTagA, lpcValues, lppPropArray) \
  301. ( ( lpPTagA \
  302. && ( IsBadReadPtr( lpPTagA, sizeof(ULONG)) \
  303. || IsBadReadPtr( lpPTagA, (UINT)( (lpPTagA->cValues + 1) \
  304. * sizeof(ULONG))))) \
  305. || IsBadWritePtr( lpcValues, sizeof(ULONG)) \
  306. || IsBadWritePtr( lppPropArray, sizeof(LPSPropValue)))
  307. /*
  308. * GetPropList
  309. */
  310. #define FBadGetPropList( lpObj, lppPTagA) \
  311. (IsBadWritePtr( lppPTagA, sizeof(LPSPropTagArray FAR *)))
  312. /*
  313. * OpenProperty
  314. */
  315. #define FBadOpenProperty( lpObj, ulPropTag, lpiid, ulInterfaceOptions, ulFlags \
  316. , lppUnk) \
  317. ( IsBadReadPtr( lpiid, sizeof(IID)) \
  318. || IsBadWritePtr( lppUnk, sizeof (LPUNKNOWN FAR *)))
  319. /*
  320. * SetProps
  321. */
  322. #define FBadSetProps( lpObj, cValues, lpPropArray, lppProblems) \
  323. ( FBadRgPropVal( lpPropArray, (UINT) cValues) \
  324. || ( lppProblems \
  325. && IsBadWritePtr( lppProblems, sizeof(LPSPropProblemArray))))
  326. /*
  327. * DeleteProps
  328. */
  329. #define FBadDeleteProps( lpObj, lpPTagA, lppProblems) \
  330. ( ( !lpPTagA \
  331. || ( IsBadReadPtr( lpPTagA, sizeof(ULONG)) \
  332. || IsBadReadPtr( lpPTagA, (UINT)( (lpPTagA->cValues + 1) \
  333. * sizeof(ULONG))))) \
  334. || ( lppProblems \
  335. && IsBadWritePtr( lppProblems, sizeof(LPSPropProblemArray))))
  336. /*
  337. * CopyTo
  338. */
  339. #define FBadCopyTo( lpIPDAT, ciidExclude, rgiidExclude, lpExcludeProps \
  340. , ulUIParam, lpProgress, lpInterface, lpDestObj \
  341. , ulFlags, lppProblems) \
  342. ( ( ciidExclude \
  343. && ( IsBadReadPtr( rgiidExclude, (UINT)(ciidExclude * sizeof(IID))))) \
  344. || ( lpExcludeProps \
  345. && ( IsBadReadPtr( lpExcludeProps, sizeof(ULONG)) \
  346. || IsBadReadPtr( lpExcludeProps \
  347. , (UINT)( (lpExcludeProps->cValues + 1) \
  348. * sizeof(ULONG))))) \
  349. || (lpProgress && FBadUnknown( lpProgress )) \
  350. || (lpInterface && IsBadReadPtr( lpInterface, sizeof(IID))) \
  351. || IsBadReadPtr( lpDestObj, sizeof(LPVOID)) \
  352. || ( lppProblems \
  353. && IsBadWritePtr( lppProblems, sizeof(LPSPropProblemArray))))
  354. /*
  355. * CopyProps
  356. */
  357. #define FBadCopyProps( lpIPDAT, lpPropTagArray \
  358. , ulUIParam, lpProgress, lpInterface, lpDestObj \
  359. , ulFlags, lppProblems) \
  360. ( ( lpPropTagArray \
  361. && ( IsBadReadPtr( lpPropTagArray, sizeof(ULONG)) \
  362. || IsBadReadPtr( lpPropTagArray \
  363. , (UINT)( (lpPropTagArray->cValues + 1) \
  364. * sizeof(ULONG))))) \
  365. || (lpProgress && FBadUnknown( lpProgress )) \
  366. || (lpInterface && IsBadReadPtr( lpInterface, sizeof(IID))) \
  367. || IsBadReadPtr( lpDestObj, sizeof(LPVOID)) \
  368. || ( lppProblems \
  369. && IsBadWritePtr( lppProblems, sizeof(LPSPropProblemArray))))
  370. /*
  371. * GetNamesFromIDs
  372. */
  373. #define FBadGetNamesFromIDs( lpIPDAT, lppPropTags, lpPropSetGuid, ulFlags, \
  374. lpcPropNames, lpppPropNames) \
  375. ( IsBadReadPtr( lppPropTags, sizeof(LPSPropTagArray)) \
  376. || ( lpPropSetGuid && IsBadReadPtr( lpPropSetGuid, sizeof(GUID))) \
  377. || ( *lppPropTags \
  378. && ( IsBadReadPtr( *lppPropTags, sizeof(ULONG)) \
  379. || IsBadReadPtr( *lppPropTags \
  380. , (UINT)( ( ( *lppPropTags)->cValues + 1) \
  381. * sizeof(ULONG))))) \
  382. || IsBadWritePtr( lpcPropNames, sizeof (ULONG)) \
  383. || IsBadWritePtr( lpppPropNames, sizeof (LPVOID FAR *)))
  384. /*
  385. * GetNamesFromIDs
  386. */
  387. #define FBadGetIDsFromNames( lpIPDAT, cPropNames, lppPropNames, ulFlags \
  388. , lppPropTags) \
  389. ( (cPropNames && FBadRglpNameID( lppPropNames, cPropNames)) \
  390. || IsBadWritePtr( lppPropTags, sizeof(LPULONG FAR *)))
  391. STDAPI_(ULONG)
  392. FBadRestriction( LPSRestriction lpres );
  393. STDAPI_(ULONG)
  394. FBadPropTag( ULONG ulPropTag );
  395. STDAPI_(ULONG)
  396. FBadRow( LPSRow lprow );
  397. STDAPI_(ULONG)
  398. FBadProp( LPSPropValue lpprop );
  399. STDAPI_(ULONG)
  400. FBadSortOrderSet( LPSSortOrderSet lpsos );
  401. STDAPI_(ULONG)
  402. FBadColumnSet( LPSPropTagArray lpptaCols );
  403. /* Validation function
  404. The eMethod parameter tells us which internal validation to perform.
  405. The ppThis parameter tells us where the stack is, so we can access the other
  406. parameters.
  407. Becuase of this *magic* we MUST obtain the pointer to the This pointer in
  408. the method function.
  409. */
  410. #ifdef WIN16
  411. #define BASED_STACK __based(__segname("_STACK"))
  412. #else
  413. #define BASED_STACK
  414. #endif
  415. #ifdef WIN16
  416. HRESULT PASCAL
  417. #else
  418. HRESULT STDAPICALLTYPE
  419. #endif
  420. __CPPValidateParameters(METHODS eMethod, const LPVOID ppFirst);
  421. #ifdef WIN16
  422. HRESULT PASCAL
  423. #else
  424. HRESULT STDAPICALLTYPE
  425. #endif
  426. __ValidateParameters(METHODS eMethod, LPVOID ppThis);
  427. #ifdef _MAC
  428. #define STDAPIVCALLTYPE __cdecl
  429. #define STDAPIV EXTERN_C HRESULT STDAPIVCALLTYPE
  430. #define STDAPIV_(type) EXTERN_C type STDAPIVCALLTYPE
  431. #endif /* _MAC */
  432. /* Macro wrappers for platform independent validation */
  433. #if defined(_X86_) || defined( WIN16 )
  434. #define ValidateParms(x) { HRESULT _hr_ = HrValidateParameters x; if (HR_FAILED(_hr_)) return (_hr_); }
  435. #define UlValidateParms(x) { HRESULT _hr_ = HrValidateParameters x; if (HR_FAILED(_hr_)) return (ULONG)(_hr_); }
  436. #define CheckParms(x) AssertSz(HR_SUCCEEDED( HrValidateParameters x), "Parameter validation failed for method called by MAPI!")
  437. #else
  438. #define ValidateParms(x) { HRESULT _hr_ = HrValidateParametersV x; if (HR_FAILED(_hr_)) return (_hr_); }
  439. #define UlValidateParms(x) { HRESULT _hr_ = HrValidateParametersV x; if (HR_FAILED(_hr_)) return (ULONG)(_hr_); }
  440. #define CheckParms(x) AssertSz(HR_SUCCEEDED( HrValidateParametersV x ), "Parameter validation failed for method called by MAPI!")
  441. #endif
  442. #if defined(_X86_) || defined( WIN16 )
  443. #define ValidateParameters1( m, a1 )
  444. #define ValidateParameters2( m, a1, a2 ) \
  445. ValidateParms( ( m, (LPVOID FAR *) &a2 ) )
  446. #define ValidateParameters3( m, a1, a2, a3 ) \
  447. ValidateParms( ( m, (LPVOID FAR *) &a2 ) )
  448. #define ValidateParameters4( m, a1, a2, a3, a4 ) \
  449. ValidateParms( ( m, (LPVOID FAR *) &a2 ) )
  450. #define ValidateParameters5( m, a1, a2, a3, a4, a5 ) \
  451. ValidateParms( ( m, (LPVOID FAR *) &a2 ) )
  452. #define ValidateParameters6( m, a1, a2, a3, a4, a5, a6 ) \
  453. ValidateParms( ( m, (LPVOID FAR *) &a2 ) )
  454. #define ValidateParameters7( m, a1, a2, a3, a4, a5, a6, a7 ) \
  455. ValidateParms( ( m, (LPVOID FAR *) &a2 ) )
  456. #define ValidateParameters8( m, a1, a2, a3, a4, a5, a6, a7, a8 ) \
  457. ValidateParms( ( m, (LPVOID FAR *) &a2 ) )
  458. #define ValidateParameters9( m, a1, a2, a3, a4, a5, a6, a7, a8, a9 ) \
  459. ValidateParms( ( m, (LPVOID FAR *) &a2 ) )
  460. #define ValidateParameters10( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ) \
  461. ValidateParms( ( m, (LPVOID FAR *) &a2 ) )
  462. #define ValidateParameters11( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11 ) \
  463. ValidateParms( ( m, (LPVOID FAR *) &a2 ) )
  464. #define ValidateParameters12( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 ) \
  465. ValidateParms( ( m, (LPVOID FAR *) &a2 ) )
  466. #define ValidateParameters13( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) \
  467. ValidateParms( ( m, (LPVOID FAR *) &a2 ) )
  468. #define ValidateParameters14( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14 ) \
  469. ValidateParms( ( m, (LPVOID FAR *) &a2 ) )
  470. #define ValidateParameters15( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 ) \
  471. ValidateParms( ( m, (LPVOID FAR *) &a2 ) )
  472. #define ValidateParameters16( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16 ) \
  473. ValidateParms( ( m, (LPVOID FAR *) &a2 ) )
  474. #define UlValidateParameters1( m, a1 )
  475. #define UlValidateParameters2( m, a1, a2 ) \
  476. UlValidateParms( ( m, (LPVOID FAR *) &a2 ) )
  477. #define UlValidateParameters3( m, a1, a2, a3 ) \
  478. UlValidateParms( ( m, (LPVOID FAR *) &a2 ) )
  479. #define UlValidateParameters4( m, a1, a2, a3, a4 ) \
  480. UlValidateParms( ( m, (LPVOID FAR *) &a2 ) )
  481. #define UlValidateParameters5( m, a1, a2, a3, a4, a5 ) \
  482. UlValidateParms( ( m, (LPVOID FAR *) &a2 ) )
  483. #define UlValidateParameters6( m, a1, a2, a3, a4, a5, a6 ) \
  484. UlValidateParms( ( m, (LPVOID FAR *) &a2 ) )
  485. #define UlValidateParameters7( m, a1, a2, a3, a4, a5, a6, a7 ) \
  486. UlValidateParms( ( m, (LPVOID FAR *) &a2 ) )
  487. #define UlValidateParameters8( m, a1, a2, a3, a4, a5, a6, a7, a8 ) \
  488. UlValidateParms( ( m, (LPVOID FAR *) &a2 ) )
  489. #define UlValidateParameters9( m, a1, a2, a3, a4, a5, a6, a7, a8, a9 ) \
  490. UlValidateParms( ( m, (LPVOID FAR *) &a2 ) )
  491. #define UlValidateParameters10( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ) \
  492. UlValidateParms( ( m, (LPVOID FAR *) &a2 ) )
  493. #define UlValidateParameters11( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11 ) \
  494. UlValidateParms( ( m, (LPVOID FAR *) &a2 ) )
  495. #define UlValidateParameters12( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 ) \
  496. UlValidateParms( ( m, (LPVOID FAR *) &a2 ) )
  497. #define UlValidateParameters13( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) \
  498. UlValidateParms( ( m, (LPVOID FAR *) &a2 ) )
  499. #define UlValidateParameters14( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14 ) \
  500. UlValidateParms( ( m, (LPVOID FAR *) &a2 ) )
  501. #define UlValidateParameters15( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 ) \
  502. UlValidateParms( ( m, (LPVOID FAR *) &a2 ) )
  503. #define UlValidateParameters16( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16 ) \
  504. UlValidateParms( ( m, (LPVOID FAR *) &a2 ) )
  505. #define CheckParameters1( m, a1 )
  506. #define CheckParameters2( m, a1, a2 ) \
  507. CheckParms( ( m, (LPVOID FAR *) &a2 ) )
  508. #define CheckParameters3( m, a1, a2, a3) \
  509. CheckParms( ( m, (LPVOID FAR *) &a2 ) )
  510. #define CheckParameters4( m, a1, a2, a3, a4 ) \
  511. CheckParms( ( m, (LPVOID FAR *) &a2 ) )
  512. #define CheckParameters5( m, a1, a2, a3, a4, a5 ) \
  513. CheckParms( ( m, (LPVOID FAR *) &a2 ) )
  514. #define CheckParameters6( m, a1, a2, a3, a4, a5, a6 ) \
  515. CheckParms( ( m, (LPVOID FAR *) &a2 ) )
  516. #define CheckParameters7( m, a1, a2, a3, a4, a5, a6, a7 ) \
  517. CheckParms( ( m, (LPVOID FAR *) &a2 ) )
  518. #define CheckParameters8( m, a1, a2, a3, a4, a5, a6, a7, a8 ) \
  519. CheckParms( ( m, (LPVOID FAR *) &a2 ) )
  520. #define CheckParameters9( m, a1, a2, a3, a4, a5, a6, a7, a8, a9 ) \
  521. CheckParms( ( m, (LPVOID FAR *) &a2 ) )
  522. #define CheckParameters10( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ) \
  523. CheckParms( ( m, (LPVOID FAR *) &a2 ) )
  524. #define CheckParameters11( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11 ) \
  525. CheckParms( ( m, (LPVOID FAR *) &a2 ) )
  526. #define CheckParameters12( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 ) \
  527. CheckParms( ( m, (LPVOID FAR *) &a2 ) )
  528. #define CheckParameters13( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) \
  529. CheckParms( ( m, (LPVOID FAR *) &a2 ) )
  530. #define CheckParameters14( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14 ) \
  531. CheckParms( ( m, (LPVOID FAR *) &a2 ) )
  532. #define CheckParameters15( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 ) \
  533. CheckParms( ( m, (LPVOID FAR *) &a2 ) )
  534. #define CheckParameters16( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16 ) \
  535. CheckParms( ( m, (LPVOID FAR *) &a2 ) )
  536. #else /* !_X86_ && !WIN16 */
  537. #define ValidateParameters1( m, a1 ) \
  538. ValidateParms( ( m, a1 ) )
  539. #define ValidateParameters2( m, a1, a2 ) \
  540. ValidateParms( ( m, a1, a2 ))
  541. #define ValidateParameters3( m, a1, a2, a3 ) \
  542. ValidateParms( ( m, a1, a2, a3 ))
  543. #define ValidateParameters4( m, a1, a2, a3, a4 ) \
  544. ValidateParms( ( m, a1, a2, a3, a4 ))
  545. #define ValidateParameters5( m, a1, a2, a3, a4, a5 ) \
  546. ValidateParms( ( m, a1, a2, a3, a4, a5 ))
  547. #define ValidateParameters6( m, a1, a2, a3, a4, a5, a6 ) \
  548. ValidateParms( ( m, a1, a2, a3, a4, a5, a6 ))
  549. #define ValidateParameters7( m, a1, a2, a3, a4, a5, a6, a7 ) \
  550. ValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7 ))
  551. #define ValidateParameters8( m, a1, a2, a3, a4, a5, a6, a7, a8 ) \
  552. ValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8 ))
  553. #define ValidateParameters9( m, a1, a2, a3, a4, a5, a6, a7, a8, a9 ) \
  554. ValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9 ))
  555. #define ValidateParameters10( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ) \
  556. ValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ))
  557. #define ValidateParameters11( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11 ) \
  558. ValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11 ))
  559. #define ValidateParameters12( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 ) \
  560. ValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 ))
  561. #define ValidateParameters13( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) \
  562. ValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ))
  563. #define ValidateParameters14( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14 ) \
  564. ValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14 ))
  565. #define ValidateParameters15( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 ) \
  566. ValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 ))
  567. #define ValidateParameters16( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16 ) \
  568. ValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16 ))
  569. #define UlValidateParameters1( m, a1 ) \
  570. UlValidateParms( ( m, a1 ) )
  571. #define UlValidateParameters2( m, a1, a2 ) \
  572. UlValidateParms( ( m, a1, a2 ))
  573. #define UlValidateParameters3( m, a1, a2, a3 ) \
  574. UlValidateParms( ( m, a1, a2, a3 ))
  575. #define UlValidateParameters4( m, a1, a2, a3, a4 ) \
  576. UlValidateParms( ( m, a1, a2, a3, a4 ))
  577. #define UlValidateParameters5( m, a1, a2, a3, a4, a5 ) \
  578. UlValidateParms( ( m, a1, a2, a3, a4, a5 ))
  579. #define UlValidateParameters6( m, a1, a2, a3, a4, a5, a6 ) \
  580. UlValidateParms( ( m, a1, a2, a3, a4, a5, a6 ))
  581. #define UlValidateParameters7( m, a1, a2, a3, a4, a5, a6, a7 ) \
  582. UlValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7 ))
  583. #define UlValidateParameters8( m, a1, a2, a3, a4, a5, a6, a7, a8 ) \
  584. UlValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8 ))
  585. #define UlValidateParameters9( m, a1, a2, a3, a4, a5, a6, a7, a8, a9 ) \
  586. UlValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9 ))
  587. #define UlValidateParameters10( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ) \
  588. UlValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ))
  589. #define UlValidateParameters11( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11 ) \
  590. UlValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11 ))
  591. #define UlValidateParameters12( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 ) \
  592. UlValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 ))
  593. #define UlValidateParameters13( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) \
  594. UlValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ))
  595. #define UlValidateParameters14( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14 ) \
  596. UlValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14 ))
  597. #define UlValidateParameters15( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 ) \
  598. UlValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 ))
  599. #define UlValidateParameters16( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16 ) \
  600. UlValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16 ))
  601. #define CheckParameters1( m, a1 ) \
  602. CheckParms( ( m, a1 ) )
  603. #define CheckParameters2( m, a1, a2 ) \
  604. CheckParms( ( m, a1, a2 ))
  605. #define CheckParameters3( m, a1, a2, a3 ) \
  606. CheckParms( ( m, a1, a2, a3 ))
  607. #define CheckParameters4( m, a1, a2, a3, a4 ) \
  608. CheckParms( ( m, a1, a2, a3, a4 ))
  609. #define CheckParameters5( m, a1, a2, a3, a4, a5 ) \
  610. CheckParms( ( m, a1, a2, a3, a4, a5 ))
  611. #define CheckParameters6( m, a1, a2, a3, a4, a5, a6 ) \
  612. CheckParms( ( m, a1, a2, a3, a4, a5, a6 ))
  613. #define CheckParameters7( m, a1, a2, a3, a4, a5, a6, a7 ) \
  614. CheckParms( ( m, a1, a2, a3, a4, a5, a6, a7 ))
  615. #define CheckParameters8( m, a1, a2, a3, a4, a5, a6, a7, a8 ) \
  616. CheckParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8 ))
  617. #define CheckParameters9( m, a1, a2, a3, a4, a5, a6, a7, a8, a9 ) \
  618. CheckParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9 ))
  619. #define CheckParameters10( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ) \
  620. CheckParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ))
  621. #define CheckParameters11( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11 ) \
  622. CheckParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11 ))
  623. #define CheckParameters12( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 ) \
  624. CheckParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 ))
  625. #define CheckParameters13( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) \
  626. CheckParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ))
  627. #define CheckParameters14( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14 ) \
  628. CheckParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14 ))
  629. #define CheckParameters15( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 ) \
  630. CheckParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 ))
  631. #define CheckParameters16( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16 ) \
  632. CheckParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16 ))
  633. #endif /* _X86_ || WIN16 */
  634. /*
  635. * M A P I P A R A M E T E R V A L I D A T I O N M A C R O S
  636. */
  637. /* IUnknown */
  638. #define Validate_IUnknown_QueryInterface( a1, a2, a3 ) \
  639. ValidateParameters3( IUnknown_QueryInterface, a1, a2, a3 )
  640. #define UlValidate_IUnknown_QueryInterface( a1, a2, a3 ) \
  641. UlValidateParameters3( IUnknown_QueryInterface, a1, a2, a3 )
  642. #define CheckParameters_IUnknown_QueryInterface( a1, a2, a3 ) \
  643. CheckParameters3( IUnknown_QueryInterface, a1, a2, a3 )
  644. #define Validate_IUnknown_AddRef( a1 ) \
  645. ValidateParameters1( IUnknown_AddRef, a1 )
  646. #define UlValidate_IUnknown_AddRef( a1 ) \
  647. UlValidateParameters1( IUnknown_AddRef, a1 )
  648. #define CheckParameters_IUnknown_AddRef( a1 ) \
  649. CheckParameters1( IUnknown_AddRef, a1 )
  650. #define Validate_IUnknown_Release( a1 ) \
  651. ValidateParameters1( IUnknown_Release, a1 )
  652. #define UlValidate_IUnknown_Release( a1 ) \
  653. UlValidateParameters1( IUnknown_Release, a1 )
  654. #define CheckParameters_IUnknown_Release( a1 ) \
  655. CheckParameters1( IUnknown_Release, a1 )
  656. /* IMAPIProp */
  657. #define Validate_IMAPIProp_GetLastError( a1, a2, a3, a4 ) \
  658. ValidateParameters4( IMAPIProp_GetLastError, a1, a2, a3, a4 )
  659. #define UlValidate_IMAPIProp_GetLastError( a1, a2, a3, a4 ) \
  660. UlValidateParameters4( IMAPIProp_GetLastError, a1, a2, a3, a4 )
  661. #define CheckParameters_IMAPIProp_GetLastError( a1, a2, a3, a4 ) \
  662. CheckParameters4( IMAPIProp_GetLastError, a1, a2, a3, a4 )
  663. #define Validate_IMAPIProp_SaveChanges( a1, a2 ) \
  664. ValidateParameters2( IMAPIProp_SaveChanges, a1, a2 )
  665. #define UlValidate_IMAPIProp_SaveChanges( a1, a2 ) \
  666. UlValidateParameters2( IMAPIProp_SaveChanges, a1, a2 )
  667. #define CheckParameters_IMAPIProp_SaveChanges( a1, a2 ) \
  668. CheckParameters2( IMAPIProp_SaveChanges, a1, a2 )
  669. #define Validate_IMAPIProp_GetProps( a1, a2, a3, a4, a5 ) \
  670. ValidateParameters5( IMAPIProp_GetProps, a1, a2, a3, a4, a5 )
  671. #define UlValidate_IMAPIProp_GetProps( a1, a2, a3, a4, a5 ) \
  672. UlValidateParameters5( IMAPIProp_GetProps, a1, a2, a3, a4, a5 )
  673. #define CheckParameters_IMAPIProp_GetProps( a1, a2, a3, a4, a5 ) \
  674. CheckParameters5( IMAPIProp_GetProps, a1, a2, a3, a4, a5 )
  675. #define Validate_IMAPIProp_GetPropList( a1, a2, a3 ) \
  676. ValidateParameters3( IMAPIProp_GetPropList, a1, a2, a3 )
  677. #define UlValidate_IMAPIProp_GetPropList( a1, a2, a3 ) \
  678. UlValidateParameters3( IMAPIProp_GetPropList, a1, a2, a3 )
  679. #define CheckParameters_IMAPIProp_GetPropList( a1, a2, a3 ) \
  680. CheckParameters3( IMAPIProp_GetPropList, a1, a2, a3 )
  681. #define Validate_IMAPIProp_OpenProperty( a1, a2, a3, a4, a5, a6 ) \
  682. ValidateParameters6( IMAPIProp_OpenProperty, a1, a2, a3, a4, a5, a6 )
  683. #define UlValidate_IMAPIProp_OpenProperty( a1, a2, a3, a4, a5, a6 ) \
  684. UlValidateParameters6( IMAPIProp_OpenProperty, a1, a2, a3, a4, a5, a6 )
  685. #define CheckParameters_IMAPIProp_OpenProperty( a1, a2, a3, a4, a5, a6 ) \
  686. CheckParameters6( IMAPIProp_OpenProperty, a1, a2, a3, a4, a5, a6 )
  687. #define Validate_IMAPIProp_SetProps( a1, a2, a3, a4 ) \
  688. ValidateParameters4( IMAPIProp_SetProps, a1, a2, a3, a4 )
  689. #define UlValidate_IMAPIProp_SetProps( a1, a2, a3, a4 ) \
  690. UlValidateParameters4( IMAPIProp_SetProps, a1, a2, a3, a4 )
  691. #define CheckParameters_IMAPIProp_SetProps( a1, a2, a3, a4 ) \
  692. CheckParameters4( IMAPIProp_SetProps, a1, a2, a3, a4 )
  693. #define Validate_IMAPIProp_DeleteProps( a1, a2, a3 ) \
  694. ValidateParameters3( IMAPIProp_DeleteProps, a1, a2, a3 )
  695. #define UlValidate_IMAPIProp_DeleteProps( a1, a2, a3 ) \
  696. UlValidateParameters3( IMAPIProp_DeleteProps, a1, a2, a3 )
  697. #define CheckParameters_IMAPIProp_DeleteProps( a1, a2, a3 ) \
  698. CheckParameters3( IMAPIProp_DeleteProps, a1, a2, a3 )
  699. #define Validate_IMAPIProp_CopyTo( a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ) \
  700. ValidateParameters10( IMAPIProp_CopyTo, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 )
  701. #define UlValidate_IMAPIProp_CopyTo( a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ) \
  702. UlValidateParameters10( IMAPIProp_CopyTo, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 )
  703. #define CheckParameters_IMAPIProp_CopyTo( a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ) \
  704. CheckParameters10( IMAPIProp_CopyTo, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 )
  705. #define Validate_IMAPIProp_CopyProps( a1, a2, a3, a4, a5, a6, a7, a8 ) \
  706. ValidateParameters8( IMAPIProp_CopyProps, a1, a2, a3, a4, a5, a6, a7, a8 )
  707. #define UlValidate_IMAPIProp_CopyProps( a1, a2, a3, a4, a5, a6, a7, a8 ) \
  708. UlValidateParameters8( IMAPIProp_CopyProps, a1, a2, a3, a4, a5, a6, a7, a8 )
  709. #define CheckParameters_IMAPIProp_CopyProps( a1, a2, a3, a4, a5, a6, a7, a8 ) \
  710. CheckParameters8( IMAPIProp_CopyProps, a1, a2, a3, a4, a5, a6, a7, a8 )
  711. #define Validate_IMAPIProp_GetNamesFromIDs( a1, a2, a3, a4, a5, a6 ) \
  712. ValidateParameters6( IMAPIProp_GetNamesFromIDs, a1, a2, a3, a4, a5, a6 )
  713. #define UlValidate_IMAPIProp_GetNamesFromIDs( a1, a2, a3, a4, a5, a6 ) \
  714. UlValidateParameters6( IMAPIProp_GetNamesFromIDs, a1, a2, a3, a4, a5, a6 )
  715. #define CheckParameters_IMAPIProp_GetNamesFromIDs( a1, a2, a3, a4, a5, a6 ) \
  716. CheckParameters6( IMAPIProp_GetNamesFromIDs, a1, a2, a3, a4, a5, a6 )
  717. #define Validate_IMAPIProp_GetIDsFromNames( a1, a2, a3, a4, a5 ) \
  718. ValidateParameters5( IMAPIProp_GetIDsFromNames, a1, a2, a3, a4, a5 )
  719. #define UlValidate_IMAPIProp_GetIDsFromNames( a1, a2, a3, a4, a5 ) \
  720. UlValidateParameters5( IMAPIProp_GetIDsFromNames, a1, a2, a3, a4, a5 )
  721. #define CheckParameters_IMAPIProp_GetIDsFromNames( a1, a2, a3, a4, a5 ) \
  722. CheckParameters5( IMAPIProp_GetIDsFromNames, a1, a2, a3, a4, a5 )
  723. /* IMAPITable */
  724. #define Validate_IMAPITable_GetLastError( a1, a2, a3, a4 ) \
  725. ValidateParameters4( IMAPITable_GetLastError, a1, a2, a3, a4 )
  726. #define UlValidate_IMAPITable_GetLastError( a1, a2, a3, a4 ) \
  727. UlValidateParameters4( IMAPITable_GetLastError, a1, a2, a3, a4 )
  728. #define CheckParameters_IMAPITable_GetLastError( a1, a2, a3, a4 ) \
  729. CheckParameters4( IMAPITable_GetLastError, a1, a2, a3, a4 )
  730. #define Validate_IMAPITable_Advise( a1, a2, a3, a4 ) \
  731. ValidateParameters4( IMAPITable_Advise, a1, a2, a3, a4 )
  732. #define UlValidate_IMAPITable_Advise( a1, a2, a3, a4 ) \
  733. UlValidateParameters4( IMAPITable_Advise, a1, a2, a3, a4 )
  734. #define CheckParameters_IMAPITable_Advise( a1, a2, a3, a4 ) \
  735. CheckParameters4( IMAPITable_Advise, a1, a2, a3, a4 )
  736. #define Validate_IMAPITable_Unadvise( a1, a2 ) \
  737. ValidateParameters2( IMAPITable_Unadvise, a1, a2 )
  738. #define UlValidate_IMAPITable_Unadvise( a1, a2 ) \
  739. UlValidateParameters2( IMAPITable_Unadvise, a1, a2 )
  740. #define CheckParameters_IMAPITable_Unadvise( a1, a2 ) \
  741. CheckParameters2( IMAPITable_Unadvise, a1, a2 )
  742. #define Validate_IMAPITable_GetStatus( a1, a2, a3 ) \
  743. ValidateParameters3( IMAPITable_GetStatus, a1, a2, a3 )
  744. #define UlValidate_IMAPITable_GetStatus( a1, a2, a3 ) \
  745. UlValidateParameters3( IMAPITable_GetStatus, a1, a2, a3 )
  746. #define CheckParameters_IMAPITable_GetStatus( a1, a2, a3 ) \
  747. CheckParameters3( IMAPITable_GetStatus, a1, a2, a3 )
  748. #define Validate_IMAPITable_SetColumns( a1, a2, a3 ) \
  749. ValidateParameters3( IMAPITable_SetColumns, a1, a2, a3 )
  750. #define UlValidate_IMAPITable_SetColumns( a1, a2, a3 ) \
  751. UlValidateParameters3( IMAPITable_SetColumns, a1, a2, a3 )
  752. #define CheckParameters_IMAPITable_SetColumns( a1, a2, a3 ) \
  753. CheckParameters3( IMAPITable_SetColumns, a1, a2, a3 )
  754. #define Validate_IMAPITable_QueryColumns( a1, a2, a3 ) \
  755. ValidateParameters3( IMAPITable_QueryColumns, a1, a2, a3 )
  756. #define UlValidate_IMAPITable_QueryColumns( a1, a2, a3 ) \
  757. UlValidateParameters3( IMAPITable_QueryColumns, a1, a2, a3 )
  758. #define CheckParameters_IMAPITable_QueryColumns( a1, a2, a3 ) \
  759. CheckParameters3( IMAPITable_QueryColumns, a1, a2, a3 )
  760. #define Validate_IMAPITable_GetRowCount( a1, a2, a3 ) \
  761. ValidateParameters3( IMAPITable_GetRowCount, a1, a2, a3 )
  762. #define UlValidate_IMAPITable_GetRowCount( a1, a2, a3 ) \
  763. UlValidateParameters3( IMAPITable_GetRowCount, a1, a2, a3 )
  764. #define CheckParameters_IMAPITable_GetRowCount( a1, a2, a3 ) \
  765. CheckParameters3( IMAPITable_GetRowCount, a1, a2, a3 )
  766. #define Validate_IMAPITable_SeekRow( a1, a2, a3, a4 ) \
  767. ValidateParameters4( IMAPITable_SeekRow, a1, a2, a3, a4 )
  768. #define UlValidate_IMAPITable_SeekRow( a1, a2, a3, a4 ) \
  769. UlValidateParameters4( IMAPITable_SeekRow, a1, a2, a3, a4 )
  770. #define CheckParameters_IMAPITable_SeekRow( a1, a2, a3, a4 ) \
  771. CheckParameters4( IMAPITable_SeekRow, a1, a2, a3, a4 )
  772. #define Validate_IMAPITable_SeekRowApprox( a1, a2, a3 ) \
  773. ValidateParameters3( IMAPITable_SeekRowApprox, a1, a2, a3 )
  774. #define UlValidate_IMAPITable_SeekRowApprox( a1, a2, a3 ) \
  775. UlValidateParameters3( IMAPITable_SeekRowApprox, a1, a2, a3 )
  776. #define CheckParameters_IMAPITable_SeekRowApprox( a1, a2, a3 ) \
  777. CheckParameters3( IMAPITable_SeekRowApprox, a1, a2, a3 )
  778. #define Validate_IMAPITable_QueryPosition( a1, a2, a3, a4 ) \
  779. ValidateParameters4( IMAPITable_QueryPosition, a1, a2, a3, a4 )
  780. #define UlValidate_IMAPITable_QueryPosition( a1, a2, a3, a4 ) \
  781. UlValidateParameters4( IMAPITable_QueryPosition, a1, a2, a3, a4 )
  782. #define CheckParameters_IMAPITable_QueryPosition( a1, a2, a3, a4 ) \
  783. CheckParameters4( IMAPITable_QueryPosition, a1, a2, a3, a4 )
  784. #define Validate_IMAPITable_FindRow( a1, a2, a3, a4 ) \
  785. ValidateParameters4( IMAPITable_FindRow, a1, a2, a3, a4 )
  786. #define UlValidate_IMAPITable_FindRow( a1, a2, a3, a4 ) \
  787. UlValidateParameters4( IMAPITable_FindRow, a1, a2, a3, a4 )
  788. #define CheckParameters_IMAPITable_FindRow( a1, a2, a3, a4 ) \
  789. CheckParameters4( IMAPITable_FindRow, a1, a2, a3, a4 )
  790. #define Validate_IMAPITable_Restrict( a1, a2, a3 ) \
  791. ValidateParameters3( IMAPITable_Restrict, a1, a2, a3 )
  792. #define UlValidate_IMAPITable_Restrict( a1, a2, a3 ) \
  793. UlValidateParameters3( IMAPITable_Restrict, a1, a2, a3 )
  794. #define CheckParameters_IMAPITable_Restrict( a1, a2, a3 ) \
  795. CheckParameters3( IMAPITable_Restrict, a1, a2, a3 )
  796. #define Validate_IMAPITable_CreateBookmark( a1, a2 ) \
  797. ValidateParameters2( IMAPITable_CreateBookmark, a1, a2 )
  798. #define UlValidate_IMAPITable_CreateBookmark( a1, a2 ) \
  799. UlValidateParameters2( IMAPITable_CreateBookmark, a1, a2 )
  800. #define CheckParameters_IMAPITable_CreateBookmark( a1, a2 ) \
  801. CheckParameters2( IMAPITable_CreateBookmark, a1, a2 )
  802. #define Validate_IMAPITable_FreeBookmark( a1, a2 ) \
  803. ValidateParameters2( IMAPITable_FreeBookmark, a1, a2 )
  804. #define UlValidate_IMAPITable_FreeBookmark( a1, a2 ) \
  805. UlValidateParameters2( IMAPITable_FreeBookmark, a1, a2 )
  806. #define CheckParameters_IMAPITable_FreeBookmark( a1, a2 ) \
  807. CheckParameters2( IMAPITable_FreeBookmark, a1, a2 )
  808. #define Validate_IMAPITable_SortTable( a1, a2, a3 ) \
  809. ValidateParameters3( IMAPITable_SortTable, a1, a2, a3 )
  810. #define UlValidate_IMAPITable_SortTable( a1, a2, a3 ) \
  811. UlValidateParameters3( IMAPITable_SortTable, a1, a2, a3 )
  812. #define CheckParameters_IMAPITable_SortTable( a1, a2, a3 ) \
  813. CheckParameters3( IMAPITable_SortTable, a1, a2, a3 )
  814. #define Validate_IMAPITable_QuerySortOrder( a1, a2 ) \
  815. ValidateParameters2( IMAPITable_QuerySortOrder, a1, a2 )
  816. #define UlValidate_IMAPITable_QuerySortOrder( a1, a2 ) \
  817. UlValidateParameters2( IMAPITable_QuerySortOrder, a1, a2 )
  818. #define CheckParameters_IMAPITable_QuerySortOrder( a1, a2 ) \
  819. CheckParameters2( IMAPITable_QuerySortOrder, a1, a2 )
  820. #define Validate_IMAPITable_QueryRows( a1, a2, a3, a4 ) \
  821. ValidateParameters4( IMAPITable_QueryRows, a1, a2, a3, a4 )
  822. #define UlValidate_IMAPITable_QueryRows( a1, a2, a3, a4 ) \
  823. UlValidateParameters4( IMAPITable_QueryRows, a1, a2, a3, a4 )
  824. #define CheckParameters_IMAPITable_QueryRows( a1, a2, a3, a4 ) \
  825. CheckParameters4( IMAPITable_QueryRows, a1, a2, a3, a4 )
  826. #define Validate_IMAPITable_Abort( a1 ) \
  827. ValidateParameters1( IMAPITable_Abort, a1 )
  828. #define UlValidate_IMAPITable_Abort( a1 ) \
  829. UlValidateParameters1( IMAPITable_Abort, a1 )
  830. #define CheckParameters_IMAPITable_Abort( a1 ) \
  831. CheckParameters1( IMAPITable_Abort, a1 )
  832. #define Validate_IMAPITable_ExpandRow( a1, a2, a3, a4, a5, a6, a7 ) \
  833. ValidateParameters7( IMAPITable_ExpandRow, a1, a2, a3, a4, a5, a6, a7 )
  834. #define UlValidate_IMAPITable_ExpandRow( a1, a2, a3, a4, a5, a6, a7 ) \
  835. UlValidateParameters7( IMAPITable_ExpandRow, a1, a2, a3, a4, a5, a6, a7 )
  836. #define CheckParameters_IMAPITable_ExpandRow( a1, a2, a3, a4, a5, a6, a7 ) \
  837. CheckParameters7( IMAPITable_ExpandRow, a1, a2, a3, a4, a5, a6, a7 )
  838. #define Validate_IMAPITable_CollapseRow( a1, a2, a3, a4, a5 ) \
  839. ValidateParameters5( IMAPITable_CollapseRow, a1, a2, a3, a4, a5 )
  840. #define UlValidate_IMAPITable_CollapseRow( a1, a2, a3, a4, a5 ) \
  841. UlValidateParameters5( IMAPITable_CollapseRow, a1, a2, a3, a4, a5 )
  842. #define CheckParameters_IMAPITable_CollapseRow( a1, a2, a3, a4, a5 ) \
  843. CheckParameters5( IMAPITable_CollapseRow, a1, a2, a3, a4, a5 )
  844. #define Validate_IMAPITable_WaitForCompletion( a1, a2, a3, a4 ) \
  845. ValidateParameters4( IMAPITable_WaitForCompletion, a1, a2, a3, a4 )
  846. #define UlValidate_IMAPITable_WaitForCompletion( a1, a2, a3, a4 ) \
  847. UlValidateParameters4( IMAPITable_WaitForCompletion, a1, a2, a3, a4 )
  848. #define CheckParameters_IMAPITable_WaitForCompletion( a1, a2, a3, a4 ) \
  849. CheckParameters4( IMAPITable_WaitForCompletion, a1, a2, a3, a4 )
  850. #define Validate_IMAPITable_GetCollapseState( a1, a2, a3, a4, a5, a6 ) \
  851. ValidateParameters6( IMAPITable_GetCollapseState, a1, a2, a3, a4, a5, a6 )
  852. #define UlValidate_IMAPITable_GetCollapseState( a1, a2, a3, a4, a5, a6 ) \
  853. UlValidateParameters6( IMAPITable_GetCollapseState, a1, a2, a3, a4, a5, a6 )
  854. #define CheckParameters_IMAPITable_GetCollapseState( a1, a2, a3, a4, a5, a6 ) \
  855. CheckParameters6( IMAPITable_GetCollapseState, a1, a2, a3, a4, a5, a6 )
  856. #define Validate_IMAPITable_SetCollapseState( a1, a2, a3, a4, a5 ) \
  857. ValidateParameters5( IMAPITable_SetCollapseState, a1, a2, a3, a4, a5 )
  858. #define UlValidate_IMAPITable_SetCollapseState( a1, a2, a3, a4, a5 ) \
  859. UlValidateParameters5( IMAPITable_SetCollapseState, a1, a2, a3, a4, a5 )
  860. #define CheckParameters_IMAPITable_SetCollapseState( a1, a2, a3, a4, a5 ) \
  861. CheckParameters5( IMAPITable_SetCollapseState, a1, a2, a3, a4, a5 )
  862. /* IMAPIContainer */
  863. #define Validate_IMAPIContainer_GetContentsTable( a1, a2, a3 ) \
  864. ValidateParameters3( IMAPIContainer_GetContentsTable, a1, a2, a3 )
  865. #define UlValidate_IMAPIContainer_GetContentsTable( a1, a2, a3 ) \
  866. UlValidateParameters3( IMAPIContainer_GetContentsTable, a1, a2, a3 )
  867. #define CheckParameters_IMAPIContainer_GetContentsTable( a1, a2, a3 ) \
  868. CheckParameters3( IMAPIContainer_GetContentsTable, a1, a2, a3 )
  869. #define Validate_IMAPIContainer_GetHierarchyTable( a1, a2, a3 ) \
  870. ValidateParameters3( IMAPIContainer_GetHierarchyTable, a1, a2, a3 )
  871. #define UlValidate_IMAPIContainer_GetHierarchyTable( a1, a2, a3 ) \
  872. UlValidateParameters3( IMAPIContainer_GetHierarchyTable, a1, a2, a3 )
  873. #define CheckParameters_IMAPIContainer_GetHierarchyTable( a1, a2, a3 ) \
  874. CheckParameters3( IMAPIContainer_GetHierarchyTable, a1, a2, a3 )
  875. #define Validate_IMAPIContainer_OpenEntry( a1, a2, a3, a4, a5, a6, a7 ) \
  876. ValidateParameters7( IMAPIContainer_OpenEntry, a1, a2, a3, a4, a5, a6, a7 )
  877. #define UlValidate_IMAPIContainer_OpenEntry( a1, a2, a3, a4, a5, a6, a7 ) \
  878. UlValidateParameters7( IMAPIContainer_OpenEntry, a1, a2, a3, a4, a5, a6, a7 )
  879. #define CheckParameters_IMAPIContainer_OpenEntry( a1, a2, a3, a4, a5, a6, a7 ) \
  880. CheckParameters7( IMAPIContainer_OpenEntry, a1, a2, a3, a4, a5, a6, a7 )
  881. #define Validate_IMAPIContainer_SetSearchCriteria( a1, a2, a3, a4 ) \
  882. ValidateParameters4( IMAPIContainer_SetSearchCriteria, a1, a2, a3, a4 )
  883. #define UlValidate_IMAPIContainer_SetSearchCriteria( a1, a2, a3, a4 ) \
  884. UlValidateParameters4( IMAPIContainer_SetSearchCriteria, a1, a2, a3, a4 )
  885. #define CheckParameters_IMAPIContainer_SetSearchCriteria( a1, a2, a3, a4 ) \
  886. CheckParameters4( IMAPIContainer_SetSearchCriteria, a1, a2, a3, a4 )
  887. #define Validate_IMAPIContainer_GetSearchCriteria( a1, a2, a3, a4, a5 ) \
  888. ValidateParameters5( IMAPIContainer_GetSearchCriteria, a1, a2, a3, a4, a5 )
  889. #define UlValidate_IMAPIContainer_GetSearchCriteria( a1, a2, a3, a4, a5 ) \
  890. UlValidateParameters5( IMAPIContainer_GetSearchCriteria, a1, a2, a3, a4, a5 )
  891. #define CheckParameters_IMAPIContainer_GetSearchCriteria( a1, a2, a3, a4, a5 ) \
  892. CheckParameters5( IMAPIContainer_GetSearchCriteria, a1, a2, a3, a4, a5 )
  893. /* IABContainer */
  894. #define Validate_IABContainer_CreateEntry( a1, a2, a3, a4, a5 ) \
  895. ValidateParameters5( IABContainer_CreateEntry, a1, a2, a3, a4, a5 )
  896. #define UlValidate_IABContainer_CreateEntry( a1, a2, a3, a4, a5 ) \
  897. UlValidateParameters5( IABContainer_CreateEntry, a1, a2, a3, a4, a5 )
  898. #define CheckParameters_IABContainer_CreateEntry( a1, a2, a3, a4, a5 ) \
  899. CheckParameters5( IABContainer_CreateEntry, a1, a2, a3, a4, a5 )
  900. #define Validate_IABContainer_CopyEntries( a1, a2, a3, a4, a5 ) \
  901. ValidateParameters5( IABContainer_CopyEntries, a1, a2, a3, a4, a5 )
  902. #define UlValidate_IABContainer_CopyEntries( a1, a2, a3, a4, a5 ) \
  903. UlValidateParameters5( IABContainer_CopyEntries, a1, a2, a3, a4, a5 )
  904. #define CheckParameters_IABContainer_CopyEntries( a1, a2, a3, a4, a5 ) \
  905. CheckParameters5( IABContainer_CopyEntries, a1, a2, a3, a4, a5 )
  906. #define Validate_IABContainer_DeleteEntries( a1, a2, a3 ) \
  907. ValidateParameters3( IABContainer_DeleteEntries, a1, a2, a3 )
  908. #define UlValidate_IABContainer_DeleteEntries( a1, a2, a3 ) \
  909. UlValidateParameters3( IABContainer_DeleteEntries, a1, a2, a3 )
  910. #define CheckParameters_IABContainer_DeleteEntries( a1, a2, a3 ) \
  911. CheckParameters3( IABContainer_DeleteEntries, a1, a2, a3 )
  912. #define Validate_IABContainer_ResolveNames( a1, a2, a3, a4, a5 ) \
  913. ValidateParameters5( IABContainer_ResolveNames, a1, a2, a3, a4, a5 )
  914. #define UlValidate_IABContainer_ResolveNames( a1, a2, a3, a4, a5 ) \
  915. UlValidateParameters5( IABContainer_ResolveNames, a1, a2, a3, a4, a5 )
  916. #define CheckParameters_IABContainer_ResolveNames( a1, a2, a3, a4, a5 ) \
  917. CheckParameters5( IABContainer_ResolveNames, a1, a2, a3, a4, a5 )
  918. /* IDistList */
  919. #define Validate_IDistList_CreateEntry( a1, a2, a3, a4, a5 ) \
  920. ValidateParameters5( IDistList_CreateEntry, a1, a2, a3, a4, a5 )
  921. #define UlValidate_IDistList_CreateEntry( a1, a2, a3, a4, a5 ) \
  922. UlValidateParameters5( IDistList_CreateEntry, a1, a2, a3, a4, a5 )
  923. #define CheckParameters_IDistList_CreateEntry( a1, a2, a3, a4, a5 ) \
  924. CheckParameters5( IDistList_CreateEntry, a1, a2, a3, a4, a5 )
  925. #define Validate_IDistList_CopyEntries( a1, a2, a3, a4, a5 ) \
  926. ValidateParameters5( IDistList_CopyEntries, a1, a2, a3, a4, a5 )
  927. #define UlValidate_IDistList_CopyEntries( a1, a2, a3, a4, a5 ) \
  928. UlValidateParameters5( IDistList_CopyEntries, a1, a2, a3, a4, a5 )
  929. #define CheckParameters_IDistList_CopyEntries( a1, a2, a3, a4, a5 ) \
  930. CheckParameters5( IDistList_CopyEntries, a1, a2, a3, a4, a5 )
  931. #define Validate_IDistList_DeleteEntries( a1, a2, a3 ) \
  932. ValidateParameters3( IDistList_DeleteEntries, a1, a2, a3 )
  933. #define UlValidate_IDistList_DeleteEntries( a1, a2, a3 ) \
  934. UlValidateParameters3( IDistList_DeleteEntries, a1, a2, a3 )
  935. #define CheckParameters_IDistList_DeleteEntries( a1, a2, a3 ) \
  936. CheckParameters3( IDistList_DeleteEntries, a1, a2, a3 )
  937. #define Validate_IDistList_ResolveNames( a1, a2, a3, a4, a5 ) \
  938. ValidateParameters5( IDistList_ResolveNames, a1, a2, a3, a4, a5 )
  939. #define UlValidate_IDistList_ResolveNames( a1, a2, a3, a4, a5 ) \
  940. UlValidateParameters5( IDistList_ResolveNames, a1, a2, a3, a4, a5 )
  941. #define CheckParameters_IDistList_ResolveNames( a1, a2, a3, a4, a5 ) \
  942. CheckParameters5( IDistList_ResolveNames, a1, a2, a3, a4, a5 )
  943. /* IMAPIFolder */
  944. #define Validate_IMAPIFolder_CreateMessage( a1, a2, a3, a4 ) \
  945. ValidateParameters4( IMAPIFolder_CreateMessage, a1, a2, a3, a4 )
  946. #define UlValidate_IMAPIFolder_CreateMessage( a1, a2, a3, a4 ) \
  947. UlValidateParameters4( IMAPIFolder_CreateMessage, a1, a2, a3, a4 )
  948. #define CheckParameters_IMAPIFolder_CreateMessage( a1, a2, a3, a4 ) \
  949. CheckParameters4( IMAPIFolder_CreateMessage, a1, a2, a3, a4 )
  950. #define Validate_IMAPIFolder_CopyMessages( a1, a2, a3, a4, a5, a6, a7 ) \
  951. ValidateParameters7( IMAPIFolder_CopyMessages, a1, a2, a3, a4, a5, a6, a7 )
  952. #define UlValidate_IMAPIFolder_CopyMessages( a1, a2, a3, a4, a5, a6, a7 ) \
  953. UlValidateParameters7( IMAPIFolder_CopyMessages, a1, a2, a3, a4, a5, a6, a7 )
  954. #define CheckParameters_IMAPIFolder_CopyMessages( a1, a2, a3, a4, a5, a6, a7 ) \
  955. CheckParameters7( IMAPIFolder_CopyMessages, a1, a2, a3, a4, a5, a6, a7 )
  956. #define Validate_IMAPIFolder_DeleteMessages( a1, a2, a3, a4, a5 ) \
  957. ValidateParameters5( IMAPIFolder_DeleteMessages, a1, a2, a3, a4, a5 )
  958. #define UlValidate_IMAPIFolder_DeleteMessages( a1, a2, a3, a4, a5 ) \
  959. UlValidateParameters5( IMAPIFolder_DeleteMessages, a1, a2, a3, a4, a5 )
  960. #define CheckParameters_IMAPIFolder_DeleteMessages( a1, a2, a3, a4, a5 ) \
  961. CheckParameters5( IMAPIFolder_DeleteMessages, a1, a2, a3, a4, a5 )
  962. #define Validate_IMAPIFolder_CreateFolder( a1, a2, a3, a4, a5, a6, a7 ) \
  963. ValidateParameters7( IMAPIFolder_CreateFolder, a1, a2, a3, a4, a5, a6, a7 )
  964. #define UlValidate_IMAPIFolder_CreateFolder( a1, a2, a3, a4, a5, a6, a7 ) \
  965. UlValidateParameters7( IMAPIFolder_CreateFolder, a1, a2, a3, a4, a5, a6, a7 )
  966. #define CheckParameters_IMAPIFolder_CreateFolder( a1, a2, a3, a4, a5, a6, a7 ) \
  967. CheckParameters7( IMAPIFolder_CreateFolder, a1, a2, a3, a4, a5, a6, a7 )
  968. #define Validate_IMAPIFolder_CopyFolder( a1, a2, a3, a4, a5, a6, a7, a8, a9 ) \
  969. ValidateParameters9( IMAPIFolder_CopyFolder, a1, a2, a3, a4, a5, a6, a7, a8, a9 )
  970. #define UlValidate_IMAPIFolder_CopyFolder( a1, a2, a3, a4, a5, a6, a7, a8, a9 ) \
  971. UlValidateParameters9( IMAPIFolder_CopyFolder, a1, a2, a3, a4, a5, a6, a7, a8, a9 )
  972. #define CheckParameters_IMAPIFolder_CopyFolder( a1, a2, a3, a4, a5, a6, a7, a8, a9 ) \
  973. CheckParameters9( IMAPIFolder_CopyFolder, a1, a2, a3, a4, a5, a6, a7, a8, a9 )
  974. #define Validate_IMAPIFolder_DeleteFolder( a1, a2, a3, a4, a5, a6 ) \
  975. ValidateParameters6( IMAPIFolder_DeleteFolder, a1, a2, a3, a4, a5, a6 )
  976. #define UlValidate_IMAPIFolder_DeleteFolder( a1, a2, a3, a4, a5, a6 ) \
  977. UlValidateParameters6( IMAPIFolder_DeleteFolder, a1, a2, a3, a4, a5, a6 )
  978. #define CheckParameters_IMAPIFolder_DeleteFolder( a1, a2, a3, a4, a5, a6 ) \
  979. CheckParameters6( IMAPIFolder_DeleteFolder, a1, a2, a3, a4, a5, a6 )
  980. #define Validate_IMAPIFolder_SetReadFlags( a1, a2, a3, a4, a5 ) \
  981. ValidateParameters5( IMAPIFolder_SetReadFlags, a1, a2, a3, a4, a5 )
  982. #define UlValidate_IMAPIFolder_SetReadFlags( a1, a2, a3, a4, a5 ) \
  983. UlValidateParameters5( IMAPIFolder_SetReadFlags, a1, a2, a3, a4, a5 )
  984. #define CheckParameters_IMAPIFolder_SetReadFlags( a1, a2, a3, a4, a5 ) \
  985. CheckParameters5( IMAPIFolder_SetReadFlags, a1, a2, a3, a4, a5 )
  986. #define Validate_IMAPIFolder_GetMessageStatus( a1, a2, a3, a4, a5 ) \
  987. ValidateParameters5( IMAPIFolder_GetMessageStatus, a1, a2, a3, a4, a5 )
  988. #define UlValidate_IMAPIFolder_GetMessageStatus( a1, a2, a3, a4, a5 ) \
  989. UlValidateParameters5( IMAPIFolder_GetMessageStatus, a1, a2, a3, a4, a5 )
  990. #define CheckParameters_IMAPIFolder_GetMessageStatus( a1, a2, a3, a4, a5 ) \
  991. CheckParameters5( IMAPIFolder_GetMessageStatus, a1, a2, a3, a4, a5 )
  992. #define Validate_IMAPIFolder_SetMessageStatus( a1, a2, a3, a4, a5, a6 ) \
  993. ValidateParameters6( IMAPIFolder_SetMessageStatus, a1, a2, a3, a4, a5, a6 )
  994. #define UlValidate_IMAPIFolder_SetMessageStatus( a1, a2, a3, a4, a5, a6 ) \
  995. UlValidateParameters6( IMAPIFolder_SetMessageStatus, a1, a2, a3, a4, a5, a6 )
  996. #define CheckParameters_IMAPIFolder_SetMessageStatus( a1, a2, a3, a4, a5, a6 ) \
  997. CheckParameters6( IMAPIFolder_SetMessageStatus, a1, a2, a3, a4, a5, a6 )
  998. #define Validate_IMAPIFolder_SaveContentsSort( a1, a2, a3 ) \
  999. ValidateParameters3( IMAPIFolder_SaveContentsSort, a1, a2, a3 )
  1000. #define UlValidate_IMAPIFolder_SaveContentsSort( a1, a2, a3 ) \
  1001. UlValidateParameters3( IMAPIFolder_SaveContentsSort, a1, a2, a3 )
  1002. #define CheckParameters_IMAPIFolder_SaveContentsSort( a1, a2, a3 ) \
  1003. CheckParameters3( IMAPIFolder_SaveContentsSort, a1, a2, a3 )
  1004. #define Validate_IMAPIFolder_EmptyFolder( a1, a2, a3, a4 ) \
  1005. ValidateParameters4( IMAPIFolder_EmptyFolder, a1, a2, a3, a4 )
  1006. #define UlValidate_IMAPIFolder_EmptyFolder( a1, a2, a3, a4 ) \
  1007. UlValidateParameters4( IMAPIFolder_EmptyFolder, a1, a2, a3, a4 )
  1008. #define CheckParameters_IMAPIFolder_EmptyFolder( a1, a2, a3, a4 ) \
  1009. CheckParameters4( IMAPIFolder_EmptyFolder, a1, a2, a3, a4 )
  1010. /* IStream */
  1011. #define Validate_IStream_Read( a1, a2, a3, a4 ) \
  1012. ValidateParameters4( IStream_Read, a1, a2, a3, a4 )
  1013. #define UlValidate_IStream_Read( a1, a2, a3, a4 ) \
  1014. UlValidateParameters4( IStream_Read, a1, a2, a3, a4 )
  1015. #define CheckParameters_IStream_Read( a1, a2, a3, a4 ) \
  1016. CheckParameters4( IStream_Read, a1, a2, a3, a4 )
  1017. #define Validate_IStream_Write( a1, a2, a3, a4 ) \
  1018. ValidateParameters4( IStream_Write, a1, a2, a3, a4 )
  1019. #define UlValidate_IStream_Write( a1, a2, a3, a4 ) \
  1020. UlValidateParameters4( IStream_Write, a1, a2, a3, a4 )
  1021. #define CheckParameters_IStream_Write( a1, a2, a3, a4 ) \
  1022. CheckParameters4( IStream_Write, a1, a2, a3, a4 )
  1023. #define Validate_IStream_Seek( a1, a2, a3, a4 ) \
  1024. ValidateParameters4( IStream_Seek, a1, a2, a3, a4 )
  1025. #define UlValidate_IStream_Seek( a1, a2, a3, a4 ) \
  1026. UlValidateParameters4( IStream_Seek, a1, a2, a3, a4 )
  1027. #define CheckParameters_IStream_Seek( a1, a2, a3, a4 ) \
  1028. CheckParameters4( IStream_Seek, a1, a2, a3, a4 )
  1029. #define Validate_IStream_SetSize( a1, a2 ) \
  1030. ValidateParameters2( IStream_SetSize, a1, a2 )
  1031. #define UlValidate_IStream_SetSize( a1, a2 ) \
  1032. UlValidateParameters2( IStream_SetSize, a1, a2 )
  1033. #define CheckParameters_IStream_SetSize( a1, a2 ) \
  1034. CheckParameters2( IStream_SetSize, a1, a2 )
  1035. #define Validate_IStream_CopyTo( a1, a2, a3, a4, a5 ) \
  1036. ValidateParameters5( IStream_CopyTo, a1, a2, a3, a4, a5 )
  1037. #define UlValidate_IStream_CopyTo( a1, a2, a3, a4, a5 ) \
  1038. UlValidateParameters5( IStream_CopyTo, a1, a2, a3, a4, a5 )
  1039. #define CheckParameters_IStream_CopyTo( a1, a2, a3, a4, a5 ) \
  1040. CheckParameters5( IStream_CopyTo, a1, a2, a3, a4, a5 )
  1041. #define Validate_IStream_Commit( a1, a2 ) \
  1042. ValidateParameters2( IStream_Commit, a1, a2 )
  1043. #define UlValidate_IStream_Commit( a1, a2 ) \
  1044. UlValidateParameters2( IStream_Commit, a1, a2 )
  1045. #define CheckParameters_IStream_Commit( a1, a2 ) \
  1046. CheckParameters2( IStream_Commit, a1, a2 )
  1047. #define Validate_IStream_Revert( a1 ) \
  1048. ValidateParameters1( IStream_Revert, a1 )
  1049. #define UlValidate_IStream_Revert( a1 ) \
  1050. UlValidateParameters1( IStream_Revert, a1 )
  1051. #define CheckParameters_IStream_Revert( a1 ) \
  1052. CheckParameters1( IStream_Revert, a1 )
  1053. #define Validate_IStream_LockRegion( a1, a2, a3, a4 ) \
  1054. ValidateParameters4( IStream_LockRegion, a1, a2, a3, a4 )
  1055. #define UlValidate_IStream_LockRegion( a1, a2, a3, a4 ) \
  1056. UlValidateParameters4( IStream_LockRegion, a1, a2, a3, a4 )
  1057. #define CheckParameters_IStream_LockRegion( a1, a2, a3, a4 ) \
  1058. CheckParameters4( IStream_LockRegion, a1, a2, a3, a4 )
  1059. #define Validate_IStream_UnlockRegion( a1, a2, a3, a4 ) \
  1060. ValidateParameters4( IStream_UnlockRegion, a1, a2, a3, a4 )
  1061. #define UlValidate_IStream_UnlockRegion( a1, a2, a3, a4 ) \
  1062. UlValidateParameters4( IStream_UnlockRegion, a1, a2, a3, a4 )
  1063. #define CheckParameters_IStream_UnlockRegion( a1, a2, a3, a4 ) \
  1064. CheckParameters4( IStream_UnlockRegion, a1, a2, a3, a4 )
  1065. #define Validate_IStream_Stat( a1, a2, a3 ) \
  1066. ValidateParameters3( IStream_Stat, a1, a2, a3 )
  1067. #define UlValidate_IStream_Stat( a1, a2, a3 ) \
  1068. UlValidateParameters3( IStream_Stat, a1, a2, a3 )
  1069. #define CheckParameters_IStream_Stat( a1, a2, a3 ) \
  1070. CheckParameters3( IStream_Stat, a1, a2, a3 )
  1071. #define Validate_IStream_Clone( a1, a2 ) \
  1072. ValidateParameters2( IStream_Clone, a1, a2 )
  1073. #define UlValidate_IStream_Clone( a1, a2 ) \
  1074. UlValidateParameters2( IStream_Clone, a1, a2 )
  1075. #define CheckParameters_IStream_Clone( a1, a2 ) \
  1076. CheckParameters2( IStream_Clone, a1, a2 )
  1077. /* IMAPIAdviseSink */
  1078. #define Validate_IMAPIAdviseSink_OnNotify( a1, a2, a3 ) \
  1079. ValidateParameters3( IMAPIAdviseSink_OnNotify, a1, a2, a3 )
  1080. #define UlValidate_IMAPIAdviseSink_OnNotify( a1, a2, a3 ) \
  1081. UlValidateParameters3( IMAPIAdviseSink_OnNotify, a1, a2, a3 )
  1082. #define CheckParameters_IMAPIAdviseSink_OnNotify( a1, a2, a3 ) \
  1083. CheckParameters3( IMAPIAdviseSink_OnNotify, a1, a2, a3 )
  1084. /* IWABObject */
  1085. #define Validate_IWABObject_GetLastError( a1, a2, a3, a4 ) \
  1086. ValidateParameters4( IWABObject_GetLastError, a1, a2, a3, a4 )
  1087. #define UlValidate_IWABObject_GetLastError( a1, a2, a3, a4 ) \
  1088. UlValidateParameters4( IWABOBject_GetLastError, a1, a2, a3, a4 )
  1089. #define CheckParameters_IWABObject_GetLastError( a1, a2, a3, a4 ) \
  1090. CheckParameters4( IWABObject_GetLastError, a1, a2, a3, a4 )
  1091. #define Validate_IWABObject_AllocateBuffer( a1, a2, a3 ) \
  1092. ValidateParameters3( IWABObject_AllocateBuffer, a1, a2, a3 )
  1093. #define UlValidate_IWABObject_AllocateBuffer( a1, a2, a3) \
  1094. UlValidateParameters3( IWABOBject_AllocateBuffer, a1, a2, a3 )
  1095. #define CheckParameters_IWABObject_AllocateBuffer( a1, a2, a3 ) \
  1096. CheckParameters3( IWABObject_AllocateBuffer, a1, a2, a3 )
  1097. #define Validate_IWABObject_AllocateMore( a1, a2, a3, a4 ) \
  1098. ValidateParameters4( IWABObject_AllocateMore, a1, a2, a3, a4 )
  1099. #define UlValidate_IWABObject_AllocateMore( a1, a2, a3, a4 ) \
  1100. UlValidateParameters4( IWABOBject_AllocateMore, a1, a2, a3, a4 )
  1101. #define CheckParameters_IWABObject_AllocateMore( a1, a2, a3, a4 ) \
  1102. CheckParameters4( IWABObject_AllocateMore, a1, a2, a3, a4 )
  1103. #define Validate_IWABObject_FreeBuffer( a1, a2 ) \
  1104. ValidateParameters2( IWABObject_FreeBuffer, a1, a2 )
  1105. #define UlValidate_IWABObject_FreeBuffer( a1, a2 ) \
  1106. UlValidateParameters2( IWABOBject_FreeBuffer, a1, a2 )
  1107. #define CheckParameters_IWABObject_FreeBuffer( a1, a2 ) \
  1108. CheckParameters2( IWABObject_FreeBuffer, a1, a2 )
  1109. #define Validate_IWABObject_Backup( a1, a2 ) \
  1110. ValidateParameters2( IWABObject_Backup, a1, a2 )
  1111. #define UlValidate_IWABObject_Backup( a1, a2 ) \
  1112. UlValidateParameters2( IWABOBject_Backup, a1, a2 )
  1113. #define CheckParameters_IWABObject_Backup( a1, a2 ) \
  1114. CheckParameters2( IWABObject_Backup, a1, a2 )
  1115. #define Validate_IWABObject_Import( a1, a2 ) \
  1116. ValidateParameters2( IWABObject_Import, a1, a2 )
  1117. #define UlValidate_IWABObject_Import( a1, a2 ) \
  1118. UlValidateParameters2( IWABOBject_Import, a1, a2 )
  1119. #define CheckParameters_IWABObject_Import( a1, a2 ) \
  1120. CheckParameters2( IWABObject_Import, a1, a2 )
  1121. #ifdef WIN16
  1122. HRESULT
  1123. PASCAL HrValidateParameters( METHODS eMethod, LPVOID FAR *ppFirstArg );
  1124. #elif defined(_X86_)
  1125. STDAPI HrValidateParameters( METHODS eMethod, LPVOID FAR *ppFirstArg );
  1126. #else
  1127. STDAPIV HrValidateParametersV( METHODS eMethod, ... );
  1128. STDAPIV HrValidateParametersValist( METHODS eMethod, va_list arglist );
  1129. #endif /* WIN16 */
  1130. #ifdef __cplusplus
  1131. }
  1132. #endif
  1133. #endif /* _INC_VALIDATE */