home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / sdk / mapi / win16 / dev / sample.ab / abp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-11  |  17.4 KB  |  630 lines

  1. /***********************************************************************
  2.  *
  3.  *  ABP.H
  4.  *
  5.  *  Definitions for Sample Address Book Provider
  6.  *
  7.  *  Copyright 1992-1995 Microsoft Corporation.  All Rights Reserved.
  8.  *
  9.  ***********************************************************************/
  10.  
  11.  
  12. #ifdef WIN32
  13. #define INC_OLE2                /* Get the OLE2 stuff */
  14. #define INC_RPC                 /* harmless on Windows NT; Windows 95 needs it */
  15. #endif
  16. #include <windows.h>
  17. #include <windowsx.h>
  18. #include <limits.h>
  19. #include <mapiwin.h>
  20. #include <mapidbg.h>
  21.  
  22. #include <mapidefs.h>
  23. #include <mapicode.h>
  24. #include <mapitags.h>
  25. #include <mapiguid.h>
  26. #include <mapispi.h>
  27. #include <mapiutil.h>
  28. #include <mapival.h>
  29.  
  30. #include <memory.h>
  31. #include <commdlg.h>
  32.  
  33. /*
  34.  *  IUnknown base members
  35.  */
  36. #define SAB_IUnknown                    \
  37.     LONG                lcInit;         \
  38.     HRESULT             hResult;        \
  39.     UINT                idsLastError;   \
  40.     HINSTANCE           hLibrary;       \
  41.     LPALLOCATEBUFFER    lpAllocBuff;    \
  42.     LPALLOCATEMORE      lpAllocMore;    \
  43.     LPFREEBUFFER        lpFreeBuff;     \
  44.     LPMALLOC            lpMalloc;       \
  45.     CRITICAL_SECTION    cs
  46.  
  47. #define SAB_IUnkWithLogon               \
  48.     SAB_IUnknown;                       \
  49.     LPABLOGON           lpABLogon
  50.  
  51. #define SAB_Wrapped                     \
  52.     SAB_IUnkWithLogon;                  \
  53.     LPMAPIPROP          lpPropData
  54.  
  55. /*
  56.  *  Definition of all the objects referred to in the various source modules
  57.  *  of this provider.
  58.  */
  59.  
  60. /*
  61.  *  Declaration of IABProvider object implementation
  62.  *  Code for this is in ABP.C
  63.  */
  64. #undef  INTERFACE
  65. #define INTERFACE struct _ABP
  66.  
  67. #undef  MAPIMETHOD_
  68. #define MAPIMETHOD_(type, method)   MAPIMETHOD_DECLARE(type, method, ABP_)
  69.         MAPI_IUNKNOWN_METHODS(IMPL)
  70.         MAPI_IABPROVIDER_METHODS(IMPL)
  71. #undef  MAPIMETHOD_
  72. #define MAPIMETHOD_(type, method)   MAPIMETHOD_TYPEDEF(type, method, ABP_)
  73.         MAPI_IUNKNOWN_METHODS(IMPL)
  74.         MAPI_IABPROVIDER_METHODS(IMPL)
  75. #undef  MAPIMETHOD_
  76. #define MAPIMETHOD_(type, method)   STDMETHOD_(type, method)
  77.  
  78. DECLARE_MAPI_INTERFACE(ABP_)
  79. {
  80.     MAPI_IUNKNOWN_METHODS(IMPL)
  81.     MAPI_IABPROVIDER_METHODS(IMPL)
  82. };
  83.  
  84.  
  85. /*
  86.  *  Declaration of IABLogon object implementation
  87.  *  Code for this is in ABP.C
  88.  */
  89. #undef  INTERFACE
  90. #define INTERFACE struct _ABPLOGON
  91.  
  92. #undef  MAPIMETHOD_
  93. #define MAPIMETHOD_(type, method)   MAPIMETHOD_DECLARE(type, method, ABPLOGON_)
  94.         MAPI_IUNKNOWN_METHODS(IMPL)
  95.         MAPI_IABLOGON_METHODS(IMPL)
  96. #undef  MAPIMETHOD_
  97. #define MAPIMETHOD_(type, method)   MAPIMETHOD_TYPEDEF(type, method, ABPLOGON_)
  98.         MAPI_IUNKNOWN_METHODS(IMPL)
  99.         MAPI_IABLOGON_METHODS(IMPL)
  100. #undef  MAPIMETHOD_
  101. #define MAPIMETHOD_(type, method)   STDMETHOD_(type, method)
  102.  
  103. DECLARE_MAPI_INTERFACE(ABPLOGON_)
  104. {
  105.     MAPI_IUNKNOWN_METHODS(IMPL)
  106.     MAPI_IABLOGON_METHODS(IMPL)
  107. };
  108.  
  109.  
  110. /*
  111.  *  Declaration of IABContainer object implementation
  112.  *  Code for this is in ROOT.C
  113.  */
  114. #undef  INTERFACE
  115. #define INTERFACE   struct _ROOT
  116.  
  117. #undef  MAPIMETHOD_
  118. #define MAPIMETHOD_(type, method)   MAPIMETHOD_DECLARE(type, method, ROOT_)
  119.         MAPI_IUNKNOWN_METHODS(IMPL)
  120.         MAPI_IMAPIPROP_METHODS(IMPL)
  121.         MAPI_IMAPICONTAINER_METHODS(IMPL)
  122.         MAPI_IABCONTAINER_METHODS(IMPL)
  123. #undef  MAPIMETHOD_
  124. #define MAPIMETHOD_(type, method)   MAPIMETHOD_TYPEDEF(type, method, ROOT_)
  125.         MAPI_IUNKNOWN_METHODS(IMPL)
  126.         MAPI_IMAPIPROP_METHODS(IMPL)
  127.         MAPI_IMAPICONTAINER_METHODS(IMPL)
  128.         MAPI_IABCONTAINER_METHODS(IMPL)
  129. #undef  MAPIMETHOD_
  130. #define MAPIMETHOD_(type, method)   STDMETHOD_(type, method)
  131.  
  132. DECLARE_MAPI_INTERFACE(ROOT_)
  133. {
  134.     MAPI_IUNKNOWN_METHODS(IMPL)
  135.     MAPI_IMAPIPROP_METHODS(IMPL)
  136.     MAPI_IMAPICONTAINER_METHODS(IMPL)
  137.     MAPI_IABCONTAINER_METHODS(IMPL)
  138. };
  139.  
  140.  
  141. /*
  142.  *  Declaration of IABContainer object implementation
  143.  *  Code for this is in ABCONT.C
  144.  */
  145. #undef  INTERFACE
  146. #define INTERFACE   struct _ABCNT
  147.  
  148. #undef  MAPIMETHOD_
  149. #define MAPIMETHOD_(type, method)   MAPIMETHOD_DECLARE(type, method, ABC_)
  150.         MAPI_IUNKNOWN_METHODS(IMPL)
  151.         MAPI_IMAPIPROP_METHODS(IMPL)
  152.         MAPI_IMAPICONTAINER_METHODS(IMPL)
  153.         MAPI_IABCONTAINER_METHODS(IMPL)
  154. #undef  MAPIMETHOD_
  155. #define MAPIMETHOD_(type, method)   MAPIMETHOD_TYPEDEF(type, method, ABC_)
  156.         MAPI_IUNKNOWN_METHODS(IMPL)
  157.         MAPI_IMAPIPROP_METHODS(IMPL)
  158.         MAPI_IMAPICONTAINER_METHODS(IMPL)
  159.         MAPI_IABCONTAINER_METHODS(IMPL)
  160. #undef  MAPIMETHOD_
  161. #define MAPIMETHOD_(type, method)   STDMETHOD_(type, method)
  162.  
  163. DECLARE_MAPI_INTERFACE(ABC_)
  164. {
  165.     MAPI_IUNKNOWN_METHODS(IMPL)
  166.     MAPI_IMAPIPROP_METHODS(IMPL)
  167.     MAPI_IMAPICONTAINER_METHODS(IMPL)
  168.     MAPI_IABCONTAINER_METHODS(IMPL)
  169. };
  170.  
  171. /*
  172.  *  Declaration of IMAPIContainer object implementation
  173.  *  Code for this is in ABSEARCH.C
  174.  */
  175. #undef  INTERFACE
  176. #define INTERFACE   struct _ABSRCH
  177.  
  178. #undef  MAPIMETHOD_
  179. #define MAPIMETHOD_(type, method)   MAPIMETHOD_DECLARE(type, method, ABSRCH_)
  180.         MAPI_IUNKNOWN_METHODS(IMPL)
  181.         MAPI_IMAPIPROP_METHODS(IMPL)
  182.         MAPI_IMAPICONTAINER_METHODS(IMPL)
  183.         MAPI_IABCONTAINER_METHODS(IMPL)
  184. #undef  MAPIMETHOD_
  185. #define MAPIMETHOD_(type, method)   MAPIMETHOD_TYPEDEF(type, method, ABSRCH_)
  186.         MAPI_IUNKNOWN_METHODS(IMPL)
  187.         MAPI_IMAPIPROP_METHODS(IMPL)
  188.         MAPI_IMAPICONTAINER_METHODS(IMPL)
  189.         MAPI_IABCONTAINER_METHODS(IMPL)
  190. #undef  MAPIMETHOD_
  191. #define MAPIMETHOD_(type, method)   STDMETHOD_(type, method)
  192.  
  193. DECLARE_MAPI_INTERFACE(ABSRCH_)
  194. {
  195.     MAPI_IUNKNOWN_METHODS(IMPL)
  196.     MAPI_IMAPIPROP_METHODS(IMPL)
  197.     MAPI_IMAPICONTAINER_METHODS(IMPL)
  198. };
  199.  
  200.  
  201. /*
  202.  *  Declaration of IMailUser object implementation
  203.  *  Code for this is in ABUSER.C
  204.  */
  205. #undef  INTERFACE
  206. #define INTERFACE   struct _ABUSER
  207.  
  208. #undef  MAPIMETHOD_
  209. #define MAPIMETHOD_(type, method)   MAPIMETHOD_DECLARE(type, method, ABU_)
  210.         MAPI_IUNKNOWN_METHODS(IMPL)
  211.         MAPI_IMAPIPROP_METHODS(IMPL)
  212.         MAPI_IMAILUSER_METHODS(IMPL)
  213. #undef  MAPIMETHOD_
  214. #define MAPIMETHOD_(type, method)   MAPIMETHOD_TYPEDEF(type, method, ABU_)
  215.         MAPI_IUNKNOWN_METHODS(IMPL)
  216.         MAPI_IMAPIPROP_METHODS(IMPL)
  217.         MAPI_IMAILUSER_METHODS(IMPL)
  218. #undef  MAPIMETHOD_
  219. #define MAPIMETHOD_(type, method)   STDMETHOD_(type, method)
  220.  
  221. DECLARE_MAPI_INTERFACE(ABU_)
  222. {
  223.     MAPI_IUNKNOWN_METHODS(IMPL)
  224.     MAPI_IMAPIPROP_METHODS(IMPL)
  225.     MAPI_IMAILUSER_METHODS(IMPL)
  226. };
  227.  
  228.  
  229. /*
  230.  *  Declaration of IMAPIProp object implementation
  231.  *  Code for this is in WRAP.C
  232.  */
  233. #undef  INTERFACE
  234. #define INTERFACE   struct _WRAP
  235.  
  236. #undef  MAPIMETHOD_
  237. #define MAPIMETHOD_(type, method)   MAPIMETHOD_DECLARE(type, method, WRAP_)
  238.         MAPI_IUNKNOWN_METHODS(IMPL)
  239.         MAPI_IMAPIPROP_METHODS(IMPL)
  240. #undef  MAPIMETHOD_
  241. #define MAPIMETHOD_(type, method)   MAPIMETHOD_TYPEDEF(type, method, WRAP_)
  242.         MAPI_IUNKNOWN_METHODS(IMPL)
  243.         MAPI_IMAPIPROP_METHODS(IMPL)
  244. #undef  MAPIMETHOD_
  245. #define MAPIMETHOD_(type, method)   STDMETHOD_(type, method)
  246.  
  247. DECLARE_MAPI_INTERFACE(WRAP_)
  248. {
  249.     MAPI_IUNKNOWN_METHODS(IMPL)
  250.     MAPI_IMAPIPROP_METHODS(IMPL)
  251. };
  252.     
  253.  
  254. #undef  INTERFACE
  255. #define INTERFACE   struct _IVTABC
  256.  
  257. #undef  MAPIMETHOD_
  258. #define MAPIMETHOD_(type, method)   MAPIMETHOD_DECLARE(type, method, IVTABC_)
  259.         MAPI_IUNKNOWN_METHODS(IMPL)
  260.         MAPI_IMAPITABLE_METHODS(IMPL)
  261. #undef  MAPIMETHOD_
  262. #define MAPIMETHOD_(type, method)   MAPIMETHOD_TYPEDEF(type, method, IVTABC_)
  263.         MAPI_IUNKNOWN_METHODS(IMPL)
  264.         MAPI_IMAPITABLE_METHODS(IMPL)
  265. #undef  MAPIMETHOD_
  266. #define MAPIMETHOD_(type, method)   STDMETHOD_(type, method)
  267.  
  268. DECLARE_MAPI_INTERFACE(IVTABC_)
  269. {
  270.     MAPI_IUNKNOWN_METHODS(IMPL)
  271.     MAPI_IMAPITABLE_METHODS(IMPL)
  272. };
  273.  
  274.  
  275. /*
  276.  *  Internal utility functions that allow access to data stored in the Init object
  277.  */
  278. void
  279. RemoveLogonObject(LPABPROVIDER lpABProvider, LPVOID lpvABLogon, LPFREEBUFFER lpFreeBuff);
  280.  
  281. void
  282. FindLogonObject(LPABPROVIDER lpABProvider, LPMAPIUID lpMuidToFind, LPABLOGON * lppABLogon);
  283.  
  284. /*
  285.  *  Internal utility functions that allow access to data stored in the logon object
  286.  */
  287.  
  288. LPMAPIUID
  289. LpMuidFromLogon(LPABLOGON lpABLogon);
  290.  
  291. HRESULT
  292. HrLpszGetCurrentFileName(LPABLOGON lpABLogon, LPSTR * lppszFileName);
  293.  
  294. HRESULT
  295. HrReplaceCurrentFileName(LPABLOGON lpABLogon, LPSTR lpstrT);
  296.  
  297. void
  298. GenerateContainerDN(LPABLOGON lpABLogon, LPSTR lpszName);
  299.  
  300. BOOL
  301. FEqualSABFiles( LPABLOGON lpABLogon,
  302.                 LPSTR lpszFileName);
  303.  
  304. /*
  305.  *
  306.  *  Functions that return new objects
  307.  *
  308.  */
  309.  
  310. /*
  311.  *  Creates a new ABPLogon object  (see ABLOGON.C)
  312.  */
  313. HRESULT
  314. HrNewABLogon(   LPABLOGON *         lppABLogon,
  315.                 LPABPROVIDER        lpABP,
  316.                 LPMAPISUP           lpMAPISup,
  317.                 LPSTR               lpszSABFile,
  318.                 LPMAPIUID           lpmuid,
  319.                 HINSTANCE           hLibrary,
  320.                 LPALLOCATEBUFFER    lpAllocBuff,
  321.                 LPALLOCATEMORE      lpAllocMore,
  322.                 LPFREEBUFFER        lpFreeBuff,
  323.                 LPMALLOC            lpMalloc );
  324.  
  325. /*
  326.  *  Creates a new ROOT container object  (see ROOT.C)
  327.  */
  328. HRESULT
  329. HrNewROOT(LPABCONT *        lppROOT,
  330.           ULONG *           lpulObjType,
  331.           LPABLOGON         lpABPLogon,
  332.           LPCIID            lpInterface,
  333.           HINSTANCE         hLibrary,
  334.           LPALLOCATEBUFFER  lpAllocBuff,
  335.           LPALLOCATEMORE    lpAllocMore,
  336.           LPFREEBUFFER      lpFreeBuff,
  337.           LPMALLOC          lpMalloc );
  338.  
  339. /*
  340.  *  Creates a new directory container object (see ABCONT.C)
  341.  */
  342. HRESULT 
  343. HrNewSampDirectory( LPABCONT *          lppABC,
  344.                     ULONG *             lpulObjType,
  345.                     LPABLOGON           lpABPLogon,
  346.                     LPCIID              lpInterface,
  347.                     HINSTANCE           hLibrary,
  348.                     LPALLOCATEBUFFER    lpAllocBuff,
  349.                     LPALLOCATEMORE      lpAllocMore,
  350.                     LPFREEBUFFER        lpFreeBuff,
  351.                     LPMALLOC            lpMalloc );
  352.  
  353. /*
  354.  *  Creates the search object associated with the SampDirectory (see ABSEARCH.C)
  355.  */
  356. HRESULT
  357. HrNewSearch(LPMAPICONTAINER *   lppABSearch,
  358.             LPABLOGON           lpABLogon,
  359.             LPCIID              lpInterface,
  360.             HINSTANCE           hLibrary,
  361.             LPALLOCATEBUFFER    lpAllocBuff,
  362.             LPALLOCATEMORE      lpAllocMore,
  363.             LPFREEBUFFER        lpFreeBuff,
  364.             LPMALLOC            lpMalloc );
  365.  
  366. /*
  367.  *  Creates a new Mail User object  (see ABUSER.C)
  368.  */
  369. HRESULT
  370. HrNewSampUser(  LPMAILUSER *        lppMAPIPropEntry,
  371.                 ULONG *             lpulObjectType,
  372.                 ULONG               cbEntryID,
  373.                 LPENTRYID           lpEntryID,
  374.                 LPABLOGON           lpABPLogon,
  375.                 LPCIID              lpInterface,
  376.                 HINSTANCE           hLibrary,
  377.                 LPALLOCATEBUFFER    lpAllocBuff,
  378.                 LPALLOCATEMORE      lpAllocMore,
  379.                 LPFREEBUFFER        lpFreeBuff,
  380.                 LPMALLOC            lpMalloc );
  381.  
  382. /*
  383.  *  Creates a new one-off templateID object (see TID.C)
  384.  */
  385. HRESULT 
  386. HrNewOOTID( LPMAPIPROP *        lppMAPIPropNew,
  387.             ULONG               cbTemplateId,
  388.             LPENTRYID           lpTemplateId,
  389.             ULONG               ulTemplateFlags,
  390.             LPMAPIPROP          lpMAPIPropData,
  391.             LPABLOGON           lpABPLogon,
  392.             LPCIID              lpInterface,
  393.             HINSTANCE           hLibrary,
  394.             LPALLOCATEBUFFER    lpAllocBuff,
  395.             LPALLOCATEMORE      lpAllocMore,
  396.             LPFREEBUFFER        lpFreeBuff,
  397.             LPMALLOC            lpMalloc );
  398.  
  399. /*
  400.  *  Creates a new one-off mail user object (see OOUSER.C)
  401.  */
  402. HRESULT
  403. HrNewSampOOUser(LPMAILUSER *        lppMAPIPropEntry,
  404.                 ULONG *             lpulObjectType,
  405.                 ULONG               cbEntryID,
  406.                 LPENTRYID           lpEntryID,
  407.                 LPABLOGON           lpABPLogon,
  408.                 LPCIID              lpInterface,
  409.                 HINSTANCE           hLibrary,
  410.                 LPALLOCATEBUFFER    lpAllocBuff,
  411.                 LPALLOCATEMORE      lpAllocMore,
  412.                 LPFREEBUFFER        lpFreeBuff,
  413.                 LPMALLOC            lpMalloc );
  414.  
  415. /*
  416.  *  Creates a new status object for this provider (see STATUS.C)
  417.  */
  418. HRESULT 
  419. HrNewStatusObject(LPMAPISTATUS *    lppABS,
  420.                 ULONG *             lpulObjType,
  421.                 ULONG               ulFlags,
  422.                 LPABLOGON           lpABPLogon,
  423.                 LPCIID              lpInterface,
  424.                 HINSTANCE           hLibrary,
  425.                 LPALLOCATEBUFFER    lpAllocBuff,
  426.                 LPALLOCATEMORE      lpAllocMore,
  427.                 LPFREEBUFFER        lpFreeBuff,
  428.                 LPMALLOC            lpMalloc );
  429.  
  430. /*
  431.  * Creates a new templateID object that's associated with
  432.  * a SAB mailuser object.
  433.  */
  434. HRESULT
  435. HrNewTID (  LPMAPIPROP *        lppMAPIPropNew,
  436.             ULONG               cbTemplateId,
  437.             LPENTRYID           lpTemplateId,
  438.             ULONG               ulTemplateFlags,
  439.             LPMAPIPROP          lpMAPIPropData,
  440.             LPABLOGON           lpABPLogon,
  441.             LPCIID              lpInterface,
  442.             HINSTANCE           hLibrary,
  443.             LPALLOCATEBUFFER    lpAllocBuff,
  444.             LPALLOCATEMORE      lpAllocMore,
  445.             LPFREEBUFFER        lpFreeBuff,
  446.             LPMALLOC            lpMalloc );
  447.  
  448.  
  449. /*
  450.  *  Creates a new contents table object
  451.  */
  452. HRESULT
  453. HrNewIVTAbc (LPMAPITABLE *      lppIVTAbc,
  454.              LPABLOGON          lpABLogon,
  455.              LPABCONT           lpABC,
  456.              HINSTANCE          hLibrary,
  457.              LPALLOCATEBUFFER   lpAllocBuff,
  458.              LPALLOCATEMORE     lpAllocMore,
  459.              LPFREEBUFFER       lpFreeBuff,
  460.              LPMALLOC           lpMalloc );
  461.  
  462. /*
  463.  *  Creates/Updates the SAB's root hierarchy
  464.  */
  465. HRESULT
  466. HrBuildRootHier(LPABLOGON lpABLogon, LPMAPITABLE * lppMAPITable);
  467.  
  468.  
  469. /*
  470.  *  Sets an error string associated with a particular hResult on an object.
  471.  *  It's used in conjunction with the method GetLastError.
  472.  */
  473. VOID SetErrorIDS (LPVOID lpObject, HRESULT hResult, UINT ids);
  474.  
  475.  
  476. /*
  477.  *  Loads a string from a resource.  Optionally allocates room for the string
  478.  *  if lpAllocBuff is not NULL.  See ABP.C.
  479.  */
  480. SCODE ScLoadString( UINT                ids,
  481.                     ULONG               ulcch,
  482.                     LPALLOCATEBUFFER    lpAllocBuff,
  483.                     HINSTANCE           hLibrary,
  484.                     LPSTR *             lppsz);
  485.  
  486. /*
  487.  *  The sample ABPs MAPIUID
  488.  *
  489.  *  This MAPIUID must be unique (see the Service Provider Writer's Guide on
  490.  *  Constructing Entry IDs)
  491.  */
  492. #define MUIDABSAMPLE {0x81,0x2b,0x1f,0x40,0xbe,0xa3,0x10,0x19,0x9d,0x6e,0x00,0xdd,0x01,0x0f,0x54,0x02}
  493.  
  494. #define SZEMAILTYPE                         "MSPEER"
  495. #define MAX_DISPLAY_NAME                    45
  496.  
  497. /*
  498.  *  Browse record
  499.  *
  500.  *  The .SAB files are made up of the following records.
  501.  */
  502.  
  503. #define MAX_NAME_SIZE   30
  504. #define MAX_EMA_SIZE    50
  505.  
  506. #pragma pack(4)
  507. typedef struct _ABCREC
  508. {
  509.  
  510.     char rgchDisplayName[MAX_NAME_SIZE + 1];
  511.     char rgchEmailAddress[MAX_EMA_SIZE + 1];
  512.  
  513. } ABCREC, *LPABCREC;
  514. #pragma pack()
  515.  
  516. /*
  517.  *  Defines of various entryid types
  518.  */
  519. #define SAMP_DIRECTORY  0x00000000
  520. #define SAMP_USER       0x00000001
  521. #define SAMP_UNKNOWN    0x00000002
  522. #define SAMP_OOUSER     0x00000003
  523.  
  524. /*
  525.  *  The version of this ABPs entryids
  526.  */
  527. #define SAMP_VERSION    0x000000002
  528.  
  529. /*
  530.  *  Directory entry id structure
  531.  *
  532.  *  This entryid is permanent.
  533.  */
  534. typedef struct _dir_entryid
  535. {
  536.  
  537.     BYTE abFlags[4];
  538.     MAPIUID muid;
  539.     ULONG ulVersion;
  540.     ULONG ulType;
  541.     MAPIUID muidID;
  542.  
  543. } DIR_ENTRYID, *LPDIR_ENTRYID;
  544.  
  545. /*
  546.  *  Mail user entry id structure
  547.  *
  548.  *  This entryid is permanent.
  549.  */
  550. #pragma pack(4)
  551. typedef struct _usr_entryid
  552. {
  553.  
  554.     BYTE abFlags[4];
  555.     MAPIUID muid;
  556.     ULONG ulVersion;
  557.     ULONG ulType;
  558.     ABCREC abcrec;
  559.  
  560. } USR_ENTRYID, *LPUSR_ENTRYID;
  561. #pragma pack()
  562.  
  563. /*
  564.  *  One off user entry id structure
  565.  *
  566.  *  This entryid is permanent.
  567.  */
  568. typedef struct _oousr_entryid
  569. {
  570.     BYTE abFlags[4];
  571.     MAPIUID muid;
  572.     ULONG ulVersion;
  573.     ULONG ulType;
  574.  
  575. } OOUSR_ENTRYID, *LPOOUSR_ENTRYID;
  576.  
  577.  
  578. /*
  579.  *  Externs used throughout various modules within this provider.
  580.  *  They actually get defined in abp.c
  581.  */
  582.  
  583. extern LCID lcidUser;
  584.  
  585. extern MAPIUID muidABSample;
  586.  
  587. extern MAPIUID muidSABProviderID;
  588.  
  589. extern DTBLLABEL dtbllabel;
  590.  
  591. extern DTBLPAGE dtblpage;
  592.  
  593. extern DTBLGROUPBOX dtblgroupbox;
  594.  
  595. extern CHAR szNoFilter[];
  596.  
  597. extern LPSTR lpszEMT;
  598.  
  599. extern CHAR szAddrTypeFilter[];
  600.  
  601. extern CHAR szFileNameFilter[];
  602.  
  603. #define PR_LISTBOX_TABLE                PROP_TAG(PT_OBJECT,0x6605)
  604. #define PR_COMBOBOX_TABLE               PROP_TAG(PT_OBJECT,0x6607)
  605. #define PR_DDLISTBOX_TABLE              PROP_TAG(PT_OBJECT,0x6609)
  606.  
  607.  
  608. /*
  609.  *  Properties defined for our one-off entry
  610.  */
  611. #define     PR_SERVER_NAME              PROP_TAG(PT_TSTRING,0x660b)
  612. #define     PR_SHARE_NAME               PROP_TAG(PT_TSTRING,0x660c)
  613. #define     PR_PATH_NAME                PROP_TAG(PT_TSTRING,0x660d)
  614.  
  615. #define MAX_SERVER_NAME                 15
  616. #define MAX_SHARE_NAME                  12
  617.  
  618. /*
  619.  *  MACROs for Win16
  620.  */
  621.  
  622. #ifdef WIN16
  623.  
  624.  
  625. #define lstrcatA        lstrcat
  626. #define wsprintfA       wsprintf
  627. #define CharUpperBuffA  CharUpperBuff
  628.  
  629. #endif /*WIN16*/
  630.