home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / newpst.h < prev    next >
C/C++ Source or Header  |  1998-04-25  |  3KB  |  81 lines

  1. // --newpst.h-----------------------------------------------------------------
  2. //
  3. // Header file for the newpst library.
  4. //
  5. // Copyright 1986 - 1998 Microsoft Corporation.  All rights reserved.
  6. //
  7. //-----------------------------------------------------------------------------
  8.  
  9. #ifndef    _NEWPST_H
  10. #define _NEWPST_H
  11.  
  12. #ifdef  __cplusplus
  13. extern "C" {
  14. #endif
  15.  
  16. // $--HrCreatePersonalStore----------------------------------------------------------
  17. //
  18. // DESCRIPTION: Create a New PST with properties determined by the input
  19. //                parameters in a temporary profile.  The name and password
  20. //                of the temporary PST are returned to the user.
  21. //
  22. // INPUT:
  23. //
  24. //    [lpszPSTPath]            -- Value for PR_PST_PATH (new PST path).
  25. //    [dwEncryption]            -- Value for PR_PST_ENCRYPTION (TBS).
  26. //    [lpszPSTDisplayName]    -- Value for PR_DISPLAY_NAME (new PST display name).
  27. //    [lpszPSTPassword]        -- Value for PR_PST_PW_SZ_NEW (new PST password,
  28. //                               NULL not accepted).
  29. //
  30. // OUTPUT:
  31. //
  32. //    [lppszProfileName]        -- Ptr that will be set to point at temporary
  33. //                               profile name on return; this may be used to
  34. //                               establish a MAPI session.
  35. //    [lppszProfilePassword]    -- Ptr that will be set to point at temporary
  36. //                               profile password on return; this may be used to
  37. //                               establish a MAPI session.
  38. //
  39. // RETURNS:     NOERROR on success,
  40. //              E_INVALIDARG if bad input,
  41. //              E_ACCESSDENIED if can't access profile,
  42. //              E_FAIL if general failure
  43. //
  44. // Notes:        Successive calls to CreateNewPST() should not be made without
  45. //                intervening calls to NewPSTCleanup().  Due to use of internal
  46. //                static storage for objects and profile strings, only one new
  47. //                PST may be created and used at a time.
  48. //
  49. //---------------------------------------------------------------------------
  50.  
  51. HRESULT HrCreatePersonalStore(                         // RETURNS: HRESULT
  52.     IN    LPSTR    lpszPSTPath,            // PST fully-pathed file name
  53.     IN    DWORD    dwEncryption,           // encryption method
  54.     IN    LPSTR    lpszPSTDisplayName,     // PR_DISPLAY_NAME value
  55.     IN    LPSTR    lpszPSTPassword,        // PST password
  56.     OUT    LPSTR *    lppszProfileName,       // Temporary profile name
  57.     OUT    LPSTR *    lppszProfilePassword    // Temporary profile password
  58.     );
  59.  
  60. // $--HrCleanupPSTGlobals---------------------------------------------------------
  61. //
  62. // DESCRIPTION: Release objects involved in creation of a new PST.
  63. //
  64. // INPUT:       temporary profile name
  65. //
  66. // RETURNS:     NOERROR on success
  67. //              E_FAIL on failure
  68. //
  69. // Notes:        This should be called after Logoff() and Release() are called
  70. //                for the LPSESSION and before MAPIUninitialize() is called.
  71. //---------------------------------------------------------------------------
  72.  
  73. HRESULT HrCleanupPSTGlobals(         // RETURNS: HRESULT
  74.         IN LPSTR lpszProfileName);  // temporary profile name
  75.  
  76. #ifdef  __cplusplus
  77. }       /*  extern "C" */
  78. #endif
  79.  
  80. #endif    // _NEWPST_H
  81.