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.

45 lines
2.3 KiB

  1. /******************************************************************************
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. SvcUtils.h
  5. Abstract:
  6. This file contains the declaration of various utility functions.
  7. Revision History:
  8. Davide Massarenti (Dmassare) 04/26/2000
  9. created
  10. ******************************************************************************/
  11. #if !defined(__INCLUDED___PCH___SVCUTILS_H___)
  12. #define __INCLUDED___PCH___SVCUTILS_H___
  13. #include <MPC_streams.h>
  14. #include <MPC_security.h>
  15. namespace SVC
  16. {
  17. HRESULT OpenStreamForRead ( /*[in]*/ LPCWSTR szFile, /*[out]*/ IStream* *pVal, /*[in]*/ bool fDeleteOnRelease = false );
  18. HRESULT OpenStreamForWrite( /*[in]*/ LPCWSTR szFile, /*[out]*/ IStream* *pVal, /*[in]*/ bool fDeleteOnRelease = false );
  19. HRESULT CopyFileWhileImpersonating ( /*[in]*/ LPCWSTR szSrc , /*[in]*/ LPCWSTR szDst, /*[in]*/ MPC::Impersonation& imp, /*[in]*/ bool fImpersonateForSource = true );
  20. HRESULT CopyOrExtractFileWhileImpersonating( /*[in]*/ LPCWSTR szSrc , /*[in]*/ LPCWSTR szDst, /*[in]*/ MPC::Impersonation& imp );
  21. HRESULT LocateDataArchive( /*[in]*/ LPCWSTR szDir, /*[out]*/ MPC::WStringList& lst );
  22. HRESULT RemoveAndRecreateDirectory( /*[in]*/ const MPC::wstring& strDir, /*[in]*/ LPCWSTR szExtra, /*[in]*/ bool fRemove, /*[in]*/ bool fRecreate );
  23. HRESULT RemoveAndRecreateDirectory( /*[in]*/ LPCWSTR szDir, /*[in]*/ LPCWSTR szExtra, /*[in]*/ bool fRemove, /*[in]*/ bool fRecreate );
  24. HRESULT ChangeSD( /*[in]*/ MPC::SecurityDescriptor& sdd, /*[in]*/ MPC::wstring strPath, /*[in]*/ LPCWSTR szExtra = NULL );
  25. ////////////////////////////////////////////////////////////////////////////////
  26. HRESULT SafeLoad ( /*[in]*/ const MPC::wstring& strFile, /*[in]*/ CComPtr<MPC::FileStream>& stream, /*[in]*/ DWORD dwTimeout = 100, /*[in]*/ DWORD dwRetries = 2 );
  27. HRESULT SafeSave_Init ( /*[in]*/ const MPC::wstring& strFile, /*[in]*/ CComPtr<MPC::FileStream>& stream, /*[in]*/ DWORD dwTimeout = 100, /*[in]*/ DWORD dwRetries = 2 );
  28. HRESULT SafeSave_Finalize( /*[in]*/ const MPC::wstring& strFile, /*[in]*/ CComPtr<MPC::FileStream>& stream, /*[in]*/ DWORD dwTimeout = 100, /*[in]*/ DWORD dwRetries = 2 );
  29. };
  30. #endif // !defined(__INCLUDED___PCH___SVCUTILS_H___)